/* === Header fix / compact clean version === */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 241, 233, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.header-shell {
  position: relative;
  padding-block: 14px;
}

.header-layer {
  border-radius: 0;
}

.navbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
}

/* Brand */
.navbar__brand {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 245px;
  min-height: 58px;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  text-decoration: none;
}



.navbar__brand-mark {
  font-size: 0.82rem;
  line-height: 1.1;
  letter-spacing: 0.22em;
}

.navbar__brand-owner,
.navbar__brand-sub {
  font-size: 0.62rem;
  line-height: 1.35;
  letter-spacing: 0.14em;
}

/* Лучше убрать центральный бейдж на десктопе — он ломает ширину */
.navbar__center {
  display: none;
}

/* Nav */
.navbar__nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.navbar__list {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 17px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--gray-700);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-link-pill:hover {
  transform: translateY(-1px);
  background: #fff;
  color: var(--color-primary) !important;
}

.navbar__cta-wrapper {
  flex: 0 0 auto;
  margin-left: 4px;
}

.nav-cta-floating {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d9b26c, #e7c98e);
  color: #2f2616;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 12px 26px rgba(217, 178, 108, 0.28);
}

/* Mobile */
.navbar__mobile-actions {
  display: none;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--gray-700);
}

/* Adaptive */
@media (max-width: 1180px) {
  .navbar__brand {
    max-width: 215px;
    padding-inline: 18px;
  }

  .nav-link-pill {
    padding-inline: 13px;
    font-size: 0.7rem;
    letter-spacing: 0.13em;
  }

  .nav-cta-floating {
    padding-inline: 18px;
    font-size: 0.68rem;
  }
}

@media (max-width: 1040px) {
  .navbar__nav {
    display: none;
  }

  .navbar__mobile-actions {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }
}

@media (max-width: 560px) {
  .header-shell {
    padding-block: 10px;
  }

  .navbar__brand {
    max-width: 220px;
    min-height: 52px;
    padding: 10px 16px;
  }

  .navbar__brand-mark {
    font-size: 0.75rem;
  }

  .navbar__brand-owner,
  .navbar__brand-sub {
    font-size: 0.56rem;
    letter-spacing: 0.11em;
  }

  .nav-cta-floating--compact {
    display: none;
  }
}

.navbar__brand:hover{
  color: #1a1a2e !important;
}

/* === Mobile/adaptive header hard fix === */

body.menu-open {
  overflow: hidden;
}

@media (max-width: 1040px) {
  .site-header {
    z-index: 80;
  }

  .header-shell {
    padding-block: 12px;
  }

  .navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 58px;
  }

  .navbar__nav {
    display: none !important;
  }

  .navbar__center {
    display: none !important;
  }

  .navbar__mobile-actions {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex: 0 0 auto;
  }

  .nav-toggle {
    display: flex !important;
    flex: 0 0 auto;
  }

  .navbar__brand {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 280px;
    min-height: 54px;
    padding: 10px 18px;
    border-radius: 28px;
    overflow: hidden;
  }

  .navbar__brand-mark,
  .navbar__brand-owner,
  .navbar__brand-sub {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .navbar__brand-mark {
    font-size: 0.78rem;
  }

  .navbar__brand-owner,
  .navbar__brand-sub {
    font-size: 0.58rem;
    line-height: 1.3;
  }

  .nav-cta-floating--compact {
    min-height: 42px;
    padding: 10px 18px;
    font-size: 0.66rem;
    letter-spacing: 0.13em;
  }

  .mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 70;
    /*background: rgba(15, 23, 42, 0.34);*/
    /*backdrop-filter: blur(10px);*/
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  .mobile-menu[hidden] {
    display: none !important;
  }

  .mobile-menu.mobile-menu--open {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu__inner {
    position: fixed;
    top: 86px;
    right: 18px;
    left: auto;
    bottom: auto;
    width: min(360px, calc(100vw - 36px));
    max-height: calc(100dvh - 108px);
    overflow-y: auto;
    padding: 24px 22px;
    border-radius: 26px;
    background: linear-gradient(160deg, #ffffff, #f6f1e9);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    transform: translateY(-10px);
    transition: transform 0.22s ease;
  }

  .mobile-menu--open .mobile-menu__inner {
    transform: translateY(0);
  }

  .mobile-menu__top {
    margin-bottom: 18px;
  }

  .mobile-menu__eyebrow {
    margin-bottom: 8px;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
  }

  .mobile-menu__hint {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .mobile-menu__list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
  }

  .mobile-menu__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 0.92rem;
    line-height: 1.25;
    text-decoration: none;
  }

  .badge-offline {
    max-width: 100%;
    font-size: 0.68rem;
    line-height: 1.35;
  }
}

@media (max-width: 640px) {
  .navbar__brand {
    max-width: calc(100vw - 92px);
    padding: 9px 15px;
  }

  .nav-cta-floating--compact {
    display: none !important;
  }

  .mobile-menu__inner {
    top: 78px;
    right: 12px;
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 92px);
    padding: 22px 18px;
  }
}

@media (max-width: 420px) {
  .navbar__brand {
    max-width: calc(100vw - 78px);
  }

  .navbar__brand-mark {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
  }

  .navbar__brand-owner,
  .navbar__brand-sub {
    font-size: 0.54rem;
    letter-spacing: 0.1em;
  }

  .nav-toggle {
    width: 42px;
    height: 42px;
  }
}