/* Клініка «Здоров'я» — дизайн-система.

   Задача: сучасний, теплий, «дорогий» вигляд без стоку й без шаблонності.
   Три опори:
     1. Manrope — геометричний гротеск із повною кирилицею. Великі
        насичені заголовки задають характер, якого не дає системний шрифт.
     2. Фотографії лікарів — головний актив. Вони великі, у щедрих рамках,
        із мʼяким градієнтом донизу, на якому лежить імʼя.
     3. Фірмовий червоний #E31E25 працює дозовано: кнопки, тонкі акценти,
        ледь помітні заливки. Червоне тло у медицині читається як тривога. */

:root {
  --brand: #E31E25;
  --pri: #C4161C;
  --pri2: #9E1016;
  --tint: #FEF4F4;
  --tint2: #FBE3E4;

  --bg: #FFFFFF;
  --bg2: #FBF8F6;
  --bg3: #F5F0EC;
  --ink: #14100F;
  --ink2: #3A3230;
  --mut: #6B605C;
  --dim: #7A6F6A;            /* 4.87:1 на білому; #8A7F7A давав лише 3.89 */
  --line: #EDE6E2;
  --line2: #DFD5D0;

  --ok: #17724B;
  --gold: #C98A2E;          /* зірочки відгуків — графіка */
  --gold-d: #8A5A0E;        /* той самий акцент для тексту: 5.9:1 */

  --r: 20px;
  --r-lg: 28px;
  --r-sm: 12px;

  --sh: 0 1px 2px rgba(20,16,15,.04), 0 8px 24px -8px rgba(20,16,15,.10);
  --sh2: 0 2px 4px rgba(20,16,15,.05), 0 24px 60px -16px rgba(20,16,15,.18);
  --sh-red: 0 2px 6px rgba(196,22,28,.24), 0 16px 40px -12px rgba(196,22,28,.36);

  --wrap: 1200px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --spring: cubic-bezier(.34,1.4,.64,1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: -.005em;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0 0 .45em; font-weight: 800; line-height: 1.08; letter-spacing: -.032em; }
h1 { font-size: clamp(38px, 6.4vw, 76px); }
h2 { font-size: clamp(29px, 4.2vw, 46px); }
h3 { font-size: clamp(19px, 2.1vw, 24px); letter-spacing: -.022em; }
h4 { font-size: 16px; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
a { color: var(--pri); text-underline-offset: .2em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--pri2); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
li { margin: .4em 0; }
b, strong { font-weight: 700; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--tint2); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.skip { position: absolute; left: -9999px; z-index: 200; background: var(--pri); color: #fff; padding: 14px 20px; border-radius: 0 0 var(--r-sm) 0; }
.skip:focus { left: 0; top: 0; }

/* ============ ШАПКА ============ */
.top {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 22px;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.top.stuck { border-bottom-color: var(--line); box-shadow: 0 4px 20px -12px rgba(20,16,15,.3); }
.logo img { height: 44px; width: auto; }
.nav { display: none; margin-left: auto; align-items: center; gap: 1px; }
.nav a {
  padding: 10px 13px; border-radius: 10px; color: var(--ink2); text-decoration: none;
  font-size: 15.5px; font-weight: 600; white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav a:hover { background: var(--bg3); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--pri); }
.nav a.nav-tel {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 10px;
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-weight: 700;
}
.nav a.nav-tel:hover { background: var(--pri); color: #fff; }

.tel-sm { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; color: var(--pri); font-weight: 700; text-decoration: none; }
.tel-sm span { display: none; }
@media (min-width: 430px) { .tel-sm span { display: inline; } }

.burger {
  width: 46px; height: 46px; border: 1px solid var(--line2); background: #fff;
  border-radius: 14px; cursor: pointer; display: grid; place-content: center; gap: 5px; padding: 0;
}
.burger span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .22s var(--ease), opacity .18s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 1130px) { .nav { display: flex; } .burger, .tel-sm { display: none; } }

.menu {
  position: fixed; inset: 0; z-index: 70; background: #fff; display: flex; flex-direction: column;
  padding: 14px 22px 30px; overflow-y: auto;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.menu.on { opacity: 1; transform: none; pointer-events: auto; }
.menu-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.menu-top img { height: 40px; width: auto; }
.menu nav { display: flex; flex-direction: column; }
.menu nav a { padding: 16px 2px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.menu nav a[aria-current="page"] { color: var(--pri); }
.menu .btn { margin-top: 22px; }
.menu-foot { margin-top: auto; padding-top: 22px; color: var(--dim); font-size: 15px; }

/* ============ КНОПКИ ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 28px; border-radius: 999px; border: 1.5px solid transparent;
  background: var(--pri); color: #fff; font: inherit; font-weight: 700; font-size: 16.5px;
  letter-spacing: -.01em; text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: var(--sh-red);
  transition: background .18s var(--ease), transform .18s var(--spring), box-shadow .18s var(--ease);
}
.btn:hover { background: var(--pri2); color: #fff; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line2); box-shadow: none; }
.btn-ghost:hover { background: var(--bg3); color: var(--ink); border-color: var(--dim); }
.btn-dark { background: var(--ink); box-shadow: none; }
.btn-dark:hover { background: var(--pri); }
.btn-sm { padding: 11px 19px; font-size: 15px; }
.btn-wide { width: 100%; }
.cta-sm { display: none; padding: 11px 18px; border-radius: 999px; border: 0; background: var(--pri); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
@media (min-width: 580px) and (max-width: 1129px) { .cta-sm { display: inline-block; } }

/* ============ СЕКЦІЇ ============ */
.sect { padding: clamp(56px, 8vw, 104px) 0; }
.sect-alt { background: var(--bg2); }
.sect-dark { background: var(--ink); color: #E8E2DF; }
.sect-dark h2, .sect-dark h3 { color: #fff; }
.sect-tight { padding: clamp(36px, 5vw, 60px) 0 clamp(44px, 6vw, 72px); }

.kicker {
  /* flex + max-content, а не inline-flex: інакше наступний
     inline-елемент (клікабельний заголовок) стає в той самий рядок */
  display: flex; width: max-content; max-width: 100%; align-items: center; gap: 9px; margin: 0 0 14px;
  color: var(--pri); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
}
.kicker::before { content: ''; width: 22px; height: 2px; background: var(--pri); border-radius: 2px; }
.sub { color: var(--mut); font-size: clamp(17px, 1.7vw, 19px); max-width: 64ch; margin-bottom: 38px; }
.lead { font-size: clamp(18px, 2.1vw, 22px); color: var(--ink2); max-width: 58ch; line-height: 1.55; }

/* ============ ГОЛОВНИЙ ЕКРАН ============ */
.hero { position: relative; padding: clamp(28px, 5vw, 56px) 0 clamp(48px, 7vw, 88px); overflow: hidden; }
.hero::before {
  content: ''; position: absolute; z-index: 0; width: 720px; height: 720px; right: -240px; top: -320px;
  background: radial-gradient(circle, rgba(227,30,37,.10), transparent 62%); pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; z-index: 0; width: 520px; height: 520px; left: -260px; bottom: -280px;
  background: radial-gradient(circle, rgba(201,138,46,.10), transparent 65%); pointer-events: none;
}
.hero-in { position: relative; z-index: 1; display: grid; gap: 40px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 980px) { .hero-in { grid-template-columns: 1.06fr .94fr; gap: 56px; } }

.hero h1 { max-width: 14ch; margin-bottom: .35em; }
.hero h1 em { font-style: normal; color: var(--pri); }
.hero .lead { margin-bottom: 30px; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; }

.live {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  padding: 8px 17px 8px 13px; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--sh);
  font-size: 14.5px; font-weight: 600; color: var(--ink2);
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: 0 0 auto; }
.live.open .live-dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(23,114,75,.16); }

/* колаж портретів */
.collage { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.collage figure { margin: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--bg3); box-shadow: var(--sh2); }
.collage img { width: 100%; height: 100%; object-fit: cover; }
.collage .c1 { grid-row: span 2; aspect-ratio: 4/5; }
.collage .c2, .collage .c3 { aspect-ratio: 1/1; }
.collage .c2 { margin-top: 26px; }
@media (min-width: 980px) { .collage .c1 { aspect-ratio: 4/5.4; } }

.badge {
  position: absolute; left: -14px; bottom: 28px; z-index: 2;
  background: #fff; border-radius: var(--r); padding: 14px 18px; box-shadow: var(--sh2);
  display: flex; align-items: center; gap: 12px; border: 1px solid var(--line);
}
.badge b { display: block; font-size: 26px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.badge span { font-size: 13px; color: var(--mut); }
.badge .bi { width: 40px; height: 40px; border-radius: 12px; background: var(--tint); color: var(--pri); display: grid; place-content: center; font-size: 19px; }
@media (max-width: 979px) { .badge { left: 8px; bottom: 10px; } }

/* ============ ЦИФРИ ============ */
.stats { list-style: none; margin: 44px 0 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 820px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats li { margin: 0; padding: 24px 22px; background: #fff; }
.stats b { display: block; font-size: clamp(30px, 3.6vw, 42px); font-weight: 800; line-height: 1; letter-spacing: -.035em; color: var(--ink); }
.stats span { display: block; margin-top: 7px; font-size: 14.5px; color: var(--mut); line-height: 1.4; }

/* ============ ПЛИТКИ ПЕРЕВАГ ============ */
.strip-in { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .strip-in { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .strip-in { grid-template-columns: repeat(4, 1fr); } }
.sfeat { padding: 26px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.sf-i { display: grid; place-content: center; width: 46px; height: 46px; margin-bottom: 16px; border-radius: 14px; background: var(--tint); color: var(--pri); font-size: 21px; }
.sfeat b { display: block; font-size: 17.5px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 5px; }
.sfeat i { display: block; font-style: normal; font-size: 15px; color: var(--mut); line-height: 1.5; }

/* ============ КАРТКИ-ПОСИЛАННЯ ============ */
.tiles { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile {
  display: flex; flex-direction: column; padding: 28px 26px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
}
a.tile:hover { transform: translateY(-4px); box-shadow: var(--sh2); border-color: transparent; color: var(--ink); }
.tile h3 { margin-bottom: 8px; }
.tile p { color: var(--mut); font-size: 15.5px; margin-bottom: 18px; }
.tile .go { margin-top: auto; color: var(--pri); font-weight: 700; font-size: 15.5px; display: inline-flex; align-items: center; gap: 7px; }
.tile .go::after { content: '→'; transition: transform .2s var(--ease); }
a.tile:hover .go::after { transform: translateX(4px); }

/* ============ ЛІКАРІ ============ */
.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 30px; }
.fbtn {
  padding: 10px 17px; border-radius: 999px; border: 1.5px solid var(--line2); background: #fff;
  color: var(--ink2); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
}
.fbtn:hover { border-color: var(--dim); }
.fbtn.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.docs { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .docs { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .docs { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1180px) { .docs { grid-template-columns: repeat(4, 1fr); } }

.doc { display: flex; flex-direction: column; background: #fff; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); transition: transform .24s var(--ease), box-shadow .24s var(--ease); }
.doc:hover { transform: translateY(-5px); box-shadow: var(--sh2); }
.doc-ph { position: relative; aspect-ratio: 4/5; overflow: hidden; background: var(--bg3); }
.doc-ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transition: transform .5s var(--ease); }
.doc:hover .doc-ph img { transform: scale(1.035); }
.doc-ph::after { content: ''; position: absolute; inset: auto 0 0 0; height: 58%; background: linear-gradient(to top, rgba(15,11,10,.86), rgba(15,11,10,.42) 38%, transparent); }
.doc-ini { width: 100%; height: 100%; display: grid; place-content: center; background: linear-gradient(155deg, var(--tint), var(--bg3)); color: var(--pri); font-size: 40px; font-weight: 800; }
.doc-cap { position: absolute; z-index: 1; inset: auto 0 0 0; padding: 18px 18px 16px; color: #fff; }
.doc-n { font-size: 17.5px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; margin: 0 0 4px; }
.doc-s { font-size: 13.5px; line-height: 1.4; color: rgba(255,255,255,.82); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.doc-b { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.doc-m { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 13px; }
.chip { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--tint); color: var(--pri2); font-weight: 700; }
.chip-n { background: var(--bg3); color: var(--mut); font-weight: 600; }
.doc-spec { display: none; }
.doc-w { margin-top: auto; font-size: 13.5px; color: var(--mut); line-height: 1.45; }
.doc-w b { display: block; color: var(--dim); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.doc .btn { margin-top: 14px; }

/* ============ ЦІНИ ============ */
.psearch { position: relative; margin-bottom: 14px; }
.psearch input { width: 100%; padding: 17px 50px 17px 22px; font: inherit; font-size: 17px; border: 1.5px solid var(--line2); border-radius: 999px; background: #fff; color: var(--ink); }
.psearch input:focus { outline: none; border-color: var(--pri); box-shadow: 0 0 0 4px rgba(227,30,37,.11); }
.psearch .clr { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: var(--bg3); border-radius: 50%; cursor: pointer; color: var(--mut); font-size: 17px; display: none; }
.psearch .clr.on { display: block; }
.ptools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 26px; }
.pnote { color: var(--dim); font-size: 14.5px; margin-left: auto; }
.pgroup { margin-bottom: 36px; scroll-margin-top: 90px; }
.pgroup h3 { display: flex; align-items: baseline; gap: 11px; margin-bottom: 14px; }
.pgroup h3 span { font-size: 14px; font-weight: 600; color: var(--dim); letter-spacing: 0; }
.plist { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.prow { display: flex; align-items: baseline; gap: 16px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.prow:last-child { border-bottom: 0; }
.prow:hover { background: var(--bg2); }
.prow-n { flex: 1; font-size: 15.5px; line-height: 1.45; }
.prow-p { flex: 0 0 auto; font-weight: 800; font-size: 16.5px; white-space: nowrap; letter-spacing: -.02em; }
.prow-p.free { color: var(--ok); }
.prow mark { background: #FFEFA8; color: inherit; border-radius: 3px; }
.pens-tag { font-size: 11.5px; color: var(--gold-d); font-weight: 700; margin-left: 7px; text-transform: uppercase; letter-spacing: .05em; }
.pempty { padding: 34px; text-align: center; color: var(--mut); }

/* ============ АКОРДЕОН ============ */
.fq { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.fq-i { border-bottom: 1px solid var(--line); }
.fq-i:last-child { border-bottom: 0; }
.fq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; background: none; border: 0; cursor: pointer; font: inherit; font-size: 17.5px; font-weight: 700; letter-spacing: -.018em; color: var(--ink); text-align: left; }
.fq-q:hover { background: var(--bg2); }
.fq-q::after { content: ''; flex: 0 0 auto; width: 10px; height: 10px; border-right: 2.5px solid var(--pri); border-bottom: 2.5px solid var(--pri); transform: rotate(45deg) translate(-2px,-2px); transition: transform .25s var(--ease); }
.fq-q[aria-expanded="true"]::after { transform: rotate(-135deg) translate(-3px,-3px); }
.fq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); }
.fq-i.on .fq-a { grid-template-rows: 1fr; }
.fq-a > div { overflow: hidden; }
.fq-a p { margin: 0; padding: 0 22px 22px; color: var(--mut); font-size: 16.5px; }

/* ============ КАРТКИ ============ */
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }
.card { padding: 28px 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.card h3 { margin-bottom: 10px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card-soft { background: var(--tint); border-color: var(--tint2); }
.card-num { position: relative; padding-top: 34px; }
.card-num::before { content: attr(data-n); position: absolute; top: 20px; left: 26px; font-size: 13px; font-weight: 800; color: var(--pri); letter-spacing: .1em; }

.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 32px; margin: 12px 0; }
.ticks li::before { content: ''; position: absolute; left: 4px; top: .48em; width: 12px; height: 6.5px; border-left: 2.5px solid var(--pri); border-bottom: 2.5px solid var(--pri); transform: rotate(-45deg); }

.ins-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.ins { padding: 17px 19px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); font-weight: 700; font-size: 15.5px; letter-spacing: -.015em; }
.ins span { display: block; font-weight: 500; font-size: 12.5px; color: var(--dim); margin-top: 3px; letter-spacing: 0; }

/* ============ ВІДГУКИ ============ */
.revs { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .revs { grid-template-columns: repeat(2, 1fr); } }
.rev { padding: 28px 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.rev-h { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.rev-av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-content: center; background: var(--tint); color: var(--pri); font-weight: 800; font-size: 17px; flex: 0 0 auto; }
.rev-a { font-weight: 700; font-size: 16px; letter-spacing: -.015em; }
.rev-s { color: var(--gold); font-size: 14px; letter-spacing: .08em; }
.rev p { margin: 0; font-size: 16px; color: var(--ink2); line-height: 1.6; }

/* ============ КОНТАКТИ ============ */
.cgrid { display: grid; gap: 26px; grid-template-columns: 1fr; }
@media (min-width: 920px) { .cgrid { grid-template-columns: 1fr 1.1fr; align-items: start; } }
.clist { list-style: none; padding: 0; margin: 0; }
.clist li { display: flex; gap: 15px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.clist li:last-child { border-bottom: 0; }
.ci { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; background: var(--tint); color: var(--pri); display: grid; place-content: center; font-size: 17px; }
.clist b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin-bottom: 3px; font-weight: 700; }
.clist a { font-weight: 700; text-decoration: none; }
.clist a:hover { text-decoration: underline; }
.map { position: relative; aspect-ratio: 4/3; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--bg3); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-fac { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; cursor: pointer; border: 0; background: var(--bg3); width: 100%; font: inherit; }
.map-fac span { color: var(--mut); font-size: 15px; }
.hours-t { width: 100%; border-collapse: collapse; }
.hours-t td { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.hours-t tr:last-child td { border-bottom: 0; }
.hours-t td:last-child { text-align: right; font-weight: 700; }
.hours-t tr.today td { color: var(--pri); }

/* ============ ФОРМА ============ */
.sheet-bg { position: fixed; inset: 0; z-index: 90; background: rgba(20,16,15,.55); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .24s var(--ease); }
.sheet-bg.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 91; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto; background: #fff; border-radius: 26px 26px 0 0; padding: 8px 22px 30px; transform: translateY(100%); transition: transform .3s var(--ease); }
.sheet.on { transform: none; }
@media (min-width: 740px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 540px; border-radius: var(--r-lg); transform: translate(-50%,-46%) scale(.97); opacity: 0; padding: 12px 30px 30px; transition: transform .24s var(--ease), opacity .24s var(--ease); }
  .sheet.on { transform: translate(-50%,-50%); opacity: 1; }
}
.sheet-grab { width: 42px; height: 4px; border-radius: 4px; background: var(--line2); margin: 8px auto 14px; }
@media (min-width: 740px) { .sheet-grab { display: none; } }
.sheet-x { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: 0; background: var(--bg3); border-radius: 50%; cursor: pointer; font-size: 18px; color: var(--mut); }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 14.5px; font-weight: 700; margin-bottom: 7px; }
.field input, .field select, .field textarea { width: 100%; padding: 14px 16px; font: inherit; font-size: 16.5px; border: 1.5px solid var(--line2); border-radius: var(--r-sm); background: #fff; color: var(--ink); }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--pri); box-shadow: 0 0 0 4px rgba(227,30,37,.11); }
.field .err { color: var(--pri2); font-size: 13.5px; margin-top: 6px; display: none; }
.field.bad input, .field.bad select { border-color: var(--pri); }
.field.bad .err { display: block; }
.agree { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; color: var(--mut); margin: 18px 0; }
.agree input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; accent-color: var(--pri); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sheet-ok { text-align: center; padding: 24px 0 8px; }
.sheet-ok .ic { font-size: 46px; line-height: 1; margin-bottom: 14px; }

/* ============ НИЖНЯ ПАНЕЛЬ ============ */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; display: flex; gap: 9px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.dock a, .dock button { flex: 1; display: flex; align-items: center; justify-content: center; padding: 14px 8px; border-radius: 14px; border: 1.5px solid var(--line2); background: #fff; color: var(--ink); font: inherit; font-size: 15.5px; font-weight: 700; text-decoration: none; cursor: pointer; }
.dock .p { background: var(--pri); border-color: var(--pri); color: #fff; }
@media (min-width: 920px) { .dock { display: none; } }
@media (max-width: 919px) { body { padding-bottom: 78px; } }

/* ============ ПІДВАЛ ============ */
.foot { background: var(--ink); color: #B8AEAA; padding: 60px 0 32px; }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot-g { display: grid; gap: 34px; grid-template-columns: 1fr; margin-bottom: 36px; }
@media (min-width: 780px) { .foot-g { grid-template-columns: 1.5fr 1fr 1fr; } }
.foot h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 10px 0; font-size: 15.5px; }
.foot-logo { background: #fff; display: inline-block; padding: 11px 16px; border-radius: 14px; margin-bottom: 18px; }
.foot-logo img { height: 34px; width: auto; }
.foot-note { font-size: 14px; color: #8B807C; line-height: 1.65; }
.foot-bot { border-top: 1px solid #2C2523; padding-top: 24px; font-size: 13.5px; color: #8B807C; display: flex; flex-wrap: wrap; gap: 10px 24px; }

/* ============ ДРІБНЕ ============ */
.crumbs { font-size: 14px; color: var(--dim); padding: 18px 0 0; }
.crumbs a { color: var(--dim); text-decoration: none; }
.crumbs a:hover { color: var(--pri); }
.crumbs span { margin: 0 8px; }
.note { padding: 20px 24px; background: var(--tint); border-radius: var(--r); font-size: 16px; color: var(--ink2); border: 1px solid var(--tint2); }
.note b { color: var(--ink); }
.disclaimer { font-size: 13.5px; color: var(--dim); max-width: 72ch; }
.more { display: flex; justify-content: center; margin-top: 32px; }
.more-in { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px; border: 1.5px solid var(--line2); background: #fff; font: inherit; font-size: 16px; font-weight: 700; color: var(--ink); cursor: pointer; text-decoration: none; }
.more-in:hover { border-color: var(--ink); color: var(--ink); }
.more-in::after { content: ''; width: 8px; height: 8px; border-right: 2.5px solid var(--pri); border-bottom: 2.5px solid var(--pri); transform: rotate(45deg) translate(-1px,-1px); }
.more-in.less::after { transform: rotate(-135deg) translate(-2px,-2px); }
.gal { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.gal img { border-radius: var(--r); aspect-ratio: 4/3; object-fit: cover; width: 100%; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

@media print {
  .top, .dock, .foot, .sheet, .sheet-bg, .more, .btn, .filters, .psearch, .collage { display: none !important; }
  body { padding: 0; font-size: 12px; }
  .sect { padding: 12px 0; }
}

/* ======================================================================
   ДРУГА ІТЕРАЦІЯ ДИЗАЙНУ
   Орієнтир — sonomed.lutsk.ua: тонка службова смуга згори, повноширинний
   герой на реальному фото, стрічка показників, нумеровані блоки.
   Наші переваги поверх цього: живий статус роботи, пошук по 105 цінах,
   фото всіх лікарів і нескінченна стрічка відгуків.
   ====================================================================== */

/* ---------- службова смуга ---------- */
.util {
  display: none; font-size: 13.5px; color: var(--mut);
  background: var(--bg2); border-bottom: 1px solid var(--line);
}
.util .wrap { display: flex; align-items: center; gap: 26px; padding-top: 9px; padding-bottom: 9px; }
.util .sp { margin-left: auto; }
.util i { font-style: normal; display: inline-flex; align-items: center; gap: 7px; }
.util a { color: var(--mut); text-decoration: none; }
.util a:hover { color: var(--pri); }
.util .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.util .dot.open { background: var(--ok); box-shadow: 0 0 0 3px rgba(23,114,75,.16); }
@media (min-width: 900px) { .util { display: block; } }

/* ---------- повноширинний герой ---------- */
.hero-full {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(78vh, 660px); display: flex; align-items: flex-end;
  padding: 100px 0 clamp(36px, 5vw, 60px); color: #fff;
}
.hero-full .bgimg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.hero-full::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(12,9,8,.90) 0%, rgba(12,9,8,.74) 38%, rgba(12,9,8,.30) 68%, rgba(12,9,8,.16) 100%),
    linear-gradient(to top, rgba(12,9,8,.72), transparent 46%);
}
.hero-full h1 { color: #fff; max-width: 15ch; margin-bottom: .32em; }
.hero-full h1 em { font-style: normal; color: #FF8A8E; }
.hero-full .lead { color: rgba(255,255,255,.90); max-width: 54ch; margin-bottom: 30px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 22px; }
.hchip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px;
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.24);
  backdrop-filter: blur(8px); font-size: 13.5px; font-weight: 600; color: #fff;
}
.hchip .dot { width: 7px; height: 7px; border-radius: 50%; background: #8FE0AE; }
.hero-full .btn-ghost { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.34); color: #fff; backdrop-filter: blur(8px); }
.hero-full .btn-ghost:hover { background: rgba(255,255,255,.20); color: #fff; border-color: #fff; }
@media (max-width: 700px) { .hero-full { min-height: 0; padding: 84px 0 38px; } }

/* ---------- стрічка показників під героєм ---------- */
.factbar { background: var(--ink); color: #fff; }
.factbar .fb { display: grid; gap: 1px; grid-template-columns: repeat(2, 1fr); background: rgba(255,255,255,.13); }
@media (min-width: 900px) { .factbar .fb { grid-template-columns: repeat(4, 1fr); } }
.fact { background: var(--ink); padding: 26px 24px; }
.fact b { display: block; font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -.035em; line-height: 1; }
.fact span { display: block; margin-top: 8px; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.62); }
.fact.small b { font-size: clamp(16px, 1.8vw, 20px); letter-spacing: -.02em; line-height: 1.3; }

/* ---------- нумеровані картки ---------- */
.numgrid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; grid-template-columns: 1fr; }
@media (min-width: 700px) { .numgrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .numgrid { grid-template-columns: repeat(4, 1fr); } }
.numc { background: #fff; padding: 28px 26px; }
.numc .nn { display: block; font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--pri); margin-bottom: 18px; }
.numc h3 { font-size: 19px; margin-bottom: 8px; }
.numc p { margin: 0; font-size: 15px; color: var(--mut); line-height: 1.55; }

/* ---------- каталог напрямків ---------- */
.dirlist { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.dirrow {
  display: flex; align-items: center; gap: 18px; padding: 20px 24px;
  border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink);
  transition: background .18s var(--ease), padding-left .18s var(--ease);
}
.dirrow:last-child { border-bottom: 0; }
.dirrow:hover { background: var(--bg2); padding-left: 30px; color: var(--ink); }
.dirrow .nn { flex: 0 0 auto; font-size: 13px; font-weight: 800; color: var(--pri); letter-spacing: .06em; width: 26px; }
.dirrow .dt { flex: 1; }
.dirrow .dt b { display: block; font-size: 17.5px; font-weight: 700; letter-spacing: -.02em; }
.dirrow .dt i { font-style: normal; font-size: 14.5px; color: var(--mut); }
.dirrow .dn { flex: 0 0 auto; font-size: 13.5px; color: var(--dim); font-weight: 600; white-space: nowrap; }
.dirrow .ar { flex: 0 0 auto; color: var(--pri); font-weight: 700; transition: transform .2s var(--ease); }
.dirrow:hover .ar { transform: translateX(5px); }
@media (max-width: 560px) { .dirrow { gap: 12px; padding: 16px 18px; } .dirrow .dt i { display: none; } }

/* ---------- нескінченна стрічка відгуків ---------- */
.marquee { position: relative; overflow: hidden; padding: 4px 0; --gap: 18px; }
.marquee::before, .marquee::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: clamp(36px, 8vw, 130px); z-index: 2; pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(to right, var(--mq-fade, #fff), transparent); }
.marquee::after { right: 0; background: linear-gradient(to left, var(--mq-fade, #fff), transparent); }
.mq-track { display: flex; gap: var(--gap); width: max-content; animation: mq var(--mq-dur, 70s) linear infinite; will-change: transform; }
@media (hover: hover) and (pointer: fine) {
  .marquee:hover .mq-track { animation-play-state: paused; }
}
.marquee:focus-within .mq-track { animation-play-state: paused; }
@keyframes mq { from { transform: translateX(0); } to { transform: translateX(calc(-50% - var(--gap) / 2)); } }
@media (prefers-reduced-motion: reduce) {
  .mq-track { animation: none; }
  .marquee { overflow-x: auto; }
}
.mq-card {
  flex: 0 0 auto; width: min(340px, 78vw); padding: 24px 24px 22px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  display: flex; flex-direction: column;
}
.mq-card .rev-h { margin-bottom: 12px; }
.mq-card p { margin: 0; font-size: 15px; color: var(--ink2); line-height: 1.6; }
.mq-src { margin-top: 14px; font-size: 12.5px; color: var(--dim); }

/* ---------- блок запису ---------- */
.bookgrid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 980px) { .bookgrid { grid-template-columns: 1fr 1.05fr; align-items: start; } }
.bookcard { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 34px); color: var(--ink); }
.perks { list-style: none; padding: 0; margin: 26px 0 0; }
.perks li { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.12); }
.perks li:first-child { border-top: 0; }
.perks .pk { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; display: grid; place-content: center; font-size: 14px; }
.perks b { display: block; color: #fff; font-size: 16px; margin-bottom: 3px; }
.perks span { font-size: 14.5px; color: rgba(255,255,255,.68); }
.sect-dark .lead, .sect-dark .sub { color: rgba(255,255,255,.74); }
.sect-dark .kicker { color: #FF8A8E; }
.sect-dark .kicker::before { background: #FF8A8E; }
.sect-dark .btn-ghost { background: transparent; border-color: rgba(255,255,255,.34); color: #fff; }
.sect-dark .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.sect-dark .field label { color: var(--ink); }

/* ---------- фото фасаду ---------- */
.fasad { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); margin-bottom: 16px; }
.fasad img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* ======================================================================
   ЗРОЗУМІЛА НАВІГАЦІЯ
   Скарга клієнта: гортаєш сайт і не розумієш, куди тиснути по ціни.
   Рішення: чотири великі картки-розділи одразу під героєм, клікабельні
   заголовки секцій зі стрілкою і вітрина цін просто на головній.
   ====================================================================== */

.quick { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .quick { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .quick { grid-template-columns: repeat(4, 1fr); } }
.qcard {
  display: flex; flex-direction: column; padding: 26px 24px 22px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  text-decoration: none; color: var(--ink); position: relative; overflow: hidden;
  transition: transform .24s var(--ease), box-shadow .24s var(--ease), border-color .24s var(--ease);
}
.qcard::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--pri); transform: scaleX(0); transform-origin: left;
  transition: transform .32s var(--ease);
}
.qcard:hover { transform: translateY(-4px); box-shadow: var(--sh2); border-color: transparent; color: var(--ink); }
.qcard:hover::before { transform: scaleX(1); }
.qi {
  display: grid; place-content: center; width: 46px; height: 46px; margin-bottom: 16px;
  border-radius: 14px; background: var(--tint); color: var(--pri); font-size: 21px; font-weight: 700;
  transition: background .24s var(--ease), color .24s var(--ease);
}
.qcard:hover .qi { background: var(--pri); color: #fff; }
.qcard b { font-size: 21px; font-weight: 800; letter-spacing: -.025em; margin-bottom: 6px; }
.qcard i { font-style: normal; font-size: 14.5px; color: var(--mut); line-height: 1.5; margin-bottom: 16px; }
.qcard .go { margin-top: auto; color: var(--pri); font-weight: 700; font-size: 15px; }
.qcard .go::after { content: ' →'; display: inline-block; transition: transform .2s var(--ease); }
.qcard:hover .go::after { transform: translateX(4px); }

/* клікабельний заголовок секції */
.sectlink {
  display: inline-flex; align-items: baseline; gap: 14px;
  text-decoration: none; color: var(--ink); margin-bottom: .1em;
}
.sectlink h2 { margin-bottom: .2em; transition: color .2s var(--ease); }
.sectlink .ar {
  flex: 0 0 auto; color: var(--pri); font-size: clamp(20px, 2.4vw, 28px); font-weight: 700;
  transition: transform .26s var(--ease);
}
.sectlink:hover { color: var(--ink); }
.sectlink:hover h2 { color: var(--pri); }
.sectlink:hover .ar { transform: translateX(8px); }

/* двоколонковий блок «фото + текст» */
.splitrow { display: grid; gap: 32px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 980px) { .splitrow { grid-template-columns: 1fr 1fr; gap: 48px; } }

.illus { margin: 0; }
.illus img { width: 100%; border-radius: var(--r-lg); border: 1px solid var(--line); }
.illus figcaption {
  margin-top: 10px; font-size: 12.5px; color: var(--dim); line-height: 1.5;
  display: flex; gap: 7px; align-items: flex-start;
}
.illus figcaption::before { content: 'i'; flex: 0 0 auto; width: 15px; height: 15px; border-radius: 50%; background: var(--bg3); color: var(--mut); font-size: 10px; font-weight: 800; display: grid; place-content: center; margin-top: 2px; }

/* м'якша поява блоків: невелика затримка по черзі всередині сітки */
.docs .reveal:nth-child(2), .tiles .reveal:nth-child(2), .numgrid .reveal:nth-child(2) { transition-delay: .06s; }
.docs .reveal:nth-child(3), .tiles .reveal:nth-child(3), .numgrid .reveal:nth-child(3) { transition-delay: .12s; }
.docs .reveal:nth-child(4), .tiles .reveal:nth-child(4), .numgrid .reveal:nth-child(4) { transition-delay: .18s; }


/* ======================================================================
   НАВІГАЦІЯ Й РУХ
   ====================================================================== */

/* Плавна поява сторінки — прибирає різкий «стрибок» при переході */
@keyframes pagein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
main { animation: pagein .38s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { main { animation: none; } }

/* Логотип у шапці — головна кнопка «додому». Робимо це відчутним. */
.logo {
  display: inline-flex; align-items: center; gap: 10px; border-radius: 12px;
  padding: 4px 10px 4px 4px; margin-left: -4px; text-decoration: none;
  transition: background .2s var(--ease), transform .2s var(--spring);
}
.logo:hover { background: var(--tint); transform: translateY(-1px); }
.logo .home-hint {
  display: none; font-size: 12.5px; font-weight: 700; color: var(--pri);
  letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  opacity: 0; transform: translateX(-6px); transition: opacity .2s var(--ease), transform .2s var(--ease);
}
@media (min-width: 1130px) {
  .logo .home-hint { display: inline; }
  .logo:hover .home-hint { opacity: 1; transform: none; }
}

/* Кнопка «нагору» */
.up {
  position: fixed; right: 18px; bottom: 96px; z-index: 54;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line2);
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px); color: var(--ink);
  cursor: pointer; display: grid; place-content: center; box-shadow: var(--sh);
  opacity: 0; transform: translateY(10px) scale(.9); pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--spring), background .2s;
}
.up.on { opacity: 1; transform: none; pointer-events: auto; }
.up:hover { background: var(--pri); border-color: var(--pri); color: #fff; }
.up::before { content: ''; width: 10px; height: 10px; border-left: 2.5px solid currentColor; border-top: 2.5px solid currentColor; transform: rotate(45deg) translate(1px, 1px); }
@media (min-width: 920px) { .up { bottom: 24px; right: 24px; } }

/* Помітна навігація «назад на головну» внизу внутрішніх сторінок */
.backhome { border-top: 1px solid var(--line); background: var(--bg2); }
.backhome .wrap { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding-top: 26px; padding-bottom: 26px; }
.backhome p { margin: 0; color: var(--mut); font-size: 15.5px; }
.backhome b { color: var(--ink); }

/* Хлібні крихти помітніші */
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--bg2); font-weight: 600; transition: background .18s, color .18s; }
.crumbs a:hover { background: var(--tint); color: var(--pri); text-decoration: none; }

/* Активний розділ у меню — підкреслення, а не лише колір */
.nav a[aria-current="page"] { position: relative; }
.nav a[aria-current="page"]::after {
  content: ''; position: absolute; left: 13px; right: 13px; bottom: 4px;
  height: 2px; border-radius: 2px; background: var(--pri);
}

/* ======================================================================
   ПРАЙС-АКОРДЕОН
   105 рядків одразу на екрані — це стіна, в якій неможливо зорієнтуватись.
   Тому спершу видно лише напрямки, ціни розкриваються за кліком.
   Під час пошуку групи з результатами відкриваються самі.
   ====================================================================== */

.phint { color: var(--mut); font-size: 15px; margin: -10px 0 22px; }

.pgroup {
  margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--r);
  background: #fff; overflow: hidden; scroll-margin-top: 96px;
  transition: border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.pgroup.on { border-color: var(--line2); box-shadow: var(--sh); }
.pgroup h3 { margin: 0; font-size: inherit; }

.pg-head {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 20px 22px; background: none; border: 0; cursor: pointer;
  font: inherit; text-align: left; color: var(--ink);
  transition: background .18s var(--ease);
}
.pg-head:hover { background: var(--bg2); }
.pg-t { flex: 1; font-size: clamp(17px, 2vw, 21px); font-weight: 800; letter-spacing: -.022em; }
.pg-n { flex: 0 0 auto; font-size: 13.5px; font-weight: 600; color: var(--dim); white-space: nowrap; }
.pg-x {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--tint);
  display: grid; place-content: center; transition: background .22s var(--ease), transform .3s var(--ease);
}
.pg-x { position: relative; }
.pg-x::before, .pg-x::after {
  /* абсолют без координат ставав у куток — центруємо явно */
  content: ''; position: absolute; top: 50%; left: 50%;
  background: var(--pri); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease), background .22s var(--ease);
}
.pg-x::before { width: 12px; height: 2.5px; transform: translate(-50%, -50%); }
.pg-x::after { width: 2.5px; height: 12px; transform: translate(-50%, -50%); }
.pgroup.on .pg-x { background: var(--pri); }
.pgroup.on .pg-x::before, .pgroup.on .pg-x::after { background: #fff; }
.pgroup.on .pg-x::after { transform: translate(-50%, -50%) scaleY(0); opacity: 0; }
.pg-head:hover .pg-x { transform: scale(1.08); }

.pg-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .34s var(--ease); }
.pgroup.on .pg-body { grid-template-rows: 1fr; }
.pg-body > div { overflow: hidden; }
.pg-body .plist { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.pg-body .prow:first-child { border-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .pg-body { transition: none; }
}

@media print {
  .pg-body { grid-template-rows: 1fr !important; }
  .pg-x, .phint { display: none !important; }
}

/* ======================================================================
   ПРАЙС, ДРУГА РЕДАКЦІЯ
   Назви напрямків крупніші й контрастніші; у кожному одразу видно перші
   позиції, решта — за кнопкою; фільтр для пенсіонерів став перемикачем.
   ====================================================================== */

.pgroup { margin-bottom: 16px; }

.pg-head-w {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding: 22px 24px 16px;
}
.pg-t {
  flex: 1; margin: 0; min-width: 60%;
  font-size: clamp(21px, 2.6vw, 27px); font-weight: 800; letter-spacing: -.03em;
  color: var(--ink); line-height: 1.15;
}
.pgroup .pg-n {
  flex: 0 0 auto; font-size: 13px; font-weight: 700; color: var(--pri);
  background: var(--tint); padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}

.pg-peek .prow:first-child { border-top: 1px solid var(--line); }
.pg-peek, .pg-body .plist { border: 0; border-radius: 0; }
.pg-body .prow { border-top: 0; }

.pg-more {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 20px; background: var(--bg2); border: 0; border-top: 1px solid var(--line);
  font: inherit; font-size: 15.5px; font-weight: 700; color: var(--pri); cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.pg-more:hover { background: var(--tint); }
.pg-x {
  position: relative; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: var(--pri); transition: transform .3s var(--ease);
}
.pg-x::before, .pg-x::after {
  content: ''; position: absolute; top: 50%; left: 50%; background: #fff; border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.pg-x::before { width: 10px; height: 2px; transform: translate(-50%, -50%); }
.pg-x::after { width: 2px; height: 10px; transform: translate(-50%, -50%); }
.pgroup.on .pg-x::after { transform: translate(-50%, -50%) scaleY(0); opacity: 0; }
.pg-more:hover .pg-x { transform: scale(1.1); }

/* ---------- перемикач ---------- */
.tgl {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 8px 17px 8px 9px; border-radius: 999px; border: 1.5px solid var(--line2);
  background: #fff; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink2);
  cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.tgl:hover { border-color: var(--dim); }
.tgl-track {
  flex: 0 0 auto; width: 40px; height: 24px; border-radius: 999px; background: var(--line2);
  position: relative; transition: background .24s var(--ease);
}
.tgl-dot {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(20,16,15,.28);
  transition: transform .24s var(--spring);
}
.tgl[aria-checked="true"] { border-color: var(--pri); background: var(--tint); color: var(--pri2); }
.tgl[aria-checked="true"] .tgl-track { background: var(--pri); }
.tgl[aria-checked="true"] .tgl-dot { transform: translateX(16px); }

@media print {
  .pg-body { grid-template-rows: 1fr !important; }
  .pg-more, .tgl, .phint { display: none !important; }
}

/* ======================================================================
   МОБІЛЬНА ВЕРСІЯ — ОКРЕМИЙ ПРОХІД
   Проблема була не в дрібницях: головна займала 15 екранів прокрутки,
   бо все стояло в одну колонку. Картка лікаря на весь екран — 600 px,
   чотири картки — 2400. Тому на телефоні переходимо на дві колонки там,
   де елемент того дозволяє, і стискаємо відступи.
   ====================================================================== */

@media (max-width: 719px) {

  /* ---------- ритм ---------- */
  .sect { padding: 44px 0; }
  .sect-tight { padding: 26px 0 36px; }
  .wrap { padding: 0 16px; }
  .sub { margin-bottom: 24px; font-size: 16px; }
  h2 { font-size: clamp(25px, 7.6vw, 32px); }
  .kicker { margin-bottom: 10px; }

  /* ---------- герой ---------- */
  .hero-full { padding: 74px 0 30px; }
  .hero-full h1 { font-size: 34px; max-width: 100%; }
  .hero-full .lead { font-size: 16px; margin-bottom: 22px; }
  .hero-chips { gap: 6px; margin-bottom: 16px; }
  .hchip { font-size: 12px; padding: 6px 12px; }
  .hero-btns { gap: 9px; }
  .hero-btns .btn { flex: 1 1 100%; }

  /* ---------- показники: 2x2 компактно ---------- */
  .fact { padding: 16px 14px; }
  .fact b { font-size: 24px; }
  .fact span { font-size: 10.5px; letter-spacing: .06em; margin-top: 5px; }

  /* ---------- розділи: дві колонки ---------- */
  .quick { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .qcard { padding: 16px 14px 14px; }
  .qi { width: 38px; height: 38px; margin-bottom: 11px; font-size: 18px; border-radius: 11px; }
  .qcard b { font-size: 17px; margin-bottom: 4px; }
  .qcard i { font-size: 13px; line-height: 1.4; margin-bottom: 12px; }
  .qcard .go { font-size: 13.5px; }

  /* ---------- «про клініку»: дві колонки ---------- */
  .numgrid { grid-template-columns: repeat(2, 1fr); }
  .numc { padding: 16px 14px; }
  .numc .nn { font-size: 10.5px; margin-bottom: 10px; }
  .numc h3 { font-size: 16.5px; margin-bottom: 5px; }
  .numc p { font-size: 13px; line-height: 1.45; }

  /* ---------- напрямки ---------- */
  .dirrow { padding: 14px 16px; gap: 10px; }
  .dirrow .nn { width: 20px; font-size: 11.5px; }
  .dirrow .dt b { font-size: 15.5px; }
  .dirrow .dn { font-size: 12px; }

  /* ---------- ЛІКАРІ: дві колонки, компактна картка ---------- */
  .docs { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .doc { border-radius: 18px; }
  .doc-cap { padding: 10px 11px 9px; }
  .doc-n { font-size: 13.5px; line-height: 1.2; margin-bottom: 0; }
  .doc-s { display: none; }                     /* спеціальність переїхала в тіло картки */
  .doc-b { padding: 10px 11px 12px; }
  .doc-spec { display: block; font-size: 12.5px; color: var(--mut); line-height: 1.35; margin-bottom: 8px; }
  .doc-m { gap: 4px; margin-bottom: 8px; }
  .chip { font-size: 10.5px; padding: 3px 7px; }
  .doc-w { font-size: 11.5px; line-height: 1.35; }
  .doc-w b { font-size: 9.5px; margin-bottom: 2px; }
  .doc .btn { margin-top: 10px; padding: 9px 10px; font-size: 13px; }
  .doc-ini { font-size: 26px; }
  .filters { gap: 6px; margin-bottom: 20px; }
  .fbtn { padding: 8px 13px; font-size: 13.5px; }

  /* ---------- ціни ---------- */
  .pg-head-w { padding: 16px 16px 12px; }
  .pg-t { font-size: 20px; }
  .prow { padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
  .prow-n { flex: 1 1 100%; font-size: 14.5px; }
  .prow-p { font-size: 15px; margin-left: auto; }
  .pg-more { padding: 13px 16px; font-size: 14.5px; }
  .psearch input { padding: 14px 44px 14px 18px; font-size: 16px; }
  .ptools { gap: 8px; }
  .pnote { margin-left: 0; flex: 1 1 100%; }

  /* ---------- стрічка відгуків ---------- */
  .mq-card { width: 270px; padding: 18px 18px 16px; }
  .mq-card p { font-size: 14px; }
  .rev-av { width: 36px; height: 36px; font-size: 14px; }

  /* ---------- блок запису: форма їде в шторку ---------- */
  .bookcard { display: none; }
  .book-mob { display: block; }
  .perks { margin-top: 20px; }
  .perks li { padding: 12px 0; }
  .perks b { font-size: 15px; }
  .perks span { font-size: 13.5px; }

  /* ---------- інше ---------- */
  .splitrow { gap: 22px; }
  .cards { gap: 10px; }
  .card { padding: 18px 16px; }
  .ins { padding: 13px 15px; font-size: 14.5px; }
  .ins-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .fq-q { padding: 15px 16px; font-size: 15.5px; }
  .fq-a p { padding: 0 16px 16px; font-size: 15px; }
  .clist li { padding: 14px 0; gap: 12px; }
  .note { padding: 16px 18px; font-size: 15px; }
  .more { margin-top: 22px; }
  .more-in { padding: 12px 20px; font-size: 15px; }

  /* ---------- підвал компактніший ---------- */
  .foot { padding: 40px 0 26px; }
  .foot-g { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .foot-g > :first-child { grid-column: 1 / -1; }
  .foot li { margin: 7px 0; font-size: 14.5px; }
  .foot h4 { margin-bottom: 11px; }
  .foot-logo { padding: 9px 13px; margin-bottom: 14px; }
  .foot-note { font-size: 13px; }
  .backhome .wrap { padding-top: 20px; padding-bottom: 20px; }
  .backhome p { font-size: 14.5px; }
  .backhome .btn { width: 100%; }
}

/* дуже вузькі екрани — не ламаємо дві колонки, лише стискаємо */
@media (max-width: 359px) {
  .wrap { padding: 0 12px; }
  .doc-n { font-size: 12.5px; }
  .qcard b { font-size: 15.5px; }
}

/* мобільна версія блоку запису показується лише на телефоні */
.book-mob { display: none; }
.book-mob .btn { width: 100%; }
.book-mob p { margin: 14px 0 0; font-size: 14px; color: rgba(255,255,255,.7); }
.book-mob p a { color: #fff; font-weight: 700; }


/* ======================================================================
   СТОРІНКА ЛІКАРЯ І НАВІГАЦІЯ «НАЗАД»
   ====================================================================== */

.docpage { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .docpage { grid-template-columns: 380px 1fr; gap: 44px; } }
.docpage-ph { margin: 0; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--bg3); }
.docpage-ph img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: 50% 18%; }
.docpage h1 { font-size: clamp(28px, 4.4vw, 44px); }
.docpage .lead { font-size: clamp(16.5px, 1.9vw, 19px); }
.docpage-w {
  padding: 18px 20px; background: var(--tint); border-radius: var(--r);
  border: 1px solid var(--tint2);
}
.docpage-w b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--pri2); margin-bottom: 6px; }
.docpage-w span { font-size: 16.5px; font-weight: 600; }

/* посилання «назад» угорі сторінки */
.backlink {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px;
  padding: 10px 18px 10px 14px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--line2);
  font-size: 15px; font-weight: 700; color: var(--ink); text-decoration: none;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.backlink:hover { border-color: var(--ink); background: var(--bg2); color: var(--ink); transform: translateX(-3px); }

.crumb-now { color: var(--ink2); font-weight: 600; }
.backhome-b { display: flex; gap: 10px; flex-wrap: wrap; }

/* підказка на картці лікаря */
.doc-ph { display: block; text-decoration: none; }
.doc-go {
  position: absolute; z-index: 2; left: 18px; bottom: 18px;
  font-size: 12.5px; font-weight: 700; color: #fff;
  opacity: 0; transform: translateY(6px);
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .doc:hover .doc-cap { transform: translateY(-22px); }
  .doc:hover .doc-go { opacity: 1; transform: none; }
}
.doc-cap { transition: transform .26s var(--ease); }

@media (max-width: 719px) {
  .docpage { gap: 20px; }
  .docpage-ph { max-width: 220px; }
  .docpage-w { padding: 14px 16px; }
  .docpage-w span { font-size: 15px; }
  .backlink { padding: 9px 15px 9px 12px; font-size: 14px; margin-bottom: 16px; }
  .backhome-b { width: 100%; }
  .backhome-b .btn { flex: 1 1 100%; }
  .doc-go { display: none; }
}

/* ======================================================================
   ПЛАВНІСТЬ
   backdrop-filter на липкій шапці й нижній панелі — головна причина
   смикання при прокрутці: браузер перераховує розмиття кожен кадр.
   На телефоні (де це найпомітніше) міняємо його на суцільний фон.
   ====================================================================== */

@media (max-width: 899px) {
  .top {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .dock {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .hchip { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255,255,255,.18); }
  .hero-full .btn-ghost { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .up { backdrop-filter: none; background: #fff; }
  .sheet-bg { backdrop-filter: none; }
}

/* Довгі списки цін: обмежуємо перерахунок стилів межами групи,
   інакше розгортання 61 рядка помітно підвисає. */
.pg-body > div { contain: content; }
.pgroup { contain: layout style; }

/* Анімовані елементи заздалегідь виносимо в окремий шар */
.doc-ph img, .doc-cap { will-change: transform; }
.doc { contain: layout paint; }

/* Плавна поява сторінки не має чіпати розкладку */
main { will-change: opacity, transform; }
main.ready { will-change: auto; }


/* ======================================================================
   ЗАГЛУШКА КАРТИ Й БЛОК «ДЕ МИ ЗНАХОДИМОСЬ»
   На десктопі порожній прямокутник 4:3 на всю ширину виглядав як
   помилка завантаження. Тепер це оформлена картка у стилі навігації,
   а сама секція розкладена у дві колонки.
   ====================================================================== */

.maprow { align-items: center; }
@media (min-width: 980px) { .maprow { grid-template-columns: 1fr 1.15fr; } }

.map-fac {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 32px 26px; text-align: center;
  background: linear-gradient(165deg, var(--tint) 0%, var(--bg3) 100%);
  transition: background .24s var(--ease);
}
.map-fac:hover { background: linear-gradient(165deg, var(--tint2) 0%, var(--bg3) 100%); }
.mf-pin {
  width: 46px; height: 46px; border-radius: 50%; background: var(--pri);
  display: grid; place-content: center; margin-bottom: 14px;
  box-shadow: var(--sh-red); position: relative;
}
.mf-pin::before {
  content: ''; width: 13px; height: 13px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); border: 3px solid #fff;
}
.map-fac strong { font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.mf-city { font-size: 14.5px; color: var(--mut); }
.mf-btn {
  margin-top: 16px; padding: 11px 22px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--line2);
  font-size: 15px; font-weight: 700; color: var(--ink);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.map-fac:hover .mf-btn { border-color: var(--pri); color: var(--pri); }
.mf-note { margin-top: 10px; font-size: 12.5px; color: var(--dim); }

/* На широкому екрані карта не має бути на пів сторінки заввишки */
@media (min-width: 980px) {
  .maprow .map { aspect-ratio: 5 / 4; max-height: 460px; }
}
@media (max-width: 979px) {
  .maprow .map { aspect-ratio: 4 / 3; }
  .map-fac { padding: 26px 20px; }
  .mf-pin { width: 40px; height: 40px; margin-bottom: 11px; }
  .map-fac strong { font-size: 17px; }
}

/* На телефоні секція «Де ми знаходимось» лишається такою, якою була:
   заголовок, абзац з адресою, карта, кнопки. Список контактів із іконками
   з'являється тільки на десктопі, де для нього є місце в другій колонці. */
.mob-only { display: none; }
@media (max-width: 979px) {
  .mob-only { display: block; }
  .maprow .clist { display: none; }
  .maprow .map { order: -1; }
  .maprow { gap: 18px; }
}
