/* ==========================================================================
   NAVIGATION COMPONENT STYLES - EUROVISION 2027 OFFICIAL BROADCAST STYLE
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--euro-spectrum);
  opacity: 0.85;
}

.site-header.scrolled {
  border-bottom-color: var(--border-medium);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

/* Brand Group: Logo + Dynamic Breadcrumbs */
.header-brand-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex-shrink: 0;
}

/* Brand Logo: Combined Heart Emblem + Official Text Logo */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 700;
  padding: 0.35rem 0.25rem;
  flex-shrink: 0;
  transition: opacity var(--transition-fast);
}

.brand-logo:hover {
  text-decoration: none;
  opacity: 0.92;
}

.brand-logo-heart {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.brand-logo:hover .brand-logo-heart {
  transform: scale(1.06);
}

.brand-logo-text {
  height: 34px;
  width: auto;
  max-width: 145px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.brand-logo-heart.logo-blue,
.brand-logo-text.logo-blue {
  display: block;
}

.brand-logo-heart.logo-white,
.brand-logo-text.logo-white {
  display: none;
}


.logo-symbol {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--euro-spectrum);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-display);
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(210, 13, 85, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-family: var(--font-family-mono);
  font-weight: 700;
}

/* Navigation Links */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 1.1vw, 1.25rem);
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.nav-link {
  color: var(--text-muted);
  font-size: clamp(0.78rem, 0.88vw, 0.875rem);
  font-weight: 600;
  text-decoration: none;
  padding: 0.4rem 0.25rem;
  position: relative;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--euro-accent-start);
  text-decoration: none;
}

.nav-link[aria-current="page"] {
  color: var(--text-main);
  font-weight: 700;
}

.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--euro-spectrum);
  border-radius: 1px;
}

/* Header Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  z-index: 1001;
}

.mobile-nav-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.mobile-nav-footer {
  display: none;
}

/* 36px passes WCAG 2.5.8 but is under every platform guideline, and this is the
   primary navigation control on a phone. Same pseudo-element trick as .tz-pill:
   the visible button is unchanged, the touch target is 44px. */
.mobile-nav-toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
}

/* Mobile Navigation Drawer */
@media (max-width: 1080px) {
  .mobile-nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 66px;
    left: 0;
    width: 100%;
    height: calc(100vh - 66px);
    background: var(--bg-surface);
    padding: var(--space-xl) var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    /* See the note on .lang-dropdown-menu: the drawer holds the same nine
       language names, so visibility:hidden made every page pay for them. */
    display: none;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-normal), opacity var(--transition-normal),
                display var(--transition-normal) allow-discrete;
    overflow-y: auto;
    border-bottom: 1px solid var(--border-subtle);
  }

  .main-nav.is-open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  @starting-style {
    .main-nav.is-open {
      transform: translateY(-100%);
      opacity: 0;
    }
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
  }

  .nav-link {
    font-size: 1.15rem;
    padding: 0.6rem 0;
    display: block;
    width: 100%;
    border-bottom: 1px solid var(--border-subtle);
  }

  .mobile-nav-footer {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: auto;
    padding-top: var(--space-xl);
    width: 100%;
  }
}

/* ==========================================================================
   LANGUAGE SWITCHER COMPONENT STYLES
   ========================================================================== */

.lang-dropdown {
  position: relative;
  display: inline-block;
}

.lang-dropdown-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.38rem 0.6rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--font-size-xs);
  font-weight: 700;
  cursor: pointer;
  height: 36px;
  box-sizing: border-box;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
  user-select: none;
}

.lang-dropdown-btn:hover {
  border-color: var(--border-strong);
  color: var(--euro-accent-start);
}

.lang-flag {
  font-size: 1.05rem;
  line-height: 1;
  display: inline-block;
}

.lang-code {
  letter-spacing: 0.04em;
  font-family: var(--font-family-mono);
  font-size: 0.8rem;
}

.lang-chevron {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
  stroke: currentColor;
}

.lang-dropdown.is-open .lang-chevron {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 190px;
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* display:none, not visibility:hidden. A visibility:hidden subtree is still
     laid out, so the browser shaped "Čeština" and "Українська" in here and
     fetched the latin-ext and cyrillic subsets on every page - 44 KB for text
     nobody could see. allow-discrete keeps the fade where it is supported and
     degrades to an instant open where it is not. */
  display: none;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast),
              display var(--transition-fast) allow-discrete;
  z-index: 1005;
}

.lang-dropdown.is-open .lang-dropdown-menu {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@starting-style {
  .lang-dropdown.is-open .lang-dropdown-menu {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.lang-option:hover {
  background: var(--euro-spectrum-subtle);
  color: var(--text-main);
  text-decoration: none;
}

.lang-option-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-option-name {
  white-space: nowrap;
}

.lang-option.active {
  background: var(--euro-spectrum-subtle);
  color: var(--euro-accent-start);
  font-weight: 700;
}

.lang-check {
  font-size: 0.75rem;
  color: var(--euro-accent-start);
  font-weight: 800;
}

/* Mobile Language Selector Grid in Drawer */
.mobile-lang-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.mobile-lang-title {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.mobile-lang-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
}

.mobile-lang-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.2rem;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.mobile-lang-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-main);
  text-decoration: none;
}

.mobile-lang-btn.active {
  border-color: var(--euro-accent-start);
  background: var(--euro-spectrum-subtle);
  color: var(--text-main);
  font-weight: 700;
}

