/* =========================================================
   Дела сердечные — Клиника доктора Сонина
   Design tokens & base
   ========================================================= */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/manrope/manrope-cyrillic-v20.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/manrope/manrope-latin-v20.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Palette */
  --violet: #6054B1;
  --violet-hover: #4F44A0;
  --violet-deep: #3A2E80;
  --violet-text: #6054B1;
  --violet-soft: #F1ECFB;
  --violet-stat: #6054B1;

  --coral: #EC5F4A;
  --coral-deep: #D54836;
  --coral-soft: #FFEBE6;

  --pink-card: #FCE2E2;
  --pink-card-2: #FBE4DF;
  --pink-hero: #FFE9E3;
  --lavender-hero: #ECE2F3;

  --green: #14B568;
  --green-hover: #0FA058;
  --green-pill: #D8F2E2;
  --green-text: #16A86A;

  --yellow-star: #F5B544;

  --bg: #FFFFFF;
  --bg-soft: #F5F5F7;
  --bg-gray-card: #F1F1F4;

  --text: #1F1F25;
  --text-muted: #6F6F78;
  --text-light: #9C9CA6;

  --border: rgba(15, 12, 50, 0.07);

  --shadow-card: 0 4px 24px rgba(48, 30, 110, 0.05);
  --shadow-lift: 0 18px 48px rgba(48, 30, 110, 0.1);
  --shadow-soft: 0 8px 28px rgba(48, 30, 110, 0.06);

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 22px;
  --r-2xl: 24px;

  /* Layout */
  --container: 1320px;
  --gutter: clamp(16px, 3vw, 32px);

  /* Vertical rhythm */
  --section-pad: 100px;         /* default top+bottom for a section */
  --section-pad-tight: 72px;    /* sections whose body is a padded card */
  --title-gap: 40px;            /* space below a section title */
  --block-gap: 64px;            /* space between major blocks inside a section */

  /* Type */
  --ff: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--ff);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container-wide {
  max-width: 1700px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    letter-spacing 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; 
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
  transition: left 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
}
.btn:hover {
}
.btn:hover::before {
  left: 100%;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--violet);
  color: #fff;
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    letter-spacing 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.4s ease;
}
.btn-primary:hover {
  background: var(--violet-hover);
}

.btn-green {
  background: var(--green);
  color: #fff;
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    letter-spacing 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.4s ease;
}
.btn-green:hover {
  background: var(--green-hover);
}

.btn-white {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-white:hover { box-shadow: var(--shadow-soft); }

.btn-ghost {
  background: transparent;
  color: var(--violet);
  font-weight: 600;
}
.btn-ghost:hover { color: var(--violet-hover); }

/* =========================================================
   КОМПОНЕНТНЫЙ КАНОН — единый источник правды.
   Крошки · текстовые ссылки · табы-фильтры.
   (Кнопки — выше; выпадающие списки .custom-select — ниже.)
   Править ТОЛЬКО здесь. Не дублировать в постраничных CSS.
   ========================================================= */

/* ---- Хлебные крошки ---- */
.breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 14px;
  max-width: 100%;
  white-space: nowrap;
}
.breadcrumbs a { color: var(--text-muted); text-decoration: none; transition: color 0.2s ease; }
.breadcrumbs a:hover { color: var(--violet); }
.breadcrumbs .sep { color: var(--text-light); }
.breadcrumbs .current { color: var(--text); }
.page-head .breadcrumbs { justify-content: center; }
.breadcrumbs.is-collapsed {
  width: 100%;
  max-width: 100%;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: visible;
}
.breadcrumbs.is-collapsed > .current {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.breadcrumbs .breadcrumb-overflow-hidden { display: none !important; }
.breadcrumbs .breadcrumb-overflow {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}
.breadcrumbs .breadcrumb-ellipsis {
  width: 28px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.breadcrumbs .breadcrumb-ellipsis:hover,
.breadcrumbs .breadcrumb-ellipsis:focus-visible,
.breadcrumbs .breadcrumb-ellipsis[aria-expanded="true"] {
  color: var(--violet);
  background: var(--violet-soft);
}
.breadcrumbs .breadcrumb-ellipsis:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}
.breadcrumbs .breadcrumb-dropdown {
  position: absolute;
  z-index: 120;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  max-width: min(380px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: var(--shadow-lift);
  white-space: normal;
}
.breadcrumbs .breadcrumb-dropdown[hidden] { display: none; }
.breadcrumbs .breadcrumb-dropdown:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.breadcrumbs .breadcrumb-dropdown-item {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
}
.breadcrumbs .breadcrumb-dropdown-item:hover,
.breadcrumbs .breadcrumb-dropdown-item:focus-visible {
  color: var(--violet);
  background: var(--violet-soft);
  outline: none;
}

/* ---- Текстовые ссылки ---- */
/* Контентная: анимированное подчёркивание (абзацы, FAQ, описания) */
.link-underline {
  position: relative;
  display: inline-block;
  color: var(--violet);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}
.link-underline::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--violet);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.link-underline:hover { color: var(--violet-hover); }
.link-underline:hover::after,
.link-underline:focus-visible::after { transform: scaleX(1); }

/* Действие: ссылка со стрелкой, зазор растёт на hover */
.link-arrow {
  color: var(--violet);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease, color 0.2s ease;
}
.link-arrow:hover { color: var(--violet-hover); gap: 10px; }

/* Сноска: приглушённая ссылка (подвал, правовые, мелкий текст) */
.link-muted {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--border);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.link-muted:hover { color: var(--violet); text-decoration-color: var(--violet); }

/* ---- Табы-фильтры (пилюли) ---- */
.spec-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  margin-bottom: 36px;
}
.spec-tab {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}
.spec-tab:hover { background: var(--violet-soft); color: var(--violet); }
.spec-tab.is-active {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 6px 18px rgba(96, 84, 177, 0.28);
}
.spec-tab.is-active:hover { background: var(--violet-hover); }

.icon-btn {
  width: 56px;
  height: 56px;
  border-radius: var(--r-md);
  background: var(--bg-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--text);
  transition: background 0.2s ease;
}
.icon-btn:hover { background: var(--violet-soft); }
/* Иконка телефона видна только на планшете/ноутбуке/десктопе ≤1280px */
.header-phone { display: none; }
@media (max-width: 1280px) {
  .header-bottom .header-phone { display: inline-flex; }
}

.round-btn {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}
.round-btn:hover { background: var(--bg-soft); color: var(--text); border-color: var(--border); }
.round-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.round-btn:disabled:hover { background: #fff; color: var(--text); border-color: var(--border); }

/* =========================================================
   Header
   ========================================================= */

.site-header {
  padding: 18px 0 14px;
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: padding 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.compact {
  padding-top: 14px;
  padding-bottom: 14px;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 24px rgba(48, 30, 110, 0.04);
}

.header-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.logo-img {
  display: block;
  width: 188px;
  height: auto;
}
.logo-img-sm {
  display: block;
  width: 148px;
  height: auto;
}
.logo-heart {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}
.logo-text {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.15;
  color: var(--violet-deep);
  letter-spacing: -0.005em;
}

/* Header layout: logo left, top+bottom rows right */
.header-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 28px;
  align-items: center;
}
.header-layout > .logo-full {
  grid-row: 1 / 3;
  grid-column: 1;
  align-self: center;
  display: inline-flex;
}
.header-layout > .logo-full .logo-img {
  width: 130px;
  height: auto;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.site-header.compact .header-layout > .logo-full .logo-img {
  width: 100px;
}
.header-layout > .header-top {
  grid-row: 1;
  grid-column: 2;
}
.header-layout > .header-bottom {
  grid-row: 2;
  grid-column: 2;
}

/* Header top row: nav */
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  max-height: 50px;
  opacity: 1;
  transition:
    max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.3s ease,
    margin 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: max-height, opacity;
}
.site-header.compact .header-top {
  max-height: 0;
  opacity: 0;
  margin-top: -14px;
  pointer-events: none;
}
.nav-main {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
}
/* Большие экраны: контент шапки всё равно ограничен 1700px,
   поэтому держим компактные размеры, чтобы 8 пунктов со стрелками
   умещались в одну строку (иначе меню переносится и обрезается). */
@media (min-width: 1701px) {
  .header-top { gap: 18px; }
  .site-header .nav-main { gap: 18px; }
  .site-header .nav-main a { font-size: 15px; }
  .accessibility-link span:not(.eye) { display: none; }
  .accessibility-link { gap: 0; }
}
.nav-main a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.nav-main a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 3px;
  height: 2px;
  background: var(--violet);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center center;
  transition: transform 0.25s ease;
}
.nav-main a:hover { color: var(--violet); }
.nav-main a:hover::after { transform: scaleX(1); }
/* Текущая страница в верхнем меню — просто фиолетовый текст, без подчёркивания.
   Подчёркивание остаётся только у активного (открытого) раздела. */
.site-header .nav-main a.is-current { color: var(--violet); }
.site-header .nav-main a.is-current:not(.active)::after { transform: scaleX(0); }

/* ── Desktop mega-menu ─────────────────────────────────────────────
   Полноширинная панель под всей шапкой, выровнена по контейнеру сайта.
   Родительский текст — ссылка на раздел; стрелка раскрывает меню. */

/* Триггер = текст-ссылка + кнопка-стрелка в одной обёртке */
.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-arrow {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.18s ease;
}
.nav-arrow svg { width: 14px; height: 14px; transition: transform 0.2s ease; }
.nav-arrow:hover { color: var(--violet); }
.nav-arrow:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

/* Активный пункт первого уровня: фиолетовый текст, подчёркивание, стрелка вверх */
.nav-mega-trigger.active { color: var(--violet); }
.nav-mega-trigger.active::after { transform: scaleX(1); }
.nav-item.open .nav-arrow { color: var(--violet); }
.nav-item.open .nav-arrow svg { transform: rotate(180deg); }

/* Полупрозрачная подложка под открытым меню (очень слабая) */
.nav-mega-scrim {
  position: fixed;
  inset: 0;
  z-index: 1190;
  background: rgba(31, 25, 70, 0.07);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s;
}
.nav-mega-scrim.show { opacity: 1; visibility: visible; pointer-events: auto; }

/* Пока открыто мега-меню — шапка лежит ВЫШЕ подложки (scrim z-index:1190),
   чтобы пункты меню оставались кликабельными и принимали mouseenter.
   Без этого scrim перекрывает строку меню и наведение пункт→пункт не работает. */
html.mega-open .site-header { z-index: 1195; }

.nav-mega {
  position: fixed;
  z-index: 1200;
  width: max-content;
  min-width: 520px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(48, 30, 110, 0.16), 0 2px 8px rgba(48, 30, 110, 0.05);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, visibility 0.16s;
}
.nav-mega.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.nav-mega-panel { display: none; }
.nav-mega-panel.show { display: block; }

.nav-mega-inner {
  display: flex;
  gap: 40px;
  padding: 26px 32px;
  align-items: stretch;
  position: relative;
  /* Единая минимальная высота — панели не прыгают по размеру */
  min-height: 312px;
}
.nav-mega-panel--compact .nav-mega-inner {
  gap: 0;
  min-height: 0;
  padding: 20px 24px 22px;
}
.nav-mega-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 0 0 auto;
}
/* Колонки размер по содержимому — подсветка при наведении всегда по ширине текста */
.nav-mega-col-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  padding: 0 12px;
  margin-bottom: 8px;
}
.nav-mega-panel--compact .nav-mega-col-title { margin-bottom: 10px; }
.nav-mega-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-mega-panel--compact .nav-mega-link { padding-right: 24px; }
.nav-mega-link:hover { background: var(--violet-soft); color: var(--violet); }
.nav-mega-link:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.nav-mega-link--all { font-weight: 600; }
/* Пункт с раскрывающимся под-разделом — подсвечен, пока колонка открыта */
.nav-mega-link.has-flyout.flyout-open { background: var(--violet-soft); color: var(--violet); }
.nav-mega-link.has-flyout.flyout-open .lk-sub { color: var(--violet); }

/* Под-раздел (напр. «Виды УЗИ») раскрывается ВНУТРИ колонки — вложенным
   списком под пунктом. Ничего не сдвигается по горизонтали, всё кликается. */
.nav-mega-fly { display: flex; flex-direction: column; }
.nav-mega-sublist {
  display: none;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 6px 16px;
  padding-left: 10px;
  border-left: 2px solid var(--violet-soft);
}
.nav-mega-sublist.show { display: flex; }
.nav-mega-sublink {
  width: max-content;
  font-size: 14px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.nav-mega-sublink .lk-label { color: var(--text-muted); }
.nav-mega-sublink:hover .lk-label { color: var(--violet); }
/* Шеврон у раскрывающегося пункта поворачивается вниз, когда открыт */
.nav-mega-link.has-flyout .lk-sub svg { transition: transform 0.15s ease; }
.nav-mega-link.has-flyout.flyout-open .lk-sub svg { transform: rotate(90deg); }
/* Внутри выпадающего меню текущая страница НЕ выделяется отдельно —
   подсвечивается только наведённый пункт (ховер). Так логика не путается. */
.nav-mega-link .lk-sub {
  margin-left: auto;
  padding-left: 14px;
  color: var(--text-light);
  display: inline-flex;
}
.nav-mega-link:hover .lk-sub { color: var(--violet); }
/* Иконка площадки (Яндекс, 2ГИС, ПроДокторов) перед названием */
.nav-mega-ico {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 4px;
}
.nav-mega-link--icon { gap: 10px; }
/* Стрелка «внешняя ссылка» */
.nav-mega-link .lk-ext {
  margin-left: auto;
  padding-left: 14px;
  color: var(--text-light);
  display: inline-flex;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.nav-mega-link:hover .lk-ext { opacity: 1; color: var(--violet); }

/* Боковой CTA / информационный блок — прижат к правому краю панели */
.nav-mega-aside {
  flex: 0 0 auto;
  width: 258px;
  margin-left: auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border-radius: 16px;
  background: linear-gradient(165deg, var(--violet-soft) 0%, #fbfaff 100%);
  border: 1px solid var(--border);
}
.nav-mega-aside h4 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--text); }
.nav-mega-aside p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-muted); }
.nav-mega-aside .btn {
  width: 100%;
  justify-content: center;
  margin-top: auto;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  height: auto;
  min-height: 52px;
  padding: 12px 18px;
  font-size: 15px;
}
.nav-mega-tel {
  display: block;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--violet);
  text-decoration: none;
}
.nav-mega-tel:hover { color: var(--violet-deep); text-decoration: underline; }
.nav-mega-address {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
}
.nav-mega-address strong { color: var(--text); font-weight: 600; }

/* Нижняя подпись на всю ширину (для «Цены») */
.nav-mega-foot {
  padding: 0 32px 24px;
  margin-top: -8px;
}
.nav-mega-note {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-light);
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

@media (max-width: 1280px) {
  .nav-mega, .nav-mega-scrim { display: none !important; }
  .nav-arrow { display: none; }
}
/* Среднее десктоп-окно: ужимаем только расстояние между пунктами и шрифт.
   Размер шеврона и его зазор заданы базовыми правилами и не меняются. */
@media (min-width: 1281px) and (max-width: 1599px) {
  .site-header .nav-main { gap: 8px; }
  .site-header .nav-main a { font-size: 14px; }
}

.header-contact {
  display: flex;
  align-items: center;
  gap: 20px;
}
.phone-link {
  font-weight: 700;
  font-size: 22px;
  color: var(--violet-deep);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.phone-link:hover { color: var(--violet); }
.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: var(--violet);
  line-height: 1.35;
  white-space: nowrap;
}
.contact-meta strong { color: var(--violet); font-weight: 600; }

.accessibility-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.2;
  white-space: nowrap;
}
.accessibility-link .eye {
  width: 38px; height: 38px;
  border-radius: 999px;
  background: #111;
  display: grid;
  place-items: center;
  color: #fff;
}
.accessibility-link .eye svg { width: 22px; height: 22px; }

/* Header bottom row: search + CTA */
.header-bottom {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 14px;
}
.search-wrap {
  position: relative;
}
.search-wrap input {
  width: 100%;
  height: 56px;
  padding: 0 56px 0 24px;
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: 15px;
  color: var(--text);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.search-wrap input:focus {
  outline: none;
  background: #fff;
  border-color: var(--violet);
}
.search-wrap input::placeholder { color: var(--text-light); }
/* hide native search clear (×) button across the site */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}
.search-wrap .search-btn {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border: 0; background: transparent;
  border-radius: var(--r-md);
  color: var(--text-muted);
  display: grid; place-items: center;
}
.search-wrap .search-btn:hover { background: #fff; color: var(--violet); }

.max-btn {
  width: 56px; height: 56px;
  border-radius: var(--r-md);
  background: linear-gradient(140deg, #2563EB 0%, #7C3AED 50%, #9333EA 100%);
  border: 0;
  display: grid; place-items: center;
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(91, 43, 216, 0.28);
}
.max-btn img, .max-btn svg { width: 26px; height: 26px; }
.max-btn:hover {
  box-shadow: 0 10px 26px rgba(91, 43, 216, 0.42);
  transform: translateY(-1px);
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  padding: 8px 0 0;
}
.hero-wrap {
  position: relative;
  border-radius: var(--r-2xl);
  overflow: hidden;
  background: linear-gradient(135deg, #FFF0F0 0%, #F1EAFC 100%);
  min-height: 560px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
}

/* Yandex badge */
.yandex-badge {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  opacity: 0;
  animation: badgePulseIn 1s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
  transition: transform 0.3s ease;
}
.yandex-badge img {
  height: 128px;
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.08));
}
.yandex-badge:hover {
  transform: translateY(-2px);
}
.yandex-badge { cursor: pointer; }

/* Yandex tooltip */
.ya-tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  width: 280px;
  background: #fff;
  border-radius: 16px;
  padding: 20px 20px 18px;
  box-shadow: 0 12px 36px rgba(48, 30, 110, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.88) rotate(-1deg);
  filter: blur(6px);
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s 0.45s;
  z-index: 10;
  pointer-events: none;
}
.ya-tooltip.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1) rotate(0deg);
  filter: blur(0px);
  transition:
    opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.16, 1.2, 0.3, 1),
    filter 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s 0s;
  pointer-events: auto;
}
.ya-tooltip strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.ya-tooltip p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

/* Tooltip inner design */
.ya-tooltip {
  background: linear-gradient(155deg, #FFFDF8 0%, #FFF8F0 40%, #FFF0E8 100%);
  border: 1px solid rgba(255, 200, 120, 0.2);
}
.ya-tooltip-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 180, 80, 0.15);
}
.ya-tooltip-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ya-tooltip-rating {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ya-rating-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
}
.ya-rating-stars {
  font-size: 14px;
  color: #FFB800;
  letter-spacing: 1px;
}
.ya-tooltip p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 14px;
}
.ya-tooltip-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--violet);
  transition: gap 0.3s ease, color 0.2s ease;
}
.ya-tooltip-link span {
  transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
  display: inline-block;
}
.ya-tooltip-link:hover {
  color: var(--violet-hover);
  gap: 8px;
}
.ya-tooltip-link:hover span {
  transform: translateX(3px);
}

.ya-tooltip-close {
  position: absolute;
  top: 10px; right: 12px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  font-size: 16px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.ya-tooltip-close:hover {
  background: #fff;
  color: var(--text);
}

@keyframes badgePulseIn {
  0% {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
  }
}

.hero-figure {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 560px;
}
.hero-figure .hero-blob {
  position: absolute;
  width: 78%;
  height: auto;
  left: -6%;
  top: 2%;
  z-index: 1;
}
.hero-doctors-picture {
  display: contents;
}
.hero-figure .hero-doctors {
  position: relative;
  z-index: 2;
  max-height: 560px;
  aspect-ratio: 940 / 864;
  height: auto;
  width: min(92%, 610px);
  object-fit: contain;
  object-position: bottom center;
  margin-bottom: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-right {
  padding: 28px 28px 28px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hero-card {
  background: linear-gradient(145deg, rgba(255,225,210,0.75) 0%, rgba(220,200,250,0.7) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: none;
  border-radius: var(--r-xl);
  padding: 44px 44px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  flex: 1;
}
.hero-title {
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  text-wrap: pretty;
}
.hero-sub {
  font-size: 16px;
  color: var(--text);
  margin: 0;
  max-width: 90%;
}
.hero-cta { margin-top: auto; }

.hero-stat {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 32px 40px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 36px;
  box-shadow: var(--shadow-card);
}
.hero-stat .num {
  font-size: 56px;
  font-weight: 700;
  color: var(--violet);
  line-height: 0.95;
  letter-spacing: -0.025em;
}
.hero-stat .label {
  font-size: 22px;
  color: var(--violet);
  margin-top: 6px;
  font-weight: 600;
}
.hero-stat .text {
  font-size: 15px;
  color: var(--violet);
  line-height: 1.5;
  font-weight: 500;
  border-left: 1px solid rgba(96, 84, 177, 0.18);
  padding-left: 36px;
  margin-left: -8px;
}

/* =========================================================
   Sections
   ========================================================= */

.section { padding: var(--section-pad) 0 0; }
.section-narrow { padding: var(--section-pad-tight) 0 0; }

.section-title {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0 0 48px;
  text-wrap: balance;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--title-gap);
  gap: 24px;
  position: relative;
}
.section-head .section-title { text-align: center; margin: 0; }
.section-head .slider-controls {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
.slider-controls {
  display: flex;
  gap: 12px;
}

/* =========================================================
   Services (4 cards)
   ========================================================= */

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.service-card {
  background: #FFF0EF;
  border-radius: var(--r-lg);
  padding: 28px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 380px;
  position: relative;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;
}
.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, #9B85ED 0%, #6F5DD8 45%, #4A3CB8 100%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(96, 84, 177, 0.28);
}
.service-card:hover::before { opacity: 1; }
.service-card .caption {
  font-size: 15.4px;
  color: var(--text);
  opacity: 1;
  line-height: 1.4;
  font-weight: 500;
  transition: color 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.service-card:hover .caption { color: rgba(255,255,255,0.85); opacity: 1; }
.service-card .visual {
  flex: 1;
  display: grid;
  place-items: center;
  position: relative;
}
.service-card .visual .circle {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  transition: background 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.service-card:hover .visual .circle {
  background: rgba(255,255,255,0.18);
  transform: scale(1.04);
}
.service-card .visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.65s ease;
}
.service-card:hover .visual img {
  transform: scale(1.08) rotate(-2deg);
}
.service-card .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.service-card .name {
  font-size: 24.2px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-wrap: balance;
  transition: color 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.service-card:hover .name { color: #fff; }
.service-card .arrow {
  width: 40px; height: 40px;
  border-radius: 999px;
  background: #F9BBB7;
  display: grid; place-items: center;
  color: #fff;
  flex-shrink: 0;
  border: 0;
  transition: transform 0.4s ease, background 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 4px 12px rgba(249, 187, 183, 0.55);
}
.service-card .arrow svg { transition: transform 0.4s ease; }
.service-card:hover .arrow {
  background: #fff;
  color: var(--violet);
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}
.service-card:hover .arrow svg { transform: none; }

/* =========================================================
   Principles (numbered grid + photos)
   ========================================================= */

.principles {
  background: var(--bg);
}
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.principle-card {
  background: linear-gradient(140deg, #F6F0FA 0%, #FFF1EC 100%);
  background-size: 180% 180%;
  background-position: 0% 0%;
  border-radius: var(--r-lg);
  padding: 32px 32px 36px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 280px;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease,
              background-position 1.2s ease;
}
/* Cursor-tracking spotlight (coral) — odd cards */
.principle-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background:
    radial-gradient(
      420px circle at var(--mx, 50%) var(--my, 0%),
      rgba(236, 95, 74, 0.32),
      transparent 55%
    );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 0;
}
.principle-card > * { position: relative; z-index: 1; }
.principle-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
  background-position: 100% 100%;
}
.principle-card:hover::before { opacity: 1; }

/* Alternating gradient for visual rhythm */
.principle-card:nth-of-type(even) {
  background: linear-gradient(140deg, #FFF1EC 0%, #F6F0FA 100%);
  background-size: 180% 180%;
  background-position: 0% 0%;
}
.principle-card:nth-of-type(even)::before {
  background:
    radial-gradient(
      420px circle at var(--mx, 50%) var(--my, 0%),
      rgba(96, 84, 177, 0.28),
      transparent 55%
    );
}
.principle-card h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  max-width: 95%;
  text-wrap: balance;
}
.principle-card p {
  margin: 0;
  font-size: 17px;
  color: var(--text);
  line-height: 1.5;
}
.principle-photo {
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: 280px;
  background: linear-gradient(135deg, var(--violet-soft) 0%, var(--pink-card-2) 100%);
  position: relative;
}
.principle-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.55), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(236,95,74,0.12), transparent 50%);
}
.principle-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute; inset: 0;
}

.principles-cta {
  text-align: center;
  margin-top: var(--block-gap);
}
.principles-cta h2 {
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 0 0 36px;
  line-height: 1.15;
  text-wrap: balance;
}

/* =========================================================
   Help Nearby (image card)
   ========================================================= */

.help-section { padding: var(--section-pad-tight) 0 0; }
.help-wrap {
  position: relative;
  border-radius: var(--r-2xl);
  overflow: hidden;
  min-height: 420px;
  background: linear-gradient(120deg, #D9C9B5 0%, #B7A38B 50%, #97836A 100%);
  display: flex;
  align-items: center;
  padding: 56px;
}
.help-wrap > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.help-card {
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--r-lg);
  padding: 44px 40px 48px;
  max-width: 380px;
  display: flex;
  flex-direction: column;
}
.help-card > img:first-child {
  margin-bottom: 32px;
}
.help-card .badge-heart {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: var(--coral);
  border-radius: var(--r-md);
  color: #fff;
}
.help-card h3 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 14px;
  letter-spacing: -0.015em;
  color: var(--text);
  line-height: 1.15;
}
.help-card p {
  font-size: 16px;
  color: var(--text);
  line-height: 1.5;
  margin: 0;
}

/* =========================================================
   Doctors section
   ========================================================= */

.doctors-section { padding: var(--section-pad) 0 0; }
.doctor-card {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px;
  border-radius: var(--r-2xl);
  background:
    radial-gradient(ellipse 80% 80% at 0% 100%, #FFD8CE 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 100% 0%, #F6DEE6 0%, transparent 60%),
    linear-gradient(135deg, #FFE9E3 0%, #FCE2E2 50%, #F5DEE0 100%);
  position: relative;
  padding: 24px 24px 0 24px;
  min-height: 560px;
  overflow: hidden;
}
.doctor-photo {
  background: transparent;
  position: relative;
  overflow: hidden;
  /* No fixed height — stretches to match the info panel in the grid */
  min-height: 400px;
  align-self: stretch;
  margin-bottom: 0;
  padding-bottom: 0;
}
.doctor-photo img {
  /* Fill full container height, pin to bottom, center horizontally */
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  max-width: 130%;
  margin-bottom: 0;
  display: block;
}
.doctor-name-badge {
  position: absolute;
  bottom: 24px;
  left: 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 260px;
  z-index: 3;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.doctor-name-badge .nm { font-size: 17px; font-weight: 600; color: var(--text); }
.doctor-name-badge .role { font-size: 13px; color: var(--text); }

.doctor-slider-arrows {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 6px;
  z-index: 4;
  pointer-events: none;
}
.doctor-slider-arrows .round-btn {
  pointer-events: auto;
  background: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-soft);
}
.doctor-slider-arrows .round-btn:hover {
  background: var(--violet);
  color: #fff;
  border-color: var(--violet);
  box-shadow: var(--shadow-soft);
  transform: scale(1.08);
}

.doctor-info {
  background: #fff;
  border-radius: var(--r-xl);
  padding: 48px 48px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  justify-content: center;
}
.doctor-info .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.doctor-info .brand .logo-img { width: 170px; }
.doctor-info .brand .logo-heart { width: 36px; height: 36px; }
.doctor-info .brand .logo-text { font-size: 14px; }
.doctor-info h2 {
  margin: 0;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.18;
  color: var(--text);
}

/* Doctor slider — photo & badge transitions */
@keyframes doc-exit-next {
  from { transform: translateX(-50%) scale(1);    opacity: 1; filter: blur(0px); }
  to   { transform: translateX(calc(-50% - 70px)) scale(0.93); opacity: 0; filter: blur(5px); }
}
@keyframes doc-exit-prev {
  from { transform: translateX(-50%) scale(1);    opacity: 1; filter: blur(0px); }
  to   { transform: translateX(calc(-50% + 70px)) scale(0.93); opacity: 0; filter: blur(5px); }
}
@keyframes doc-enter-next {
  from { transform: translateX(calc(-50% + 70px)) scale(0.93); opacity: 0; filter: blur(5px); }
  to   { transform: translateX(-50%) scale(1);    opacity: 1; filter: blur(0px); }
}
@keyframes doc-enter-prev {
  from { transform: translateX(calc(-50% - 70px)) scale(0.93); opacity: 0; filter: blur(5px); }
  to   { transform: translateX(-50%) scale(1);    opacity: 1; filter: blur(0px); }
}
@keyframes badge-exit-anim {
  from { transform: translateY(0);   opacity: 1; }
  to   { transform: translateY(14px); opacity: 0; }
}
@keyframes badge-enter-anim {
  from { transform: translateY(18px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}

/* Doctor info panel — wave animation on button hover */
@keyframes stat-wave {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.1); }
  65%  { transform: scale(0.98); }
  100% { transform: scale(1); }
}

.doctor-stats > div {
  transform-origin: center bottom;
}

.doctor-info .btn {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease, box-shadow 0.3s ease;
}
.doctor-info .btn:hover {
  transform: translateY(-2px);
}
.doctor-info .btn:hover ~ .doctor-stats-dummy,
.doctor-info:has(.btn:hover) .doctor-stats > div:nth-child(1) {
  animation: stat-wave 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0s;
}
.doctor-info:has(.btn:hover) .doctor-stats > div:nth-child(2) {
  animation: stat-wave 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.15s;
}
.doctor-info:has(.btn:hover) .doctor-stats > div:nth-child(3) {
  animation: stat-wave 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.3s;
}
.doctor-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 48px;
  margin-top: 4px;
}
.doctor-stats .num {
  font-size: 44px;
  font-weight: 700;
  color: var(--violet);
  letter-spacing: -0.02em;
  line-height: 1;
}
.doctor-stats .label {
  font-size: 13px;
  color: var(--violet);
  margin-top: 6px;
}

/* =========================================================
   REVIEWS — NEW UNIFIED SECTION
   ========================================================= */

.reviews-new { padding: var(--section-pad) 0 0; }

/* ── CTA card — pink outer wrap, two white inner cards ── */
.rev-cta {
  background: linear-gradient(135deg, #FDE9E5 0%, #F5DFDB 100%);
  border-radius: var(--r-2xl);
  padding: 28px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  margin-top: var(--title-gap);
  align-items: stretch;
}
.rev-cta-left {
  background: #fff;
  border-radius: var(--r-xl);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.rev-cta-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: #F6F7F9;
  flex-shrink: 0;
}
.rev-cta-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.rev-cta-score {
  font-size: 64px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.03em;
}
.rev-cta-stars {
  color: var(--yellow-star);
  font-size: 24px;
  letter-spacing: 2px;
  line-height: 1;
}
.rev-cta-right {
  background: #fff;
  border-radius: var(--r-xl);
  padding: 44px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}
.rev-cta-right h3 {
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: pretty;
  margin: 0;
}
.rev-cta-right p {
  font-size: 17px;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}

/* Компактная типографика CTA-отзыва на мобильном */
@media (max-width: 560px) {
  .rev-cta-right { gap: 14px; padding: 22px; }
  .rev-cta-right h3 { font-size: 19px; line-height: 1.25; }
  .rev-cta-right p { font-size: 14px !important; line-height: 1.5; }
}

/* ── External review cards ── */
.ext-rev-viewport {
  overflow: hidden;
  margin-top: var(--title-gap);
}
.ext-rev-track {
  display: grid;
  grid-template-columns: repeat(25, calc(33.333% - 14px));
  gap: 20px;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  touch-action: pan-y;
}
.ext-rev-card {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
  transform-origin: center center;
}
.ext-rev-track.is-moving .ext-rev-card {
  transform: scale(0.965);
  opacity: 0.8;
}
.ext-rev-track.is-dragging {
  transition: none;
  cursor: grabbing;
}
.ext-rev-viewport { cursor: grab; }
.ext-rev-card {
  background: var(--bg-soft);
  border-radius: var(--r-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ext-rev-inner {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}
.ext-rev-date {
  font-size: 12px;
  color: var(--text-light);
}
.ext-rev-source {
  display: flex;
  align-items: center;
  gap: 10px;
}
.plat-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.plat-icon-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}
.plat-chip-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
}
.ext-rev-source-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.plat-name  { font-size: 13px; font-weight: 600; color: var(--text); }
.plat-type  { font-size: 11px; color: var(--text-muted); }
.ext-rev-score {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.ext-rev-score .star-svg { color: var(--yellow-star); flex-shrink: 0; }
.ext-rev-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  flex: 1;
  margin: 0;
}
.ext-rev-text.is-collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ext-rev-toggle {
  width: fit-content;
  padding: 0;
  border: 0;
  background: none;
  color: var(--violet);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.ext-rev-toggle:hover,
.ext-rev-toggle:focus-visible {
  color: var(--violet-hover);
  text-decoration: underline;
}
.ext-rev-link {
  font-size: 14px;
  color: var(--violet);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0;
  transition: color 0.2s ease, gap 0.2s ease;
}
.ext-rev-link:hover {
  color: var(--violet-hover);
  text-decoration: none;
  gap: 5px;
}
.ext-rev-link::after {
  content: '\2192';
  opacity: 0;
  font-size: 14px;
  transition: opacity 0.2s ease;
  display: inline-block;
}
.ext-rev-link:hover::after { opacity: 1; }

/* ── Platform bar ── */
.platform-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.plat-chip {
  flex: 1 1 200px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 22px;
  border-radius: var(--r-lg);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.18s ease;
  color: var(--text);
  min-height: 64px;
}
.plat-chip:hover { opacity: 0.88; transform: translateY(-2px); }
.plat-chip-logo  { flex-shrink: 0; display: flex; align-items: center; }
.plat-chip-arrow { margin-left: auto; flex-shrink: 0; opacity: 0.7; }
.plat-chip-yandex { background: #FFF3C4; }
.plat-chip-2gis   { background: #D8F4E4; }
.plat-chip-pro    { background: #fff; border: 1px solid var(--border); }
.plat-chip-cta    { background: var(--violet); color: #fff; }
.plat-chip-cta .plat-chip-arrow { opacity: 0.9; }
.plat-chip-cta:hover { opacity: 1; background: var(--violet-hover); transform: translateY(-2px); }
.pro-logo-text { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }

/* ── Ratings slider arrows — high-contrast style ── */
.section-head-c .round-btn {
  background: #323C43;
  border-color: #323C43;
  color: #fff;
}
.section-head-c .round-btn:hover:not(:disabled) {
  background: rgb(96, 84, 177);
  border-color: rgb(96, 84, 177);
  color: #fff;
  box-shadow: 0 4px 16px rgba(96, 84, 177, 0.35);
  transform: scale(1.08);
}
.section-head-c .round-btn:disabled {
  background: #323C43;
  border-color: #323C43;
  color: #fff;
  opacity: 0.3;
}
.section-head-c {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: var(--block-gap);
}
.section-head-c .section-title { margin: 0; }
.section-head-c .slider-controls { display: flex; gap: 8px; justify-content: flex-end; }

/* ── Yandex badge inside CTA card ── */
.rev-cta-rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}
.rev-cta-rating-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rev-cta-badge {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  flex-shrink: 0;
  margin-top: 0;
  align-self: center;
}
.rev-cta-badge img {
  width: 56px !important;
  height: auto !important;
  filter: none !important;
}
.rev-cta-badge .ya-tooltip { left: 0; right: auto; }

@media (max-width: 900px) {
  .rev-cta { grid-template-columns: 1fr; padding: 16px; gap: 12px; }
  .rev-cta-left { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 20px; padding: 24px; }
  .rev-cta-score { font-size: 44px; }
  .rev-cta-right { padding: 24px; }
  /* Шильдик у правого края — тултип раскрываем влево и ограничиваем ширину,
     чтобы он не обрывался за краем экрана на планшете. */
  .rev-cta-badge .ya-tooltip {
    left: auto; right: 0;
    width: min(280px, calc(100vw - 32px));
  }
  .platform-bar { grid-template-columns: 1fr 1fr; }
  .ext-rev-track { grid-template-columns: repeat(25, calc(50% - 10px)); }
  .section-head-c { grid-template-columns: 1fr auto; }
  .section-head-c > div:first-child { display: none; }
  .section-head-c .section-title { text-align: left; }
}
/* 768–900 (планшет): CTA-отзыв — как на десктопе (две колонки), только
   компактнее. Ниже 768 остаётся одноколоночная раскладка из правила ≤900. */
@media (min-width: 768px) and (max-width: 900px) {
  .rev-cta { grid-template-columns: 256px 1fr; padding: 18px; gap: 14px; }
  .rev-cta-left {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 14px;
    padding: 26px 24px;
  }
  .rev-cta-score { font-size: 52px; }
  .rev-cta-right { padding: 28px; }
  /* рейтинг и шильдик опускаем вниз карточки, чтобы заполнить пустоту */
  .rev-cta-left .rev-cta-rating-row { margin-top: auto; }
}
@media (max-width: 600px) {
  .platform-bar { gap: 8px; }
  .plat-chip { flex-basis: 140px; padding: 14px 14px; font-size: 13px; }
  .ext-rev-track { grid-template-columns: repeat(25, 100%); }
}
/* До 768 — каждая платформенная плашка в отдельную строку (одна колонка) */
@media (max-width: 768px) {
  .platform-bar { gap: 10px; }
  .platform-bar .plat-chip { flex-basis: 100%; }
}

/* =========================================================
   Reviews (own + independent)
   ========================================================= */

.reviews-section { padding: var(--section-pad) 0 0; }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.review-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 300px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.review-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }

.review-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border-radius: var(--r-sm);
  padding: 6px 0 6px 0;
  font-size: 14px;
  font-weight: 600;
}
.rating-pill .star { color: var(--yellow-star); }
.rating-pill .label-good {
  color: var(--green-text);
  background: var(--green-pill);
  border-radius: 6px;
  padding: 2px 8px;
  margin-left: 2px;
}
.review-date {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 0;
}
.review-body {
  background: #fff;
  border-radius: var(--r-md);
  padding: 22px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.review-body p {
  margin: 0;
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.review-source {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.review-body .read-more {
  font-size: 14px;
  color: var(--violet);
  font-weight: 600;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s ease, gap 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.review-body .read-more::after {
  content: '→';
  display: inline-block;
  font-size: 15px;
  transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
  transform: translateX(-6px);
}
.review-body .read-more:hover {
  color: var(--violet-hover);
  gap: 8px;
}
.review-body .read-more:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.reviews-bottom {
  text-align: center;
  margin-top: 32px;
}
.reviews-bottom a {
  color: var(--violet);
  font-weight: 600;
  font-size: 16px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s ease, gap 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.reviews-bottom a::before {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--violet);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.reviews-bottom a::after {
  content: '→';
  display: inline-block;
  font-size: 17px;
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.3s ease;
  opacity: 0.6;
  transform: translateX(0);
}
.reviews-bottom a:hover {
  color: var(--violet-hover);
}
.reviews-bottom a:hover::before {
  transform: scaleX(1);
  transform-origin: left center;
}
.reviews-bottom a:hover::after {
  opacity: 1;
  transform: translateX(4px);
}

/* =========================================================
   Review form
   ========================================================= */

.review-form-section { padding: var(--section-pad-tight) 0 0; }
.review-form-wrap {
  background: linear-gradient(135deg, #F2E2EE 0%, #FCE3D7 100%);
  border-radius: var(--r-2xl);
  padding: 4px;
  box-shadow: var(--shadow-soft);
}
.review-form-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 0;
  border-radius: var(--r-2xl);
  overflow: hidden;
}
.review-form-left {
  padding: 56px 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: center;
}
.review-form-left .avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  background: #ddd;
}
.review-form-left .avatar img { width: 100%; height: 100%; object-fit: cover; }
.review-form-left h3 {
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.015em;
  line-height: 1.18;
  color: var(--text);
  text-wrap: balance;
}
.review-form-left p {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
}

.review-form-card {
  background: #fff;
  border-radius: var(--r-2xl);
  padding: 44px 44px;
  margin: 24px 24px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.field label .req { color: var(--coral); }
/* Ошибка валидации поля. В макетах формы отправлялись скриптом и ошибок не
   показывали — на сервере они появляются, поэтому стиль добавлен здесь, а не
   в стилях отдельной страницы: правило нужно каждой серверной форме. */
.field-error {
  font-size: 13px;
  line-height: 1.35;
  color: var(--coral);
}
/* Подсказка в подписи поля: допустимые форматы, ограничения. */
.field-hint {
  font-weight: 400;
  opacity: 0.75;
}
.field input,
.field select,
.field textarea {
  height: 52px;
  padding: 0 18px;
  border-radius: var(--r-md);
  background: var(--bg-soft);
  border: 1px solid transparent;
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.field textarea {
  height: 110px;
  padding: 16px 18px;
  resize: vertical;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'><path d='M4 6l4 4 4-4' stroke='%236F6F78' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 16px;
  padding-right: 44px;
}

/* Custom select */
.custom-select {
  position: relative;
  width: 100%;
}
.custom-select-trigger {
  height: 52px;
  padding: 0 44px 0 18px;
  border-radius: var(--r-md);
  background: var(--bg-soft);
  border: 1px solid transparent;
  color: var(--text);
  font-size: inherit;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
  user-select: none;
  position: relative;
}
.custom-select-trigger.placeholder { color: var(--text-light); }
.custom-select.open .custom-select-trigger,
.custom-select-trigger:hover {
  background: #fff;
  border-color: var(--violet);
}
.custom-select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: flex;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease;
}
.custom-select.open .custom-select-arrow {
  transform: translateY(-50%) rotate(180deg);
  color: var(--violet);
}
.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(48, 30, 110, 0.12);
  z-index: 50;
  padding: 6px;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--violet-soft) transparent;
}
.custom-select-dropdown::-webkit-scrollbar {
  width: 6px;
}
.custom-select-dropdown::-webkit-scrollbar-track {
  background: transparent;
  margin: 6px 0;
}
.custom-select-dropdown::-webkit-scrollbar-thumb {
  background: var(--violet-soft);
  border-radius: 3px;
}
.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--violet);
}
.custom-select.open .custom-select-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.custom-select-option {
  padding: 12px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  color: var(--text);
  transition: background 0.15s ease, color 0.15s ease;
}
.custom-select-option:hover {
  background: var(--violet-soft);
  color: var(--violet);
}
.custom-select-option.selected {
  background: var(--violet);
  color: #fff;
  font-weight: 500;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--violet);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-light); }

.stars-input {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  height: 52px;
}
.stars-input button {
  background: transparent;
  border: 0;
  color: var(--yellow-star);
  font-size: 28px;
  padding: 0;
  line-height: 1;
  transition: transform 0.15s ease;
}
.stars-input button:hover { transform: scale(1.12); }
.stars-input button.off { color: #E4E4EA; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  cursor: pointer;
  user-select: none;
}
.checkbox-row input[type=checkbox] {
  appearance: none;
  width: 20px; height: 20px;
  border: 1.5px solid var(--green);
  border-radius: 5px;
  margin: 0;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  transition: background 0.15s ease;
}
.checkbox-row input[type=checkbox]:checked {
  background: var(--green);
}
.checkbox-row input[type=checkbox]:checked::after {
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 6px; height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checkbox-row a { color: var(--green-text); font-weight: 500; }

.rev-cta-qc-link {
  color: var(--green-text);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--green-text) 30%, transparent);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.rev-cta-qc-link:hover {
  color: var(--green-hover);
  border-bottom-color: var(--green-hover);
}

/* =========================================================
   Booking form
   ========================================================= */

.booking-section { padding: var(--section-pad-tight) 0 0; }
.booking-wrap {
  background: var(--violet);
  border-radius: var(--r-2xl);
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  overflow: hidden;
  position: relative;
}
.booking-wrap::before {
  content: "";
  position: absolute;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  top: -120px; right: 30%;
}
/* Cursor-following glow on booking left */
.booking-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      500px circle at var(--bx, 30%) var(--by, 50%),
      rgba(255, 255, 255, 0.14),
      transparent 50%
    ),
    radial-gradient(
      350px circle at var(--bx, 30%) var(--by, 50%),
      rgba(180, 160, 255, 0.2),
      transparent 45%
    );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}
.booking-wrap:hover::after {
  opacity: 1;
}
.booking-left {
  padding: 56px 56px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  color: #fff;
  position: relative;
  z-index: 2;
  align-items: flex-start;
  justify-content: center;
}
.booking-left h2 {
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.015em;
  line-height: 1.15;
  text-wrap: balance;
}
.booking-left p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255,255,255,0.85);
  max-width: 340px;
}
.booking-left .phone {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.booking-left .max-chat {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(140deg, #2563EB 0%, #7C3AED 50%, #9333EA 100%);
  color: #fff;
  padding: 14px 22px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 15px;
  border: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.booking-left .max-chat:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,0.18); }
.booking-left .max-chat .max-icon {
  width: auto; height: auto;
  border-radius: 0;
  background: none;
  display: grid; place-items: center;
  color: #fff;
}
.booking-left .max-chat .max-icon img { width: 26px !important; height: 26px !important; }

.booking-card {
  background: #fff;
  border-radius: var(--r-2xl);
  padding: 40px 40px;
  margin: 24px 24px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.has-icon { position: relative; }
.has-icon .field-icon {
  position: absolute;
  right: 16px;
  bottom: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Datepicker & Timepicker — full overlay on booking-card */
.datepicker, .timepicker {
  position: absolute;
  inset: 0;
  background: #fff;
  border-radius: var(--r-2xl);
  z-index: 60;
  padding: 32px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.85) translateY(32px) rotate(-1deg);
  filter: blur(10px);
  transition:
    opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s 0.5s;
}
.datepicker.open, .timepicker.open {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0) rotate(0deg);
  filter: blur(0px);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s 0s;
}

.tp-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 0;
  display: grid; place-items: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  z-index: 2;
}
.tp-close:hover {
  background: var(--coral-soft);
  color: var(--coral);
  transform: rotate(90deg);
}

.dp-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.dp-header .dp-title {
  flex: 1;
  text-align: center;
}
.dp-close-inline {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 0;
  display: grid; place-items: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.dp-close-inline:hover {
  background: var(--coral-soft);
  color: var(--coral);
  transform: rotate(90deg);
}

/* Stagger animation for picker elements */
.datepicker.open .dp-header {
  animation: dpFadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}
.datepicker.open .dp-days-header {
  animation: dpFadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}
.datepicker.open .dp-grid {
  animation: dpFadeIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}
.timepicker.open .tp-title {
  animation: dpFadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}
.timepicker.open .tp-grid {
  animation: dpFadeIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}
@keyframes dpFadeIn {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.dp-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}
.dp-nav {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 0;
  display: grid; place-items: center;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}
.dp-nav:hover { background: var(--violet-soft); color: var(--violet); }

.dp-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}
.dp-days-header span {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  padding: 6px 0;
}

.dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  flex: 1;
  align-content: start;
}
.dp-empty { }
.dp-day {
  border: 0;
  background: transparent;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 10px 4px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.2s ease;
}
.dp-day:hover:not(.dp-disabled) {
  background: var(--violet-soft);
  color: var(--violet);
  transform: scale(1.08);
}
.dp-day.dp-today {
  background: var(--bg-soft);
  font-weight: 700;
  border: 1px solid var(--border);
}
.dp-day.dp-selected {
  background: var(--violet);
  color: #fff;
  font-weight: 600;
}
.dp-day.dp-selected:hover {
  background: var(--violet-hover);
  color: #fff;
}
.dp-day.dp-disabled {
  color: var(--text-light);
  opacity: 0.4;
  cursor: not-allowed;
}

/* Timepicker */
.tp-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 24px;
}
.tp-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  flex: 1;
  align-content: start;
}
.tp-slot {
  padding: 12px 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.2s ease;
  text-align: center;
}
.tp-slot:hover {
  background: var(--violet-soft);
  color: var(--violet);
  border-color: var(--violet);
  transform: scale(1.04);
}
.tp-slot.tp-selected {
  background: var(--violet);
  color: #fff;
  border-color: var(--violet);
  font-weight: 600;
}
.tp-slot.tp-selected:hover {
  background: var(--violet-hover);
  border-color: var(--violet-hover);
  color: #fff;
}

/* =========================================================
   "С заботой" image block
   ========================================================= */

.care-section { padding: var(--section-pad) 0 var(--section-pad); }
.care-wrap {
  position: relative;
  border-radius: var(--r-2xl);
  overflow: hidden;
  min-height: 420px;
  background: linear-gradient(120deg, #B6BFA6 0%, #87967A 50%, #6E7E5F 100%);
  display: flex;
  align-items: center;
  padding: 56px;
}
.care-wrap > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.care-card {
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--r-lg);
  padding: 44px 40px 48px;
  max-width: 380px;
  display: flex;
  flex-direction: column;
}
.care-card > img:first-child {
  margin-bottom: 32px;
}
.care-card .badge-heart {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: var(--coral);
  border-radius: var(--r-md);
  color: #fff;
}
.care-card h3 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 14px;
  letter-spacing: -0.015em;
  color: var(--text);
  line-height: 1.15;
}
.care-card p {
  font-size: 16px;
  color: var(--text);
  line-height: 1.55;
  margin: 0;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  background: var(--bg-soft);
  padding: 56px 0 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 32px;
  padding-bottom: 32px;
}
.footer-top .logo .logo-text { font-size: 18px; line-height: 1.1; }
.footer-top .logo .logo-heart { width: 48px; height: 48px; }
.footer-top .logo .logo-img { height: 60px; width: auto; }
.footer-phone {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
}
.footer-phone .num {
  font-size: 24px;
  font-weight: 600;
  color: var(--violet-deep);
  letter-spacing: -0.01em;
}
.footer-meta {
  font-size: 13px;
  color: var(--violet);
  line-height: 1.45;
}
.footer-meta strong { color: var(--violet) !important; }
.footer-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 32px;
  padding: 32px 0;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-col a {
  font-size: 15px;
  color: var(--text);
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--violet); }

.footer-map {
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: 240px;
  background: 
    linear-gradient(135deg, #E4ECF3 0%, #D5E3EE 100%);
  position: relative;
}
.footer-map .map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(60,90,120,0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(60,90,120,0.08) 1px, transparent 1px);
  background-size: 40px 40px;
}
.footer-map .map-river {
  position: absolute;
  top: 0; left: -10%;
  width: 50%; height: 100%;
  background: linear-gradient(110deg, transparent 30%, #BBD4E6 30%, #BBD4E6 55%, transparent 55%);
  opacity: 0.85;
}
.footer-map .map-park {
  position: absolute;
  top: 20%; left: 35%;
  width: 22%; height: 35%;
  background: #D5E5D0;
  border-radius: 20% 60% 30% 40%;
  opacity: 0.8;
}
.footer-map .map-road1 {
  position: absolute;
  top: 30%; left: 0;
  width: 100%; height: 6px;
  background: #fff;
  transform: rotate(-3deg);
}
.footer-map .map-road2 {
  position: absolute;
  top: 70%; left: 0;
  width: 100%; height: 4px;
  background: #fff;
  transform: rotate(2deg);
}
.footer-map .map-road3 {
  position: absolute;
  top: 0; left: 60%;
  width: 4px; height: 100%;
  background: #fff;
}
.footer-map img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.footer-map .map-pin {
  position: absolute;
  left: 60%; top: 50%;
  transform: translate(-50%, -100%);
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-map .map-pin .dot {
  width: 32px; height: 40px;
  background: var(--coral);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  position: relative;
}
.footer-map .map-pin .dot::after {
  content: "";
  position: absolute;
  bottom: -10px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 16px; height: 16px;
  background: var(--coral);
  z-index: -1;
}
.footer-map .map-pin .label {
  background: #fff;
  border-radius: var(--r-sm);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.footer-ya-badge-top {
  display: flex;
  align-items: center;
  opacity: 0;
  animation: badgePulseIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}
.footer-ya-badge-top img {
  height: 52px;
  width: auto;
}
.footer-ya-badge img {
  height: 48px;
  width: auto;
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-bottom a:hover { color: var(--violet); }
.footer-legal-links { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }

/* =========================================================
   Scroll reveal
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 0.55s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   Toast
   ========================================================= */

.toast {
  position: fixed;
  bottom: 32px; right: 32px;
  background: var(--text);
  color: #fff;
  padding: 16px 22px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  box-shadow: var(--shadow-lift);
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.show {
  opacity: 1; transform: translateY(0);
}
.toast .ok {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--green);
  display: grid; place-items: center;
  color: #fff;
}

/* =========================================================
   Responsive
   ========================================================= */

/* Burger button */
.burger-btn {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 44px; height: 44px;
  background: var(--violet);
  border: 1px solid transparent;
  border-radius: 13px;
  cursor: pointer;
  padding: 0;
  z-index: 200;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.12s ease;
}
.burger-btn:hover { background: var(--violet-hover); border-color: transparent; }
.burger-btn:active { transform: scale(0.94); }
.burger-btn span {
  display: block;
  width: 20px; height: 2px;
  background: #fff;
  border-radius: 99px;
  transition: transform 0.34s cubic-bezier(0.5, 0.1, 0.25, 1.3),
              opacity 0.2s ease, width 0.3s ease, background 0.22s ease;
}
.burger-btn.open {
  background: var(--violet);
  border-color: transparent;
}
.burger-btn.open span { background: #fff; }
.burger-btn.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
.burger-btn.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  top: 0;
  background: #fff;
  z-index: 90;
  padding: 24px 24px 32px;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
  border-top: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(48, 30, 110, 0.12);
}
.mobile-menu.open {
  opacity: 1;
  transform: translateY(0);
}
.mobile-menu > * { flex-shrink: 0; }
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav a {
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s ease;
}
.mobile-nav a:hover { color: var(--violet); }
.mobile-nav .m-acc-link,
.mobile-nav .m-acc-panel a { border-bottom: 0; }

/* Аккордеон подразделов в мобильном меню */
.m-acc { border-bottom: 1px solid var(--border); }
.m-acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.m-acc-link {
  flex: 1 1 auto;
  padding: 11px 0;
  text-align: left;
  font-family: inherit;
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}
.m-acc-link:hover { color: var(--violet); }
.m-acc-chev {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 8px;
  margin-right: -8px;
  cursor: pointer;
  color: var(--text);
  color: var(--text-muted);
  transition: transform 0.25s ease, color 0.2s ease;
}
.m-acc.open .m-acc-chev { transform: rotate(180deg); color: var(--violet); }
.m-acc-panel {
  display: none;
}
/* Раскрытие — простое и надёжное (анимации высоты в гибком контейнере
   мобильного меню застревали: и max-height, и grid-fr резолвились в 0).
   Высоту даёт display:block, плавность — fade/slide по opacity/transform. */
.m-acc.open .m-acc-panel { display: block; }
.m-acc-panel > .m-acc-inner { min-height: 0; }
@media (prefers-reduced-motion: no-preference) {
  .m-acc.open .m-acc-panel { animation: mAccReveal 0.24s ease both; }
}
@keyframes mAccReveal {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
.mobile-nav .m-acc-panel a {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 10px 0 10px 14px;
  border: 0;
  transition: color 0.2s ease;
}
.mobile-nav .m-acc-panel a:first-child { padding-top: 14px; }
.mobile-nav .m-acc-panel a:last-child { padding-bottom: 16px; }
.mobile-nav .m-acc-panel a.m-acc-all { display: flex; align-items: center; gap: 8px; }
.mobile-nav .m-acc-panel a.m-acc-all svg { flex: 0 0 auto; transition: transform 0.25s ease; }
.mobile-nav .m-acc-panel a.m-acc-all:hover svg { transform: translate(2px, -2px); }
.m-acc-panel a:hover { color: var(--violet); }
/* Подзаголовок группы внутри раскрытого раздела (мобайл) */
.mobile-nav .m-acc-group-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  padding: 14px 0 4px;
}
.mobile-nav .m-acc-group-title:first-child { padding-top: 12px; }

/* Вложенный под-аккордеон (напр. «УЗИ» → виды УЗИ) внутри раскрытого раздела.
   Имя ведёт на страницу, стрелка раскрывает список подпунктов с отступом. */
.mobile-nav .m-subacc-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mobile-nav .m-subacc-link {
  flex: 1 1 auto;
  display: block;
  font-size: 16px;
  color: var(--text);
  padding: 11px 0;
  border-bottom: 0;
}
.mobile-nav .m-subacc-link:hover { color: var(--violet); }
.m-subacc-chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin-right: -8px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--text-muted);
  transition: transform 0.25s ease, color 0.2s ease;
}
.m-subacc.open .m-subacc-chev { transform: rotate(180deg); color: var(--violet); }
.m-subacc-panel { display: none; }
.m-subacc.open .m-subacc-panel { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .m-subacc.open .m-subacc-panel { animation: mAccReveal 0.22s ease both; }
}
/* Подпункты глубже на ступень — отступ + лёгкая направляющая слева */
.mobile-nav .m-subacc-inner {
  padding-left: 14px;
  margin-left: 2px;
  border-left: 2px solid var(--border);
}
.mobile-nav .m-subacc-panel a {
  display: block;
  font-size: 15px;
  color: var(--text-muted);
  padding: 9px 0;
  border-bottom: 0;
}
.mobile-nav .m-subacc-panel a:first-child { padding-top: 10px; }
.mobile-nav .m-subacc-panel a:last-child { padding-bottom: 12px; }
.mobile-nav .m-subacc-panel a:hover { color: var(--violet); }
.mobile-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mobile-contact .phone-link {
  font-size: 22px;
  font-weight: 700;
  color: var(--violet);
}
.mobile-contact p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}
.btn-mobile-book { width: 100%; text-align: center; }

/* Доп. действия в мобильном меню */
.mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mobile-max {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(140deg, #2563EB 0%, #7C3AED 50%, #9333EA 100%);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(91, 43, 216, 0.26);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.mobile-max img { width: 22px; height: 22px; }
.mobile-max:active { transform: translateY(1px); }
.mobile-a11y {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.mobile-a11y .a11y-ic {
  width: 34px; height: 34px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--violet-soft);
  color: var(--violet);
}
.mobile-a11y[aria-pressed="true"] {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}
.mobile-a11y[aria-pressed="true"] .a11y-ic {
  background: rgba(255,255,255,0.22);
  color: #fff;
}

@media (max-width: 1700px) and (min-width: 901px) {
  /* Ноутбук/планшет: меню не должно переноситься на вторую строку —
     ужимаем шрифт и отступы, навигация в одну строку. Подпись «Версия для
     слабовидящих» сворачивается до иконки, чтобы блок контактов влезал. */
  .header-top { gap: 16px; }
  .nav-main { flex-wrap: nowrap; gap: 15px; }
  .nav-main a { font-size: 14px; }
  .header-contact { gap: 14px; }
  .phone-link { font-size: 16px; }
  .accessibility-link span:not(.eye) { display: none; }
  .accessibility-link { gap: 0; }
}
/* 1400–1700 (большой ноутбук/десктоп): места хватает — увеличиваем пункты меню. */
@media (min-width: 1400px) and (max-width: 1700px) {
  .site-header .nav-main { gap: 16px; }
  .site-header .nav-main a { font-size: 15px; }
}
/* Адрес и время работы в шапке — как в подвале и в мобильном меню.

   Показываются с 1400px. Замер верхней строки: меню из 8 разделов (806px),
   телефон (191px), иконка доступности и адрес (190px) требуют 1281px при
   доступных 1302px — помещается.

   Ниже 1400px адрес убирается ПЕРВЫМ: он продублирован в подвале и в мобильном
   меню, тогда как меню и телефон заменить нечем. При 1281–1399px строке нужно
   1337px при доступных 1142px — адрес там не помещается.

   Прежнее правило прятало адрес с 1281px и показывало на 1181–1280px, то есть
   ровно там, где он не влезал и обрезался `overflow: hidden` у .header-top. */
@media (max-width: 1399px) {
  .header-contact .contact-meta { display: none; }
}
@media (max-width: 1180px) and (min-width: 901px) {
  /* Узкий ноутбук: компактнее меню, чтобы всё осталось в одну строку. */
  .nav-main { gap: 12px; }
  .nav-main a { font-size: 13.5px; }
}

@media (max-width: 1000px) and (min-width: 901px) {
  /* Перед самым бургер-меню: убираем иконку доступности и максимально
     ужимаем навигацию, чтобы всё влезало в одну строку. */
  .nav-main { gap: 8px; }
  .nav-main a { font-size: 13px; }
  .phone-link { font-size: 15px; }
  .accessibility-link { display: none; }
}

@media (max-width: 1180px) {
  .header-bottom { flex-wrap: wrap; }
  .hero-wrap { grid-template-columns: 1fr; }
  /* min-width:0 — фото-фигура не должна распирать грид-трек (иначе карточки
     в баннере съезжают вправо: левый отступ больше правого). */
  .hero-wrap > * { min-width: 0; }
  .hero-figure { min-height: 360px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .principles-grid { grid-template-columns: 1fr 1fr; }
  .principles-grid .principle-photo { order: 2; }
  .reviews-grid { grid-template-columns: 1fr 1fr; }
  .booking-wrap, .review-form-grid { grid-template-columns: 1fr; }
  .booking-card, .review-form-card { margin: 0 24px 24px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; text-align: left; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-map { grid-column: 1 / -1; min-height: 260px; }
}

/* Планшет/ноутбук (901–1180): сохраняем двухколоночную карточку врача как на
   десктопе, только компактнее — так фото не «висит» маленьким посреди широкой
   полосы. */
@media (min-width: 901px) and (max-width: 1180px) {
  .doctor-card { min-height: 460px; gap: 20px; }
  .doctor-photo { min-height: 460px; }
  .doctor-info { padding: 36px; gap: 22px; }
}

/* ≤900: карточка в одну колонку. */
@media (max-width: 900px) {
  .doctor-card { grid-template-columns: 1fr; min-height: 0; }
}
/* 601–900: фото врача по центру и прижато к низу (без «воздуха» под фото),
   плашка с ФИО — по центру снизу. Центрируем плашку без transform, иначе
   анимация смены слайда (translateY) сбрасывает центрирование и ФИО «прыгает».
   Ниже 600 — мобильная компоновка. */
@media (min-width: 601px) and (max-width: 900px) {
  .doctor-photo { min-height: 420px; }
  .doctor-photo img {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 0;
    height: 100%;
  }
  .doctor-name-badge {
    left: 0;
    right: 0;
    margin: 0;
    transform: none;
    width: auto;
    bottom: 0;
    border-radius: var(--r-md) var(--r-md) 0 0;
    background: rgba(255, 255, 255, 0.9);
    align-items: flex-start;
    text-align: left;
    min-width: 0;
    max-width: none;
    padding: 16px 24px;
  }
}

@media (max-width: 1024px) {
  :root {
    --section-pad: 64px;
    --section-pad-tight: 44px;
    --title-gap: 32px;
    --block-gap: 48px;
  }
  .footer-top {
    grid-template-columns: auto 1fr;
    gap: 20px;
    row-gap: 16px;
  }
  .footer-phone { flex-wrap: wrap; }
  .footer-ya-badge-top img { height: 44px; }
}

@media (max-width: 1280px) {
  .burger-btn { display: flex; }
  .mobile-menu { display: flex; }  .nav-main { display: none; }
  .header-contact { display: none; }
  .header-bottom .search-wrap { flex: 1; }
  .header-bottom .btn-primary { display: none; }
  .header-bottom .accessibility-link { display: none; }
  
  .hero-wrap { grid-template-columns: 1fr; min-height: auto; }
  .hero-right { padding: 20px; }
  .hero-figure { min-height: 240px; }
  .yandex-badge img { height: 80px; }
  
  .service-card { min-height: auto; }
  .review-card { min-height: auto; }
  .principle-card { min-height: auto; }
  
  .help-wrap { flex-direction: column; }
  .help-wrap img { width: 100%; max-height: 260px; object-fit: cover; }
  
  /* Keep slider arrows absolutely positioned & vertically centered on mobile —
     position:static would void their z-index and let the photo <img> cover them,
     making them un-clickable. */
  .doctor-slider-arrows { position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%); margin-top: 0; padding: 0 10px; }
  .section-head { flex-wrap: wrap; justify-content: center; gap: 12px; }
  .section-head .slider-controls { position: static; transform: none; }
  
  .booking-left { padding: 36px 28px; }
  .doctor-info { padding: 32px; }
}

@media (max-width: 720px) {
  :root {
    --section-pad: 52px;
    --section-pad-tight: 36px;
    --title-gap: 28px;
    --block-gap: 40px;
  }
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .principles-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .reviews-grid { grid-template-columns: 1fr; gap: 12px; }
  .principle-card { padding: 20px; min-height: auto; }
  .principle-card h3 { font-size: 16px; }
  .principle-card p { font-size: 13px; }
  .hero-stat { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 16px; }
  .doctor-stats { flex-direction: row; flex-wrap: wrap; gap: 16px; }
  .doctor-info, .review-form-left, .booking-left { padding: 28px 24px; }
  .review-form-card, .booking-card { padding: 24px; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 16px; }
  .footer-phone { gap: 16px; }
  .footer-ya-badge-top img { height: 40px; }
  
  .principle-photo { height: 240px; }
  .principle-photo img { height: 100%; object-fit: cover; }
  
  .help-wrap img { width: 100%; max-height: 220px; object-fit: cover; }
  
  .tp-grid { grid-template-columns: repeat(4, 1fr); }
  .yandex-badge img { height: 64px; }
  .yandex-badge { bottom: 16px; left: 16px; }
}

@media (max-width: 480px) {
  .container, .container-wide { padding: 0 16px; }
  
  .hero-card { padding: 24px 20px; }
  .hero-card h1 { font-size: 24px; }
  .hero-figure { min-height: 200px; }
  .hero-stat .num { font-size: 24px; }
  .hero-stat { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 14px; }
  
  .section-title { font-size: 24px; }
  
  .btn { height: 48px; padding: 0 20px; font-size: 15px; }
  .round-btn { width: 44px; height: 44px; }
  
  .doctor-info { padding: 20px; }
  .doctor-photo { min-height: 380px; }
  .doctor-info h2 { font-size: 20px; }
  .doctor-stats { flex-direction: row; flex-wrap: wrap; gap: 10px 12px; }
  .doctor-stats > div { flex: 1 1 0; min-width: 0; }
  .doctor-stats .num { font-size: 24px; white-space: nowrap; }
  .doctor-stats .label { font-size: 12px; }
  
  .review-card { padding: 16px; min-height: auto; }
  .review-body { padding: 16px; }
  
  .booking-left { padding: 24px 20px; }
  .booking-card { padding: 20px 16px; }
  
  .review-form-left { padding: 24px 20px; }
  .review-form-card { padding: 20px 16px; }
  
  .tp-grid { grid-template-columns: repeat(3, 1fr); }
  
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  
  .yandex-badge img { height: 52px; }
  
  .mobile-menu { padding: 16px 20px 28px; gap: 18px; }
  .mobile-nav a { font-size: 17px; padding: 9px 0; }
  .m-acc-link { font-size: 17px; padding: 9px 0; }
  .mobile-nav .m-acc-panel a { font-size: 15px; }
}

/* =========================================================
   MOBILE AUDIT FIXES — адаптивная доработка (mobile-first)
   Аудит по ТЗ: компактная шапка, без горизонтального скролла,
   читабельные шрифты, удобные тач-зоны.
   ========================================================= */

/* 1 ─ Глобальная защита от горизонтального скролла на телефонах.
   overflow-x: clip не ломает position: sticky (в отличие от hidden). */
@media (max-width: 1280px) {
  html, body { overflow-x: clip; }
}

/* 2 ─ КОМПАКТНАЯ МОБИЛЬНАЯ ШАПКА — одна строка, ~60px.
   Логотип компактный, поиск растягивается и сжимается (min-width:0),
   лишние кнопки (Max, «Онлайн запись») убраны из шапки (есть в меню/контенте). */
@media (max-width: 1280px) {
  .site-header { padding: 9px 0; }
  .site-header.compact { padding: 9px 0; }

  .header-layout {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .header-top { display: none; }            /* nav и контакты и так скрыты — убираем пустую строку */

  .header-layout > .logo-full .logo-img,
  .site-header.compact .header-layout > .logo-full .logo-img { width: 86px; }

  .header-bottom {
    grid-template-columns: none;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
  }
  .header-bottom .search-wrap { flex: 1 1 auto; min-width: 0; }
  .search-wrap input {
    height: 44px;
    padding: 0 42px 0 16px;
    font-size: 16px;                         /* ≥16px — iOS не зумит поле при фокусе */
  }
  .search-wrap .search-btn { width: 38px; height: 38px; }

  .header-bottom .max-btn { display: none; }
  .header-bottom .btn-primary { display: none; }
  .header-bottom .icon-btn,
  .header-bottom .acct-btn {
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 auto;
    padding: 0 !important;
    justify-content: center;
  }
  .header-bottom .acct-btn .acct-avatar { width: 30px; height: 30px; }
  .burger-btn { flex: 0 0 auto; }
}

/* Ноутбук 1025–1280: возвращаем полноценные действия (Max, «Онлайн запись»,
   чип аккаунта с именем); навигация остаётся в бургере. */
@media (min-width: 1025px) and (max-width: 1280px) {
  .header-bottom .max-btn { display: grid; width: 44px; height: 44px; }
  .header-bottom .btn-primary { display: inline-flex; height: 44px; }
  .header-bottom .acct-btn { width: auto !important; height: 44px !important; padding: 0 8px !important; justify-content: flex-start; }
  .header-bottom .acct-btn .acct-name,
  .header-bottom .acct-btn .acct-caret { display: inline-block !important; }
  /* единая высота всех контролов шапки */
  .header-bottom .search-wrap input { height: 44px; }
}

/* 2b ─ ≤768px: поиск в шапке сворачивается в иконку, рядом — иконка
   «Версия для слабовидящих». Кнопка a11y вставляется скриптом
   accessibility.js (класс .hdr-a11y-btn) и видна только на этом брейкпоинте. */
.hdr-a11y-btn {
  display: none;
  place-items: center;
  width: 44px; height: 44px;
  flex: 0 0 auto;
  border: 0;
  padding: 0;
  border-radius: var(--r-md);
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
}
.hdr-a11y-btn[aria-pressed="true"] { background: var(--violet); color: #fff; }
/* иконка «версия для слабовидящих» видна во всём компактном диапазоне шапки */
@media (max-width: 1280px) {
  .header-bottom .hdr-a11y-btn { display: grid; }
}
/* только на телефонах (<768) поиск сворачивается в иконку и всё прижато вправо */
@media (max-width: 767px) {
  .header-bottom { justify-content: flex-end; }
  .header-bottom .search-wrap {
    flex: 0 0 auto;
    width: 44px;
    min-width: 44px;
  }
  .header-bottom .search-wrap input { display: none; }
  .header-bottom .search-wrap .search-btn {
    position: static;
    transform: none;
    width: 44px; height: 44px;
    background: var(--bg-soft);
    color: var(--text);
    border-radius: var(--r-md);
  }
}

/* ≤480px: логотип и иконки — одной строкой, поиск — полной строкой ниже.
   header-bottom раскрываем через display:contents, чтобы поиск стал
   полноценным элементом строки шапки (без отрицательных отступов).
   Компактные размеры — чтобы всё помещалось вплоть до 320px. */
/* удалён дублирующий закрывающий блок — см. выше */
@media (max-width: 480px) {
  .header-layout {
    flex-wrap: wrap;
    align-items: center;
    column-gap: 6px;
    row-gap: 10px;
  }
  .header-layout > .logo-full {
    flex: 0 0 auto;
    margin-right: auto;            /* логотип слева, иконки уезжают вправо */
  }
  .header-layout > .logo-full .logo-img,
  .site-header.compact .header-layout > .logo-full .logo-img { width: 68px; }

  /* раскрываем контейнер — его дети встают в строку шапки */
  .header-bottom { display: contents; }

  /* единый компактный вид всех иконок в строке */
  .header-bottom .icon-btn,
  .header-bottom .acct-btn,
  .header-bottom .hdr-a11y-btn,
  .burger-btn {
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 auto;
    padding: 0 !important;
    border-radius: var(--r-md);
  }
  .header-bottom .acct-btn .acct-avatar { width: 26px; height: 26px; }

  /* поиск — отдельной строкой во всю ширину */
  .header-bottom .search-wrap {
    order: 10 !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  .header-bottom .search-wrap input {
    display: block !important;
    width: 100%;
    height: 46px;
    padding: 0 48px 0 16px;
    font-size: 16px;
  }
  .header-bottom .search-wrap .search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    background: transparent;
  }
}

/* 3 ─ Декоративный тултип Яндекса — главный источник горизонтального
   скролла на телефоне (выходит за правый край). На мобильном скрываем —
   рейтинг и ссылки доступны в блоке отзывов и в подвале. */
@media (max-width: 720px) {
  .ya-tooltip { display: none !important; }
}

/* 4 ─ Hero на телефоне: заголовок не должен быть гигантским.
   (инлайновый font-size:40px убран из разметки; здесь — потолок). */
@media (max-width: 600px) {
  .hero { padding: 4px 0 0; }
  .hero-card { padding: 24px 20px; gap: 18px; }
  .hero-title { font-size: clamp(23px, 6.4vw, 27px) !important; line-height: 1.18; }
  .hero-sub { font-size: 15px; max-width: 100%; }
  .hero-right { padding: 14px 14px 16px; }
  .hero-cta, .hero-cta .btn { width: 100%; }
  .hero-figure { min-height: 200px; }
  .hero-stat { padding: 14px 16px; gap: 12px 18px; }
  .hero-stat .num { font-size: 30px; }
  .hero-stat .text { padding-left: 18px; }
}

/* 5 ─ Типографика заголовков секций на телефоне (ТЗ: H1 24–30, H2 20–24) */
@media (max-width: 600px) {
  .section-title { font-size: 23px; line-height: 1.22; margin-bottom: 24px; }
  .principles-cta h2 { font-size: 24px; }
  .care-card h3, .help-card h3 { font-size: 22px; }
  /* Заголовки внутренних страниц (.page-title переопределяется в нескольких
     файлах, которые грузятся после styles.css — нужен !important) */
  .page-title, .search-hero h1 { font-size: 27px !important; line-height: 1.2; }
}

/* 6 ─ Тач-зоны календаря/слотов записи — минимум 44px (ТЗ) */
@media (max-width: 600px) {
  .dp-nav, .dp-close-inline { width: 44px; height: 44px; }
  .dp-day { padding: 12px 4px; min-height: 44px; }
  .tp-slot { padding: 14px 4px; min-height: 46px; }
  .datepicker, .timepicker { padding: 24px 18px; }
}

/* 7 ─ Карточки услуг на главной: круг-картинка не должна вылезать за карточку */
@media (max-width: 480px) {
  .services-grid { gap: 10px; }
  .service-card { min-height: auto; padding: 18px 14px; gap: 12px; }
  .service-card .visual .circle {
    width: clamp(110px, 42vw, 170px);
    height: clamp(110px, 42vw, 170px);
  }
  .service-card .name { font-size: 18px; }
}

/* 8 ─ Подвал плотнее и без «простыни» (ТЗ) */
@media (max-width: 600px) {
  .site-footer { padding: 40px 0 26px; }
  /* компактная и аккуратная верхняя зона футера */
  .footer-top {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 14px;
    padding-bottom: 22px;
    text-align: left;
  }
  .footer-top .logo { grid-column: 1; grid-row: 1; }
  .footer-ya-badge-top { grid-column: 2; grid-row: 1; justify-self: end; margin: 0; }
  .footer-ya-badge-top img { height: 40px; }
  .footer-phone {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  .footer-phone .num { font-size: 22px; }
  .footer-top .max-btn { grid-column: 1; grid-row: 3; width: 48px; height: 48px; flex: 0 0 auto; }
  .footer-top .btn-primary { grid-column: 2; grid-row: 3; width: 100%; height: 48px; }
  .footer-main { gap: 22px; padding: 24px 0; }
  .footer-col a { padding: 2px 0; }
  .footer-bottom { gap: 14px; padding-top: 18px; margin-top: 18px; }
  .footer-legal-links { gap: 12px 18px; justify-content: center; }
  .footer-map { min-height: 200px; }
}

/* 9 ─ Кнопки внутри потока на телефоне не должны быть гигантскими,
   но основная CTA — на всю ширину (ТЗ) */
@media (max-width: 600px) {
  .btn { height: 48px; }
  .btn-mobile-book { height: 50px; font-size: 16px; }
}

/* 10 ─ ПОДВАЛ-АККОРДЕОН (заголовки колонок добавляет header-search.js).
   На десктопе заголовки скрыты, ссылки видны как раньше;
   на телефоне ссылки сворачиваются под тап-заголовки. */
.footer-acc-h { display: none; }
@media (max-width: 600px) {
  .footer-col.footer-acc { gap: 0; }
  .footer-acc-h {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 14px 0; margin: 0;
    background: none; border: 0; border-bottom: 1px solid var(--border);
    font-family: inherit; font-size: 16px; font-weight: 600; color: var(--text);
    cursor: pointer; letter-spacing: -0.01em;
  }
  .footer-acc-h .chev { color: var(--text-muted); transition: transform 0.3s ease; }
  .footer-acc.is-open .footer-acc-h .chev { transform: rotate(180deg); }
  .footer-col.footer-acc > a { display: none; }
  .footer-col.footer-acc.is-open > a {
    display: block; padding: 11px 2px; font-size: 15px;
    animation: footerAccIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  @keyframes footerAccIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
}

/* =========================================================
   MOBILE AUDIT FIXES · v2 — по замечаниям с реальных телефонов
   ========================================================= */

/* 11 ─ МОБИЛЬНОЕ МЕНЮ.
   Скрипт переносит .mobile-menu в <body> (иначе backdrop-filter шапки
   «ловит» fixed и меню сжимается в зону шапки). Здесь — надёжные состояния:
   закрытое меню не перехватывает тапы, открытое гарантированно видимо. */
@media (max-width: 1280px) {
  .mobile-menu { visibility: hidden; pointer-events: none; }
  /* Меню выпадает строго под зафиксированной шапкой */
  .mobile-menu {
    top: var(--menu-top, 62px);
    bottom: 0;
  }
  .mobile-menu.open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
  }
  /* На время открытия меню шапка прибита к верху и всегда поверх меню,
     чтобы лого/поиск/кабинет/× не уезжали при скролле. */
  body.mobile-menu-open .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
  }
}

/* 12 ─ HERO-СТАТИСТИКА «7 лет с вами»: в один столбец, число и подпись в строку,
   текст без боковой линии — не «прилипает» книзу. */
@media (max-width: 600px) {
  .hero-stat {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 8px; padding: 18px;
  }
  .hero-stat > div:first-child { display: flex; align-items: baseline; gap: 8px; }
  .hero-stat .num { font-size: 30px; }
  .hero-stat .label { margin-top: 0; }
  .hero-stat .text { border-left: 0; padding-left: 0; margin-left: 0; font-size: 14.5px; }
}

/* 13 ─ КАРТОЧКА ВРАЧА (главная): фото выше, плашка с ФИО не закрывает лицо. */
@media (max-width: 600px) {
  .doctor-card { padding: 16px 16px 0; min-height: 0; }
  .doctor-photo { min-height: 360px; }
  /* Сохраняем пропорции фото (без растяжения): высота 100%, ширина авто,
     по центру; лишнее по бокам обрезает overflow:hidden контейнера.
     Раньше max-width:130% клампил ширину и тянул фото по вертикали. */
  .doctor-photo img {
    position: absolute;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: auto; height: 100%;
    max-width: none;
    object-fit: contain;
  }
  /* Full-bleed badge pinned to the bottom edge so the cropped bottom of the
     photo is hidden behind it. */
  .doctor-name-badge {
    min-width: 0;
    left: 0; right: 0;
    bottom: 0;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--r-md) var(--r-md) 0 0;
  }
  .doctor-name-badge .nm { font-size: 15px; }
  .doctor-name-badge .role { font-size: 12.5px; }
}

/* 14 ─ БЛОКИ «Помощь рядом» / «С заботой»: фото заполняет весь блок,
   карточка лежит поверх (как на десктопе), без обрезающей полосы. */
@media (max-width: 900px) {
  .help-wrap, .care-wrap {
    flex-direction: column; align-items: stretch;
    padding: 22px; min-height: auto;
  }
  .help-wrap > img, .care-wrap > img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; max-height: none; object-fit: cover;
  }
  .help-card, .care-card { max-width: 100%; }
}

/* 901–1280 (ноутбук/планшет): блок «Помощь рядом» — как на десктопе:
   фото заполняет весь блок, карточка лежит поверх. Отменяем колоночную
   раскладку и обрезку фото из общего правила ≤1280. */
@media (min-width: 901px) and (max-width: 1280px) {
  .help-wrap {
    flex-direction: row;
    align-items: center;
  }
  .help-wrap > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
  }
  .help-card { max-width: 380px; }
}

/* 15 ─ ОТЗЫВЫ: на телефоне — нативный горизонтальный свайп по одной карточке. */
@media (max-width: 900px) {
  .ext-rev-viewport {
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--violet-soft) transparent;
    cursor: auto;
    margin-left: -16px; margin-right: -16px;     /* «лента» от края до края */
    padding-left: 16px; padding-right: 16px;
  }
  .ext-rev-viewport::-webkit-scrollbar { height: 6px; }
  .ext-rev-viewport::-webkit-scrollbar-track { background: transparent; margin: 0 16px; }
  .ext-rev-viewport::-webkit-scrollbar-thumb { background: var(--violet-soft); border-radius: 3px; }
  .ext-rev-viewport::-webkit-scrollbar-thumb:hover { background: var(--violet); }
  .ext-rev-track {
    display: flex !important;
    grid-template-columns: none !important;
    transform: none !important;
    gap: 14px;
    padding: 4px 0 10px;
  }
  .ext-rev-card {
    flex: 0 0 340px;
    scroll-snap-align: start;
    transform: none !important;
    opacity: 1 !important;
  }
  .ext-rev-track.is-moving .ext-rev-card { transform: none !important; }
  .ext-rev-text.is-collapsed { -webkit-line-clamp: 6; }
  .reviews-new .section-head-c .slider-controls { display: none; }
}
@media (max-width: 600px) {
  /* На телефоне — одна карточка на экран */
  .ext-rev-card { flex: 0 0 88%; scroll-snap-align: center; }
}

/* 16 ─ КАРТОЧКИ УСЛУГ: на узких экранах круг-картинка чуть меньше и по центру,
   чтобы карточки выглядели ровно и ничего не выезжало вправо. */
@media (max-width: 480px) {
  .service-card .visual .circle { width: clamp(104px, 40vw, 160px); height: clamp(104px, 40vw, 160px); }
  .service-card .foot { gap: 8px; }
}

/* 17 ─ КАРТОЧКИ УСЛУГ на телефоне — горизонтальные компактные строки,
   по одной в ряд: круг-картинка слева, название + подпись по центру,
   стрелка справа. .foot → display:contents, чтобы название и стрелку
   можно было разложить в отдельные ячейки грида без правки разметки. */
@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
  .service-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "visual name  arrow"
      "visual caption arrow";
    align-items: center;
    column-gap: 12px;
    row-gap: 2px;
    min-height: 0;
    padding: 12px 14px;
  }
  .service-card .foot { display: contents; }
  .service-card .visual {
    grid-area: visual;
    flex: none;
    width: 68px; height: 68px;
  }
  .service-card .visual .circle {
    width: 68px !important; height: 68px !important;
  }
  .service-card .name {
    grid-area: name;
    align-self: end;
    font-size: 16px;
    line-height: 1.15;
  }
  .service-card .caption {
    grid-area: caption;
    align-self: start;
    font-size: 12px;
    line-height: 1.3;
  }
  .service-card .arrow {
    grid-area: arrow;
    align-self: center;
    width: 36px; height: 36px;
  }
}

/* 18 ─ ПРИНЦИПЫ на телефоне — компактные строки по одной в ряд:
   заголовок в левой колонке, описание справа. */
@media (max-width: 600px) {
  .principles-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
  .principle-card {
    display: grid;
    grid-template-columns: minmax(108px, 40%) 1fr;
    column-gap: 16px;
    align-items: start;
    padding: 16px;
    min-height: 0;
  }
  .principle-card h3 { font-size: 15px; line-height: 1.2; }
  .principle-card p { font-size: 12.5px; line-height: 1.4; }
  .principles-grid .principle-photo {
    grid-column: 1 / -1;
    height: 200px;
  }
}

/* ── Хлебные крошки на мобильном: весь путь в одну строку с горизонтальной
   прокруткой, без переноса и обрезки. ── */
@media (max-width: 600px) {
  .page-head .breadcrumbs,
  .search-hero .breadcrumbs { justify-content: flex-start; }
  .breadcrumbs {
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    font-size: 12.5px;
    max-width: 100%;
    margin-left: -2px;
    padding-bottom: 2px;
  }
  .breadcrumbs::-webkit-scrollbar { display: none; }
  .breadcrumbs a,
  .breadcrumbs .current { flex: 0 0 auto; }
  .breadcrumbs .sep { flex: 0 0 auto; }
}

/* ── Планшет/ноутбук (901–1180): компактная верхняя зона футера одной строкой,
   без разреженной сетки и пустот справа. ── */
@media (min-width: 901px) and (max-width: 1180px) {
  .footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 22px;
    text-align: left;
    padding-bottom: 24px;
  }
  .footer-top .logo { margin-right: 4px; }
  .footer-phone { flex-direction: column; align-items: flex-start; gap: 2px; margin-right: auto; }
  .footer-ya-badge-top { margin: 0; }
  .footer-ya-badge-top img { height: 44px; }
  .footer-top .btn-primary { height: 48px; }
  /* Ссылки двумя компактными колонками слева, карта — справа на всю высоту. */
  .footer-main {
    grid-template-columns: auto auto 1fr;
    column-gap: 56px;
    row-gap: 0;
    align-items: stretch;
  }
  .footer-col { gap: 10px; }
  .footer-map { grid-column: 3; min-height: 240px; }
  .footer-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
}
