/* =========================================================
   HEADER
   База — макет 1920: подложка 1795 × 71.
   Всё считается от ширины экрана (vw), сверху ограничено
   размерами макета, снизу — минимальными размерами.
   ========================================================= */

:root {
  --hdr-w: min(93.49vw, 1795px);
  --hdr-h: clamp(56px, 3.698vw, 71px);
  --hdr-top: clamp(10px, 1.25vw, 24px);
  --hdr-pad-l: clamp(16px, 1.41vw, 27px);
  --hdr-pad-r: clamp(16px, 1.98vw, 38px);
  --hdr-gap: clamp(14px, 1.98vw, 38px);
  --hdr-actions-gap: clamp(12px, 1.3vw, 25px);
  --hdr-font: clamp(14px, 1.094vw, 21px);
  --hdr-logo-h: clamp(26px, 2.29vw, 44px);
  --hdr-icon: clamp(22px, 1.67vw, 32px);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding-top: var(--hdr-top);
  pointer-events: none;
}

.site-header .header-inner,
.site-header .header-search-bar,
.site-header .header-mobile-menu {
  pointer-events: auto;
}

/* Стеклянная подложка */
.header-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--hdr-gap);
  width: var(--hdr-w);
  height: var(--hdr-h);
  margin-inline: auto;
  padding: 0 var(--hdr-pad-r) 0 var(--hdr-pad-l);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

.site-header.scrolled .header-inner {
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.1);
}

/* ЛОГО */

.header-logo {
  flex-shrink: 0;
}

.header-logo a {
  display: block;
}

.logo-img {
  display: block;
  height: var(--hdr-logo-h);
  width: auto;
}

/* НАВИГАЦИЯ */

.header-nav {
  margin-left: auto;
}

.header-nav__list {
  display: flex;
  align-items: center;
  gap: var(--hdr-gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-nav__item {
  position: relative;
}

.header-nav__link {
  display: block;
  font-size: var(--hdr-font);
  font-weight: 500;
  line-height: 1.2;
  color: #111111;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.header-nav__link:hover {
  color: #bb1f11;
}

/* ДЕЙСТВИЯ: разделитель, поиск, кабинет, язык, бургер */

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--hdr-actions-gap);
  flex-shrink: 0;
}

.header-actions__divider {
  width: 1px;
  height: calc(var(--hdr-h) * 0.8);
  background: #555555;
}

.header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--hdr-icon);
  height: var(--hdr-icon);
  padding: 0;
  border: 0;
  background: none;
  color: #111111;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.header-icon-btn svg {
  display: block;
  width: 100%;
  height: 100%;
}

.header-icon-btn:hover {
  color: #bb1f11;
}

/* БУРГЕР */

.header-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 7px;
  border: 0;
  background: none;
  cursor: pointer;
}

.header-burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #111111;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.header-burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header-burger.open span:nth-child(2) {
  opacity: 0;
}

.header-burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* СТРОКА ПОИСКА — под подложкой, в том же стекле */

.header-search-bar {
  position: relative;
  z-index: 2;
  width: var(--hdr-w);
  max-height: 0;
  margin: 8px auto 0;
  overflow: hidden;
  opacity: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  transition:
    max-height 0.35s ease,
    opacity 0.3s ease;
}

.header-search-bar.open {
  max-height: 80px;
  opacity: 1;
}

.header-search-bar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px var(--hdr-pad-r) 10px var(--hdr-pad-l);
}

.header-search-bar__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: max(16px, var(--hdr-font));
  color: #111111;
  background: transparent;
}

.header-search-bar__input::-webkit-search-cancel-button {
  display: none;
  -webkit-appearance: none;
}

.header-search-bar__input::placeholder {
  color: #777777;
}

.header-search-bar__submit,
.header-search-bar__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: #555555;
  transition: color 0.2s ease;
}

.header-search-bar__submit:hover {
  color: #bb1f11;
}

.header-search-bar__close:hover {
  color: #111111;
}

/* ПОДСКАЗКИ ПОИСКА НА ЛЕТУ (assets/js/search-live.js) */

.header-search-bar.open.has-live {
  max-height: min(640px, calc(100vh - 120px));
  border-radius: 28px;
}

.header-search-live {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: min(540px, calc(100vh - 200px));
  overflow-y: auto;
  padding: 0 var(--hdr-pad-r) 14px var(--hdr-pad-l);
  overscroll-behavior: contain;
}

.header-search-live__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 16px;
  color: #111111;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.header-search-live__item:hover,
.header-search-live__item.is-active {
  background: rgba(255, 255, 255, 0.85);
}

.header-search-live__type {
  font-size: 12px;
  color: #8a8a8a;
}

.header-search-live__title {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 600;
  color: #bb1f11;
}

.header-search-live__text {
  font-size: 13px;
  line-height: 1.35;
  color: #444444;
}

.header-search-live__fix,
.header-search-live__empty {
  margin: 0;
  padding: 6px 14px;
  font-size: 14px;
  color: #555555;
}

.header-search-live__fix b {
  color: #111111;
}

.header-search-live__all {
  align-self: flex-start;
  margin: 6px 14px 0;
  font-size: 14px;
  font-weight: 600;
  color: #2a20c1;
  text-decoration: none;
}

.header-search-live__all:hover {
  text-decoration: underline;
}

/* МОБИЛЬНОЕ МЕНЮ */

.header-mobile-menu {
  display: none;
  flex-direction: column;
  background: #fff;
  padding: calc(var(--header-h, 80px) + 16px) 24px 24px;
  gap: 4px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 1;
}

.header-mobile-menu.open {
  display: flex;
}

.header-mobile-menu__footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header-mobile-menu__footer-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  padding: 0 14px 6px;
}

.header-mobile-menu__footer a,
.header-mobile-menu__footer address {
  display: block;
  padding: 6px 14px;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  color: #555;
  text-decoration: none;
  line-height: 1.5;
}

.header-mobile-menu__footer a:hover {
  color: #bb1f11;
}

.header-mobile-menu__footer-legal {
  padding-top: 10px;
}

.header-mobile-menu__footer-legal a {
  font-size: 12px;
  color: #999;
  text-decoration: underline;
  padding: 4px 14px;
}

.header-mobile-menu a {
  display: block;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.header-mobile-menu .mobile-submenu-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  padding: 16px 14px 6px;
}

/* ПРОЧЕЕ (было в этом файле) */

.policy-page {
  padding-block: 110px;
}

.current {
  color: #bb1f11;
}

/* =========================================================
   АДАПТИВ
   ========================================================= */

/* До 1024 — бургер вместо меню */
@media (max-width: 1024px) {
  .header-nav,
  .header-actions__divider {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .header-burger {
    display: flex;
  }
}

@media (max-width: 380px) {
  .header-mobile-menu {
    padding: calc(var(--header-h, 80px) + 12px) 16px 20px;
  }

  .header-mobile-menu a {
    padding: 10px 12px;
    font-size: 15px;
  }

  .header-mobile-menu .mobile-submenu-title {
    padding: 12px 12px 4px;
  }
}

/* Пункт «КЭМП.Трафик» — всегда синий */
.site-header .header-nav__link.header-nav__link--camp,
.site-header .header-nav__link.header-nav__link--camp:hover,
.site-header .header-nav__link.header-nav__link--camp:focus-visible {
  color: #2a20c1;
}
