/* LOST redesign — fixed header + compact on scroll */

:root {
  /* Верхняя полоска с соцсетями убрана — соцсети в .lost-social-float */
  --lost-header-top-h: 0px;
  --lost-header-main-h: 72px;
  --lost-header-h: calc(var(--lost-header-top-h) + var(--lost-header-main-h));
  --lost-header-compact-h: 58px;
  --lost-header-bg: rgba(10, 9, 12, 0.82);
  --lost-header-bg-solid: rgba(10, 9, 12, 0.96);
  --lost-header-line: rgba(255, 255, 255, 0.08);
}

body {
  padding-top: var(--lost-header-h) !important;
  transition: padding-top 0.25s ease;
}

body:has(.lost-header.is-compact) {
  padding-top: var(--lost-header-compact-h) !important;
}

body.qa-login-page {
  padding-top: 0 !important;
}

body:has(.qa) {
  padding-top: 0 !important;
}

.lost-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--lost-z-header);
  font-family: var(--lost-font-family);
  color: var(--lost-text-primary);
  background: transparent;
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.lost-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(209, 43, 60, 0.55), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.lost-header.is-compact {
  background: var(--lost-header-bg-solid);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.lost-header.is-compact::after {
  opacity: 1;
}

/* Top bar (legacy): пустой — соцсети вынесены в .lost-social-float */
.lost-header__top {
  display: none;
}

.lost-header__top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lost-space-4);
  height: var(--lost-header-top-h);
  min-height: 0;
  padding-block: 0;
}

.lost-header__address {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.lost-header__address span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lost-header__icon {
  flex-shrink: 0;
  display: block;
  color: rgba(255, 255, 255, 0.78);
}

.lost-header__pin {
  color: var(--lost-accent-red);
}

.lost-header__top-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}

.lost-header__top-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-weight: var(--lost-fw-semibold);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--lost-transition);
}

.lost-header__top-phone:hover {
  color: #ffb4bc;
}

.lost-header__social-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lost-header__social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  transition: background-color var(--lost-transition), color var(--lost-transition);
}

.lost-header__social:hover {
  background: rgba(209, 43, 60, 0.18);
  color: #fff;
}

.lost-header__social svg {
  width: 15px;
  height: 15px;
}

.lost-header__social img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.lost-header__social--max {
  overflow: hidden;
}

.lost-header__social--max img {
  width: auto;
  height: 34px;
  max-width: none;
  margin-top: -2px;
}

/* Main bar.
   backdrop-filter вынесен на ::before: иначе он создаёт containing block
   для position:fixed потомков (панель поиска) и ломает привязку к viewport. */
.lost-header__main {
  position: relative;
  height: var(--lost-header-main-h);
  background: transparent;
  border-bottom: 1px solid var(--lost-header-line);
  transition: height 0.25s ease;
}

.lost-header__main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--lost-header-bg);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  pointer-events: none;
  transition: background-color 0.25s ease;
}

.lost-header.is-compact .lost-header__main {
  height: var(--lost-header-compact-h);
}

.lost-header.is-compact .lost-header__main::before {
  background: var(--lost-header-bg-solid);
}

.lost-header__main-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px 20px;
  height: 100%;
  min-height: 0;
}

.lost-header__logo {
  flex-shrink: 0;
}

.lost-header__logo a {
  display: inline-flex;
  align-items: center;
}

.lost-header__logo img,
.lost-header__logo svg {
  display: block;
  width: auto;
  max-height: 48px;
  height: auto;
  transition: max-height 0.25s ease, transform 0.25s ease;
}

.lost-header.is-compact .lost-header__logo img,
.lost-header.is-compact .lost-header__logo svg {
  max-height: 36px;
}

.lost-header__nav {
  display: none;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1.2vw, 8px);
  min-width: 0;
}

.lost-header__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.lost-header__nav-link::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--lost-accent-red);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.lost-header__nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.lost-header__nav-link:hover::after,
.lost-header__nav-link.is-active::after {
  transform: scaleX(1);
}

.lost-header__nav-link.is-active {
  color: #fff;
}

.lost-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.lost-header__cta {
  display: none;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--lost-accent-primary-grad, linear-gradient(180deg, #e23a4b 0%, #d12b3c 100%));
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(209, 43, 60, 0.28);
  transition: filter 0.2s ease, transform 0.2s ease;
}

.lost-header__cta:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  color: #fff !important;
}

.lost-header.is-compact .lost-header__cta {
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.lost-header__icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lost-header__icon-btn:hover {
  background: rgba(209, 43, 60, 0.16);
  border-color: rgba(209, 43, 60, 0.35);
}

.lost-header.is-compact .lost-header__icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

/* legacy burger reset */
.lost-header .lost-header__burger.mobile_brg_menu {
  position: relative !important;
  right: auto !important;
  top: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
}

.lost-header__burger-lines {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 18px;
}

.lost-header__burger-lines span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, width 0.2s ease, opacity 0.2s ease;
}

.lost-header__burger-lines span:first-child {
  width: 100%;
}

.lost-header__burger-lines span:last-child {
  width: 72%;
}

.lost-header__burger[aria-expanded="true"] .lost-header__burger-lines span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.lost-header__burger[aria-expanded="true"] .lost-header__burger-lines span:last-child {
  width: 100%;
  transform: translateY(-4px) rotate(-45deg);
}

@media (min-width: 1024px) {
  .lost-header__nav {
    display: flex;
  }

  .lost-header__cta {
    display: inline-flex;
  }

  .lost-header__logo img,
  .lost-header__logo svg {
    max-height: 52px;
  }

  .lost-header.is-compact .lost-header__logo img,
  .lost-header.is-compact .lost-header__logo svg {
    max-height: 38px;
  }
}

@media (min-width: 1280px) {
  :root {
    --lost-header-main-h: 76px;
    --lost-header-compact-h: 60px;
  }

  .lost-header__nav {
    gap: 4px;
  }

  .lost-header__nav-link {
    font-size: 14.5px;
    padding: 8px 12px;
  }
}

@media (max-width: 1023px) {
  .lost-header__main-inner {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .lost-header__nav {
    display: none !important;
  }

  .lost-header__cta {
    display: none;
  }
}

@media (max-width: 767px) {
  :root {
    /* Верхняя полоска скрыта — в padding-top её не считаем. */
    --lost-header-top-h: 0px;
    --lost-header-main-h: 58px;
    --lost-header-compact-h: 52px;
  }

  /* override legacy template fixed/absolute header rules */
  header,
  .lost-header,
  .lost-header__top,
  .lost-header__main {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    min-height: 0 !important;
    min-width: 0 !important;
  }

  .lost-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
  }

  .lost-header__top {
    display: none !important;
    height: 0 !important;
    overflow: hidden;
    pointer-events: none;
    border: 0 !important;
  }

  .lost-header.is-compact .lost-header__top {
    display: none !important;
    height: 0 !important;
    border-bottom: 0 none transparent !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .lost-header.is-compact {
    background: var(--lost-header-bg-solid) !important;
  }

  .lost-header__main {
    height: var(--lost-header-main-h) !important;
    background: transparent !important;
  }

  .lost-header__main::before {
    background: var(--lost-header-bg-solid);
  }

  .lost-header.is-compact .lost-header__main {
    height: var(--lost-header-compact-h) !important;
  }

  .main-content {
    margin-top: 0 !important;
  }

  .lost-header__top-phone {
    font-size: 11px;
  }

  .lost-header__address span {
    font-size: 11px;
  }

  .lost-header__logo img,
  .lost-header__logo svg {
    max-height: 40px;
  }

  .lost-header.is-compact .lost-header__logo img,
  .lost-header.is-compact .lost-header__logo svg {
    max-height: 34px;
  }

  body.no_body:has(.mobile_menu_main.active) .callback-call-widget,
  body.no_body:has(.mobile_menu_main.active) .callback-vidget,
  body.lost-nav-menu-open .callback-call-widget,
  body.lost-nav-menu-open .callback-vidget,
  body:has(.lost-nav-menu.is-open) .callback-call-widget,
  body:has(.lost-nav-menu.is-open) .callback-vidget,
  body.lost-booking-modal-open .callback-call-widget,
  body.lost-booking-modal-open .callback-vidget,
  body:has(.lost-home-booking-modal.is-open) .callback-call-widget,
  body:has(.lost-home-booking-modal.is-open) .callback-vidget {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@media (max-width: 420px) {
  .lost-header__address {
    display: none;
  }

  .lost-header__top-inner {
    justify-content: flex-end;
  }
}

/* Reduce hero top gap — header already offsets via body padding */
.lost-home-page .lost-hero,
body.lost-home-page .lost-hero {
  margin-top: clamp(12px, 2vw, 24px);
}

.lost-header__top-inner--socials-only {
  justify-content: flex-end;
}
.lost-header__phone-icon {
  color: #fff;
}
@media (min-width: 1100px) {
  .lost-header__phone-icon {
    display: none;
  }
}

.lost-header__logo { display: flex; align-items: center; gap: 12px; }
