/**
 * Единая тёмная шапка (.topbar) на всех внутренних страницах — как на главной-лендинге АУ.
 * .nav-mobile и backdrop — сiblings header (вне .topbar из-за backdrop-filter).
 */

.site-header.topbar {
  position: sticky;
  top: 0;
  z-index: 9990;
  background: rgba(7, 21, 38, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: none;
}

html.admin-bar .site-header.topbar {
  top: 32px;
}

@media screen and (max-width: 782px) {
  html.admin-bar .site-header.topbar {
    top: 46px;
  }
}

.site-header.topbar.scrolled {
  background: rgba(7, 21, 38, 0.96);
  box-shadow: 0 10px 32px rgba(7, 21, 38, 0.35);
  border-bottom-color: rgba(212, 175, 55, 0.25);
}

.site-header.topbar .header-inner,
.site-header.topbar .topbar__inner {
  justify-content: flex-start;
  gap: 1rem;
}

.site-header.topbar .logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-right: auto;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}

.site-header.topbar .logo__mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #071526;
  background: linear-gradient(145deg, #d4af37, #a67c0f);
}

.site-header.topbar .logo__text {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
}

.site-header.topbar .topbar__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.65rem, 1.6vw, 1.35rem);
  flex: 1 1 auto;
  min-width: 0;
}

.site-header.topbar .topbar__nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.65rem, 1.6vw, 1.35rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.site-header.topbar .topbar__nav a,
.site-header.topbar .topbar__nav-menu a {
  color: #fff;
  text-decoration: none;
  font-size: clamp(0.78rem, 1.1vw, 0.92rem);
  font-weight: 500;
  white-space: nowrap;
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.site-header.topbar .topbar__nav a:hover,
.site-header.topbar .topbar__nav a:focus-visible,
.site-header.topbar .topbar__nav-menu a:hover,
.site-header.topbar .topbar__nav-menu a:focus-visible {
  color: #d4af37;
  opacity: 1;
}

.site-header.topbar .topbar__phone,
.site-header.topbar .phone-link {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.site-header.topbar .topbar__phone:hover,
.site-header.topbar .phone-link:hover {
  color: #d4af37;
  text-decoration: none;
}

.site-header.topbar .btn--gold,
.site-header.topbar .header-cta-mobile {
  color: #071526;
  background: linear-gradient(145deg, #e2c56a, #c49a1a);
  box-shadow: 0 10px 28px rgba(196, 154, 26, 0.35);
  border: 1px solid transparent;
  white-space: nowrap;
}

.site-header.topbar .btn--gold:hover,
.site-header.topbar .header-cta-mobile:hover {
  filter: brightness(1.05);
}

/* Бургер — как на лендинге */
.burger {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  color: inherit;
  border: 0;
}

.burger span {
  background: #fff;
}

/* Мобильный drawer — тёмный, как .topbar-mobile на лендинге (вне header) */
.nav-mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1098;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.nav-mobile-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-mobile {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1099;
  width: min(100%, 320px);
  height: 100svh;
  padding: 5rem 1.25rem 1.5rem;
  background: #071526;
  color: #fff;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
}

.nav-mobile.is-open {
  transform: translateX(0);
}

.nav-mobile .topbar__nav-menu {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-mobile .topbar__nav-menu li,
.nav-mobile > a {
  width: 100%;
}

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

.nav-mobile a:hover,
.nav-mobile a:focus-visible {
  color: #d4af37;
}

.nav-mobile .header-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  margin-top: 1.25rem;
  padding-top: 0.5rem;
}

.nav-mobile .header-actions .phone-link {
  color: #fff;
  text-align: center;
  font-weight: 600;
  border-bottom: none;
  padding: 0;
}

.nav-mobile .header-actions .btn--gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  color: #071526;
  background: linear-gradient(145deg, #e2c56a, #c49a1a);
  box-shadow: 0 10px 28px rgba(196, 154, 26, 0.35);
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  border-bottom: none;
}

@media (max-width: 900px) {
  .site-header.topbar .desktop-only {
    display: none !important;
  }

  .site-header.topbar .topbar__nav.nav-desktop {
    display: none !important;
  }

  .site-header.topbar .logo {
    flex: 1 1 auto;
    min-width: 0;
  }

  .site-header.topbar .logo__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-header.topbar .header-inner,
  .site-header.topbar .topbar__inner {
    gap: 0.5rem;
    overflow: hidden;
  }

  .site-header.topbar .header-cta-mobile {
    display: inline-flex !important;
    flex-shrink: 0;
    max-width: 5.75rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.72rem;
    line-height: 1.15;
    white-space: normal;
    text-align: center;
  }

  .burger {
    display: flex !important;
  }
}

@media (min-width: 768px) {
  .site-header.topbar .topbar__phone.desktop-only {
    display: inline-flex;
    margin-left: 0.25rem;
  }

  .site-header.topbar .btn--gold.desktop-only {
    display: inline-flex;
    flex-shrink: 0;
  }
}

@media (max-width: 1100px) and (min-width: 768px) {
  .site-header.topbar .topbar__nav a,
  .site-header.topbar .topbar__nav-menu a {
    font-size: 0.78rem;
  }

  .site-header.topbar .topbar__phone.desktop-only {
    font-size: 0.82rem;
  }
}

@media (max-width: 420px) {
  .site-header.topbar .header-cta-mobile__full {
    display: none;
  }

  .site-header.topbar .header-cta-mobile__short {
    display: inline;
  }

  .site-header.topbar .header-cta-mobile {
    max-width: 4.5rem;
    padding-inline: 0.55rem;
  }
}

@media (min-width: 901px) {
  .burger {
    display: none !important;
  }
}

body.fs-has-topbar {
  padding-top: 0 !important;
}
