/* =========================================================
   Ферти·Лайн — дизайн-система сайта
   Основано на брендбуке «Ферти-Лайн. Айдентика. Доработка» (chao tiger, 2026)
   ========================================================= */

:root {
  /* Брендовая палитра */
  --green: #16403e;        /* основной: знак, текст, тёмные плашки */
  --green-90: #2c514e; /* фирменный зелёный 90% + кремовый 10% */
  --green-90: color-mix(in srgb, #16403e 90%, #f0eee1);
  --green-70: #57746f;
  --green-70: color-mix(in srgb, #16403e 70%, #f0eee1); /* 70% + кремовый 30% */
  --peach: #fbc9a8;        /* тёплый акцент */
  --mint: #b8e6c2;         /* свежий акцент */
  --cream: #f0eee1;        /* фон */
  --mist: #e9eaef;         /* холодный нейтральный фон из презентации */
  --white: #ffffff;
  /* Суб-бренд «Биобанк» */
  --bio: #f18142;
  --bio-deep: #df5d21;
  --bio-light: #fbc9a8;

  --text: var(--green);
  --muted: #4a6a65;
  --muted: color-mix(in srgb, #16403e 76%, #f0eee1); /* фирменный зелёный + кремовый */
  --line: rgba(22, 64, 62, .14);

  --radius: 28px;
  --radius-s: 16px;
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);

  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--bio); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
h1 { font-size: clamp(40px, 6.4vw, 84px); letter-spacing: -.035em; }
h2 { font-size: clamp(30px, 4vw, 52px); letter-spacing: -.03em; }
h3 { font-size: clamp(21px, 2vw, 26px); }
h4 { font-size: 19px; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; color: var(--green-90); max-width: 46ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 14px; height: 14px; border-radius: 0 14px 14px 0; background: currentColor;
}
.muted { color: var(--muted); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--tight { padding: clamp(40px, 6vw, 72px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head h2 { margin: 0; max-width: 16ch; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 1.5px solid transparent;
  font-size: 16px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--green); color: var(--cream); }
.btn--primary:hover { background: var(--green-90); }
.btn--peach { background: var(--peach); color: var(--green); }
.btn--peach:hover { background: #fabe99; background: color-mix(in srgb, var(--peach) 85%, var(--bio)); }
.btn--ghost { border-color: currentColor; background: transparent; }
.btn--ghost:hover { background: var(--green); color: var(--cream); border-color: var(--green); }
.on-dark .btn--ghost:hover { background: var(--cream); color: var(--green); border-color: var(--cream); }
.btn svg { width: 20px; height: 20px; flex: none; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: none; }
.link-arrow::after { content: "→"; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Логотип ---------- */
.header .logo, .footer .logo { flex: none; }
.header .logo img, .footer .logo img { max-width: none; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--green); line-height: 1; }
.logo__mark { width: 22px; height: 44px; flex: none; }
.logo__text { display: flex; flex-direction: column; gap: 5px; }
.logo__name { font-size: 23px; font-weight: 600; letter-spacing: -.02em; }
.logo__sub { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.logo--light { color: var(--cream); }

/* ---------- Шапка ---------- */
.topbar { background: var(--green); color: var(--cream); font-size: 14px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; }
.topbar a { text-decoration: none; opacity: .85; }
.topbar a:hover { opacity: 1; }
.topbar__addr { display: flex; gap: 28px; }
.topbar__addr span { opacity: .85; }
.topbar__right { display: flex; gap: 20px; }

.header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(240, 238, 225, .88);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 80px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav > a, .nav__drop > button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 12px; border-radius: 999px; border: 0; background: none;
  font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s;
}
.nav > a:hover, .nav__drop > button:hover, .nav__drop:focus-within > button { background: rgba(22, 64, 62, .07); }
.nav > a[aria-current="page"], .nav__drop.is-current > button { background: var(--green); color: var(--cream); }
.nav__drop { position: relative; }
.nav__drop > button::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg) translateY(-3px); }
.nav__menu {
  position: absolute; top: calc(100% + 10px); left: -12px; min-width: 320px;
  background: var(--white); border-radius: 22px; padding: 10px;
  box-shadow: 0 24px 60px -20px rgba(22, 64, 62, .35);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.nav__drop:hover .nav__menu, .nav__drop:focus-within .nav__menu, .nav__drop.is-open .nav__menu { opacity: 1; visibility: visible; transform: none; }
.nav__menu::before { content: ""; position: absolute; inset: -12px 0 auto; height: 12px; }
.nav__menu a { display: block; padding: 11px 14px; border-radius: 12px; text-decoration: none; font-size: 15.5px; }
.nav__menu a:hover { background: var(--cream); }
.nav__menu a small { display: block; color: var(--muted); font-size: 13px; }
.nav__menu .nav__group { padding: 10px 14px 4px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.header__cta { display: flex; align-items: center; gap: 12px; }
.header__phone { font-weight: 600; text-decoration: none; white-space: nowrap; }
.burger { display: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--green); color: var(--cream); cursor: pointer; align-items: center; justify-content: center; }
.burger span, .burger span::before, .burger span::after { display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; transition: transform .3s, background .3s; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -6px; } .burger span::after { top: 6px; }
.menu-open .burger span { background: transparent; }
.menu-open .burger span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .burger span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1480px) {
  .header__phone { display: none; }
}
@media (max-width: 1240px) and (min-width: 1101px) {
  .nav > a, .nav__drop > button { padding: 10px 9px; font-size: 14.5px; }
}
@media (max-width: 1100px) {
  .topbar__addr span:nth-child(2) { display: none; }
  .burger { display: inline-flex; }
  .header__cta .btn { display: none; }
  .nav {
    position: fixed; inset: var(--nav-top, 80px) 0 0; z-index: 40;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); padding: 16px var(--gutter) 40px; overflow-y: auto;
    transform: translateX(100%); transition: transform .35s var(--ease);
  }
  .menu-open .nav { transform: none; }
  .menu-open { overflow: hidden; }
  .nav > a, .nav__drop > button { width: 100%; justify-content: space-between; padding: 16px 4px; border-radius: 0; font-size: 20px; border-bottom: 1px solid var(--line); }
  .nav > a[aria-current="page"], .nav__drop.is-current > button { background: none; color: inherit; font-weight: 600; }
  .nav__menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: none; padding: 0 0 8px; display: none; min-width: 0; }
  .nav__drop.is-open .nav__menu { display: block; }
  .nav__mobile-cta { display: flex !important; }
}
.nav__mobile-cta { display: none; flex-direction: column; gap: 10px; margin-top: 24px; }
@media (max-width: 640px) {
  .topbar__addr, .topbar__right span { display: none; }
  .topbar .container { justify-content: center; min-height: 34px; }
  .logo__name { font-size: 20px; }
  .logo__mark { width: 19px; height: 38px; }
}

/* ---------- Графический язык: полукруги ---------- */
.shape { position: absolute; pointer-events: none; }
.half { aspect-ratio: 1 / 2; }
.half--r { border-radius: 0 999px 999px 0; }
.half--l { border-radius: 999px 0 0 999px; }
.half-h { aspect-ratio: 2 / 1; }
.half--t { border-radius: 999px 999px 0 0; }
.half--b { border-radius: 0 0 999px 999px; }
.c-green { background: var(--green); } .c-peach { background: var(--peach); } .c-mint { background: var(--mint); } .c-cream { background: var(--cream); } .c-bio { background: var(--bio); }

.pattern {
  background-color: var(--green);
  background-image: url("../img/pattern.svg");
  background-size: 120px 120px;
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(32px, 5vw, 64px) 0 clamp(64px, 8vw, 110px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-bottom: 24px; }
.hero h1 em { font-style: normal; color: var(--green-70); }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }
.hero__visual { position: relative; aspect-ratio: 4 / 5; }
.hero__photo { position: absolute; inset: 0 0 0 18%; border-radius: 0 999px 999px 0; overflow: hidden; background: var(--mist); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__visual .s1 { left: 0; top: 8%; width: 36%; background: var(--peach); border-radius: 999px 0 0 999px; aspect-ratio: 1/2; }
.hero__visual .s2 { right: -6%; bottom: -4%; width: 34%; aspect-ratio: 2/1; border-radius: 999px 999px 0 0; background: var(--mint); }
.hero__badge {
  position: absolute; left: 0; bottom: 6%; z-index: 2;
  background: var(--white); border-radius: 22px; padding: 18px 22px; max-width: 240px;
  box-shadow: 0 24px 50px -24px rgba(22, 64, 62, .45);
}
.hero__badge b { display: block; font-size: 36px; line-height: 1; letter-spacing: -.03em; margin-bottom: 6px; }
.hero__badge span { font-size: 14px; color: var(--muted); line-height: 1.35; display: block; }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 460px; width: 100%; margin: 0 auto; }
}

/* ---------- Page hero (внутренние страницы) ---------- */
.page-hero { position: relative; padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 6vw, 88px); overflow: hidden; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(38px, 5.6vw, 72px); max-width: 15ch; }
.page-hero .lead { max-width: 52ch; }
.page-hero__shape { right: max(-80px, -6vw); top: 50%; transform: translateY(-50%); width: clamp(160px, 26vw, 360px); }
.page-hero__shape .a, .page-hero__shape .b { width: 100%; aspect-ratio: 2/1; }
.page-hero__shape .a { border-radius: 999px 999px 0 0; }
.page-hero__shape .b { border-radius: 0 0 999px 999px; }
.page-hero--dark { background: var(--green); color: var(--cream); }
.page-hero--dark .lead { color: rgba(240, 238, 225, .82); }
.page-hero--bio { background: var(--green); color: var(--cream); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; margin-bottom: 28px; opacity: .75; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span[aria-hidden] { opacity: .5; }
@media (max-width: 700px) { .page-hero__shape { opacity: .35; } }

/* ---------- Карточки и сетки ---------- */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--white); border-radius: var(--radius); padding: clamp(24px, 2.6vw, 34px);
  text-decoration: none; overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
a.card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -36px rgba(22, 64, 62, .5); }
.card h3 { margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 16px; }
.card__num { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 40px; }
.card__foot { margin-top: auto; padding-top: 20px; }
.card__icon { width: 56px; height: 56px; margin-bottom: 28px; }
.card--green { background: var(--green); color: var(--cream); }
.card--green p { color: rgba(240, 238, 225, .78); }
.card--peach { background: var(--peach); }
.card--mint { background: var(--mint); }
.card--cream { background: var(--cream); }
.on-white .card:not([class*="card--"]), .on-white .news-card { background: var(--cream); }
.card--peach p, .card--mint p { color: var(--green-90); }
.card__deco { position: absolute; right: -24px; bottom: -24px; width: 110px; aspect-ratio: 1; border-radius: 50%; opacity: .9; transition: transform .5s var(--ease); }
a.card:hover .card__deco { transform: scale(1.12); }
.card > *:not(.card__deco) { position: relative; z-index: 1; }
@media (max-width: 640px) { .card__deco { width: 80px !important; right: -28px !important; bottom: -28px !important; } }

/* ---------- Направления (главная) ---------- */
.directions { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.directions > :nth-child(1) { grid-column: span 7; min-height: 420px; }
.directions > :nth-child(2) { grid-column: span 5; }
.directions > :nth-child(n+3) { grid-column: span 4; min-height: 300px; }
.directions h3 { font-size: clamp(24px, 2.4vw, 34px); }
@media (max-width: 980px) { .directions > * { grid-column: span 6 !important; min-height: 280px !important; } }
@media (max-width: 640px) { .directions > * { grid-column: span 12 !important; } }

/* ---------- Цифры ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { border-top: 1.5px solid currentColor; padding-top: 20px; }
.stat b { display: block; font-size: clamp(44px, 5.5vw, 76px); font-weight: 600; line-height: 1; letter-spacing: -.04em; margin-bottom: 12px; }
.stat span { display: block; font-size: 15px; opacity: .8; max-width: 24ch; line-height: 1.4; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); row-gap: 40px; } }

.on-dark { background: var(--green); color: var(--cream); }
.on-dark .muted, .on-dark .lead { color: rgba(240, 238, 225, .78); }
.on-mist { background: var(--mist); }
.on-white { background: var(--white); }

/* ---------- Сплит-блоки ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.split--top { align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.photo-arch { border-radius: 999px 999px var(--radius) var(--radius); overflow: hidden; aspect-ratio: 4/5; background: var(--mist); }
.photo-arch img, .photo-round img { width: 100%; height: 100%; object-fit: cover; }
.photo-round { border-radius: var(--radius); overflow: hidden; background: var(--mist); }

/* ---------- Списки ---------- */
.checklist { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 34px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(90deg, var(--green) 50%, var(--mint) 50%);
}
.on-dark .checklist li::before { background: linear-gradient(90deg, var(--peach) 50%, var(--mint) 50%); }
.checklist--cols { grid-template-columns: repeat(2, 1fr); gap: 12px 32px; }
@media (max-width: 640px) { .checklist--cols { grid-template-columns: 1fr; } }

.steps { counter-reset: step; display: grid; gap: 0; }
.step { counter-increment: step; display: grid; grid-template-columns: 72px 1fr; gap: 20px; padding: 26px 0; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step::before {
  content: counter(step, decimal-leading-zero);
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--mint); font-weight: 600; font-size: 17px;
}
.step h3, .step h4 { margin-bottom: 6px; font-size: 21px; }
.step p { margin: 0; color: var(--muted); }
.on-dark .step { border-color: rgba(240, 238, 225, .18); }
.on-dark .step p { color: rgba(240, 238, 225, .75); }
.on-dark .step::before { background: var(--peach); color: var(--green); }

/* ---------- Контент страниц ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(28px, 3vw, 40px); margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--green-90); }
.prose ul:not(.checklist) { padding-left: 1.2em; }
.layout-aside { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(32px, 5vw, 80px); align-items: start; }
.aside-sticky { position: sticky; top: 104px; display: grid; gap: 16px; }
@media (max-width: 1000px) { .layout-aside { grid-template-columns: 1fr; } .aside-sticky { position: static; } }

.callout { border-radius: var(--radius); padding: 28px; background: var(--white); }
.callout h3 { font-size: 22px; }
.callout--green { background: var(--green); color: var(--cream); }
.callout--green p { color: rgba(240, 238, 225, .8); }
.callout--mint { background: var(--mint); }
.callout--peach { background: var(--peach); }
.callout .btn { width: 100%; margin-top: 8px; }

.note { border-left: 4px solid var(--peach); background: rgba(251, 201, 168, .25); padding: 18px 22px; border-radius: 0 var(--radius-s) var(--radius-s) 0; margin: 1.5em 0; }
.note--mint { border-color: var(--mint); background: rgba(184, 230, 194, .3); }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  background: rgba(22, 64, 62, .07); text-decoration: none; font-size: 15px; font-weight: 500;
  border: 0; cursor: pointer; transition: background .2s, color .2s;
}
.chip:hover { background: rgba(22, 64, 62, .14); }
.chip.is-active { background: var(--green); color: var(--cream); }
.page-hero--dark .chip, .on-dark .chip { background: rgba(240, 238, 225, .12); }
.page-hero--dark .chip:hover, .on-dark .chip:hover { background: rgba(240, 238, 225, .22); }

/* Аккордеон */
.acc { border-top: 1px solid var(--line); }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 24px 0; font-size: clamp(18px, 1.6vw, 21px); font-weight: 500;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: "+"; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(22, 64, 62, .07); font-size: 22px; font-weight: 400; transition: transform .3s var(--ease), background .3s;
}
.acc details[open] summary::after { transform: rotate(45deg); background: var(--mint); }
.acc .acc__body { padding: 0 0 28px; max-width: 760px; color: var(--green-90); }
.on-dark .acc, .on-dark .acc details { border-color: rgba(240, 238, 225, .18); }
.on-dark .acc summary::after { background: rgba(240, 238, 225, .12); }
.on-dark .acc details[open] summary::after { background: var(--peach); color: var(--green); }
.on-dark .acc .acc__body { color: rgba(240, 238, 225, .82); }

/* Таблицы */
.table-wrap { overflow-x: auto; border-radius: var(--radius-s); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--cream); }
tr:last-child td { border-bottom: 0; }

/* ---------- Врачи ---------- */
.doctors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1100px) { .doctors { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) { .doctors { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .doctors { gap: 24px 14px; } .doctor h3 { font-size: 16px; } .doctor p { font-size: 13.5px; } .doctor__photo { margin-bottom: 12px; } }
.doctor { display: flex; flex-direction: column; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; font: inherit; color: inherit; }
.doctor__photo { position: relative; aspect-ratio: 3/4; border-radius: 999px 999px var(--radius) var(--radius); overflow: hidden; background: var(--mint); margin-bottom: 18px; }
.doctor:nth-child(3n+2) .doctor__photo { background: var(--peach); }
.doctor:nth-child(3n+3) .doctor__photo { background: var(--mist); }
.doctor__photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .6s var(--ease); }
.doctor:hover .doctor__photo img { transform: scale(1.04); }
.doctor__photo--empty { display: grid; place-items: center; }
.doctor__photo--empty svg { width: 34%; opacity: .5; }
.doctor h3 { font-size: 20px; margin-bottom: 6px; }
.doctor p { font-size: 15px; color: var(--muted); margin: 0; line-height: 1.45; }
.doctor__more { margin-top: 12px; font-size: 15px; font-weight: 500; }
.doctor[hidden] { display: none; }

/* Модалка */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.is-open { display: flex; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(22, 64, 62, .55); backdrop-filter: blur(4px); }
.modal__box {
  position: relative; width: min(880px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--cream); border-radius: var(--radius); display: grid; grid-template-columns: 300px 1fr;
  animation: pop .35s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal__photo { background: var(--mint); min-height: 100%; }
.modal__photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.modal__content { padding: 40px 36px; }
.modal__content h2 { font-size: 32px; }
.modal__close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--white); cursor: pointer; font-size: 22px; z-index: 2; }
@media (max-width: 700px) {
  .modal__box { grid-template-columns: 1fr; }
  .modal__photo { height: 300px; }
  .modal__content { padding: 28px 22px; }
}

/* ---------- Новости ---------- */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 980px) { .news { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .news { grid-template-columns: 1fr; } }
.news-card { display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: transform .35s var(--ease); }
.news-card:hover { transform: translateY(-4px); }
.news-card__img { aspect-ratio: 16/10; background: var(--mint); overflow: hidden; }
.news-card__img img { width: 100%; height: 100%; object-fit: cover; }
.news-card__body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.news-card time { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.news-card h3 { font-size: 20px; line-height: 1.25; }
.news-card p { color: var(--muted); font-size: 15.5px; margin: 0; }
.article { max-width: 760px; }
.article__img { border-radius: var(--radius); overflow: hidden; margin: 0 0 32px; }

/* ---------- Цены ---------- */
.price-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 28px; }
.search {
  flex: 1 1 320px; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 22px;
  background: var(--white); border-radius: 999px; border: 1.5px solid transparent; transition: border-color .2s;
}
.search:focus-within { border-color: var(--green); }
.search input { flex: 1; border: 0; outline: 0; background: none; font: inherit; color: inherit; min-width: 0; }
.search svg { width: 20px; height: 20px; opacity: .6; flex: none; }
.price-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.price-section { margin-bottom: 16px; background: var(--white); border-radius: var(--radius); overflow: hidden; }
.price-section > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 28px; font-size: 21px; font-weight: 600; }
.price-section > summary::-webkit-details-marker { display: none; }
.price-section > summary small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: auto; }
.price-section > summary::after { content: "+"; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); font-weight: 400; flex: none; transition: transform .3s; }
.price-section[open] > summary::after { transform: rotate(45deg); background: var(--mint); }
.price-row { display: grid; grid-template-columns: 70px 1fr auto; gap: 16px; padding: 14px 28px; border-top: 1px solid var(--line); font-size: 15.5px; align-items: baseline; }
.price-row:hover { background: rgba(240, 238, 225, .6); }
.price-row__code { color: var(--muted); font-size: 13.5px; }
.price-row__price { font-weight: 600; white-space: nowrap; }
.price-row mark { background: var(--peach); color: inherit; border-radius: 4px; padding: 0 2px; }
@media (max-width: 600px) {
  .price-row { grid-template-columns: 1fr auto; padding: 14px 20px; }
  .price-row__code { display: none; }
  .price-section > summary { padding: 20px; font-size: 18px; }
  .price-section > summary small { display: none; }
}
.empty-state { padding: 48px; text-align: center; background: var(--white); border-radius: var(--radius); }

/* ---------- Контакты ---------- */
.branch { background: var(--white); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.branch__map { aspect-ratio: 16/10; background: var(--mist); border: 0; width: 100%; }
.branch__body { padding: clamp(24px, 3vw, 36px); }
.branch__row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 16px; }
.branch__row dt { color: var(--muted); font-size: 14px; }
.branch__row dd { margin: 0; }
.branch__row a { text-decoration: none; font-weight: 500; }
.branch__row a:hover { text-decoration: underline; }

.messengers { display: flex; gap: 10px; flex-wrap: wrap; }
.msg {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 22px 0 16px; border-radius: 999px;
  background: var(--white); text-decoration: none; font-weight: 500; transition: transform .25s var(--ease), background .25s;
}
.msg:hover { transform: translateY(-2px); }
.msg svg { width: 24px; height: 24px; }
.on-dark .msg, .footer .msg { background: rgba(240, 238, 225, .1); color: var(--cream); opacity: 1; }
.footer .msg:hover { text-decoration: none; }
.on-dark .msg:hover { background: rgba(240, 238, 225, .2); }

/* ---------- CTA ---------- */
.cta { position: relative; overflow: hidden; border-radius: clamp(28px, 4vw, 48px); background: var(--green); color: var(--cream); padding: clamp(40px, 6vw, 80px); }
.cta h2 { max-width: 14ch; }
.cta p { color: rgba(240, 238, 225, .8); max-width: 44ch; font-size: 18px; }
.cta__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: end; }
.cta__actions { display: grid; gap: 12px; }
.cta__phones { display: grid; gap: 4px; margin-bottom: 12px; }
.cta__phones a { font-size: clamp(24px, 2.6vw, 34px); font-weight: 600; text-decoration: none; letter-spacing: -.02em; }
.cta__phones small { opacity: .7; font-size: 14px; }
.cta .shape.a { right: 150px; top: 36px; width: 84px; height: 168px; border-radius: 168px 0 0 168px; background: var(--peach); }
.cta .shape.b { right: 66px; top: 204px; width: 84px; height: 168px; border-radius: 0 168px 168px 0; background: var(--mint); }
@media (min-width: 901px) { .cta__inner { padding-right: 180px; } }
@media (max-width: 900px) { .cta__inner { grid-template-columns: 1fr; } .cta .shape { display: none; } }

/* ---------- Подвал ---------- */
.footer { background: var(--green); color: var(--cream); padding: clamp(56px, 7vw, 96px) 0 32px; margin-top: clamp(64px, 9vw, 120px); position: relative; overflow: hidden; }
.footer a { text-decoration: none; opacity: .82; }
.footer a:hover { opacity: 1; text-decoration: underline; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; opacity: .6; font-weight: 600; margin-bottom: 18px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer__about p { opacity: .75; font-size: 15px; max-width: 32ch; margin-top: 20px; }
.footer__bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 64px; padding-top: 24px; border-top: 1px solid rgba(240, 238, 225, .16); font-size: 13.5px; opacity: .7; }
.footer__bottom div { display: flex; gap: 20px; flex-wrap: wrap; }
.footer__partners { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.footer__partners a { display: inline-flex; background: var(--cream); border-radius: 12px; padding: 8px 12px; opacity: 1; }
.footer__partners img { height: 34px; width: auto; }
.footer__wordmark { position: absolute; right: -2%; bottom: -14%; width: 22vw; max-width: 260px; opacity: .06; pointer-events: none; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Плавающая кнопка связи ---------- */
.fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; }
.fab__toggle {
  width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--green); color: var(--cream); display: grid; place-items: center;
  box-shadow: 0 16px 40px -12px rgba(22, 64, 62, .6); transition: transform .3s var(--ease);
}
.fab__toggle:hover { transform: scale(1.06); }
.fab__toggle svg { width: 26px; height: 26px; }
.fab__menu {
  position: absolute; right: 0; bottom: 76px; display: grid; gap: 8px; min-width: 230px;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: .25s var(--ease);
}
.fab.is-open .fab__menu { opacity: 1; visibility: visible; transform: none; }
.fab__menu a { display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 14px; border-radius: 999px; background: var(--white); text-decoration: none; font-weight: 500; box-shadow: 0 10px 30px -14px rgba(22, 64, 62, .45); }
.fab__menu svg { width: 24px; height: 24px; flex: none; }

/* ---------- Cookie ---------- */
.cookie {
  position: fixed; left: 20px; bottom: 20px; z-index: 70; max-width: 420px;
  background: var(--white); border-radius: 22px; padding: 20px 22px; font-size: 14.5px; line-height: 1.5;
  box-shadow: 0 24px 60px -24px rgba(22, 64, 62, .5);
  display: none;
}
.cookie.is-visible { display: block; }
.cookie p { margin: 0 0 14px; }
.cookie .btn { min-height: 42px; padding: 0 20px; font-size: 15px; }
@media (max-width: 560px) { .cookie { left: 12px; right: 92px; bottom: 12px; } }

/* ---------- Биобанк ---------- */
.bio-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px; background: var(--bio); color: var(--white); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.bio-badge::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(90deg, var(--white) 50%, var(--bio-light) 50%); }
.theme-bio .eyebrow { color: var(--bio); }
.theme-bio .step::before { background: var(--bio-light); }
.theme-bio .checklist li::before { background: linear-gradient(90deg, var(--bio) 50%, var(--bio-light) 50%); }
.logo__sub--bio { color: var(--bio); }

/* ---------- Анимация появления ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition-duration: 0s !important; }
}

/* ---------- Версия для слабовидящих ---------- */
.a11y-mode { font-size: 21px; }
.a11y-mode body { background: #fff; }
.a11y-mode .muted, .a11y-mode .card p, .a11y-mode .doctor p, .a11y-mode .prose p, .a11y-mode .prose li { color: var(--green) !important; }
.a11y-mode .shape, .a11y-mode .card__deco, .a11y-mode .footer__wordmark { display: none !important; }
.a11y-mode img:not(.keep) { filter: grayscale(1); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-l { margin-top: clamp(32px, 4vw, 56px); }
.center { text-align: center; }

/* Прайс на телефоне: разделы одной прокручиваемой строкой */
@media (max-width: 640px) {
  .price-nav { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)) 24px; padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .price-nav::-webkit-scrollbar { display: none; }
  .price-nav .chip { white-space: nowrap; flex: none; }
}
.is-searching .price-nav { display: none; }

.price-row[hidden], .price-section[hidden], .empty-state[hidden] { display: none; }

/* =========================================================
   Мобильный первый экран: фото на всю ширину
   ========================================================= */
.hero-m { display: none; }
.nav__a11y { display: block; text-align: center; padding: 14px 0 0; font-size: 15px; color: var(--muted); }
.btn--glass { background: rgba(255, 255, 255, .55); color: var(--green); border-color: rgba(255, 255, 255, .7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

@media (max-width: 900px) {
  .hero { display: none; }
  .hero-m {
    display: flex; flex-direction: column; justify-content: space-between;
    position: relative; overflow: hidden; isolation: isolate;
    min-height: max(600px, calc(100svh - 80px));
    padding: 28px var(--gutter) 108px;
    background: var(--mist);
  }
  .hero-m__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 91% 40%; }
  .hero-m__shade {
    position: absolute; inset: 0; z-index: -1;
    background:
      linear-gradient(180deg, rgba(240, 238, 225, .97) 0%, rgba(240, 238, 225, .88) 26%, rgba(240, 238, 225, 0) 52%),
      linear-gradient(0deg, rgba(240, 238, 225, .55) 0%, rgba(240, 238, 225, 0) 30%);
  }
  .hero-m__top { max-width: 30ch; }
  .hero-m .eyebrow { font-size: 11.5px; margin-bottom: 14px; }
  .hero-m h1 { font-size: clamp(40px, 11.5vw, 58px); line-height: 1.02; margin-bottom: 14px; letter-spacing: -.035em; }
  .hero-m h1 em { font-style: normal; color: var(--green-70); }
  .hero-m p { font-size: 16px; line-height: 1.5; color: var(--green-90); margin: 0; max-width: 32ch; }
  .hero-m__bottom { display: grid; gap: 10px; position: relative; z-index: 1; }
  .hero-m__bottom .btn { width: 100%; min-height: 54px; }
  .hero-m__wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 84px; pointer-events: none; }
  .hero-m__wave span { position: absolute; bottom: 0; border-radius: 999px 999px 0 0; }
  .hero-m__wave .w1 { left: -12%; width: 78%; height: 64px; background: var(--peach); }
  .hero-m__wave .w2 { right: -14%; width: 74%; height: 84px; background: var(--green); }
  /* шапка на телефоне: логотип + «Записаться» + меню */
  .home .topbar { display: none; }
}
@media (max-width: 640px) {
  .topbar { display: none; }
  .header .container { min-height: 68px; gap: 10px; }
  .header .logo img { height: 36px !important; }
  .header__cta { gap: 8px; }
  .header__cta .header__book { display: inline-flex; min-height: 40px; padding: 0 16px; font-size: 14px; background: transparent; color: var(--green); border-color: var(--green); }
  .burger { width: 42px; height: 42px; }
}

/* =========================================================
   v2: первый экран с фото, сценарии, понятная навигация
   ========================================================= */
.serif { font-family: "Lora", Georgia, serif; font-style: italic; font-weight: 500; letter-spacing: -.01em; }
.btn--lg { min-height: 60px; padding: 0 30px; font-size: 17px; }
.btn--glass-dark { background: rgba(240, 238, 225, .14); color: var(--cream); border-color: rgba(240, 238, 225, .45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn--glass-dark:hover { background: rgba(240, 238, 225, .26); }

/* Первый экран */
.hero2 {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(860px, calc(100svh - 120px));
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: clamp(56px, 9vh, 104px) 0 clamp(150px, 22vh, 230px);
  color: var(--cream); text-align: center;
  background: var(--green);
}
.hero2__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero2__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(22, 64, 62, .62) 0%, rgba(22, 64, 62, .38) 34%, rgba(22, 64, 62, 0) 58%),
    radial-gradient(ellipse 60% 45% at 50% 22%, rgba(22, 64, 62, .28), transparent 70%);
}
.hero2__inner { display: flex; flex-direction: column; align-items: center; }
.hero2__eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .9; margin-bottom: 22px; }
.hero2__title { font-size: clamp(44px, 6.6vw, 92px); line-height: 1.02; letter-spacing: -.035em; font-weight: 500; max-width: 13ch; margin: 0 0 22px; text-wrap: balance; }
.hero2__title .serif { display: block; font-size: 1.04em; }
.hero2__lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; max-width: 46ch; margin: 0 0 32px; color: rgba(240, 238, 225, .92); text-wrap: pretty; }
.hero2__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero2 .hero2__actions .btn svg { width: 20px; height: 20px; }
.hero2__wave { position: absolute; left: 0; right: 0; bottom: -1px; height: clamp(70px, 9vw, 120px); pointer-events: none; }
.hero2__wave span { position: absolute; bottom: 0; border-radius: 999px 999px 0 0; }
.hero2__wave .w1 { left: -6%; width: 58%; height: 72%; background: var(--peach); }
.hero2__wave .w2 { right: -8%; width: 56%; height: 100%; background: var(--cream); }
.hero, .hero-m { display: none !important; }

@media (max-width: 700px) {
  .hero2 { min-height: calc(100svh - 68px); padding: 36px 0 112px; justify-content: space-between; }
  .hero2__img { object-position: 47% 60%; }
  .hero2__shade { background: linear-gradient(180deg, rgba(22, 64, 62, .72) 0%, rgba(22, 64, 62, .45) 36%, rgba(22, 64, 62, 0) 58%, rgba(22, 64, 62, 0) 70%, rgba(22, 64, 62, .35) 100%); }
  .hero2__inner { flex: 1; }
  .hero2__eyebrow { font-size: 11px; letter-spacing: .12em; margin-bottom: 16px; max-width: 28ch; }
  .hero2__title { font-size: clamp(42px, 12.5vw, 56px); }
  .hero2__lead { font-size: 16.5px; }
  .hero2__actions { margin-top: auto; width: 100%; flex-direction: column; }
  .hero2__actions .btn { width: 100%; }
  .hero2__wave { height: 64px; }
}

/* С чем вы обращаетесь */
.section--tasks { padding-top: clamp(48px, 6vw, 80px); }
.tasks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 980px) { .tasks { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tasks { grid-template-columns: 1fr; gap: 10px; } }
.task {
  display: flex; align-items: center; gap: 18px; min-height: 104px; padding: 20px 22px;
  background: var(--white); border-radius: 22px; text-decoration: none;
  border: 1.5px solid transparent; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.task:hover { transform: translateY(-2px); border-color: var(--green); box-shadow: 0 18px 40px -28px rgba(22, 64, 62, .6); }
.task__icon { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); color: var(--green); }
.task__icon svg { width: 28px; height: 28px; }
.task--green .task__icon { background: var(--green); color: var(--cream); }
.task--mint .task__icon { background: var(--mint); }
.task--peach .task__icon { background: var(--peach); }
.task__text { flex: 1; display: grid; gap: 4px; }
.task__text b { font-size: 19px; font-weight: 600; line-height: 1.25; }
.task__text small { font-size: 15px; color: var(--muted); line-height: 1.35; }
.task__arrow { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); font-size: 18px; transition: background .25s, color .25s; }
.task:hover .task__arrow { background: var(--green); color: var(--cream); }

/* Где мы находимся */
.place { background: var(--cream); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); }
.place h3 { font-size: clamp(24px, 2.4vw, 30px); margin-bottom: 10px; }
.place__phone { font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; text-decoration: none; letter-spacing: -.01em; }
.place p { margin-bottom: 10px; }

/* Коротко о главном */
.summary { background: var(--white); border-radius: var(--radius); padding: 24px 28px 10px; margin-bottom: 40px; border-left: 6px solid var(--mint); }
.summary__title { font-size: 15px !important; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px !important; }
.summary dl { margin: 0; }
.summary__row { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.summary__row:first-child { border-top: 0; }
.summary__row dt { color: var(--muted); font-size: 15.5px; }
.summary__row dd { margin: 0; font-weight: 500; font-size: 17.5px; line-height: 1.45; }
.theme-bio .summary { border-left-color: var(--bio); }
@media (max-width: 560px) { .summary__row { grid-template-columns: 1fr; gap: 2px; } .summary { padding: 20px 20px 6px; } }

/* Кнопка меню с подписью */
.burger { gap: 8px; }
.burger__label { display: none; font-size: 15px; font-weight: 500; }
@media (max-width: 1100px) {
  .burger { width: auto; height: 44px; padding: 0 16px 0 14px; border-radius: 999px; }
  .burger__label { display: inline; }
}
@media (max-width: 640px) {
  .header__cta .header__book { display: none !important; }
  .burger { height: 42px; }
}

/* Нижняя панель на телефоне */
.mbar { display: none; }
@media (max-width: 900px) {
  .mbar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(240, 238, 225, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .mbar a, .mbar button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 52px; border-radius: 999px; border: 0; font: inherit; font-size: 17px; font-weight: 600; text-decoration: none; cursor: pointer;
  }
  .mbar svg { width: 20px; height: 20px; }
  .mbar__call { background: var(--green); color: var(--cream); }
  .mbar__book { background: var(--peach); color: var(--green); }
  .fab { display: none; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .cookie { bottom: calc(84px + env(safe-area-inset-bottom)); right: 12px; }
  .menu-open .mbar { display: none; }
}

/* Первый экран на компьютере: текст слева, касание рук свободно */
@media (min-width: 701px) {
  .hero2 { text-align: left; justify-content: center; padding: clamp(56px, 8vh, 96px) 0 clamp(120px, 16vh, 170px); }
  .hero2__inner { align-items: flex-start; }
  .hero2__title { max-width: 11ch; }
  .hero2__lead { max-width: 40ch; }
  .hero2__actions { justify-content: flex-start; }
  .hero2__img { width: 128%; max-width: none; left: 0; right: auto; object-position: 50% 62%; }
  .hero2__shade {
    background:
      linear-gradient(90deg, rgba(22, 64, 62, .86) 0%, rgba(22, 64, 62, .7) 28%, rgba(22, 64, 62, .25) 50%, rgba(22, 64, 62, 0) 64%),
      linear-gradient(180deg, rgba(22, 64, 62, .25) 0%, rgba(22, 64, 62, 0) 30%);
  }
}
@media (min-width: 701px) and (max-width: 1000px) {
  .hero2__shade { background: linear-gradient(90deg, rgba(22, 64, 62, .88) 0%, rgba(22, 64, 62, .72) 45%, rgba(22, 64, 62, .2) 75%); }
}
@media (min-width: 1600px) { .hero2__img { width: 118% !important; } }
@media (min-width: 701px) and (max-width: 1000px) { .hero2__img { width: 150% !important; } }
.show-m { display: none !important; }
@media (max-width: 900px) {
  .hide-m { display: none; }
  .hero2 .hero2__actions .show-m { display: inline-flex !important; }
  .hero2 .hero2__actions .btn:not(.show-m) { display: none; }
  .hero2 { padding-bottom: 96px; }
  .task { min-height: 0; padding: 16px 18px; gap: 14px; }
  .task__icon { width: 48px; height: 48px; }
  .task__icon svg { width: 24px; height: 24px; }
  .task__text b { font-size: 18px; }
  .task__arrow { width: 34px; height: 34px; }
}

/* v3: врачи ровно, первый экран — скруглённая карточка без волн */
.doctors { align-items: stretch; }
.doctor { height: 100%; }
.doctor h3 { min-height: 2.5em; }
.doctor__more { margin-top: auto; padding-top: 14px; }

.hero2 {
  margin: 12px clamp(10px, 1.6vw, 24px) 0;
  border-radius: clamp(28px, 3vw, 44px);
  padding-bottom: clamp(64px, 10vh, 112px);
}
.hero2__wave { display: none; }
@media (min-width: 701px) {
  .hero2 { padding-bottom: clamp(64px, 10vh, 112px); min-height: min(820px, calc(100svh - 136px)); }
}
@media (max-width: 700px) {
  .hero2 { margin-top: 6px; min-height: calc(100svh - 160px); padding-bottom: 28px; }
}
.hero2__chip {
  position: absolute; right: 104px; bottom: clamp(24px, 3vw, 40px);
  display: flex; align-items: center; gap: 16px; max-width: 360px; padding: 16px 18px 16px 16px;
  border-radius: 24px; text-decoration: none; color: var(--cream); text-align: left;
  background: rgba(22, 64, 62, .38); border: 1px solid rgba(240, 238, 225, .28);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  transition: background .25s, transform .25s var(--ease);
}
.hero2__chip:hover { background: rgba(22, 64, 62, .55); transform: translateY(-2px); }
.hero2__chip-mark { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--peach); color: var(--green); display: grid; place-items: center; }
.hero2__chip-mark svg { width: 12px; height: 30px; }
.hero2__chip b { display: block; font-size: 17px; font-weight: 600; }
.hero2__chip small { display: block; font-size: 14px; opacity: .85; line-height: 1.35; margin-top: 2px; }
.hero2__chip-arrow { flex: none; font-size: 20px; }
@media (max-width: 900px) { .hero2__chip { display: none; } }

/* v4: первый экран без лишнего текста, цифры сразу после него */
.hero2__title { margin-bottom: 32px; }
.stats-band { margin-top: 20px; }
.stats-band__head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: end; margin-bottom: clamp(36px, 4vw, 56px); }
.stats-band__head h2 { margin: 0; max-width: 16ch; }
.stats-band__head p { margin: 0; font-size: 18px; line-height: 1.55; color: rgba(240, 238, 225, .8); max-width: 44ch; }
@media (max-width: 800px) { .stats-band__head { grid-template-columns: 1fr; } }
@media (min-width: 701px) { .hero2 { justify-content: center; } }

/* v5: полезные организации — крупные карточки */
.orgs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1000px) { .orgs { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .orgs { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.org { display: flex; flex-direction: column; gap: 14px; padding: 18px; background: var(--cream); border-radius: 22px; text-decoration: none; border: 1.5px solid transparent; transition: border-color .2s, transform .25s var(--ease); }
.org:hover { border-color: var(--green); transform: translateY(-2px); }
.org__logo { display: grid; place-items: center; height: 110px; background: var(--white); border-radius: 14px; padding: 10px; }
.org__logo img { max-height: 90px; width: auto; object-fit: contain; }
.org__name { font-size: 15.5px; font-weight: 500; line-height: 1.35; }

/* v5: цифры — карточки вместо длинных линий */
.stats { gap: 16px; }
.stat { border-top: 0; padding: clamp(22px, 2.4vw, 32px); border-radius: 24px; background: rgba(240, 238, 225, .07); border: 1px solid rgba(240, 238, 225, .12); }
.stat b { font-size: clamp(40px, 4.6vw, 64px); margin-bottom: 10px; }
.stat b::before { content: ""; display: block; width: 18px; height: 36px; margin-bottom: 18px; background: url("../img/mark.svg") center / contain no-repeat; filter: invert(88%) sepia(18%) saturate(500%) hue-rotate(320deg); }
.stat:nth-child(2) b::before { filter: invert(91%) sepia(12%) saturate(600%) hue-rotate(70deg); }
.stat:nth-child(3) b::before { filter: invert(96%) sepia(6%) saturate(300%) hue-rotate(10deg); }
@media (max-width: 900px) { .stats { row-gap: 12px; gap: 12px; } .stat { padding: 18px; } .stat b { font-size: 36px; } .stat b::before { width: 14px; height: 28px; margin-bottom: 12px; } }
.stat b::before { filter: none !important; background: var(--peach); -webkit-mask: url("../img/mark.svg") center / contain no-repeat; mask: url("../img/mark.svg") center / contain no-repeat; }
.stat:nth-child(2) b::before { background: var(--mint); }
.stat:nth-child(3) b::before { background: var(--cream); }
.stat:nth-child(4) b::before { background: var(--peach); }

/* v6: длинные выпадающие меню — своя прокрутка, страница стоит на месте */
.nav__menu { max-height: calc(100vh - 140px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
@media (min-width: 1101px) {
  .nav__drop:first-child .nav__menu { display: grid; grid-template-columns: 1fr 1fr; column-gap: 4px; min-width: 620px; grid-auto-flow: row; }
  .nav__drop:first-child .nav__menu .nav__group { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .nav { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .nav__menu { max-height: none; overflow: visible; }
}
/* кнопки NextBot не перекрывают cookie-плашку на компьютере */
.cookie { right: auto; }
.hero2__chip { top: clamp(24px, 3vw, 40px); bottom: auto; right: clamp(24px, 3vw, 40px); }
/* пока открыто меню или окно записи — виджет NextBot скрыт */
.menu-open [class^="prefix_"], .menu-open [class*=" prefix_"],
body:has(.modal.is-open) [class^="prefix_"], body:has(.modal.is-open) [class*=" prefix_"] { display: none !important; }

/* v7: видео */
.route-video video, .article video { width: 100%; height: auto; border-radius: 18px; background: #000; display: block; }
.route-video { margin-top: 24px; max-width: 520px; }
.route-video { max-width: 320px; }

/* =========================================================
   v8: согласие на cookie, кнопка чата до согласия, карты по согласию
   ========================================================= */
.consent {
  position: fixed; left: 20px; bottom: 20px; z-index: 120; width: min(560px, calc(100vw - 40px));
  background: var(--white); color: var(--green); border-radius: 24px; padding: 24px 24px 20px;
  box-shadow: 0 30px 80px -24px rgba(22, 64, 62, .55); border: 1px solid var(--line);
  max-height: calc(100vh - 40px); overflow-y: auto;
}
.consent[hidden] { display: none; }
.consent__title { font-size: 20px; margin: 0 0 8px; }
.consent__text { font-size: 15px; line-height: 1.5; margin: 0 0 16px; color: var(--green-90); }
.consent__prefs { display: grid; gap: 10px; margin: 0 0 16px; }
.consent__prefs[hidden] { display: none; }
.consent__opt { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 12px 14px; border-radius: 14px; background: var(--cream); cursor: pointer; }
.consent__opt input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--green); }
.consent__opt b { display: block; font-size: 15.5px; font-weight: 600; }
.consent__opt small { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.consent__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.consent__actions .btn { min-height: 46px; padding: 0 18px; font-size: 15px; flex: 1 1 auto; }
.consent__actions [hidden] { display: none; }
@media (max-width: 900px) {
  .consent { left: 10px; right: 10px; width: auto; bottom: calc(80px + env(safe-area-inset-bottom)); padding: 20px 18px 16px; max-height: calc(100vh - 110px); }
}

.chat-launch {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  display: inline-flex; align-items: center; gap: 8px; height: 56px; padding: 0 20px 0 16px; border: 0; border-radius: 999px;
  background: var(--green); color: var(--cream); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  box-shadow: 0 16px 40px -12px rgba(22, 64, 62, .6);
}
.chat-launch svg { width: 24px; height: 24px; }
@media (max-width: 900px) { .chat-launch { right: 14px; bottom: calc(88px + env(safe-area-inset-bottom)); height: 50px; } }
.menu-open .chat-launch, body:has(.modal.is-open) .chat-launch { display: none; }

.map-consent { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; background: var(--mist); }
.map-consent p { margin: 0; font-size: 15px; color: var(--muted); max-width: 34ch; }

/* v9: классическая плашка cookie — текст и две кнопки */
.consent { display: flex; align-items: center; gap: 16px; width: min(640px, calc(100vw - 40px)); padding: 16px 16px 16px 22px; border-radius: 20px; }
.consent__text { margin: 0; font-size: 14.5px; flex: 1; }
.consent__actions { flex: none; flex-wrap: nowrap; }
.consent__actions .btn { min-height: 42px; padding: 0 18px; flex: none; }
@media (max-width: 600px) {
  .consent { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
  .consent__actions .btn { flex: 1; }
}

/* демо-версия */
.demo-bar { position: relative; z-index: 70; background: var(--bio-deep); color: #fff; text-align: center; font-size: 14px; font-weight: 500; padding: 8px 16px; line-height: 1.4; }
.demo-bar a { color: #fff; text-decoration: underline; }

/* v10: встроенный браузер Telegram/VK рисует свою панель поверх страницы — фон шапки продлён вверх */
@media (max-width: 640px) { .header::before { top: -160px; background: var(--cream); } }
