/* ===================================================================
   IPTV Nordic — Header & Footer
   ================================================================ */

/* Reset legacy nav styles that conflict (current main.css has .main-nav) */
.site-header * { box-sizing: border-box; }

/* === SITE HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Logo */
.logo-link {
  text-decoration: none;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: inline-flex;
  gap: 0.3rem;
}

.logo-iptv { color: #1976d2; }
.logo-nordic { color: #1f2937; }

/* Desktop Nav — hard reset legacy .main-nav from main.css */
.site-header .main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  background: none;
  position: static;
  top: auto;
  z-index: auto;
  padding: 0;
  margin: 0;
  border: none;
  box-shadow: none;
  height: auto;
  width: auto;
}

.site-header .nav-list {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-header .nav-item {
  position: relative;
}

.site-header .nav-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 1rem;
  color: #1f2937;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}

.site-header .nav-link:hover {
  color: #1976d2;
  background: rgba(25, 118, 210, 0.06);
}

.site-header .nav-link.is-active {
  color: #1976d2;
  background: rgba(25, 118, 210, 0.1);
}

.site-header .nav-link-disabled {
  color: #9ca3af;
  cursor: not-allowed;
}

.site-header .nav-link-disabled:hover {
  color: #9ca3af;
  background: none;
}

/* Dropdown Arrow */
.dropdown-arrow {
  transition: transform 0.25s ease;
}

.site-header .nav-item.has-dropdown:hover .dropdown-arrow,
.site-header .nav-item.has-dropdown:focus-within .dropdown-arrow {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.site-header .dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 240px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  padding: 0.5rem;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.04);
  display: block;
}

.site-header .dropdown-menu-wide {
  min-width: 280px;
}

.site-header .nav-item.has-dropdown:hover .dropdown-menu,
.site-header .nav-item.has-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.site-header .dropdown-menu li {
  margin: 0;
  padding: 0;
}

.site-header .dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  color: #374151;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s ease;
  background: none;
}

.site-header .dropdown-menu li a:hover {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  color: #1976d2;
  transform: translateX(2px);
}

.site-header .menu-icon {
  font-size: 1.1rem;
  width: 20px;
  display: inline-block;
  text-align: center;
  flex-shrink: 0;
}

.site-header .menu-featured {
  margin-bottom: 0.25rem;
}

.site-header .menu-featured a {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%) !important;
  color: white !important;
}

.site-header .menu-featured a:hover {
  transform: translateX(0);
  filter: brightness(1.05);
}

.site-header .menu-featured a strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.2;
}

.site-header .menu-featured a small {
  display: block;
  font-size: 0.78rem;
  opacity: 0.85;
  font-weight: 400;
  margin-top: 2px;
}

.site-header .menu-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 0.4rem 0.5rem;
  list-style: none;
  padding: 0;
}

/* Header CTA Button */
.header-cta-button {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.4rem;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: white !important;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
  transition: all 0.2s ease;
  flex-shrink: 0;
  border: none;
}

.header-cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.35);
  color: white !important;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.hamburger-line {
  width: 24px;
  height: 2.5px;
  background: #1f2937;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-toggle.is-open .hamburger-line:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.mobile-toggle.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.is-open .hamburger-line:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  overflow-y: auto;
  padding: 1.5rem;
  z-index: 9999;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu.is-open {
  display: block;
}

.mobile-toggle {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-toggle {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-link {
  display: block;
  padding: 1rem;
  color: #1f2937;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-nav-link.disabled {
  color: #9ca3af;
}

.mobile-nav-link.is-active {
  color: #1976d2;
  background: rgba(25, 118, 210, 0.06);
  border-radius: 6px;
}

.mobile-nav-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  color: #1f2937;
  font-size: 1.05rem;
  font-weight: 600;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  font-family: inherit;
}

.mobile-nav-toggle .arrow {
  font-size: 0.75rem;
  transition: transform 0.25s ease;
}

.mobile-nav-toggle.is-open .arrow {
  transform: rotate(180deg);
}

.mobile-submenu {
  display: none;
  list-style: none;
  padding: 0.5rem 0 0.5rem 1rem;
  margin: 0;
  background: #f9fafb;
}

.mobile-submenu.is-open {
  display: block;
}

.mobile-submenu li {
  margin: 0;
}

.mobile-submenu li a {
  display: block;
  padding: 0.75rem 1rem;
  color: #4b5563;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 6px;
}

.mobile-submenu li a:hover,
.mobile-submenu li a.is-active {
  background: rgba(25, 118, 210, 0.08);
  color: #1976d2;
}

.mobile-cta {
  margin-top: 1.5rem;
  padding: 0;
  border-bottom: none !important;
}

.mobile-cta-button {
  display: block;
  text-align: center;
  padding: 1rem;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: white !important;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 10px;
}

/* Responsive */
@media (max-width: 1024px) {
  .site-header .main-nav,
  .header-cta-button {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .header-container {
    height: 64px;
  }

  .mobile-menu {
    top: 64px;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0 1rem;
  }

  .logo-text {
    font-size: 1.25rem;
  }
}

/* ===================================================================
   FOOTER ENHANCEMENTS
   ================================================================ */

.main-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 4rem 1.5rem 2rem;
  margin-top: 4rem;
}

.main-footer .footer-container {
  max-width: 1280px;
  margin: 0 auto;
}

.main-footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 3rem 2rem;
}

.main-footer .footer-col h4 {
  color: white;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
  letter-spacing: 0.02em;
}

.main-footer .footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-footer .footer-col li {
  margin-bottom: 0.6rem;
}

.main-footer .footer-col a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: inline-block;
}

.main-footer .footer-col a:hover {
  color: #60a5fa;
  transform: translateX(2px);
}

.main-footer .footer-about p {
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 0.75rem;
}

.main-footer .footer-contact-box {
  background: rgba(96, 165, 250, 0.05);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.1);
}

.main-footer .footer-contact-box h4 {
  margin-bottom: 0.5rem;
}

.main-footer .footer-contact-box p {
  font-size: 0.88rem;
  margin: 0 0 1rem;
  color: #cbd5e1;
}

.main-footer .btn-contact {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.1rem;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white !important;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.main-footer .btn-contact:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  color: white !important;
}

.main-footer .footer-bottom {
  max-width: 1280px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  text-align: center;
}

.main-footer .footer-legal {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
}

.main-footer .footer-legal a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s ease;
}

.main-footer .footer-legal a:hover {
  color: #60a5fa;
}

.main-footer .copyright {
  color: #64748b;
  font-size: 0.85rem;
  margin: 0;
}

@media (max-width: 600px) {
  .main-footer {
    padding: 3rem 1rem 1.5rem;
  }

  .main-footer .footer-grid {
    gap: 2rem 1.5rem;
  }

  .main-footer .footer-legal {
    gap: 0.5rem 1rem;
  }
}
