/* ============================================================
   Центр малоінвазивної урології — v6 «кружечок»
   Синьо-чорний «монітор», бірюза з логотипа як промінь,
   бурштин каменя лише на лінійці. IBM Plex: вузький / звичайний / моно.
   ============================================================ */

:root {
  --bg: #0b1116;
  --bg-2: #111a21;
  --bg-3: #18232b;
  --line: #1f2b34;
  --line-2: #2c3b46;
  --text: #e9eef1;
  --text-2: #9caab4;
  --text-3: #63737f;
  --cyan: #2cbfd9;
  --cyan-2: #6fd6e8;
  --on-cyan: #04232b;
  --stone: #d9a15b;
  --stone-2: #a8733a;
  --r: 14px;
  --display: "IBM Plex Sans Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "Consolas", "SF Mono", monospace;
  --pad: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--text); text-decoration: none; }
p { margin: 0 0 14px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; line-height: 0.98; color: var(--text); text-wrap: balance; }
h1 { font-size: clamp(44px, 5.2vw, 78px); }
h2 { font-size: clamp(34px, 4.4vw, 62px); }
h3 { font-size: 24px; line-height: 1.1; }
.hl { color: var(--cyan); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.lead { font-size: 18px; line-height: 1.6; color: var(--text-2); max-width: 58ch; }
.muted { color: var(--text-2); }
.small { font-size: 13px; color: var(--text-3); margin: 18px 0 0; }
.wrap { padding-left: var(--pad); padding-right: var(--pad); }
.link { display: inline-flex; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); padding-bottom: 4px; border-bottom: 1px solid var(--line-2); transition: border-color .2s, color .2s; }
.link:active { color: var(--cyan); border-color: var(--cyan); }

/* ---------- Розділ: підпис ліворуч, зміст праворуч ---------- */
.sec { border-top: 1px solid var(--line); padding: 80px var(--pad); display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }
.sec__idx { position: sticky; top: 104px; }
.sec__idx .mono { color: var(--cyan); }
.sec__body { min-width: 0; }
.sec__body > h2 + .lead { margin-top: 18px; }

/* ---------- Кнопки (з v5: текст | дія, заливка зліва) ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: stretch; justify-content: space-between;
  min-height: 56px; padding: 0; border-radius: 6px;
  font-family: var(--mono); font-weight: 500; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
  border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer;
  transition: color .22s, border-color .22s; -webkit-tap-highlight-color: transparent;
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--cyan); transform: scaleX(0); transform-origin: left; transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.btn > span:first-child { display: flex; align-items: center; padding: 0 22px; }
.btn__arrow { display: flex; align-items: center; justify-content: center; flex: none; padding: 0 16px; border-left: 1px solid var(--line-2); transition: border-color .22s; }
.btn__arrow svg { width: 16px; height: 16px; transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.btn--blue { background: var(--cyan); border-color: var(--cyan); color: var(--on-cyan); }
.btn--blue::before { background: var(--text); }
.btn--blue .btn__arrow { border-left-color: rgba(4,35,43,.25); }
.btn--lg { min-height: 72px; font-family: var(--display); font-size: 21px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.btn--lg > span:first-child { padding: 0 28px; }
.btn--lg .btn__arrow { padding: 0 24px; }
.btn--lg .btn__arrow svg { width: 22px; height: 22px; }
.btn--block { width: 100%; }
.btn--plain { align-items: center; justify-content: center; padding: 0 24px; }
@media (prefers-reduced-motion: reduce) { .btn::before, .btn__arrow svg { transition: none; } }

.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--text); font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); flex: none; }
.pill--ghost { color: var(--text-2); }
.pill--ghost::before { display: none; }

/* ---------- Шапка ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgba(11,17,22,.86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header__inner { height: 84px; display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; flex: none; }
.logo img { height: 42px; width: auto; filter: brightness(0) invert(1); }
.header__cta { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.header__phone { font-family: var(--mono); font-size: 13px; color: var(--text-2); white-space: nowrap; }
.menu-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px; border-radius: 6px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; transition: background .2s; }
.menu-btn i { display: flex; flex-direction: column; gap: 4px; }
.menu-btn i::before, .menu-btn i::after { content: ""; display: block; width: 18px; height: 2px; background: var(--text); }
.menu-btn i::after { width: 12px; }
.nav { display: none; }

/* ---------- Хіро: фонове відео + кнопка-кружечок «Дивитись відео» ---------- */
.hero { position: relative; isolation: isolate; margin: 16px var(--pad) 0; min-height: 660px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; gap: 48px; padding: 28px 36px 40px; }
.hero__bg { position: absolute; inset: 0; z-index: -1; background: var(--bg-2); }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.55) brightness(.5) contrast(1.05); }
.hero__video { position: absolute; top: 0; left: 50%; transform: translateX(-50%); pointer-events: none; opacity: 0; transition: opacity 1.4s ease; filter: saturate(.6) brightness(.6) contrast(1.05); }
.hero__video.is-playing { opacity: 1; }
.hero__video iframe { width: 100%; height: 100%; border: 0; display: block; }
.hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,17,22,.86) 0, rgba(11,17,22,.4) 55%, rgba(11,17,22,.12)), linear-gradient(0deg, rgba(11,17,22,.9) 0, rgba(11,17,22,0) 55%); }
.hero__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.hero__where { color: var(--text-2); }
.watch { display: inline-flex; align-items: center; gap: 14px; color: var(--text); -webkit-tap-highlight-color: transparent; }
.watch__circle { position: relative; width: 68px; height: 68px; flex: none; }
.watch__circle img { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); border-radius: 50%; object-fit: cover; object-position: 50% 15%; transition: transform .3s; }
.watch__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.watch__track { fill: none; stroke: rgba(233,238,241,.2); stroke-width: 2.4; transition: stroke .2s; }
.watch__prog { fill: none; stroke: var(--cyan); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .25s linear; }
.watch__play { position: absolute; inset: 5px; border-radius: 50%; display: grid; place-items: center; background: rgba(11,17,22,.45); }
.watch__play svg { width: 18px; height: 18px; color: #fff; margin-left: 2px; }
.watch__text { display: flex; flex-direction: column; gap: 2px; }
.watch__text b { font-family: var(--display); font-size: 19px; font-weight: 600; }
.watch__text .mono { font-size: 10px; }
.watch:active .watch__circle img { transform: scale(1.06); }
.hero__bottom { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.hero__kicker { color: var(--cyan); }
/* заголовок — гасло лікаря зі старого слайдера, воно довге: дрібніший кегль і ширший рядок */
.hero h1 { max-width: 22ch; font-size: clamp(36px, 4.2vw, 62px); }
.hero__cta { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.hero__cta .lead { margin: 0; max-width: 40ch; font-size: 15px; color: var(--text); opacity: .85; }
.facts { padding-top: 16px; }
.hero__facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.hero__facts > div { padding: 14px 18px; border-right: 1px solid var(--line); }
.hero__facts > div:last-child { border-right: 0; }
.hero__facts dt { font-size: 10px; color: var(--text-3); margin-bottom: 4px; }
.hero__facts dd { margin: 0; font-family: var(--mono); font-size: 14px; color: var(--text); white-space: nowrap; }
.hero__facts a { color: var(--text); }

/* підзаголовок усередині секції (напр. «Переваги ендоскопії» на головній) */
.sec__sub { margin: 44px 0 16px; font-size: 23px; }

/* ---------- Лікар ---------- */
.founder { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; min-height: 600px; }
.founder__text { padding: 80px var(--pad); display: flex; flex-direction: column; gap: 24px; justify-content: center; align-items: flex-start; }
.founder__text > .mono { color: var(--cyan); }
.founder__tags { display: flex; gap: 8px; flex-wrap: wrap; }
.founder__bio { margin: 0; font-size: 17px; color: var(--text-2); max-width: 52ch; }
.founder__media { position: relative; background: var(--bg-2); overflow: hidden; }
.founder__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: saturate(.75) contrast(1.04); }
.founder__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0, rgba(11,17,22,0) 30%); pointer-events: none; }

/* ---------- Списки ---------- */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; min-height: 72px; padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.row__t { font-family: var(--display); font-size: 24px; font-weight: 600; line-height: 1.15; }
.row__s { display: block; margin-top: 6px; font-family: var(--sans); font-size: 14px; font-weight: 400; color: var(--text-2); }
.row svg { width: 20px; height: 20px; color: var(--cyan); transition: transform .2s; }
.rows--3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; border-top: 0; }
.rows--3 .row { min-height: 60px; }
.rows--3 .row__t { font-size: 19px; }
.price-val { font-family: var(--mono); font-size: 15px; color: var(--text); white-space: nowrap; }
.price-val.is-consult { color: var(--text-3); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; }

/* ---------- Команда ---------- */
.team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.member { display: flex; flex-direction: column; gap: 14px; }
.member img { width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; object-position: top; border-radius: var(--r); filter: saturate(.75) contrast(1.04); }
.member__name { font-family: var(--display); font-size: 21px; font-weight: 600; line-height: 1.15; }
.member__role { font-size: 14px; color: var(--text-2); margin-top: 4px; }

/* ---------- Відгук ---------- */
.quote { font-family: var(--display); font-size: clamp(28px, 3.2vw, 46px); font-weight: 500; line-height: 1.15; max-width: 24ch; margin: 0 0 22px; }
.quote__who a { color: var(--cyan); }

/* ---------- Про центр ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stat { padding: 28px; display: flex; flex-direction: column; gap: 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat .mono { color: var(--cyan); }
.stat p { color: var(--text-2); }
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about__text { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.equip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; border-top: 1px solid var(--line); }
.equip li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 70px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--text-2); }
.timeline strong { font-family: var(--mono); font-weight: 500; color: var(--cyan); }
.photo-wide { border-radius: var(--r); overflow: hidden; }
.photo-wide img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; filter: saturate(.7) brightness(.85); }

/* ---------- Калькулятор коліки ---------- */
.calc__list { border-top: 1px solid var(--line); margin-bottom: 28px; }
.calc__item { display: flex; align-items: center; gap: 18px; min-height: 64px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 17px; }
.calc__item input { width: 22px; height: 22px; accent-color: var(--cyan); flex: none; margin: 0; }
.calc__result { display: none; margin-top: 28px; padding: 28px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-2); }
.calc__result.is-visible { display: block; }
.calc__result h3 { margin-bottom: 10px; }
.calc__result.level-high { border-color: var(--stone); }
.calc__result.level-high h3 { color: var(--stone); }
.calc__note { font-size: 13px; color: var(--text-3); margin-top: 20px; }
.calc__note a { color: var(--text-2); }

/* ---------- Форма й модалки ---------- */
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.form input:not([type=submit]), .form textarea { font: inherit; font-size: 16px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: var(--text); width: 100%; }
.form input::placeholder, .form textarea::placeholder { color: var(--text-3); }
.form input:focus, .form textarea:focus { outline: 2px solid var(--cyan); outline-offset: -1px; }
.form textarea { min-height: 100px; resize: vertical; }
.form__note { font-size: 12px; color: var(--text-3); }
.form__ok { display: none; padding: 14px 16px; border-radius: 8px; border: 1px solid var(--cyan); color: var(--cyan-2); font-weight: 500; }
.form__ok.is-visible { display: block; }
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.72); }
.modal.is-open { display: flex; }
.modal__box { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 18px; padding: 36px; width: min(520px, 100%); position: relative; max-height: 90vh; overflow: auto; }
.modal__close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border: 1px solid var(--line-2); background: transparent; border-radius: 50%; cursor: pointer; font-size: 22px; line-height: 1; color: var(--text); }
.modal__box h3 { margin-bottom: 8px; }
.modal--video { background: rgba(0,0,0,.88); }
.modal--video .modal__close { color: #fff; border-color: rgba(255,255,255,.35); }
.video-frame { width: min(960px, 100%); aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Заклик ---------- */
.cta { margin: 0 var(--pad) 56px; border: 1px solid var(--line-2); border-radius: 20px; background: var(--bg-2); padding: 56px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.cta h2 { font-size: clamp(32px, 3.6vw, 52px); }
.cta > div:first-child .mono { color: var(--cyan); }
.cta__right { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.cta__phone { font-family: var(--display); font-size: clamp(30px, 3.2vw, 44px); font-weight: 600; color: var(--text); }

/* ---------- Контакти ---------- */
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.contact-list li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-list .mono { color: var(--text-3); padding-top: 5px; }
.contact-list a, .contact-list span:not(.mono) { font-family: var(--display); font-size: 21px; font-weight: 600; line-height: 1.3; }
.map { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); min-height: 380px; filter: invert(.9) hue-rotate(180deg) saturate(.35) brightness(.95); }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }

/* ---------- Підвал ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px var(--pad) 28px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 44px; }
.footer__grid > div { display: flex; flex-direction: column; gap: 10px; }
.footer__grid img { height: 40px; width: auto; filter: brightness(0) invert(1); margin-bottom: 8px; align-self: flex-start; }
.footer h4 { margin: 0 0 6px; font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.footer a, .footer span { font-size: 15px; color: var(--text-2); }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--line); }
.footer__bottom span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.socials { display: flex; gap: 8px; margin-top: 6px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--text-2); }
.socials svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Поява ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { transform: translateY(14px); transition: transform .6s ease; }
  .reveal.is-in { transform: none; }
}

.callbar { display: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  :root { --pad: 32px; }
  .sec { grid-template-columns: 1fr; gap: 20px; }
  .sec__idx { position: static; }
  .rows--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --pad: 20px; }
  .header__inner { height: 68px; }
  .logo img { height: 34px; }
  .header__phone, .header__cta .btn { display: none; }
  .sec { padding: 56px var(--pad); }
  .founder { grid-template-columns: 1fr; }
  .founder__media { order: -1; }
  .founder__media img { aspect-ratio: 4 / 4.2; height: auto; }
  .founder__media::after { background: linear-gradient(0deg, var(--bg) 0, rgba(11,17,22,0) 35%); }
  .founder__text { padding: 40px var(--pad) 56px; }
  .team, .rows--3 { grid-template-columns: 1fr; }
  .about, .contacts { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr !important; }
  .stat { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .equip { grid-template-columns: 1fr; }
  .row__t { font-size: 20px; }
  .contact-list li { grid-template-columns: 1fr; gap: 4px; }
  .cta { margin: 0 8px 8px; padding: 36px 22px; grid-template-columns: 1fr; border-radius: 16px; }
  .btn--lg { min-height: 64px; font-size: 18px; }
  .btn--lg > span:first-child { padding: 0 18px; }
  .btn--lg .btn__arrow { padding: 0 18px; }
  .btn--lg .btn__arrow svg { width: 18px; height: 18px; }
  .footer { padding: 44px var(--pad) 24px; }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .modal__box { padding: 28px 20px; }
  .callbar { display: flex; gap: 8px; position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 40; }
  .callbar .btn { flex: 1; justify-content: center; padding: 0 16px; }
  .callbar .btn:not(.btn--blue) { background: var(--bg-2); }
  body { padding-bottom: 76px; }
}

/* ---------- Меню на весь екран ---------- */
html.menu-open { overflow: hidden; }
/* розмиття шапки робить її рамкою для fixed-нащадків — на час меню прибираємо */
.header.is-open { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
.header.is-open .nav { display: flex; flex-direction: column; gap: 20px; position: fixed; left: 0; right: 0; top: 84px; bottom: 0; overflow-y: auto; background: var(--bg); border-top: 1px solid var(--line); padding: 20px var(--pad) 32px; }
.nav__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.nav__list a { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; min-height: 140px; padding: 20px; background: var(--bg); transition: background .2s; -webkit-tap-highlight-color: transparent; }
.nav__t { font-family: var(--display); font-size: 28px; font-weight: 600; line-height: 1.05; color: var(--text); transition: color .2s; }
.nav__s { font-size: 11px; color: var(--text-3); }
.nav__list a.is-active .nav__t { color: var(--cyan); }
.nav__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav__phone { font-family: var(--display); font-size: 28px; font-weight: 600; color: var(--text); }
@media (prefers-reduced-motion: no-preference) {
  .header.is-open .nav__list a { animation: navIn .42s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 45ms); }
  .header.is-open .nav__foot { animation: navIn .42s cubic-bezier(.2,.8,.2,1) .32s both; }
  @keyframes navIn { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ---------- Хвороби: швидкі переходи і групи плиток ---------- */
.chips { position: sticky; top: 84px; z-index: 30; background: rgba(11,17,22,.92); backdrop-filter: blur(10px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.chips__in { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; padding-bottom: 12px; scrollbar-width: none; }
.chips__in::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-2); transition: background .2s, color .2s, border-color .2s; -webkit-tap-highlight-color: transparent; }
.chip span { color: var(--text-3); }
.chip.is-on { background: var(--cyan); border-color: var(--cyan); color: var(--on-cyan); }
.chip.is-on span { color: var(--on-cyan); opacity: .7; }
.dgroup { display: grid; grid-template-columns: 220px 1fr; gap: 48px; padding: 56px var(--pad); border-top: 1px solid var(--line); scroll-margin-top: 150px; }
.chips + .dgroup { border-top: 0; }
.dgroup__head { display: flex; align-items: baseline; gap: 12px; position: sticky; top: 168px; align-self: start; }
.dgroup__head h2 { font-size: 34px; }
.dgroup__head .mono { color: var(--cyan); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-height: 96px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); color: var(--text); transition: border-color .2s, transform .25s cubic-bezier(.2,.8,.2,1); -webkit-tap-highlight-color: transparent; }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(135deg, rgba(44,191,217,.14), transparent 60%); opacity: 0; transition: opacity .25s; }
.tile__t { font-family: var(--display); font-size: 21px; font-weight: 600; line-height: 1.12; }
.tile:active { border-color: var(--cyan); transform: scale(.98); }
.tile:active::before { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .dgroup.pre .tile, .sec.pre .tile { transform: translateY(18px); }
  .dgroup.anim .tile, .sec.anim .tile { transition: transform .5s cubic-bezier(.2,.8,.2,1), border-color .2s; transition-delay: calc(var(--i) * 55ms); }
}

@media (max-width: 1100px) {
  .nav__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dgroup { grid-template-columns: 1fr; gap: 20px; }
  .dgroup__head { position: static; }
}
@media (max-width: 768px) {
  .header.is-open .nav { top: 68px; padding: 0 0 24px; gap: 18px; }
  .nav__list { border-radius: 0; border-left: 0; border-right: 0; border-top: 0; }
  .nav__list a { min-height: 104px; padding: 16px 18px; gap: 16px; }
  .nav__t { font-size: 22px; }
  .nav__s { font-size: 10px; }
  .nav__foot { flex-direction: column; align-items: stretch; padding: 0 20px; }
  .nav__phone { font-size: 24px; }
  .nav__foot .btn { width: 100%; }
  .chips { top: 68px; }
  .dgroup { padding: 36px var(--pad); gap: 16px; scroll-margin-top: 130px; }
  .dgroup__head h2 { font-size: 28px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tile { min-height: 84px; padding: 14px; gap: 10px; }
  .tile__t { font-size: 17px; }
}

/* ---------- Стаття: хвороба, операція, новина ---------- */
.art { display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 48px; padding-top: 48px; padding-bottom: 80px; }
.art__side { position: sticky; top: 108px; align-self: start; display: flex; flex-direction: column; gap: 10px; }
.art__back { color: var(--cyan); }
/* зміст довгої сторінки («Про нас») */
.art__toc { gap: 0; border-top: 1px solid var(--line); }
.art__toc a { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.4; color: var(--text-2); }
.art__toc a:hover { color: var(--cyan); }
.prose h2[id] { scroll-margin-top: 110px; }
.prose { min-width: 0; }
.prose h1 { font-size: clamp(36px, 4.4vw, 60px); margin-bottom: 28px; }
.prose h2 { font-size: clamp(26px, 2.6vw, 34px); margin: 44px 0 14px; }
.prose h3 { font-size: 23px; margin: 32px 0 10px; }
.prose h4 { font-family: var(--display); font-size: 19px; font-weight: 600; margin: 24px 0 8px; color: var(--text); }
.prose p, .prose li { font-size: 17px; line-height: 1.72; color: #c7d1d8; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--cyan); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a:not(.btn):not(.link) { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose blockquote { margin: 24px 0; padding-left: 18px; border-left: 2px solid var(--cyan); }
.prose figure { margin: 24px 0; }
.prose figure img { width: 100%; max-height: 560px; object-fit: contain; border-radius: 12px; background: var(--bg-2); }
.prose .gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 24px 0; }
.prose .gallery figure { margin: 0; }
.prose .gallery img { aspect-ratio: 4 / 3; object-fit: cover; max-height: none; }
.prose details { margin: 10px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.prose summary { display: flex; justify-content: space-between; gap: 16px; padding: 16px 18px; cursor: pointer; list-style: none; font-family: var(--display); font-size: 19px; font-weight: 600; color: var(--text); }
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after { content: "+"; color: var(--cyan); font-family: var(--mono); }
.prose details[open] summary::after { content: "−"; }
.prose details > :not(summary) { padding-left: 18px; padding-right: 18px; }
.prose details > :last-child { padding-bottom: 14px; }
.prose .embed { aspect-ratio: 16 / 9; margin: 24px 0; border-radius: 12px; overflow: hidden; background: #000; }
.prose .embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; margin: 0 0 18px; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 10px; font-size: 15px; color: #c7d1d8; }
.prose .book { margin: 28px 0; }
.stats-inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 24px 0; }
.stats-inline div { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.stats-inline b { display: block; font-family: var(--display); font-size: 40px; font-weight: 600; color: var(--cyan); line-height: 1; margin-bottom: 8px; }
.stats-inline span { font-size: 14px; line-height: 1.5; color: var(--text-2); }

/* ---------- Новини: картки ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ncard { justify-content: flex-start; gap: 10px; padding: 0 0 18px; min-height: 0; }
.ncard img, .ncard__ph { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--bg-3); }
.ncard .mono, .ncard__t { padding: 0 16px; }
.ncard .mono { margin-top: 6px; color: var(--text-3); }
.ncard__t { font-family: var(--display); font-size: 19px; font-weight: 600; line-height: 1.2; }

/* меню: 9 пунктів — 3 колонки на комп'ютері; на телефоні непарний останній на всю ширину */
.nav__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1100px) {
  .art { grid-template-columns: 1fr; gap: 16px; padding-top: 32px; }
  .art__side { position: static; flex-direction: row; justify-content: space-between; }
  .art__side.art__toc { flex-direction: column; justify-content: flex-start; }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav__list a:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .art { padding-bottom: 56px; }
  .prose p, .prose li { font-size: 16px; }
  .prose .gallery { grid-template-columns: 1fr 1fr; gap: 6px; }
  .news-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ncard__t { font-size: 16px; }
  .ncard .mono, .ncard__t { padding: 0 12px; }
}

/* ---------- Наведення: лише миша; дотик вимикає (див. main.js) ---------- */
/* хіро на телефоні */
@media (max-width: 768px) {
  .hero { margin: 8px 8px 0; min-height: 600px; padding: 18px 18px 24px; border-radius: 14px; gap: 32px; }
  .hero__where { display: none; }
  .hero__bg::after { background: linear-gradient(0deg, rgba(11,17,22,.95) 0, rgba(11,17,22,.55) 55%, rgba(11,17,22,.25)); }
  .watch__circle { width: 58px; height: 58px; }
  .hero__cta { flex-direction: column; align-items: stretch; width: 100%; gap: 14px; }
  .hero__cta .btn { width: 100%; }
  .facts { padding: 8px 8px 0; }
  .hero__facts { grid-template-columns: 1fr 1fr; }
  .hero__facts > div:nth-child(2n) { border-right: 0; }
  .hero__facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}


@media (hover: hover) and (pointer: fine) {
  html:not(.is-touch) .header__phone:hover { color: var(--cyan); }
  html:not(.is-touch) .watch:hover .watch__circle img { transform: scale(1.06); }
  html:not(.is-touch) .watch:hover .watch__track { stroke: rgba(233,238,241,.4); }
  html:not(.is-touch) .btn:hover { color: var(--on-cyan); border-color: var(--cyan); }
  html:not(.is-touch) .btn:hover::before { transform: scaleX(1); }
  html:not(.is-touch) .btn:hover .btn__arrow { border-left-color: rgba(4,35,43,.25); }
  html:not(.is-touch) .btn:hover .btn__arrow svg { transform: translateX(4px); }
  html:not(.is-touch) .btn--blue:hover { color: var(--bg); border-color: var(--text); }
  html:not(.is-touch) .menu-btn:hover { background: var(--bg-2); }
  html:not(.is-touch) .nav__list a:hover { background: var(--bg-2); }
  html:not(.is-touch) .nav__list a:hover .nav__t { color: var(--cyan); }
  html:not(.is-touch) .chip:not(.is-on):hover { color: var(--text); border-color: var(--text-3); }
  html:not(.is-touch) .tile:hover { border-color: var(--cyan); transform: translateY(-3px); }
  html:not(.is-touch) .tile:hover::before { opacity: 1; }
  html:not(.is-touch) .row:hover .row__t { color: var(--cyan); }
  html:not(.is-touch) .row:hover svg { transform: translateX(4px); }
  html:not(.is-touch) .link:hover { color: var(--cyan); border-color: var(--cyan); }
  html:not(.is-touch) .footer a:hover { color: var(--text); }
  html:not(.is-touch) .socials a:hover { background: var(--cyan); border-color: var(--cyan); color: var(--on-cyan); }
}
/* дотик: заливка на час натискання */
.btn:active { color: var(--on-cyan); border-color: var(--cyan); }
.btn:active::before { transform: scaleX(1); transition-duration: .12s; }
.btn--blue:active { color: var(--bg); border-color: var(--text); }
.btn:active .btn__arrow svg { transform: translateX(4px); transition-duration: .12s; }
.menu-btn:active, .nav__list a:active { background: var(--bg-2); }
.cta .btn--blue::before { background: var(--text); }

/* ---------- WordPress: сторінка «Відгуки» і форма Contact Form 7 ---------- */
.reviews { columns: 3 300px; column-gap: 12px; padding-bottom: 80px; }
.review { break-inside: avoid; margin: 0 0 12px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.review__stars { color: var(--cyan); font-size: 14px; letter-spacing: 2px; }
.review h3 { margin: 10px 0 8px; font-size: 20px; }
.review blockquote { margin: 0 0 14px; color: #c7d1d8; }
.review blockquote p { margin: 0 0 10px; }
.review figcaption { color: var(--text-3); }
.wpcf7-form-control-wrap { display: block; }
.wpcf7-not-valid-tip { display: block; margin-top: 6px; font-family: var(--sans); font-size: 13px; letter-spacing: 0; text-transform: none; color: #ff9b8f; }
.wpcf7-submit.btn { min-height: 56px; }
.wpcf7-spinner { display: none; }
.wpcf7 form.submitting .wpcf7-spinner { display: block; margin: 0 auto; }
.wpcf7 form .wpcf7-response-output { margin: 0; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 14px; }
.wpcf7 form.sent .wpcf7-response-output { border-color: var(--cyan); color: var(--cyan-2); font-weight: 500; }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output, .wpcf7 form.spam .wpcf7-response-output, .wpcf7 form.unaccepted .wpcf7-response-output { border-color: #ff9b8f; color: #ffc2ba; }
