/* ============================================================
   Header · каноничный CSS из YouSmile/site/css/site.css L139-651
   + media queries L728-789.
   Используется компонентом components/header.njk
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  padding: 22px 24px 12px;
  /* строка шапки лежит ПОВЕРХ первой секции — без своей фоновой полосы */
  margin-bottom: -94px;
}
.site-header .nav {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  background: #fff;
  border-radius: 999px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(1,33,105,0.06);
}
.site-header .logo {
  display: flex;
  align-items: center;
  background: transparent;
  border-radius: 999px;
  padding: 6px 18px 6px 14px;
  text-decoration: none;
  flex-shrink: 0;
  height: 44px;
}
/* На Hero (scrollY <= 40, класс .is-hero) — лого 56px, при скролле уменьшается до 40px */
.site-header .logo img {
  height: 40px;
  width: auto;
  display: block;
  transition: height 250ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.site-header.is-hero .logo img { height: 90px; }

.menu {
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 1;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.menu > li { position: relative; }
.menu > li.has-mega { position: static; }
.menu > li > a,
.menu > li > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--brand-navy);
  text-decoration: none;
  letter-spacing: 0.005em;
  padding: 10px 14px;
  border-radius: 999px;
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 150ms, background 150ms;
}
.menu > li > a:hover,
.menu > li > button:hover,
.menu > li.has-dropdown:hover > button,
.menu > li.has-dropdown:focus-within > button {
  color: var(--brand-fuchsia);
}
.menu > li.has-dropdown > button .chev {
  width: 14px;
  height: 14px;
  transition: transform 200ms;
}
.menu > li.has-dropdown:hover > button .chev,
.menu > li.has-dropdown:focus-within > button .chev {
  transform: rotate(180deg);
}

/* ============================================================
   MEGA MENU (по образцу smile-at-once.ru)
   Открывается hover-ом, две колонки: слева категории с иконками,
   справа активная панель с группами подкатегорий.
   ============================================================ */
.mega {
  position: absolute;
  /* Прилегает к низу .nav без наложения и без зазора.
     Hover не рвётся благодаря JS-задержке закрытия (см. site.js). */
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(1, 33, 105, 0.14);
  padding: 0;
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 420px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 60;
  overflow: hidden;
}
.menu > li.has-mega:hover > .mega,
.menu > li.has-mega:focus-within > .mega,
.menu > li.has-mega.is-open > .mega {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Шеврон у has-mega поворачивается на 180° при открытом меню */
.menu > li.has-mega > button .chev {
  width: 14px;
  height: 14px;
  transition: transform 200ms;
}
.menu > li.has-mega:hover > button .chev,
.menu > li.has-mega:focus-within > button .chev,
.menu > li.has-mega.is-open > button .chev {
  transform: rotate(180deg);
}

/* --- Левая колонка: категории --- */
.mega-cats {
  background: var(--brand-gray);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
}
.mega-cats ul {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mega-cats a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-navy);
  text-decoration: none;
  transition: background 150ms, color 150ms;
  cursor: pointer;
}
.mega-cats a .lucide,
.mega-cats a svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--brand-sky-500);
  stroke: var(--brand-sky-500);
  transition: color 150ms, stroke 150ms;
}
.mega-cats a i.dental-ico {
  width: 20px;
  height: 20px;
  background-color: var(--brand-sky-500);
  transition: background-color 150ms;
}
.mega-cats a:hover {
  background: #fff;
  color: var(--brand-fuchsia);
  text-decoration: none;
}
.mega-cats a:hover .lucide,
.mega-cats a:hover svg { color: var(--brand-fuchsia); stroke: var(--brand-fuchsia); }
.mega-cats a:hover i.dental-ico { background-color: var(--brand-fuchsia); }
.mega-cats a.is-active {
  background: var(--brand-navy);
  color: #fff;
}
.mega-cats a.is-active .lucide,
.mega-cats a.is-active svg { color: #fff; stroke: #fff; }
.mega-cats a.is-active i.dental-ico { background-color: #fff; }

/* Dental-иконки — inline SVG из js/dental-icons.js (MDI path data
   из design-system/assets/dental/*.svg). Цвет — currentColor.
   MDI-формы залитые (fill-based), обводка здесь не нужна — иначе поверх
   заливки появляется 1px-кайма от родительских правил stroke: ... */
svg.dental-ico {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  fill: currentColor;
  stroke: none !important;
}

/* Iceberg-иконки категорий (ico-ice-*) — CSS-маска поверх <i class="dental-ico">.
   Подходят и SVG (fill=white), и PNG с альфа-каналом: форму берёт маска,
   цвет — background-color: currentColor, поэтому перекрашиваются на
   active / hover / в мобильном drawer ровно как inline-SVG. Источники —
   /assets/services-icons/, выгружены с iceberg.dental. */
i.dental-ico {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: contain;
          mask-size: contain;
}
.ico-ice-therapy  { -webkit-mask-image: url(/assets/services-icons/lechenie-zubov.svg); mask-image: url(/assets/services-icons/lechenie-zubov.svg); }
.ico-ice-protez   { -webkit-mask-image: url(/assets/services-icons/protezirovanie.svg); mask-image: url(/assets/services-icons/protezirovanie.svg); }
.ico-ice-implant  { -webkit-mask-image: url(/assets/services-icons/implantaciya.svg);   mask-image: url(/assets/services-icons/implantaciya.svg); }
.ico-ice-diag     { -webkit-mask-image: url(/assets/services-icons/diagnostika.svg);    mask-image: url(/assets/services-icons/diagnostika.svg); }
.ico-ice-surgery  { -webkit-mask-image: url(/assets/services-icons/hirurgicheskaya.png); mask-image: url(/assets/services-icons/hirurgicheskaya.png); }
.ico-ice-kids     { -webkit-mask-image: url(/assets/services-icons/detskaya.png);       mask-image: url(/assets/services-icons/detskaya.png); }
.ico-ice-hygiene  { -webkit-mask-image: url(/assets/services-icons/gigiena.png);        mask-image: url(/assets/services-icons/gigiena.png); }
.ico-ice-esthetic { -webkit-mask-image: url(/assets/services-icons/esteticheskaya.png); mask-image: url(/assets/services-icons/esteticheskaya.png); }

.mega-cats .all-link {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--brand-sky-200);
}
.mega-cats .all-link a {
  background: var(--brand-fuchsia);
  color: #fff;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 12px 20px;
  border-radius: 999px;
}
.mega-cats .all-link a:hover {
  background: var(--brand-fuchsia-300);
  color: #fff;
}

/* --- Правая колонка: панели --- */
.mega-content { padding: 28px 32px 28px 36px; position: relative; }
.mega-panel {
  display: none;
}
.mega-panel.is-active { display: block; }

.mega-panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--brand-sky-100);
}
.mega-panel-head .ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--brand-sky-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-navy);
  flex-shrink: 0;
}
.mega-panel-head .ico svg { width: 22px; height: 22px; stroke: var(--brand-navy); }
.mega-panel-head .ico svg.dental-ico { width: 26px; height: 26px; color: var(--brand-navy); }
.mega-panel-head h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--brand-navy);
  margin: 0;
  letter-spacing: -0.01em;
}

.mega-panel-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 32px;
}
.mega-panel-body.cols-2 { grid-template-columns: repeat(2, 1fr); }

/* Сетка логотипов страховых партнёров (используется в категории ДМС).
   Распахивается на всю ширину панели через grid-column:1/-1, чтобы лежать
   под группами (или одна, если groups пустой). Стиль логотипов — единый
   с .insurance-grid в blocks/why-us.njk: grayscale + multiply + hover. */
.mega-insurances {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px 24px;
  padding: 4px 0;
}
.mega-insurances img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: contain;
  display: block;
  filter: grayscale(1);
  opacity: 0.7;
  mix-blend-mode: multiply;
  transition: opacity 180ms, filter 180ms;
}
.mega-insurances img:hover { filter: grayscale(0); opacity: 1; }
@media (max-width: 1120px) {
  .mega-insurances { grid-template-columns: repeat(4, 1fr); }
}
.mega-group h4 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-fuchsia);
  margin: 0 0 12px;
}
.mega-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mega-group a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--brand-navy);
  text-decoration: none;
  transition: color 120ms, transform 120ms;
}
.mega-group a:hover {
  color: var(--brand-fuchsia);
  text-decoration: none;
  transform: translateX(2px);
}
/* Неактивный пункт мега-меню (например, услуги ЗТЛ — заглушки) */
.mega-link.is-disabled {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-400);
  cursor: default;
  pointer-events: none;
}

/* Right side actions */
.header-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}
/* Иконки соцсетей/мессенджеров — брендовые SVG из design-system/assets/msn ico/
   (в проекте лежат в assets/msn-ico/ — без пробела в имени папки).
   Фон встроен в сам SVG, поэтому обёртке фон не нужен. */
.icon-pill {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 200ms cubic-bezier(0.22,0.61,0.36,1), filter 200ms;
  flex-shrink: 0;
}
.icon-pill img,
.icon-pill svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
}
.icon-pill:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 8px 14px rgba(1,33,105,0.18));
}

/* Селектор филиала — выпадающий список адресов/телефонов/часов работы */
.branch-picker {
  position: relative;
  margin-right: 6px;
}
.branch-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0;
  border: none;
  background: none;
  color: var(--brand-navy);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.branch-trigger:focus-visible {
  outline: 2px solid var(--brand-fuchsia);
  outline-offset: 4px;
  border-radius: 4px;
}
.branch-pin {
  width: 18px;
  height: 18px;
  color: var(--brand-fuchsia);
  flex-shrink: 0;
}
.branch-label {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.branch-city {
  font-weight: 500;
  color: var(--brand-navy);
  opacity: 0.5;            /* приглушённо — это контекст города */
}
.branch-place {
  font-weight: 700;
  color: var(--brand-navy);
}
.branch-chev {
  width: 14px;
  height: 14px;
  opacity: 0.5;
  transition: transform 200ms;
}
.branch-picker:hover .branch-chev,
.branch-picker:focus-within .branch-chev { transform: rotate(180deg); }

.branch-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 360px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(1, 33, 105, 0.16),
              0 2px 6px rgba(1, 33, 105, 0.08);
  padding: 8px;
  z-index: 200;
  border: 1px solid var(--brand-sky-100);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
}
/* Невидимая «перемычка» между триггером и карточкой —
   чтобы курсор не терял hover при переходе через 10px gap. */
.branch-dropdown::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
.branch-picker:hover .branch-dropdown,
.branch-picker:focus-within .branch-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.branch-dropdown .branch {
  display: block;             /* перебиваем глобальный .branch{display:flex} из components.css */
  background: transparent;    /* и фон/border/cursor оттуда же */
  border: 0;
  padding: 14px 14px;
  border-radius: 12px;
  transition: background 150ms;
  position: relative;         /* якорь для растянутой ссылки .branch-switch::after */
}
.branch-dropdown .branch + .branch { border-top: 1px solid var(--brand-sky-100); }
.branch-dropdown .branch:hover { background: var(--brand-sky-100); }

/* Переключение филиала. Кликабельна вся карточка: ссылка стоит в заголовке,
   а её ::after растянут на карточку. Телефон внутри поднят выше по z-index,
   поэтому остаётся отдельной ссылкой, а не «дыркой» в области переключения. */
.branch-switch {
  color: inherit;
  text-decoration: none;
}
.branch-switch::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
}
.branch-switch:hover { text-decoration: none; }
.branch-dropdown .branch:has(.branch-switch:focus-visible) {
  outline: 2px solid var(--brand-fuchsia);
  outline-offset: -2px;
}
.branch-switch:focus-visible { outline: none; }   /* рамку рисует карточка целиком */

/* Текущий филиал — тот, чьи документы сейчас показывает сайт (data-org).
   Не ссылка «никуда»: клик по нему просто возвращает на его же адрес. */
.branch-dropdown .branch.is-current { background: var(--brand-sky-100); }
.branch-dropdown .branch.is-current h4::after {
  content: "вы здесь";
  margin-left: 8px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-fuchsia);
  vertical-align: middle;
}
.branch-dropdown .branch header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.branch-dropdown .branch h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--brand-navy);
  margin: 0;
  letter-spacing: -0.005em;
}
.branch-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--brand-fuchsia);
  color: #fff;
  padding: 3px 8px;
  border-radius: 999px;
}
.branch-addr,
.branch-hours {
  font-size: 12px;
  color: var(--brand-navy);
  opacity: 0.7;
  line-height: 1.4;
  margin: 0 0 4px;
  /* Логические переносы: внутри «Пн–Пт 08:00–20:00» и «Сб–Вс по записи»
     стоят неразрывные пробелы (см. HTML ниже), поэтому строка разорвётся
     максимум один раз — у разделителя «·». */
  text-wrap: balance;
}
a.branch-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-navy);
  text-decoration: none;
  margin-top: 4px;
  transition: color 150ms;
  white-space: nowrap;   /* номер телефона никогда не рвётся */
  position: relative;    /* вместе с z-index — поверх растянутой .branch-switch::after, */
  z-index: 1;            /* иначе клик по номеру уходил бы в переключение филиала */
}
a.branch-phone i, a.branch-phone svg { width: 13px; height: 13px; color: var(--brand-fuchsia); }
a.branch-phone:hover { color: var(--brand-fuchsia); text-decoration: none; }
/* a.branch-all / a.branch-phone — (0,2,1) перебивает components.css:13 a:not(.btn):hover. */
a.branch-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  margin-top: 4px;
  background: var(--brand-navy);
  color: #fff;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 150ms;
}
a.branch-all i, a.branch-all svg { width: 14px; height: 14px; }
a.branch-all:hover { background: var(--brand-fuchsia); color: #fff; text-decoration: none; }

/* a.phone-cta — специфичность (0,2,0), чтобы перебить
   components.css:13 a:not(.btn):hover{color:var(--orange)} (0,2,1). */
a.phone-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-fuchsia);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: 0.01em;
  height: 38px;
  transition: background 200ms, transform 200ms, box-shadow 200ms;
}
a.phone-cta:hover {
  /* Согласовано со стилем .btn.primary из атомов (site.css:89-90):
     pink → pink-soft + soft pink shadow. Селектор a.phone-cta:hover (0,2,1)
     перебивает components.css:13 a:not(.btn):hover{color:var(--orange)} (0,2,1)
     по cascade order — inline <style> грузится позже. */
  background: var(--brand-fuchsia-300);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(225, 16, 113, 0.25);
}
/* На десктопе — только текст. Иконка скрыта. */
a.phone-cta i, a.phone-cta svg { display: none; width: 16px; height: 16px; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: var(--brand-gray);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--brand-navy);
}

/* ============================================================
   Адаптив шапки (из site.css:728-789)
   ============================================================ */
@media (max-width: 1100px) {
  .menu { gap: 0; }
  .menu > li > a, .menu > li > button { padding: 10px 10px; font-size: 13px; }
}
@media (max-width: 960px) {
  .site-header .nav { padding: 6px 8px; }
  .menu { display: none; }
  .menu.is-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    margin-top: 8px;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-radius: 22px;
    padding: 16px;
    box-shadow: 0 18px 48px rgba(1,33,105,0.12);
    z-index: 60;
  }
  .menu.is-open > li { width: 100%; }
  .menu.is-open > li > a, .menu.is-open > li > button {
    justify-content: space-between;
    width: 100%;
  }
  .mega {
    position: static;
    transform: none;
    box-shadow: none;
    border-radius: 0;
    grid-template-columns: 1fr;
    min-height: 0;
    opacity: 1;
    pointer-events: auto;
    display: none;
    margin-top: 6px;
    overflow: visible;
  }
  .menu.is-open > li.has-mega.is-open > .mega { display: grid; }
  .mega-cats { padding: 8px; background: transparent; border-radius: 12px; }
  .mega-cats ul { gap: 0; }
  .mega-cats a { padding: 10px 12px; }
  .mega-cats .all-link { padding-top: 12px; }
  .mega-content { padding: 12px 8px; }
  .mega-panel-body { grid-template-columns: 1fr; gap: 18px; }
  .menu-toggle { display: inline-flex; }
  .branch-trigger .branch-place { display: none; }
  .branch-city { opacity: 0.7; }
  .branch-label { gap: 0; }
  .branch-trigger { gap: 6px; }
  .branch-dropdown { left: auto; right: 0; width: min(320px, calc(100vw - 32px)); }
  .header-actions a.phone-cta span { display: none; }
  .header-actions a.phone-cta i,
  .header-actions a.phone-cta svg { display: inline-block; }
  a.phone-cta { padding: 0; width: 38px; justify-content: center; }
}

/* ============================================================
   Мобильная шапка ≤860px
   Адаптация из semya-med-cl/ds-kit/styles/components.css L1949-2085.
   Переменные:
     --ink-400  → var(--brand-sky-300)
     --ink-700  → var(--brand-sky-500)
     --ink-900  → var(--brand-navy)
     --teal-deep→ var(--brand-navy)
     --teal-tint→ var(--brand-sky-100)
     --r-lg     → 20px (наш --r-lg или canonical)
     --dur-base → 200ms; --ease-out → ease-out
   ============================================================ */
.nav__mobtop,
.nav__hourspop,
.nav__burger,
.nav__drawer { display: none; }
/* .logo-desc — дескриптор «Сеть стоматологических клиник» рядом с лого.
   Виден только на мобайле (≤860px) между логотипом и phone-CTA. */
.logo-desc { display: none; }

@media (max-width: 960px) {
  /* На «тесном десктопе» (861–960) убираем только branch-picker — он самый широкий.
     Десктопное мега-меню остаётся видимым до 860px, чтобы не было «мёртвой зоны»
     без навигации (раньше меню скрывалось ≤960, а бургер появлялся только ≤860). */
  .site-header .branch-picker { display: none !important; }
}
@media (max-width: 860px) {
  /* Мобильный пакет: меню прячется именно здесь, одновременно с появлением бургера. */
  .site-header .menu { display: none !important; }
}

@media (max-width: 860px) {
  /* site-header — column, plate сверху, mobtop ниже */
  .site-header {
    position: sticky;
    top: 8px;
    z-index: 60;
    padding: 0 10px;
    /* Шапка лежит поверх hero (плашки парят на sky-tint фоне).
       Высота: 8 (top) + 68 (.nav) + 7 (gap) + 36 (.nav__mobtop) ≈ 119px.
       Hero компенсирует padding-top:160px → 41px честного зазора. */
    margin-bottom: -119px;
    display: flex;
    flex-direction: column;
    gap: 7px;
  }
  .site-header .nav         { order: 1; }
  .site-header .nav__mobtop { order: 2; }
  .site-header .nav__hourspop { order: 3; }

  /* Дескриптор «Сеть стоматологий» — вплотную к лого слева.
     header-actions уезжает вправо через margin-left:auto (см. ниже).
     Гасим правый padding у лого + nav gap отдельно, чтобы текст прижался
     максимально близко к логотипу. */
  .site-header .nav .logo { padding-right: 0; }
  .site-header .logo-desc {
    display: block;
    flex: 0 1 auto; min-width: 0; max-width: 46%;
    margin: 0 0 0 -2px;
    color: var(--brand-navy);
    font-family: var(--font-display); font-weight: 700;
    font-size: 10.5px; letter-spacing: .03em;
    line-height: 1.18; text-transform: uppercase;
    opacity: .72;
  }

  /* mobtop: адрес + часы-тоггл */
  .nav__mobtop {
    position: relative; z-index: 60;
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
    min-width: 0; width: auto; align-self: stretch;
    margin: 0; padding: 8px 16px;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 6px 26px rgba(1,33,105,0.10);
    font-family: var(--font-display); font-size: 12px;
    box-sizing: border-box;
  }
  .nav__mobaddr {
    display: flex; align-items: center; gap: 6px;
    min-width: 0; flex: 1;
    color: var(--brand-sky-300); font-weight: 600;
  }
  .nav__mobaddr-t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav__mobaddr .city { color: var(--brand-sky-300); font-weight: 600; }
  .nav__mobaddr strong { color: var(--brand-navy); font-weight: 800; }
  .nav__mobaddr svg { color: var(--brand-sky-500); flex-shrink: 0; }
  .nav__mobhours {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
    border: 0; cursor: pointer;
    background: var(--brand-sky-100); color: var(--brand-navy);
    font-family: var(--font-display); font-weight: 800; font-size: 11.5px;
    padding: 7px 12px; border-radius: 999px; white-space: nowrap;
  }
  .nav__mobhours .chev { transition: transform 200ms ease-out; }
  .nav__mobhours[aria-expanded="true"] .chev { transform: rotate(180deg); }

  /* hours-popup */
  .nav__hourspop {
    display: block; position: absolute;
    left: 10px; right: 10px; top: calc(100% + 4px);
    max-width: 1260px; margin: 0 auto; overflow: hidden;
    background: #fff; border-radius: 20px;
    box-shadow: 0 8px 24px rgba(1,33,105,0.10);
    z-index: 55;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 200ms ease-out, transform 200ms ease-out, visibility 200ms;
  }
  .nav__hourspop.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__hourspop .hpop__row { padding: 14px 18px; }
  .nav__hourspop .hpop__row + .hpop__row { border-top: 1px solid var(--brand-sky-100); }
  .nav__hourspop .hpop__t {
    font-family: var(--font-display); font-weight: 800; font-size: 13px;
    color: var(--brand-navy); margin-bottom: 6px;
  }
  .nav__hourspop .hpop__hours { font-size: 13px; color: var(--brand-sky-500); margin-bottom: 8px; }
  .nav__hourspop .hpop__phone {
    display: inline-block; margin-right: 12px;
    font-size: 13px; font-weight: 700; color: var(--brand-navy);
    text-decoration: none;
  }
  .nav__hourspop a.hpop__phone:hover { color: var(--brand-fuchsia); }

  /* плашка nav (лого + actions + бургер) */
  .site-header .nav {
    position: relative; z-index: 60;
    display: flex !important; align-items: center; gap: 6px;
    padding: 8px 10px 8px 16px;
    align-self: stretch; width: auto; max-width: none; margin: 0;
    box-sizing: border-box;
    transition: padding 200ms ease-out;
  }
  /* Дефолтная авто-маргина на лого выключена выше (рядом с .logo-desc) —
     дескриптор стоит вплотную к лого, а header-actions уезжает вправо
     через margin-left:auto на самих actions. */
  .site-header .nav .logo { margin-right: 0; }
  .site-header .nav .header-actions { margin-left: auto; }
  .site-header .nav .logo img { height: 52px; transition: height 200ms ease-out; }
  .site-header.is-hero .nav .logo img { height: 52px; }   /* перебиваем десктопный is-hero 90px */
  .site-header .nav .header-actions .icon-pill { display: none; }   /* соц-pills переезжают в drawer */
  .site-header .nav a.phone-cta { padding: 0; width: 38px; justify-content: center; }
  .site-header .nav a.phone-cta span { display: none; }
  .site-header .nav a.phone-cta i,
  .site-header .nav a.phone-cta svg { display: inline-block; }

  /* burger */
  .nav__burger {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 40px; height: 40px; padding: 0 9px;
    background: transparent; border: 0; cursor: pointer;
    border-radius: 999px; position: relative; z-index: 80;
  }
  .nav__burger span {
    display: block; height: 2.5px; width: 100%;
    background: var(--brand-navy); border-radius: 2px;
    transition: transform 200ms ease-out, opacity 200ms;
  }
  .nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  /* shrink при скролле: скрыть mobtop/hourspop, уменьшить лого */
  .site-header.is-shrunk .nav__mobtop,
  .site-header.is-shrunk .nav__hourspop { display: none; }
  .site-header.is-shrunk .nav { padding: 5px 10px 5px 16px; }
  .site-header.is-shrunk .nav .logo img { height: 36px; }
  /* При скролле шапка ниже: только .nav (~54px) + 8 top = ~62px */
  /* .is-shrunk: margin-bottom не нужен — шапка sticky сверху, hero снизу. */

  /* full-screen drawer */
  .nav__drawer {
    display: block; position: fixed; inset: 0; width: 100%;
    background: #fff; z-index: 50;
    opacity: 0; visibility: hidden; overscroll-behavior: contain;
    transition: opacity 240ms ease-out, visibility 240ms;
  }
  .nav__drawer.is-open { opacity: 1; visibility: visible; }
  .nav__drawer-scroll {
    height: 100%; overflow-y: auto;
    padding: 148px 20px calc(28px + env(safe-area-inset-bottom));
  }
  .nav__drawer-label {
    font-family: var(--font-display); font-weight: 800; font-size: 11px;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--brand-fuchsia); margin: 2px 4px 10px;
  }

  /* accordion */
  .nav__drawer .acc { border-bottom: 1px solid var(--brand-sky-100); }
  .nav__drawer .acc__h {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    background: transparent; border: 0; cursor: pointer;
    font-family: var(--font-display); font-weight: 800; font-size: 17px;
    color: var(--brand-navy); padding: 15px 4px;
    text-align: left;
  }
  .nav__drawer .acc__h-t { display: inline-flex; align-items: center; gap: 8px; }
  .nav__drawer .acc__h .chev { color: var(--brand-sky-300); transition: transform 200ms ease-out; flex-shrink: 0; }
  .nav__drawer .acc__h[aria-expanded="true"] .chev { transform: rotate(180deg); color: var(--brand-fuchsia); }
  .nav__drawer .acc__p { max-height: 0; overflow: hidden; transition: max-height 320ms ease-out; }
  .nav__drawer .acc.is-open > .acc__p { max-height: 800px; }
  .nav__drawer .acc__p a {
    display: block; font-family: var(--font-body); font-size: 15px;
    color: var(--brand-sky-500); padding: 10px 4px 10px 14px; text-decoration: none;
  }
  .nav__drawer .acc__p a:hover { color: var(--brand-navy); }
  .nav__drawer .acc__p a:last-child { padding-bottom: 16px; }
  .nav__drawer .acc__p .acc__link.is-disabled {
    display: block; font-family: var(--font-body); font-size: 15px;
    color: var(--ink-400); padding: 10px 4px 10px 14px; cursor: default; pointer-events: none;
  }

  /* Вложенные аккордеоны (категории внутри «Услуг») */
  .nav__drawer .acc--top.is-open > .acc__p { max-height: 4800px; }
  .nav__drawer .acc--top > .acc__p > .acc--sub {
    border-bottom: 1px solid var(--brand-sky-100);
    margin: 0 0 0 8px;
  }
  .nav__drawer .acc--top > .acc__p > .acc--sub:last-child { border-bottom: 0; }
  .nav__drawer .acc--sub > .acc__h {
    font-size: 15px; font-weight: 700; padding: 12px 4px;
    color: var(--brand-navy);
  }
  .nav__drawer .acc--sub > .acc__h .dental-ico {
    width: 18px; height: 18px; color: var(--brand-fuchsia); flex-shrink: 0;
  }
  .nav__drawer .acc--sub > .acc__p a {
    font-size: 14px; padding: 8px 4px 8px 30px;
  }
  /* muted-пункт в под-аккордеоне услуг — та же геометрия, что у ссылки (без сдвига) */
  .nav__drawer .acc--sub > .acc__p .acc__link.is-disabled {
    font-size: 14px; padding: 8px 4px 8px 30px;
  }
  .nav__drawer .acc--sub.is-open > .acc__p { max-height: 1200px; }

  .nav__drawer-link {
    display: block;
    font-family: var(--font-display); font-weight: 800; font-size: 17px;
    color: var(--brand-navy); padding: 15px 4px;
    text-decoration: none; border-bottom: 1px solid var(--brand-sky-100);
  }
  .nav__drawer-link:hover { color: var(--brand-fuchsia); }
  .nav__drawer-link.is-disabled { color: var(--brand-sky-300); pointer-events: none; }

  /* scroll-lock body когда меню открыто */
  body.nav-locked { overflow: hidden; }
  body.nav-locked .site-header { position: fixed; top: 8px; left: 0; right: 0; }
  body.nav-locked .site-header.is-shrunk .nav__mobtop { display: flex; }
  body.nav-locked .site-header.is-shrunk .nav { padding: 8px 10px 8px 16px; }
  body.nav-locked .site-header.is-shrunk .nav .logo img { height: 52px; }

  /* Соц-pills внутри drawer (на десктопе скрыты, на мобайле — большие кнопки в drawer) */
  .nav__drawer-socials {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin-top: 24px;
  }
  .nav__drawer-soc {
    flex: 1 1 calc(50% - 5px); min-width: 0;
    display: inline-flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-radius: 999px;
    background: var(--brand-sky-100); color: var(--brand-navy);
    font-family: var(--font-display); font-weight: 800; font-size: 14px;
    text-decoration: none;
    transition: background 150ms;
  }
  .nav__drawer-soc:hover { background: var(--brand-sky-200); color: var(--brand-navy); }
  .nav__drawer-soc img { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; }
}
