/* Kyiv Center of Endocrinology — лендинг за макетом «Desktop - 1440_фінальний» */
:root {
  --ink: #0f1a18;
  --muted: #5b6664;
  --green-900: #072c26;
  --green-700: #0b4a3f;
  --green-500: #0e7a63;
  --accent: #0f5546;
  --card: #f0f1f2;
  --line: #e2e5e5;
  --white: #fff;
  --radius: 22px;
  --grad: linear-gradient(135deg, #0a3a32 0%, #0e7a63 100%);
  --shadow: 0 10px 30px -12px rgb(7 44 38 / 0.35);
}

*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Onest", system-ui, sans-serif; color: var(--ink); background: var(--white); line-height: 1.45; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.container { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: 40px; }
section { margin-top: 120px; }
.center { text-align: center; }
.center.btn, div.center { display: flex; justify-content: center; }
.muted { color: var(--muted); }
.lead { font-size: 20px; line-height: 1.4; }
.accent { color: var(--accent); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green-500); }
p.eyebrow.center { display: flex; justify-content: center; }

.title-xl { font-size: clamp(34px, 3.6vw, 52px); max-width: 640px; line-height: 1.06; font-weight: 500; letter-spacing: -0.02em; color: var(--green-900); }
.title-xl .indent { padding-left: 1.65em; }
.title-lg { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.1; font-weight: 500; letter-spacing: -0.02em; color: var(--green-900); }
.title-md { font-size: clamp(28px, 3vw, 42px); line-height: 1.12; font-weight: 500; letter-spacing: -0.015em; }

/* ── Кнопки ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 12px; font: 500 16px/1.2 inherit; font-family: inherit; border: 0; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--grad); color: var(--white); box-shadow: var(--shadow); }
.btn--primary:hover { box-shadow: 0 16px 34px -12px rgb(7 44 38 / 0.5); }
.btn--outline { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--green-700); }
.btn--light { background: #e3f3ef; color: var(--green-900); }
.btn--lg { padding: 20px 30px; font-size: 17px; border-radius: 14px; min-width: 260px; }
.btn--xl { padding: 22px; font-size: 19px; border-radius: 16px; width: 100%; }
.arrow-badge { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green-700); color: var(--white); font-size: 16px; }

/* ── Шапка ── */
.header { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / 0.86); backdrop-filter: blur(14px); }
.header__inner { display: flex; align-items: center; gap: 32px; height: 84px; }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo img { width: 44px; height: auto; }
.logo__text { display: flex; flex-direction: column; line-height: 1; color: var(--green-700); }
.logo__text b { font-size: 18px; font-weight: 600; letter-spacing: 0.01em; }
.logo__text small { font-size: 9.5px; font-weight: 600; letter-spacing: 0.04em; margin-top: 3px; }
.logo--light .logo__text { color: var(--white); }
/* де проходить прийом — пацієнт приходить у клініку Remedy */
.partner { display: flex; align-items: baseline; gap: 5px; line-height: 1; padding: 6px 0 6px 14px; margin-left: -18px; border-left: 1px solid rgb(7 44 38 / .18); color: var(--green-700); white-space: nowrap; }
.partner small { font-size: 14px; font-weight: 400; font-style: italic; opacity: .65; }
.partner b { font-size: 18px; font-weight: 600; }
.nav { display: flex; gap: 22px; margin: 0 auto; font-size: 16px; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: var(--card); border-radius: 12px; cursor: pointer; }
.burger span { display: block; width: 18px; height: 2px; background: var(--ink); margin: 5px auto; transition: transform .2s; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.mobile-menu { display: flex; flex-direction: column; gap: 4px; padding: 8px 20px 20px; }
.mobile-menu[hidden] { display: none; }
.mobile-menu a:not(.btn) { padding: 12px 4px; font-size: 18px; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { margin-top: 12px; }

/* ── Hero ── */
/* три колонки: текст / фото / бічна — фото у своїй колонці й не заходить під текст на жодній ширині;
   знизу в текстових колонках — місце під зелену смугу (кнопки не потрапляють на неї) */
.hero { --band: 230px; --photo-h: clamp(540px, 46vw, 720px); position: relative; margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(230px, 300px); column-gap: clamp(16px, 2vw, 32px); }
.hero__text { grid-column: 1; grid-row: 1; position: relative; z-index: 2; padding-top: 40px; padding-bottom: calc(var(--band) + 28px); }
/* заголовок заходить у прозору ліву частину фото (голова — у центрі кадру), кнопки лишаються у своїй колонці */
.hero .title-xl { font-size: clamp(36px, 3.4vw, 54px); max-width: none; margin-right: calc(var(--photo-h) * -0.15); }
.hero__buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 44px; }
.hero__side { grid-column: 3; grid-row: 1; position: relative; z-index: 2; padding-top: 52px; padding-bottom: calc(var(--band) + 28px); }
.hero__lead { font-size: 18px; color: var(--muted); max-width: 320px; }
.hero__stat { display: flex; align-items: center; gap: 12px; margin-top: 96px; }
.hero__stat img { width: 126px; height: auto; }
.hero__stat b { font-size: 52px; font-weight: 500; color: var(--green-900); line-height: 1; letter-spacing: -0.02em; }
.hero__stat-label { margin-top: 10px; color: var(--muted); }
.hero__band { position: absolute; z-index: 0; left: 40px; right: 40px; bottom: 0; height: var(--band); border-radius: 0 40px 40px 0; background: linear-gradient(180deg, #0e7a63 0%, #0b4a3f 55%, #072c26 100%); }
.hero__figure { grid-column: 2; grid-row: 1; align-self: end; justify-self: center; position: relative; z-index: 1; height: var(--photo-h); pointer-events: none; }
.hero__woman { position: relative; z-index: 1; display: block; width: auto; max-width: none; height: 100%; object-fit: contain; }
/* «було»: сіра тінь позаду — нижча, трохи вліво, розмита */
.hero__past { position: absolute; z-index: 0; bottom: 0; left: -38%; height: 74%; width: auto; max-width: none; opacity: .55; }
.doc-card { position: absolute; z-index: 3; left: 40px; bottom: 0; display: flex; gap: 14px; align-items: stretch; padding: 16px; width: max-content; min-width: 360px; border-radius: 20px; background: var(--grad); color: var(--white); box-shadow: 0 0 0 8px var(--white); }
.doc-card img { width: 126px; height: 132px; object-fit: cover; border-radius: 12px; }
.doc-card__role, .doc-card__small { font-size: 14px; opacity: .9; }
.doc-card__role { white-space: nowrap; }
.doc-card__name { font-weight: 600; margin-bottom: auto; }
.doc-card > div { display: flex; flex-direction: column; }
.doc-card__small { margin-top: 18px; }
.doc-card__big { font-size: 26px; font-weight: 700; line-height: 1.1; }

/* ── Симптоми ── */
.symptoms { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 40px; }
.symptoms__text { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.symptoms__text .arrow-badge { margin: 40px 0 8px; }
.symptoms__list { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: repeat(5, auto); column-gap: 32px; }
.symptoms__list li { display: flex; align-items: center; gap: 20px; min-height: 70px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 17px; transition: color .2s, padding-left .2s; }
.symptoms__list li:hover { color: var(--accent); padding-left: 6px; }
.symptoms__list b { font-size: 13px; font-weight: 500; color: var(--muted); width: 18px; }

/* ── Підхід ── */
.approach__card { display: grid; grid-template-columns: 1fr 0.55fr; align-items: stretch; background: var(--card); border-radius: 28px; overflow: hidden; min-height: 380px; }
.approach__text { display: flex; flex-direction: column; padding: 36px 32px 28px; }
.approach__text .title-md { max-width: 520px; }
.approach__img { width: 100%; height: 100%; object-fit: cover; object-position: 30% center; align-self: end; }
.progress { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: auto; padding-top: 48px; font-size: 15px; color: var(--muted); }
/* етапи: --fill (0…1) — наскільки заповнена лінія до наступного етапу (керує прокрутка, див. script.js) */
.progress li { --fill: 0; position: relative; padding-top: 30px; padding-right: 10px; transition: color .35s ease; }
.progress li::before { content: ""; position: absolute; top: 4px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--white); border: 1px solid #c9cfce; z-index: 1; transition: background .3s ease, border-color .3s ease, transform .45s cubic-bezier(.3, 1.8, .5, 1), box-shadow .45s ease; }
.progress li::after { content: ""; position: absolute; top: 8px; left: 0; right: 0; height: 2px; background: linear-gradient(to right, var(--green-700) calc(var(--fill) * 100%), #dde1e1 0); }
.progress li.is-done::before, .progress li.is-active::before { background: var(--green-700); border-color: var(--green-700); }
.progress li.is-current, .progress li.is-active { color: var(--ink); font-weight: 500; }
.progress li.is-current::before, .progress li.is-active::before { transform: scale(1.6); box-shadow: 0 0 0 4px rgb(14 122 99 / .14); }
.progress li:last-child::after { display: none; }
/* поки етапи перемикаються, картка стоїть на місці (висоту секції й відступ задає script.js) */
.approach.is-pinned .approach__card { position: sticky; }

/* ── Промо Діла ── */
.promo { display: flex; align-items: center; gap: 40px; padding: 28px 32px; background: var(--card); border-radius: var(--radius); }
.promo img { width: 122px; height: auto; }
.promo__text { flex: 1; }
.promo__title { font-size: clamp(22px, 2.3vw, 30px); font-weight: 500; }
.promo__title b { color: var(--accent); }
.promo .muted { font-size: 19px; }

/* ── Напрями ── */
.directions .title-lg { margin-bottom: 36px; }
.directions__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; margin-bottom: 32px; align-items: start; }
.dir-main { padding: 36px 34px 34px; border-radius: 24px; background: linear-gradient(160deg, #0e7a63 0%, #0b4a3f 50%, #072c26 100%); color: var(--white); }
.dir-main h3 { font-size: clamp(26px, 2.4vw, 34px); font-weight: 500; text-transform: uppercase; margin-bottom: 80px; }
.dir-main ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.dir-main li { padding: 12px 0; border-bottom: 1px solid rgb(255 255 255 / .25); font-size: 16px; }
.eyebrow--light { color: rgb(255 255 255 / .85); }
.eyebrow--light::before { background: var(--white); }
/* напрями-акордеон: клік по рядку або стрілці розкриває деталі; стрілка ↙ повертається вниз */
.dir-item { padding: 22px 0; border-bottom: 1px solid var(--line); }
.dir-item:first-child { padding-top: 6px; }
.dir-item__head { display: flex; align-items: center; justify-content: space-between; gap: 24px; cursor: pointer; }
.dir-list h3 { font-size: 20px; font-weight: 600; text-transform: uppercase; margin-bottom: 8px; }
.dir-item__toggle { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-transform: inherit; text-align: left; cursor: pointer; }
.dir-item__toggle:focus-visible { outline: 2px solid var(--green-500); outline-offset: 4px; border-radius: 4px; }
.dir-item__head p { font-size: 15px; color: #3e4846; max-width: 440px; }
.dir-list .arrow-badge { flex-shrink: 0; transition: transform .3s ease, background .2s; }
.dir-item__head:hover .arrow-badge { transform: rotate(-45deg); background: var(--green-500); }
.dir-item.is-open .arrow-badge { transform: rotate(-45deg); }
.dir-item__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s ease; }
.dir-item.is-open .dir-item__body { grid-template-rows: 1fr; }
.dir-item__body > div { overflow: hidden; min-height: 0; }
.dir-item__content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; margin-top: 18px; padding: 22px; border-radius: 18px; background: var(--card); opacity: 0; transform: translateY(-6px); transition: opacity .3s ease, transform .3s ease; }
.dir-item.is-open .dir-item__content { opacity: 1; transform: none; transition-delay: .1s; }
.dir-item__content h4 { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--green-500); }
.dir-item__content ul { display: grid; gap: 6px; }
.dir-item__content li { position: relative; padding-left: 16px; font-size: 14.5px; line-height: 1.4; color: var(--ink); }
.dir-item__content li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--green-500); }
.dir-item__how { grid-column: 1 / -1; }
.dir-item__how p { font-size: 14.5px; color: #3e4846; max-width: none; }
.dir-item__cta { grid-column: 1 / -1; justify-self: start; }

/* ── Спеціалізація ── */
/* «Спеціалізація»: лише фото кабінету — широким банером */
.spec { display: block; }
.spec__list { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 40px; margin-top: 40px; font-size: 19px; color: var(--muted); }
.spec__list li { display: flex; align-items: center; gap: 14px; }
.spec__list li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 5px solid var(--green-700); box-shadow: 0 0 0 4px #dcefe9; flex-shrink: 0; }
.spec__img { width: 100%; border-radius: 28px; aspect-ratio: 21 / 9; object-fit: cover; object-position: center 40%; }
/* підпис на фото: що це за приміщення */
.spec__figure { position: relative; margin: 0; }
.spec__caption { position: absolute; left: 28px; bottom: 28px; max-width: 420px; padding: 20px 24px; border-radius: 20px; background: rgb(12 52 44 / .78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--white); box-shadow: 0 18px 40px -24px rgb(7 44 38 / .7); }
.spec__title { font-size: 24px; font-weight: 600; line-height: 1.2; margin-top: 6px; }
.spec__text { margin-top: 8px; font-size: 15px; line-height: 1.5; opacity: .9; }
@media (max-width: 760px) {
  .spec__caption { position: relative; left: auto; bottom: auto; max-width: none; margin: -32px 12px 0; padding: 18px 20px; }
  .spec__title { font-size: 20px; }
}
@media (max-width: 760px) { .spec__img { aspect-ratio: 4 / 3; border-radius: var(--radius); } }

/* ── Результат ── */
.slider { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 24px; align-items: end; margin-top: 56px; }
.slider__nav { display: flex; gap: 8px; }
.arrow { width: 48px; height: 48px; border: 0; border-radius: 10px; background: #e3f3ef; color: var(--green-900); font-size: 18px; cursor: pointer; transition: background .2s; }
.arrow:hover { background: #cbe8e0; }
.slider__track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 26px; margin-bottom: -18px; }
.slider__track::-webkit-scrollbar { display: none; }
/* картки «Результат» — фірмовий зелений, текст та іконки білі */
.benefit { flex: 0 0 262px; scroll-snap-align: start; display: flex; flex-direction: column; padding: 20px; min-height: 210px; background: var(--grad); color: var(--white); border-radius: 16px; position: relative; z-index: 2; overflow: hidden; isolation: isolate; box-shadow: 0 14px 30px -20px rgb(7 44 38 / .55); }
.benefit::after { content: ""; position: absolute; z-index: -1; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgb(255 255 255 / .14), transparent 70%); }
.benefit__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: rgb(255 255 255 / .12); color: var(--white); margin-bottom: auto; }
.benefit__icon svg { width: 30px; height: 30px; stroke-width: 1.7; }
.benefit__icon svg .f { fill: currentColor; stroke: none; }
.benefit h3 { margin-top: 40px; font-size: 19px; font-weight: 600; text-transform: uppercase; color: var(--white); }
.benefit p { margin-top: 6px; font-size: 14.5px; color: rgb(255 255 255 / .82); }

/* ── Як працюємо ── */
.how { background: var(--card); border-radius: 32px; padding: 72px 32px; }
.how .title-md { margin-bottom: 36px; }
.how__list { display: flex; flex-direction: column; gap: 14px; max-width: 610px; margin: 0 auto 32px; }
.how__list li { position: relative; display: grid; grid-template-columns: 90px 200px 1fr; align-items: center; min-height: 86px; background: var(--white); border-radius: 14px; padding-right: 44px; }
.how__list li::after { content: "↙"; position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--white); box-shadow: 0 0 0 3px var(--card); color: var(--green-700); font-size: 13px; }
.how__list b { display: grid; place-items: center; height: 100%; border-right: 3px solid var(--card); font-size: 26px; font-weight: 500; color: #c7cccb; }
.how__list h3 { padding-left: 28px; font-size: 18px; font-weight: 600; text-transform: uppercase; line-height: 1.15; }
.how__list p { font-size: 14.5px; color: #3e4846; padding: 12px 0; }

/* ── Лікар ── */
.doctor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: stretch; }
.doctor__text { display: flex; flex-direction: column; gap: 18px; }
.doctor__text .title-lg { margin-bottom: 10px; }
.doctor__lead { font-size: 21px; color: var(--muted); }
.doctor__text .muted { font-size: 15.5px; max-width: 470px; }
.doctor__buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 32px; }
.doctor__photo { position: relative; width: 100%; min-width: 0; margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 540 / 497; }
.doctor__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.glass { position: absolute; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; padding: 20px 22px; border-radius: 18px; background: rgb(255 255 255 / .55); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 10px 30px -14px rgb(0 0 0 / .3); font-size: 15px; }
.glass b { font-size: 18px; font-weight: 600; text-transform: uppercase; color: #3b4543; margin-bottom: 4px; }
.glass span:not(.arrow-badge) { display: flex; align-items: center; gap: 8px; }
.arrow-badge--ring { position: absolute; top: -16px; right: 14px; width: 40px; height: 40px; border: 4px solid rgb(255 255 255 / .8); }

/* ── Про клініку ── */
.about__img { width: 100%; margin-top: 36px; border-radius: 28px; aspect-ratio: 1933 / 814; object-fit: cover; }
.about__values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.about__values h3 { font-size: 19px; font-weight: 600; text-transform: uppercase; margin-bottom: 8px; }
.about__values p { font-size: 15px; color: #3e4846; }

/* ── Оплата частинами ── */
.pay__lead { margin: 16px auto 0; max-width: 540px; color: var(--ink); }
.pay__banks { display: flex; justify-content: center; align-items: center; gap: 56px; flex-wrap: wrap; margin: 36px 0 40px; }
.pay__banks img { height: 40px; width: auto; }
.pay__banks img[src*=privat] { height: 46px; }

/* ── Форма ── */
.form-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.form-section .lead { margin-top: 20px; max-width: 500px; }
.lead-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 24px; background: var(--card); border-radius: 26px; }
.field { display: flex; gap: 12px; align-items: flex-start; padding: 18px 20px; background: var(--white); border-radius: 14px; transition: box-shadow .2s; }
.field:focus-within { box-shadow: 0 0 0 2px var(--green-500); }
.field svg { margin-top: 2px; color: var(--ink); }
.field input, .field textarea { flex: 1; min-width: 0; border: 0; outline: 0; font: 400 17px/1.3 inherit; font-family: inherit; color: var(--ink); background: transparent; resize: vertical; }
.field--wide { grid-column: 1 / -1; }
.field.invalid { box-shadow: 0 0 0 2px #c2410c; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--muted); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--green-700); flex-shrink: 0; }
.consent a { color: var(--accent); font-weight: 600; }
.consent.invalid span { color: #c2410c; }
.form-status { font-size: 15px; min-height: 1px; }
.form-status.ok { color: var(--green-500); font-weight: 500; }
.form-status.err { color: #c2410c; }

/* ── FAQ ── */
.faq { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 40px; align-items: start; }
.faq__list { border-top: 1px solid var(--line); }
.faq details { padding: 20px 0; border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; align-items: center; cursor: pointer; list-style: none; font-size: 17px; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "→"; display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); color: var(--green-900); transition: transform .2s, background .2s; }
.faq summary:hover::after { background: #e3f3ef; }
.faq details[open] summary::after { transform: rotate(90deg); }
.faq details > div { margin-top: 12px; padding-right: 56px; color: var(--muted); }

/* ── Футер ── */
footer { margin-top: 120px; margin-bottom: 40px; }
.footer { display: grid; grid-template-columns: 1.1fr 1fr 1fr; grid-template-rows: auto auto; gap: 32px 40px; padding: 48px 48px 40px; border-radius: 28px; background: radial-gradient(120% 140% at 100% 0%, #0e7a63 0%, #0b4a3f 45%, #072c26 100%); color: var(--white); }
.footer__brand { display: flex; flex-direction: column; gap: 26px; align-items: flex-start; }
.footer__brand .logo img { width: 46px; }
.socials { display: flex; gap: 8px; }
.socials a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgb(255 255 255 / .12); }
.footer__nav { display: grid; grid-template-columns: repeat(3, auto); gap: 22px 40px; align-content: start; font-size: 16px; }
.footer__nav a:hover, .footer__contacts a:hover { opacity: .8; }
.footer__contacts { display: flex; flex-direction: column; gap: 18px; font-style: normal; font-size: 16px; }
.footer__contacts a { display: flex; gap: 10px; align-items: center; }
.footer__legal { font-size: 13px; opacity: .8; align-self: end; grid-column: span 2; }
.footer__legal--right { grid-column: 3; text-align: right; }

/* ── Поява блоків при скролі ── */
/* ── Про лікаря (детально) ── */
.doc-more__head { max-width: 760px; }
.doc-more__head .lead { margin-top: 18px; }
.doc-more__grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 48px; margin-top: 48px; align-items: start; }
.doc-more__h3 { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--green-500); margin-bottom: 20px; }
.timeline { position: relative; display: grid; gap: 22px; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(to bottom, var(--line), var(--green-500)); border-radius: 2px; }
.timeline li { position: relative; display: flex; flex-direction: column; gap: 2px; }
.timeline li::before { content: ""; position: absolute; left: -26px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 2px solid #b9c7c3; }
.timeline li.is-now::before { background: var(--green-700); border-color: var(--green-700); box-shadow: 0 0 0 5px rgb(14 122 99 / .15); }
.timeline__when { font-size: 13px; font-weight: 600; color: var(--green-500); letter-spacing: .02em; }
.timeline b { font-size: 16.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.timeline li > span:not(.timeline__when) { font-size: 14.5px; color: var(--muted); }
.conditions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.conditions li { padding: 20px; border-radius: 18px; background: var(--card); transition: background .3s ease; }
.conditions li:hover { background: #e6f2ee; }
.conditions h4 { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--green-900); }
.conditions p { font-size: 14.5px; line-height: 1.45; color: #3e4846; }
.diag-card { margin-top: 12px; padding: 26px; border-radius: 20px; background: linear-gradient(135deg, #0a3a32 0%, #0e7a63 100%); color: var(--white); display: grid; gap: 16px; }
.diag-card .eyebrow { margin: 0; }
.diag-card ul { display: grid; gap: 10px; }
.diag-card li { display: flex; flex-direction: column; gap: 2px; padding-left: 22px; position: relative; }
.diag-card li::before { content: "✓"; position: absolute; left: 0; top: 0; font-weight: 700; color: #9fe3cf; }
.diag-card b { font-size: 16.5px; font-weight: 600; }
.diag-card li span { font-size: 14px; opacity: .8; }
.diag-card .btn { justify-self: start; }
@media (max-width: 1180px) {
  .doc-more__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 760px) {
  .doc-more__grid { margin-top: 32px; }
  .conditions { grid-template-columns: minmax(0, 1fr); }
  .conditions li { padding: 18px; }
  .diag-card { padding: 22px 20px; }
  .diag-card .btn { justify-self: stretch; padding: 16px 20px; }
}

/* ── Сертифікати ── */
.certs { margin-top: 64px; }
.certs__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 20px; }
.certs__head .doc-more__h3 { margin: 0; }
.certs__head .muted { max-width: 520px; font-size: 15px; text-align: right; }
.certs__list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.cert { display: flex; flex-direction: column; gap: 6px; width: 100%; height: 100%; padding: 10px 10px 16px; border: 0; border-radius: 18px; background: var(--card); text-align: left; font: inherit; color: inherit; cursor: zoom-in; transition: background .3s ease, box-shadow .3s ease, transform .4s cubic-bezier(.16, 1, .3, 1); }
.cert:hover { background: #e6f2ee; box-shadow: 0 18px 36px -22px rgb(7 44 38 / .45); transform: translateY(-4px); }
.cert:focus-visible { outline: 2px solid var(--green-500); outline-offset: 3px; }
.cert__img { display: grid; place-items: center; aspect-ratio: 4 / 3; margin-bottom: 6px; padding: 8px; border-radius: 12px; background: var(--white); overflow: hidden; }
.cert__img img { width: 100%; height: 100%; object-fit: contain; transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.cert:hover .cert__img img { transform: scale(1.04); }
.cert__when { padding: 0 4px; font-size: 12.5px; font-weight: 600; color: var(--green-500); }
.cert__title { padding: 0 4px; font-size: 14.5px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.cert__sub { padding: 0 4px; font-size: 12.5px; line-height: 1.4; color: var(--muted); }

.lightbox { width: min(1100px, 100vw - 32px); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 20px; background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgb(4 24 21 / .82); backdrop-filter: blur(6px); }
.lightbox[open] { animation: lb-in .45s cubic-bezier(.16, 1, .3, 1); }
.lightbox[open]::backdrop { animation: lb-fade .35s ease; }
@keyframes lb-in { from { opacity: 0; transform: scale(.96) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox figure { margin: 0; display: grid; gap: 12px; justify-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 140px); width: auto; height: auto; border-radius: 12px; background: var(--white); box-shadow: 0 30px 80px -30px rgb(0 0 0 / .6); }
.lightbox figcaption { max-width: 720px; text-align: center; color: var(--white); font-size: 15px; line-height: 1.4; }
.lightbox figcaption b { display: block; font-size: 16.5px; margin-bottom: 2px; }
.lightbox__btn { position: fixed; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgb(255 255 255 / .14); color: var(--white); font-size: 22px; cursor: pointer; backdrop-filter: blur(8px); transition: background .2s; }
.lightbox__btn:hover { background: rgb(255 255 255 / .28); }
.lightbox__close { top: 16px; right: 16px; font-size: 28px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
body:has(.lightbox[open]) { overflow: hidden; }

@media (max-width: 1180px) {
  .certs__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .certs { margin-top: 48px; }
  .certs__head { flex-direction: column; align-items: start; gap: 8px; }
  .certs__head .muted { text-align: left; }
  /* на телефоні — стрічка з горизонтальним гортанням */
  .certs__list { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -16px; padding: 4px 16px 8px; }
  .certs__list::-webkit-scrollbar { display: none; }
  .certs__list li { flex: 0 0 76%; scroll-snap-align: start; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 16px; transform: none; }
  .lightbox__prev { left: calc(50% - 60px); }
  .lightbox__next { right: calc(50% - 60px); }
  .lightbox img { max-height: calc(100dvh - 200px); }
}

/* ───────────── Анімації (script.js): лише transform/opacity — плавно й на телефонах.
   Ховаємо до появи тільки коли працює JS (клас .js у <html>); «зменшити рух» — без анімацій ───────────── */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); }
h1, h2, h3 { text-wrap: balance; }

.js [data-anim] { opacity: 0; transform: translate3d(0, 26px, 0); transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: calc(var(--d, 0) * 1ms); }
.js [data-anim].in { opacity: 1; transform: none; }
.js [data-anim="fade"] { transform: none; }
/* фото — м'яко розкривається з рамки й «наближається» */
.js [data-anim="img"] { transform: scale(1.06); clip-path: inset(9% 7% 9% 7%); transition: opacity .9s ease, transform 1.6s var(--ease-out), clip-path 1.3s var(--ease-out); }
.js [data-anim="img"].in { transform: none; clip-path: inset(0 0 0 0); }
/* заголовки — слова піднімаються з-під маски по черзі */
.js .split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .16em 0 .22em; margin: -.16em 0 -.22em; }
.js .split .w > span { display: inline-block; transform: translate3d(0, 110%, 0); transition: transform 1s var(--ease-out); transition-delay: calc(var(--d, 0) * 1ms + var(--i, 0) * 38ms); }
.js .split.in .w > span { transform: none; }
/* перший екран: спершу проступає сіра «було», потім виходить кольорова «стало» */
.js [data-anim="past"] { opacity: 0; transform: translate3d(4%, 0, 0); transition: opacity 1.2s ease, transform 1.6s var(--ease-out); }
.js [data-anim="past"].in { opacity: .55; transform: none; }
.js [data-anim="bloom"] { opacity: 0; filter: grayscale(1) brightness(1.04); transform: translate3d(-4%, 0, 0) scale(.985); transition: opacity 1s ease, transform 1.5s var(--ease-out), filter 1.6s ease; transition-delay: calc(var(--d, 0) * 1ms), calc(var(--d, 0) * 1ms), calc(var(--d, 0) * 1ms + 450ms); }
.js [data-anim="bloom"].in { opacity: 1; filter: none; transform: none; }
/* перший екран при завантаженні */
.js .hero__band { transform-origin: left center; transform: scaleX(0); transition: transform 1.4s var(--ease-out) .25s; }
.js .hero.in .hero__band { transform: none; }

/* кнопки: відблиск при наведенні */
.btn--primary { position: relative; overflow: hidden; isolation: isolate; }
.btn--primary::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / .22) 50%, transparent 70%); transform: translateX(-120%); transition: transform .9s var(--ease-out); pointer-events: none; }
.btn--primary:hover::after { transform: translateX(120%); }
/* шапка: тінь, коли сторінку прокручено */
.header { transition: box-shadow .3s ease, background .3s ease; }
.header.is-scrolled { box-shadow: 0 8px 24px -16px rgb(7 44 38 / .35); background: rgb(255 255 255 / .92); }
/* мобільне меню: пункти виїжджають по черзі */
@keyframes menu-in { from { opacity: 0; transform: translate3d(0, -10px, 0); } to { opacity: 1; transform: none; } }
.mobile-menu:not([hidden]) > * { animation: menu-in .5s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-anim], .js [data-anim="img"], .js [data-anim="bloom"], .js .split .w > span, .js .hero__band { opacity: 1; transform: none; clip-path: none; filter: none; transition: none; }
  .js [data-anim="past"] { opacity: .55; transform: none; transition: none; }
  .mobile-menu:not([hidden]) > * { animation: none; }
  .lightbox[open], .lightbox[open]::backdrop { animation: none; }
  .cert, .cert__img img { transition: none; }
  .dir-item__body, .dir-item__content, .dir-list .arrow-badge, .btn--primary::after { transition: none; }
}

/* ───────────── Адаптив ───────────── */
@media (max-width: 1180px) {
  .nav { display: none; }
  .header__cta { margin-left: auto; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__text, .hero__side { grid-column: 1; grid-row: auto; padding-bottom: 0; }
  .hero .title-xl { margin-right: 0; }
  .hero__side { display: grid; grid-template-columns: 1fr auto; gap: 12px 24px; align-items: center; padding-top: 32px; }
  .hero__stat { margin-top: 0; }
  .hero__stat-label { grid-column: 2; margin-top: -6px; }
  .hero__figure { grid-column: 1; grid-row: auto; align-self: auto; justify-self: center; height: auto; width: min(420px, 80%); margin: 24px auto 0; }
  .hero__woman { width: 100%; height: auto; }
  .hero__band { top: auto; height: 180px; }
  .doc-card { position: relative; left: auto; bottom: auto; margin-top: -60px; }
  .symptoms, .spec, .doctor, .form-section, .faq, .directions__grid { grid-template-columns: minmax(0, 1fr); }
  .about__values { grid-template-columns: 1fr 1fr; }
  .footer { grid-template-columns: 1fr 1fr; }
  .footer__legal, .footer__legal--right { grid-column: 1 / -1; text-align: left; }
  /* «Наш підхід»: фото зверху, етапи на всю ширину — підписи не злипаються */
  .approach__card { grid-template-columns: 1fr; }
  .approach__img { height: 320px; order: -1; }
}

@media (max-width: 760px) {
  .container { padding-inline: 16px; }
  section { margin-top: 80px; }
  .header__inner { height: 68px; gap: 12px; }
  .header__cta { display: none; }
  .burger { display: block; }
  .logo__text b { font-size: 15px; }
  .partner { margin-left: -2px; padding-left: 10px; }
  .partner small { font-size: 12px; }
  .partner b { font-size: 15px; }
  .btn--lg { min-width: 0; width: 100%; padding: 18px 20px; }
  .hero__buttons { flex-direction: column; }
  .hero__side { grid-template-columns: 1fr; }
  .hero__stat-label { grid-column: 1; }
  .title-xl .indent { padding-left: 0; }
  .doc-card { position: relative; left: 0; bottom: 0; width: 100%; min-width: 0; margin-top: -40px; box-shadow: 0 0 0 6px var(--white); }
  .doc-card__role { font-size: clamp(11.5px, 3.75vw, 14px); }
  .doc-card img { width: 96px; height: 110px; }
  .approach__card { grid-template-columns: 1fr; }
  .approach__img { height: 260px; order: -1; }
  .progress { grid-template-columns: 1fr; padding-top: 28px; }
  .progress li { padding: 0 0 18px 26px; }
  .progress li::before { top: 4px; }
  .progress li.is-active::before { top: 2px; left: -2px; }
  .progress li::after { top: 8px; bottom: -4px; left: 3px; right: auto; width: 2px; height: auto; background: linear-gradient(to bottom, var(--green-700) calc(var(--fill) * 100%), #dde1e1 0); }
  .symptoms__list { grid-template-columns: 1fr; grid-auto-flow: row; grid-template-rows: none; }
  .symptoms__list li { min-height: 56px; font-size: 16px; }
  .dir-main { padding: 28px 22px; }
  .dir-main h3 { margin-bottom: 40px; }
  .dir-main ul { grid-template-columns: 1fr; }
  .dir-item__content { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .dir-item__cta { justify-self: stretch; }
  .about__img { aspect-ratio: 4 / 3; }
  .about__values { grid-template-columns: 1fr; gap: 20px; }
  .glass { left: 12px; right: 12px; bottom: 12px; padding: 16px; }
  .doctor__photo { aspect-ratio: 4 / 5; }
  .approach__text { padding: 28px 20px 0; }
  .promo { flex-direction: column; align-items: flex-start; gap: 18px; padding: 24px 20px; }
  .promo .btn { width: 100%; }
  .spec__list { grid-template-columns: 1fr; font-size: 17px; gap: 16px; }
  .slider { grid-template-columns: 1fr; margin-top: 16px; }
  .slider__nav { order: 2; }
  .benefit { flex-basis: 78%; }
  .how { padding: 48px 14px; border-radius: 24px; }
  .how__list li { grid-template-columns: 56px 1fr; padding: 0 40px 0 0; }
  .how__list b { grid-row: 1 / 3; font-size: 22px; }
  .how__list h3 { padding: 16px 0 0 16px; font-size: 16px; }
  .how__list p { padding: 4px 0 16px 16px; }
  .doctor { gap: 32px; }
  .doctor__photo { order: -1; }
  /* на телефоні фото рецепції обрізаємо праворуч (без запеченої картки), цінності — звичайним списком */
  .pay__banks { gap: 28px; }
  .pay__banks img { height: 38px; }
  .lead-form { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .footer { grid-template-columns: 1fr; padding: 32px 22px; }
  .footer__nav { grid-template-columns: repeat(2, auto); justify-content: start; }
}

/* ───────────── Мобільна версія за макетом «Mobile - 375» ───────────── */
@media (max-width: 760px) {
  .burger { display: grid; place-items: center; align-content: center; gap: 4px; width: 40px; height: 40px; background: var(--grad); border-radius: 10px; }
  .burger span { background: var(--white); margin: 0 auto; width: 18px; }
  .burger[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
  .burger[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }
  .results h2 br { display: none; }
  .footer__legal, .footer__legal--right { text-align: left; align-self: flex-start; }
  .logo img { width: 40px; }

  .hero { display: flex; flex-direction: column; margin-top: 8px; }
  .hero__text, .hero__side { display: contents; }
  /* Hero: заголовок → опис → КНОПКИ (видно на першому екрані) → фото зі смугою → картка лікаря → 800+ */
  .hero h1 { order: 1; padding-top: 8px; }
  .hero__lead { order: 2; margin-top: 12px; max-width: none; font-size: 16px; }
  .hero__buttons { order: 3; margin-top: 20px; gap: 10px; }
  .hero__buttons .btn--lg { padding: 16px 20px; }
  .hero__figure { order: 4; width: 78%; max-width: 320px; height: auto; margin: 28px auto 0 auto; }
  .hero__woman { width: 100%; height: auto; }
  .hero__past { left: -36%; height: 80%; }
  .hero__band { order: 5; position: relative; z-index: 0; left: auto; right: auto; bottom: auto; height: 150px; margin-top: -150px; border-radius: 32px 32px 0 0; }
  .doc-card { order: 6; position: relative; z-index: 2; margin: -40px auto 0; width: calc(100% - 32px); max-width: 340px; box-shadow: 0 0 0 6px var(--white); }
  .hero__stat { order: 7; margin-top: 28px; }
  .hero__stat-label { order: 8; margin-top: 8px; }
  .how h2 br { display: none; }

  /* Симптоми: заголовок → «Вам знайомо?» → список → стрілка → текст → кнопка */
  .symptoms { display: flex; flex-direction: column; gap: 0; }
  .symptoms__text { display: contents; }
  .symptoms__text h2 { order: 1; }
  .symptoms__text > p:first-of-type { order: 2; margin-top: 10px; }
  .symptoms__list { order: 3; margin-top: 18px; }
  .symptoms__text .arrow-badge { order: 4; margin: 24px 0 12px; }
  .symptoms__text > p:last-of-type { order: 5; }
  .symptoms__text .btn { order: 6; margin-top: 18px; }

  /* Підхід: текст і етапи, фото внизу картки */
  .approach__img { order: 0; height: 240px; object-position: 25% center; }
  .approach__text { padding: 24px 18px 8px; }

  /* Як працюємо: картки з номером угорі */
  .how__list li { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px 18px; min-height: 0; }
  .how__list b { width: 54px; height: 54px; border: 2px solid var(--card); border-radius: 12px; font-size: 22px; }
  .how__list h3 { padding: 10px 0 0; font-size: 18px; }
  .how__list p { padding: 0; font-size: 15px; }
  .how__list li::after { top: 8px; right: 8px; bottom: auto; }

  /* Лікар: підпис → ім'я → фото → текст → кнопки */
  .doctor { display: flex; flex-direction: column; gap: 0; }
  .doctor__text { display: contents; }
  .doctor__text .eyebrow { order: 1; }
  .doctor__text .title-lg { order: 2; }
  .doctor__photo { order: 3; margin: 12px 0 20px; aspect-ratio: 1 / 1.15; }
  .doctor__lead { order: 4; font-size: 17px; }
  .doctor__text .muted { order: 5; margin-top: 10px; }
  .doctor__buttons { order: 6; flex-direction: column; padding-top: 24px; }

  /* Оплата: логотипи 2 × 2 */
  .pay__banks { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; justify-items: center; }
  .pay__banks img { height: 36px; max-width: 100%; object-fit: contain; }
  .pay__banks img[src*=privat] { height: 40px; }

  /* Підвал: лого → меню → контакти → кнопка → соцмережі → юридичне */
  .footer { display: flex; flex-direction: column; gap: 28px; }
  .footer__brand { display: contents; }
  .footer__brand .logo { order: 1; }
  .footer__nav { order: 2; grid-template-columns: 1fr 1fr; gap: 18px 24px; font-size: 17px; }
  .footer__contacts { order: 3; }
  .footer__brand .btn { order: 4; width: 100%; padding: 16px; }
  .socials { order: 5; }
  .footer__legal { order: 6; }
  .footer__legal--right { order: 7; margin-top: -16px; }
}

/* ───────────── Найвужчі телефони (320–360) ───────────── */
@media (max-width: 360px) {
  .title-xl { font-size: 31px; }
  .title-lg { font-size: 27px; }
  .title-md { font-size: 25px; }
}

/* ── «Як ми працюємо»: картки етапів — фірмовий зелений, номери, текст і стрілки білі ── */
.how__list li { background: var(--grad); color: var(--white); box-shadow: 0 14px 30px -22px rgb(7 44 38 / .6); overflow: hidden; isolation: isolate; }
.how__list li::before { content: ""; position: absolute; z-index: -1; right: -50px; top: -60px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgb(255 255 255 / .12), transparent 70%); }
.how__list b { color: var(--white); border-right-color: rgb(255 255 255 / .18); }
.how__list h3 { color: var(--white); }
.how__list p { color: rgb(255 255 255 / .82); }
.how__list li::after { background: rgb(255 255 255 / .16); box-shadow: none; color: var(--white); }
@media (max-width: 760px) {
  .how__list b { border: 0; background: rgb(255 255 255 / .14); }
}

/* дуже вузькі телефони (320–380): компактніша картка лікаря, щоб текст не обрізався */
@media (max-width: 380px) {
  .doc-card { padding: 12px; gap: 10px; }
  .doc-card img { width: 72px; height: 92px; }
  .doc-card__role { font-size: 11px; }
  .doc-card__small { font-size: 12px; margin-top: 12px; }
  .doc-card__big { font-size: 22px; }
}
