/* ============================================
   SECTION 0 — HEADER
   Sticky | Scroll blur | Mobile hamburger
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: var(--iptv-navy);
  border-bottom: 1px solid var(--iptv-border);
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
  padding-top: env(safe-area-inset-top);
}

/* Scroll effect — added via JS */
.site-header.scrolled {
  background: rgba(12, 18, 32, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* LOGO */
.header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.site-logo-svg {
  display: block;
  height: 44px;
  width: auto;
}
@media (max-width: 900px) {
  .site-logo-svg { height: 36px; }
}

/* DESKTOP NAV */
.header-nav ul {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--iptv-muted);
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--iptv-cyan);
  transition: width 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--iptv-cyan);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* CTA BUTTON */
.header-cta {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #000000;
  background: #F5C518;
  border-radius: 4px;
  padding: 10px 22px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

@media (hover: hover) {
  .header-cta:hover { opacity: 0.88; transform: translateY(-1px); }
}

/* HAMBURGER — min 44×44px tap target (Apple HIG / WCAG 2.5.5) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 11px;
  width: 44px;
  height: 44px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--iptv-white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger open state */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* MOBILE MENU */
.mobile-menu {
  display: none;
  background: linear-gradient(180deg, #0D1526 0%, #07090F 100%);
  border-top: 2px solid var(--iptv-cyan);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), inset 0 0 80px rgba(0,212,255,0.025);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.mobile-menu.open {
  max-height: 640px;
  padding: 8px 0 84px;
}

.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 16px;
}

.mobile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--iptv-muted);
  text-decoration: none;
  min-height: 52px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(28,42,58,0.5);
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.mobile-link::after {
  content: '›';
  font-size: 24px;
  line-height: 1;
  color: var(--iptv-cyan);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s, transform 0.2s;
}

.mobile-link.active {
  color: var(--iptv-white);
  border-left-color: var(--iptv-cyan);
  background: rgba(0,212,255,0.07);
}

.mobile-link.active::after {
  opacity: 1;
  transform: translateX(0);
}

/* Kontakt — always cyan, feels like a secondary CTA */
.mobile-link[href*="kontakt"] {
  color: var(--iptv-cyan);
  font-weight: 700;
}

.mobile-link[href*="kontakt"]::after {
  opacity: 0.5;
  transform: translateX(0);
}

@media (hover: hover) {
  .mobile-link:hover {
    color: var(--iptv-white);
    border-left-color: var(--iptv-cyan);
    background: rgba(0,212,255,0.06);
  }
  .mobile-link:hover::after {
    opacity: 1;
    transform: translateX(0);
  }
}

.mobile-cta {
  display: block;
  margin-top: 18px;
  text-align: center;
  text-decoration: none;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .header-nav,
  .header-cta { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: block; }
  .header-inner { padding: 0 20px; }
}

/* ── STICKY MOBILE CTA BAR ── */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9998;
  background: var(--iptv-navy);
  border-top: 2px solid rgba(245,197,24,0.4);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-cta-bar.visible {
  transform: translateY(0);
}

.mobile-cta-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.mobile-cta-bar-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--iptv-muted);
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mobile-cta-bar-text strong {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 17px;
  text-transform: uppercase;
  color: var(--iptv-white);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.mobile-cta-bar-btn {
  flex: 0 0 auto;
  width: auto !important;
  min-height: 48px;
  font-size: 17px !important;
  padding: 13px 24px;
  white-space: nowrap;
  text-align: center;
}

/* Pulse animation — fires 3x when bar first slides in, grabs attention */
@keyframes ctaBarPulse {
  0%   { box-shadow: 0 0 0 0 rgba(245,197,24,0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(245,197,24,0); }
  100% { box-shadow: 0 0 0 0 rgba(245,197,24,0); }
}
.mobile-cta-bar.visible .mobile-cta-bar-btn {
  animation: ctaBarPulse 1.4s ease-out 0.3s 3;
}

@media (max-width: 900px) {
  .mobile-cta-bar { display: block; }
}
