.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7,7,7,0.94);
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.12));
  color: var(--text, rgba(255,255,255,0.94));
}

.site-nav__inner {
  width: min(1120px, calc(100% - 2rem));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  color: var(--text, rgba(255,255,255,0.94));
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex: 0 0 auto;
}

.site-brand em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  color: var(--muted, var(--text-muted, rgba(255,255,255,0.68)));
  font-weight: 400;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
  color: var(--muted, var(--text-muted, rgba(255,255,255,0.68)));
  font-size: 0.92rem;
}

.site-nav__links a {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease, opacity 180ms ease;
}

.site-nav__links a:hover,
.site-nav__links a:focus-visible {
  color: var(--text, rgba(255,255,255,0.94));
}

.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
}

.site-nav__icons {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  color: var(--muted, var(--text-muted, rgba(255,255,255,0.68)));
}

.site-nav__icons a,
.language-switcher__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.site-nav__icons a {
  width: 42px;
  height: 42px;
}

.site-nav__icons a:hover,
.site-nav__icons a:focus-visible,
.language-switcher__button:hover,
.language-switcher__button:focus-visible {
  color: var(--text, rgba(255,255,255,0.94));
  background: rgba(255,255,255,0.07);
}

.site-nav__icon-link--whatsapp:hover,
.site-nav__icon-link--whatsapp:focus-visible {
  color: #25d366;
}

.language-switcher {
  position: relative;
  flex: 0 0 auto;
}

.language-switcher__button {
  gap: 0.35rem;
  min-width: 74px;
  height: 40px;
  padding: 0 0.55rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.045);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.language-switcher.is-open .language-switcher__button {
  background: rgba(255,255,255,0.075);
  border-color: rgba(255,255,255,0.22);
  color: var(--text, rgba(255,255,255,0.94));
}

.language-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  height: 16px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12);
}

.language-flag img {
  display: block;
  width: 24px;
  height: 16px;
  object-fit: cover;
}

.language-switcher__current {
  min-width: 1.35rem;
  text-align: left;
}

.language-switcher__chevron {
  width: 12px;
  height: 12px;
  color: var(--muted, var(--text-muted, rgba(255,255,255,0.68)));
  transition: transform 180ms ease, color 180ms ease;
}

.language-switcher.is-open .language-switcher__chevron {
  transform: rotate(180deg);
  color: var(--text, rgba(255,255,255,0.94));
}

.language-switcher__menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 150;
  min-width: 96px;
  padding: 0.35rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  background: #0a0a0a;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.language-switcher.is-open .language-switcher__menu,
.language-switcher:focus-within .language-switcher__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.language-switcher__option {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.45rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted, var(--text-muted, rgba(255,255,255,0.68)));
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  text-align: left;
  transition: background 180ms ease, color 180ms ease;
}

.language-switcher__option:hover,
.language-switcher__option:focus-visible,
.language-switcher__option.is-active {
  background: rgba(255,255,255,0.08);
  color: var(--text, rgba(255,255,255,0.94));
}

.language-switcher__code {
  min-width: 1.35rem;
}

.site-nav__book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.68rem 1.1rem;
  border-radius: 999px;
  background: var(--text, rgba(255,255,255,0.94));
  color: var(--bg, #070707);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1;
  white-space: nowrap;
  transition: transform 180ms ease, background 180ms ease;
}

.site-nav__book:hover,
.site-nav__book:focus-visible {
  background: rgba(255,255,255,0.86);
  transform: translateY(-1px);
}

.site-nav__icons a:focus-visible,
.language-switcher__button:focus-visible,
.language-switcher__option:focus-visible,
.site-nav__book:focus-visible {
  outline: 2px solid var(--accent, var(--accent-warm, #d6a04b));
  outline-offset: 2px;
}

@media (max-width: 980px) {
  .site-nav__links {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-nav__inner {
    width: min(100% - 1rem, 1120px);
    gap: 0.45rem;
    min-height: 68px;
  }

  .site-brand {
    font-size: 1.04rem;
  }

  .site-nav__actions {
    gap: 0.3rem;
  }

  .site-nav__icons {
    gap: 0;
  }

  .site-nav__icons a {
    width: 36px;
    height: 36px;
  }

  .language-switcher__button {
    min-width: 40px;
    height: 36px;
    padding: 0 0.35rem;
  }

  .language-switcher__current,
  .language-switcher__chevron {
    display: none;
  }

  .site-nav__book {
    min-height: 36px;
    padding: 0.58rem 0.78rem;
    font-size: 0.84rem;
  }
}

@media (max-width: 390px) {
  .site-brand {
    font-size: 0.98rem;
  }

  .site-nav__icons a {
    width: 34px;
  }

  .site-nav__book {
    padding: 0.56rem 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav *,
  .site-nav *::before,
  .site-nav *::after {
    transition-duration: 0.01ms !important;
  }
}
