/* =========================================================================
   Merkulov dental clinic – основні стилі
   Ідея: світло на графіті. Як вивіска клініки ввечері і підсвічена стійка рецепції:
   графітові площини, холодне біле світло, мармурово-сірі світлі секції.
   ====================================================================== */

/* ---------- Шрифт Commissioner (змінна вага, локально) ---------- */
@font-face { font-family: 'Commissioner'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/commissioner-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Commissioner'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/commissioner-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Commissioner'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/commissioner-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Commissioner'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/commissioner-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Токени ---------- */
:root {
	--ink: #1d1e20;
	--graphite: #2b2c2e;
	--brand: #3d3d3d;
	--slate: #4a4d51;
	--steel: #8b9197;
	--mist: #e4e6e8;
	--marble: #eef0f1;
	--paper: #ffffff;
	--glow: #eaf4ff;
	--glow-rgb: 214, 233, 255;

	--text-l: #1d1e20;
	--muted-l: #5c6166;
	--text-d: #eef0f2;
	--muted-d: #a6acb2;
	--line-l: rgba(29, 30, 32, 0.12);
	--line-d: rgba(255, 255, 255, 0.13);

	--radius-s: 12px;
	--radius: 20px;
	--radius-l: 28px;
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--ease-io: cubic-bezier(0.65, 0, 0.35, 1);

	--font: 'Commissioner', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
	--container: 1240px;
	--gutter: clamp(16px, 4vw, 40px);
	--header-h: 76px;
	--adminbar: 0px;
}
body.admin-bar { --adminbar: 32px; }
@media (max-width: 782px) { body.admin-bar { --adminbar: 46px; } }
html.md-hide-adminbar body.admin-bar { --adminbar: 0px; }

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--adminbar) + 16px); }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.65;
	font-weight: 400;
	color: var(--text-l);
	background: var(--ink);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	font-feature-settings: 'kern', 'liga';
}
img, video, svg, canvas, iframe { display: block; max-width: 100%; }
[hidden] { display: none !important; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
address { font-style: normal; }
::selection { background: var(--brand); color: #fff; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; border-radius: 6px; }
.section--light :focus-visible, .section--paper :focus-visible, .side-panel :focus-visible { outline-color: var(--ink); }

.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 10001; background: #fff; color: var(--ink); padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: calc(820px + var(--gutter) * 2); }

/* ---------- Секції ---------- */
.site-main { display: block; }
.section { position: relative; padding: clamp(80px, 10vw, 150px) 0; }
.section--dark { background: var(--ink); color: var(--text-d); }
.section--light { background: var(--marble); color: var(--text-l); }
.section--paper { background: var(--paper); color: var(--text-l); }

.section-head { margin-bottom: clamp(40px, 5vw, 72px); }
.section-title + .post-grid, .section-title + .team-grid { margin-top: clamp(32px, 4vw, 56px); }
.section-head--split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 24px 64px; align-items: end; }
.section-head--row { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-title { font-size: clamp(2.1rem, 4.4vw, 3.9rem); font-weight: 300; line-height: 1.04; letter-spacing: -0.03em; }
.section-lead { font-size: 1.125rem; color: var(--muted-l); max-width: 46ch; }
.section--dark .section-lead { color: var(--muted-d); }
.section-more { margin-top: clamp(32px, 4vw, 56px); text-align: center; }
@media (max-width: 860px) {
	.section-head--split { grid-template-columns: 1fr; }
}

/* ---------- Кнопки ---------- */
.btn {
	--b-bg: var(--ink); --b-fg: #fff; --b-bd: transparent;
	display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
	padding: 0.95em 1.65em; border-radius: 999px;
	border: 1px solid var(--b-bd); background: var(--b-bg); color: var(--b-fg);
	font-weight: 500; font-size: 1rem; line-height: 1.2; letter-spacing: 0.005em;
	text-decoration: none; white-space: nowrap;
	transition: background 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.45s var(--ease), transform 0.35s var(--ease), border-color 0.35s var(--ease);
	will-change: transform;
}
.btn .icon { width: 1.1em; height: 1.1em; }
.btn--glow { --b-bg: #fff; --b-fg: var(--ink); box-shadow: 0 0 0 0 rgba(var(--glow-rgb), 0); }
.btn--glow:hover { box-shadow: 0 0 28px 2px rgba(var(--glow-rgb), 0.55), 0 0 0 1px rgba(255, 255, 255, 0.8); }
.btn--dark:hover { --b-bg: var(--brand); box-shadow: 0 10px 30px -12px rgba(29, 30, 32, 0.55); }
.btn--ghost { --b-bg: transparent; --b-fg: #fff; --b-bd: var(--line-d); }
.btn--ghost:hover { --b-bd: rgba(255, 255, 255, 0.6); box-shadow: 0 0 24px rgba(var(--glow-rgb), 0.25); }
.btn--ghost-dark { --b-bg: transparent; --b-fg: var(--ink); --b-bd: var(--line-l); }
.btn--ghost-dark:hover { --b-bd: var(--ink); }
.btn--sm { padding: 0.7em 1.25em; font-size: 0.95rem; }
.btn--lg { padding: 1.1em 2em; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: progress; }

.link-arrow { display: inline-flex; align-items: center; gap: 0.4em; text-decoration: none; font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link-arrow .icon { transition: transform 0.35s var(--ease); }
.link-arrow:hover .icon { transform: translate(3px, -3px); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.chip {
	display: inline-flex; align-items: center; padding: 0.45em 1em; border-radius: 999px;
	border: 1px solid var(--line-l); background: transparent; font-size: 0.92rem; text-decoration: none;
	transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.chip:hover, .chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Соцмережі ---------- */
.socials { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.social {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
	width: 46px; height: 46px; border-radius: 50%;
	border: 1px solid var(--line-d); color: #fff; text-decoration: none;
	transition: background 0.3s, color 0.3s, box-shadow 0.4s, border-color 0.3s;
}
.social span { display: none; }
.social .icon { width: 20px; height: 20px; }
.socials--light .social:hover { background: #fff; color: var(--ink); box-shadow: 0 0 24px rgba(var(--glow-rgb), 0.5); }
.socials--dark .social { border-color: var(--line-l); color: var(--ink); }
.socials--dark .social:hover { background: var(--ink); color: #fff; }
.socials--labels .social { width: auto; padding: 0 18px 0 14px; border-radius: 999px; }
.socials--labels .social span { display: inline; font-size: 0.95rem; }

/* ---------- Поля форм ---------- */
.field { position: relative; }
.field input, .field textarea, .field select {
	width: 100%; padding: 24px 16px 8px; border-radius: 14px;
	border: 1px solid var(--line-l); background: #fff; color: var(--text-l);
	font-size: 1rem; line-height: 1.4; appearance: none; -webkit-appearance: none;
	transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.field textarea { resize: vertical; min-height: 64px; }
.field label {
	position: absolute; left: 17px; top: 17px; font-size: 1rem; color: var(--muted-l);
	pointer-events: none; transform-origin: 0 0; transition: transform 0.25s var(--ease), color 0.25s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(29, 30, 32, 0.08); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field--select label { transform: translateY(-10px) scale(0.75); }
.field__chevron { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); pointer-events: none; opacity: 0.6; }
.field.is-invalid input { border-color: #d9534f; }

.field--dark input, .field--dark textarea, .field--dark select,
.modal .field input, .modal .field textarea, .modal .field select {
	background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.16); color: #fff;
}
.field--dark label, .modal .field label { color: var(--muted-d); }
.field--dark input:focus, .modal .field input:focus, .modal .field textarea:focus, .modal .field select:focus {
	border-color: rgba(255, 255, 255, 0.7); box-shadow: 0 0 0 3px rgba(var(--glow-rgb), 0.12), 0 0 22px rgba(var(--glow-rgb), 0.15);
}
.modal .field select option { color: var(--ink); }

.lead-form { display: grid; gap: 12px; }
.lead-form__error { color: #ffb4b0; font-size: 0.92rem; margin: 0; }
.section--light .lead-form__error { color: #b3261e; }
.lead-form__success { color: #c9f2d6; margin: 0; }
.lead-form__consent { font-size: 0.8rem; color: var(--muted-d); margin: 0; }
.lead-form__consent a { color: inherit; }
.lead-form.is-sent .field, .lead-form.is-sent button[type="submit"] { display: none; }

/* ---------- Шапка ---------- */
.site-header {
	position: fixed; top: var(--adminbar); left: 0; right: 0; z-index: 900;
	height: var(--header-h); color: #fff;
	transition: background 0.5s var(--ease), backdrop-filter 0.5s, box-shadow 0.5s, transform 0.5s var(--ease);
}
.site-header::after {
	content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent); opacity: 0; transition: opacity 0.5s;
}
.site-header.is-scrolled { background: rgba(29, 30, 32, 0.78); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
.site-header.is-scrolled::after { opacity: 1; }
.site-header.is-hidden { transform: translateY(-110%); }
.site-header__inner { height: 100%; display: flex; align-items: center; gap: 28px; }
/* На комп'ютері шапка на всю ширину екрана (не обмежена контейнером), меню отримує більше простору */
@media (min-width: 1041px) {
	.site-header__inner.container { max-width: none; width: 100%; padding-left: clamp(24px, 3vw, 56px); padding-right: clamp(24px, 3vw, 56px); }
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; flex-shrink: 0; }
.brand__mark { height: 40px; width: auto; }
.brand__word { height: 32px; width: auto; }
.site-header--over:not(.is-scrolled) .brand { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.brand { transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }

/* Меню розтягнуте на весь простір між логотипом і телефоном, пункти рівномірно */
.site-nav { flex: 1 1 auto; min-width: 0; margin: 0 clamp(8px, 2vw, 40px) 0 clamp(16px, 4vw, 72px); }
.site-nav__list { display: flex; justify-content: space-between; gap: 14px; list-style: none; max-width: 860px; margin: 0 auto; }
.site-nav__list a {
	position: relative; display: block; padding: 8px 0; color: rgba(255, 255, 255, 0.78);
	text-decoration: none; font-size: 0.97rem; transition: color 0.3s; white-space: nowrap;
}
.site-nav__list a::after {
	content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor;
	transform: scaleX(0); transform-origin: right; transition: transform 0.45s var(--ease);
}
.site-nav__list a:hover, .site-nav__list .current-menu-item > a { color: #fff; }
.site-nav__list a:hover::after { transform: scaleX(1); transform-origin: left; }

.site-header__actions { display: flex; align-items: center; gap: 14px; }
.header-phone { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.header-phone .icon { width: 18px; height: 18px; opacity: 0.8; }

.burger { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-d); background: transparent; position: relative; }
.burger span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: #fff; transition: transform 0.45s var(--ease), top 0.45s var(--ease); }
.burger span:nth-child(1) { top: 18px; }
.burger span:nth-child(2) { top: 26px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

/* Номер текстом тільки на широких екранах, інакше лише іконка (7 пунктів меню мають вміщатися в один рядок) */
@media (max-width: 1359px) { .header-phone span { display: none; } }
@media (max-width: 1040px) {
	.site-nav { display: none; }
	.burger { display: inline-block; }
	.site-header__actions { margin-left: auto; }
}
@media (max-width: 560px) {
	:root { --header-h: 64px; }
	.site-header__actions .btn { display: none; }
	.brand__word { height: 26px; }
	.brand__mark { height: 34px; }
}

/* ---------- Мобільне меню ---------- */
.mobile-menu {
	position: fixed; inset: 0; z-index: 850; background: var(--ink); color: #fff;
	clip-path: circle(0 at calc(100% - 44px) 38px); visibility: hidden;
	transition: clip-path 0.8s var(--ease-io), visibility 0s 0.8s;
	overflow-y: auto;
}
.mobile-menu.is-open { clip-path: circle(150% at calc(100% - 44px) 38px); visibility: visible; transition: clip-path 0.8s var(--ease-io), visibility 0s; }
.mobile-menu__inner { min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: calc(var(--header-h) + var(--adminbar) + 24px) var(--gutter) 40px; }
.mobile-menu__list { list-style: none; display: grid; gap: 4px; }
.mobile-menu__list a {
	display: block; font-size: clamp(1.9rem, 7vw, 2.6rem); font-weight: 300; letter-spacing: -0.02em; text-decoration: none; padding: 6px 0;
	opacity: 0; transform: translateY(18px); transition: opacity 0.5s, transform 0.6s var(--ease);
}
.mobile-menu.is-open .mobile-menu__list li a { opacity: 1; transform: none; }
.mobile-menu.is-open .mobile-menu__list li:nth-child(1) a { transition-delay: 0.2s; }
.mobile-menu.is-open .mobile-menu__list li:nth-child(2) a { transition-delay: 0.25s; }
.mobile-menu.is-open .mobile-menu__list li:nth-child(3) a { transition-delay: 0.3s; }
.mobile-menu.is-open .mobile-menu__list li:nth-child(4) a { transition-delay: 0.35s; }
.mobile-menu.is-open .mobile-menu__list li:nth-child(5) a { transition-delay: 0.4s; }
.mobile-menu.is-open .mobile-menu__list li:nth-child(6) a { transition-delay: 0.45s; }
.mobile-menu.is-open .mobile-menu__list li:nth-child(n+7) a { transition-delay: 0.5s; }
.mobile-menu__contacts { display: grid; gap: 16px; color: var(--muted-d); }
.mobile-menu__phone { font-size: 1.6rem; color: #fff; text-decoration: none; }
body.menu-open { overflow: hidden; }

/* ---------- Прелоадер ---------- */
.preloader {
	position: fixed; inset: 0; z-index: 10000; background: var(--ink);
	display: grid; place-items: center; color: #fff;
	transition: clip-path 1s var(--ease-io);
	clip-path: inset(0 0 0 0);
}
.preloader.is-done { clip-path: inset(0 0 100% 0); }
.preloader__logo { width: clamp(90px, 14vw, 130px); }
.preloader__logo svg { width: 100%; height: auto; }
html.no-js .preloader, html.no-preloader .preloader { display: none; }

/* Малювання логотипу лінією світла */
.logo-draw path {
	fill: transparent; stroke: currentColor; stroke-width: 7;
	stroke-dasharray: var(--len, 6000); stroke-dashoffset: var(--len, 6000);
}
.logo-draw.is-drawing path { animation: md-draw 1.6s var(--ease-io) forwards, md-fill 0.6s 1.3s ease forwards; }
.logo-draw.is-drawn path { fill: currentColor; stroke-dashoffset: 0; stroke-width: 0; }
@keyframes md-draw { to { stroke-dashoffset: 0; } }
@keyframes md-fill { to { fill: currentColor; stroke-width: 0; } }

/* ---------- Hero ---------- */
.hero {
	position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
	background: var(--ink); color: #fff; display: flex; flex-direction: column; justify-content: center;
	padding: calc(var(--header-h) + var(--adminbar) + 40px) 0 90px;
	isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: -3; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; }
.hero__slide.is-active { opacity: 1; }
.hero__slide img, .hero__slide video { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; transform: scale(1.12); }
.hero__bg { -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.25) 38%, #000 70%); mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.25) 38%, #000 70%); }
@media (max-width: 960px) { .hero__bg { -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 75%); mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 75%); } }
.hero__slide.is-active img, .hero__slide.is-active video { animation: md-kenburns 16s ease-out forwards; }
@keyframes md-kenburns { from { transform: scale(1.12); } to { transform: scale(1.02); } }
.hero__scrim {
	position: absolute; inset: 0; z-index: -2;
	background:
		linear-gradient(90deg, rgba(29, 30, 32, 0.96) 0%, rgba(29, 30, 32, 0.86) 42%, rgba(29, 30, 32, 0.62) 100%),
		linear-gradient(0deg, rgba(29, 30, 32, 0.9), transparent 40%);
}
.hero__spot {
	position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background: radial-gradient(520px circle at var(--mx, 30%) var(--my, 40%), rgba(var(--glow-rgb), 0.11), transparent 60%);
	transition: background 0.2s;
}

/* Вертикальна вивіска «СТОМАТОЛОГІЯ», як на фасаді */
.hero__sign {
	position: absolute; left: max(14px, calc((100vw - var(--container)) / 2 - 76px)); top: 50%; transform: translateY(-46%);
	display: flex; flex-direction: column; align-items: center; gap: 2px;
	padding: 18px 10px; border-radius: 6px;
	background: linear-gradient(180deg, rgba(61, 61, 61, 0.55), rgba(43, 44, 46, 0.55));
	border: 1px solid rgba(255, 255, 255, 0.08);
	font-weight: 600; font-size: 1.05rem; line-height: 1.12;
}
.hero__sign span {
	color: rgba(255, 255, 255, 0.12);
	animation: md-ignite 0.9s calc(1.9s + var(--i) * 0.06s) steps(1, end) forwards;
}
@keyframes md-ignite {
	0% { color: rgba(255, 255, 255, 0.12); text-shadow: none; }
	20% { color: #fff; text-shadow: 0 0 8px rgba(var(--glow-rgb), 0.9); }
	35% { color: rgba(255, 255, 255, 0.25); text-shadow: none; }
	55%, 100% { color: #fff; text-shadow: 0 0 6px rgba(var(--glow-rgb), 0.95), 0 0 18px rgba(var(--glow-rgb), 0.55); }
}
html.no-preloader .hero__sign span { animation-delay: calc(0.5s + var(--i) * 0.06s); }
@media (max-width: 1400px) { .hero__sign { display: none; } }

.hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 420px); gap: clamp(32px, 6vw, 96px); align-items: end; }
.hero__logo { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); margin-bottom: clamp(28px, 4vw, 48px); color: #fff; }
.hero__mark { height: clamp(78px, 9vw, 124px); width: auto; filter: drop-shadow(0 0 10px rgba(var(--glow-rgb), 0.75)) drop-shadow(0 0 34px rgba(var(--glow-rgb), 0.35)); }
/* Без анімації filter: Safari на iPhone «застрягав» у розмитті */
.hero__word { height: clamp(46px, 5.4vw, 74px); width: auto; filter: drop-shadow(0 0 8px rgba(var(--glow-rgb), 0.55)); opacity: 0; transform: translateX(-12px); clip-path: inset(0 100% 0 0); transition: opacity 0.9s var(--ease), transform 1s var(--ease), clip-path 1.2s var(--ease-io); }
.hero.is-lit .hero__word { opacity: 1; transform: none; clip-path: inset(0 -20% 0 0); }
.hero__badge { display: inline-flex; align-items: center; gap: 8px; color: var(--muted-d); font-size: 0.98rem; margin-bottom: 18px; }
.hero__badge .icon { width: 17px; height: 17px; }
.hero__title { font-size: clamp(2.9rem, 7.2vw, 6.4rem); font-weight: 250; line-height: 0.98; letter-spacing: -0.04em; margin-bottom: 24px; }
.hero__lead { font-size: clamp(1.05rem, 1.4vw, 1.22rem); color: rgba(238, 240, 242, 0.82); max-width: 52ch; }

.hero__card {
	position: relative; padding: clamp(22px, 2.5vw, 30px); border-radius: var(--radius-l);
	background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035));
	border: 1px solid rgba(255, 255, 255, 0.14);
	-webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
	box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}
.hero__card::before {
	content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
	background: linear-gradient(140deg, rgba(var(--glow-rgb), 0.7), transparent 35%, transparent 70%, rgba(var(--glow-rgb), 0.35));
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.hero__card-title { font-size: 1.35rem; font-weight: 400; margin-bottom: 6px; }
.hero__card-text { font-size: 0.95rem; color: var(--muted-d); margin-bottom: 18px; }
.hero__messengers { display: flex; align-items: center; gap: 12px; margin: 18px 0; padding-top: 18px; border-top: 1px solid var(--line-d); color: var(--muted-d); font-size: 0.92rem; flex-wrap: wrap; }
.hero__messengers .social { width: 42px; height: 42px; }
.hero__contacts { list-style: none; display: grid; gap: 8px; font-size: 0.95rem; }
.hero__contacts a, .hero__contacts span { display: inline-flex; align-items: center; gap: 10px; color: rgba(238, 240, 242, 0.9); text-decoration: none; }
.hero__contacts a:hover { color: #fff; }
.hero__contacts .icon { width: 17px; height: 17px; opacity: 0.7; }

.hero__scroll { position: absolute; left: 50%; bottom: 26px; width: 26px; height: 42px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 14px; transform: translateX(-50%); }
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 2px; height: 8px; margin-left: -1px; border-radius: 2px; background: #fff; animation: md-scroll 2s infinite; }
@keyframes md-scroll { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* Послідовність появи першого екрана */
.js .hero [data-hero-step] { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.js .hero.is-lit [data-hero-step] { opacity: 1; transform: none; }
.js .hero.is-lit [data-hero-step]:nth-of-type(1) { transition-delay: 0.1s; }
.js .hero.is-lit .hero__title { transition-delay: 0.2s; }
.js .hero.is-lit .hero__lead { transition-delay: 0.32s; }
.js .hero.is-lit .hero__card { transition-delay: 0.45s; }

@media (max-width: 960px) {
	.hero { min-height: auto; padding-bottom: 60px; }
	.hero__grid { grid-template-columns: 1fr; }
	.hero__scroll { display: none; }
	.hero__scrim { background: linear-gradient(180deg, rgba(29, 30, 32, 0.85), rgba(29, 30, 32, 0.95)); }
}
@media (max-width: 560px) {
	.hero { padding-top: calc(var(--header-h) + var(--adminbar) + 28px); }
	.hero__logo { gap: 14px; }
	.hero__mark { height: 72px; }
	.hero__word { height: 44px; }
	.hero__title { font-size: clamp(2.6rem, 12vw, 3.4rem); }
}

/* ---------- Послуги ---------- */
.services-list { list-style: none; border-top: 1px solid var(--line-l); }
.service-row { border-bottom: 1px solid var(--line-l); }
.service-row__btn {
	position: relative; isolation: isolate; width: 100%; display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr) 180px 48px; gap: 12px 40px; align-items: center;
	padding: 28px clamp(8px, 1.5vw, 24px); border: 0; background: transparent; text-align: left; color: var(--text-l);
	transition: color 0.45s var(--ease), padding 0.5s var(--ease);
}
.service-row__btn::before {
	content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink);
	transform: scaleY(0); transform-origin: bottom; transition: transform 0.55s var(--ease);
	border-radius: 2px;
}
.service-row__btn:hover, .service-row__btn:focus-visible { color: #fff; padding-left: clamp(16px, 2.5vw, 40px); }
.service-row__btn:hover::before, .service-row__btn:focus-visible::before { transform: scaleY(1); transform-origin: top; }
.service-row__title { font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 400; letter-spacing: -0.015em; line-height: 1.2; }
.service-row__text { font-size: 0.97rem; color: var(--muted-l); transition: color 0.45s; }
.service-row__btn:hover .service-row__text { color: var(--muted-d); }
.service-row__price { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.service-row__icon { width: 48px; height: 48px; border-radius: 50%; border: 1px solid currentColor; display: grid; place-items: center; opacity: 0.6; transition: transform 0.5s var(--ease), opacity 0.3s, box-shadow 0.4s; }
.service-row__btn:hover .service-row__icon { transform: rotate(90deg); opacity: 1; box-shadow: 0 0 18px rgba(var(--glow-rgb), 0.5); }
@media (max-width: 900px) {
	.service-row__btn { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 22px 4px; }
	.service-row__btn:hover { padding-left: 14px; }
	.service-row__title { grid-column: 1; }
	.service-row__icon { grid-column: 2; grid-row: 1 / span 2; width: 40px; height: 40px; }
	.service-row__text { grid-column: 1; grid-row: 2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
	.service-row__price { grid-column: 1; grid-row: 3; text-align: left; }
}

/* ---------- Бічна панель послуги ---------- */
.side-panel { position: fixed; inset: 0; z-index: 1000; }
.side-panel[hidden] { display: none; }
.side-panel__overlay { position: absolute; inset: 0; background: rgba(15, 16, 17, 0.55); opacity: 0; transition: opacity 0.5s; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.side-panel__dialog {
	position: absolute; top: 0; right: 0; bottom: 0; width: min(580px, 100%);
	background: var(--paper); color: var(--text-l); overflow-y: auto; overscroll-behavior: contain;
	padding: calc(var(--adminbar) + 72px) clamp(22px, 4vw, 48px) 40px;
	transform: translateX(100%); transition: transform 0.65s var(--ease);
	display: flex; flex-direction: column;
}
.side-panel.is-open .side-panel__overlay { opacity: 1; }
.side-panel.is-open .side-panel__dialog { transform: none; }
.side-panel__close { position: absolute; top: calc(var(--adminbar) + 18px); right: 18px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-l); background: transparent; display: grid; place-items: center; }
.side-panel__close:hover { background: var(--ink); color: #fff; }
.side-panel__body > * { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.7s var(--ease); }
.side-panel.is-open .side-panel__body > * { opacity: 1; transform: none; }
.side-panel.is-open .side-panel__body > *:nth-child(2) { transition-delay: 0.08s; }
.side-panel.is-open .side-panel__body > *:nth-child(3) { transition-delay: 0.14s; }
.side-panel.is-open .side-panel__body > *:nth-child(4) { transition-delay: 0.2s; }
.side-panel.is-open .side-panel__body > *:nth-child(5) { transition-delay: 0.26s; }
.service-panel__img { border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; }
.service-panel__title { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 300; letter-spacing: -0.03em; margin-bottom: 16px; }
.service-panel__text { color: var(--muted-l); margin-bottom: 24px; }
.service-panel__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.side-panel__all { margin-top: auto; padding-top: 32px; color: var(--muted-l); font-size: 0.95rem; }
body.panel-open { overflow: hidden; }

/* ---------- Рядки цін ---------- */
.price-lines { list-style: none; }
.price-lines li {
	display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: baseline;
	padding: 12px 0; border-bottom: 1px dashed var(--line-l);
}
.nowrap { white-space: nowrap; }
/* Номер телефону ніде не розривається між рядками (у статтях, футері, кнопках) */
a[href^="tel:"] { white-space: nowrap; }
.price-lines__price { font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-lines--big li { padding: 15px 4px; transition: background 0.3s; }
.price-lines--big li:hover { background: rgba(29, 30, 32, 0.035); }
.price-lines mark { background: rgba(29, 30, 32, 0.12); color: inherit; border-radius: 2px; padding: 0; box-shadow: 0 0 0 2px rgba(29, 30, 32, 0.12); }

/* ---------- Про клініку ---------- */
.about__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 110px); align-items: center; }
.about__media { position: relative; padding-bottom: 18%; }
.about__img { margin: 0; overflow: hidden; border-radius: var(--radius-l); background: var(--graphite); }
.about__img img { width: 100%; height: 100%; object-fit: cover; }
.about__img--main { aspect-ratio: 4 / 5; }
.about__img--main img { transform: scale(1.12); }
.about__img--small {
	position: absolute; right: -6%; bottom: 0; width: 52%; aspect-ratio: 4 / 3;
	border: 8px solid var(--ink); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}
.about__body .section-title { margin-bottom: 28px; }
.about__text { color: rgba(238, 240, 242, 0.8); font-size: 1.08rem; }
.about__points { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--line-d); }
.about__points li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.98rem; line-height: 1.45; }
.about__points .icon { margin-top: 2px; width: 20px; height: 20px; color: var(--glow); filter: drop-shadow(0 0 6px rgba(var(--glow-rgb), 0.7)); }
@media (max-width: 900px) {
	.about__grid { grid-template-columns: 1fr; }
	.about__media { max-width: 560px; }
	.about__img--small { right: 0; }
}
@media (max-width: 560px) { .about__points { grid-template-columns: 1fr; } }

/* Слайдер великого фото «Про клініку»: фото і відео, стрілки, крапки з прогресом автогортання */
.about-slider { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; touch-action: pan-y; }
.about-slider__slide {
	position: absolute; inset: 0; opacity: 0; visibility: hidden; transform: scale(1.08);
	transition: opacity 1s var(--ease), transform 1.6s var(--ease), visibility 0s 1s;
}
.about-slider__slide.is-active { opacity: 1; visibility: visible; transform: scale(1); transition: opacity 1s var(--ease), transform 1.6s var(--ease), visibility 0s; z-index: 1; }
.about-slider__slide img, .about-slider__slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.about__img--slider { position: relative; }
.about-slider__ui {
	position: absolute; left: 16px; top: 16px; z-index: 3; display: flex; align-items: center; gap: 6px; padding: 5px;
	border-radius: 999px; background: rgba(18, 19, 20, 0.38); border: 1px solid rgba(255, 255, 255, 0.18);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.about-slider__arrow {
	width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: #fff;
	display: grid; place-items: center; cursor: pointer; transition: background-color 0.3s, transform 0.3s var(--ease);
}
.about-slider__arrow:hover { background: rgba(255, 255, 255, 0.16); }
.about-slider__arrow:active { transform: scale(0.92); }
.about-slider__arrow .icon { width: 20px; height: 20px; }
.about-slider__dots { display: flex; gap: 6px; padding: 0 4px; }
.about-slider__dot { position: relative; width: 22px; height: 4px; padding: 0; border: 0; border-radius: 4px; background: rgba(255, 255, 255, 0.3); overflow: hidden; cursor: pointer; transition: width 0.4s var(--ease); }
.about-slider__dot.is-active { width: 40px; }
.about-slider__dot span { position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.about-slider__dot.is-active span { transform: scaleX(1); }
.about-slider.is-playing .about-slider__dot.is-active span { transform: scaleX(0); animation: md-slide-progress var(--slide-ms, 6000ms) linear forwards; }
.about-slider.is-paused .about-slider__dot.is-active span { animation-play-state: paused; }
@keyframes md-slide-progress { to { transform: scaleX(1); } }
.js .about__img--slider[data-reveal-img] > .about-slider { transform: none; }
@media (prefers-reduced-motion: reduce) { .about-slider__slide { transition: opacity 0.3s; transform: none; } }

/* Перший візит: послідовність */
.steps { margin-top: clamp(90px, 10vw, 150px); }
.steps__title { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 300; margin-bottom: 48px; }
.steps__track { position: relative; }
.steps__list { list-style: none; display: grid; grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr)); gap: 36px; }
.steps__line { position: absolute; left: 22px; right: 0; top: 22px; height: 1px; background: var(--line-d); }
.steps__line-fill { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(var(--glow-rgb), 0.2), #fff); box-shadow: 0 0 12px rgba(var(--glow-rgb), 0.8); transform: scaleX(var(--p, 0)); transform-origin: left; }
.steps__item { position: relative; }
.steps__num {
	position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
	background: var(--ink); border: 1px solid var(--line-d); font-weight: 500; margin-bottom: 22px;
	transition: border-color 0.5s, box-shadow 0.5s, background 0.5s, color 0.5s;
}
.steps__item.is-reached .steps__num { background: #fff; color: var(--ink); border-color: #fff; box-shadow: 0 0 22px rgba(var(--glow-rgb), 0.7); }
.steps__name { font-size: 1.2rem; font-weight: 500; margin-bottom: 8px; }
.steps__text { color: var(--muted-d); font-size: 0.97rem; }
@media (max-width: 900px) {
	.steps__list { grid-template-columns: 1fr; gap: 28px; padding-left: 64px; }
	.steps__line { left: 22px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
	.steps__line-fill { transform: scaleY(var(--p, 0)); transform-origin: top; }
	.steps__num { position: absolute; left: -64px; top: -6px; }
}

/* ---------- Ціни ---------- */
.prices__search {
	position: relative; display: flex; align-items: center; gap: 12px; margin-bottom: 28px;
	background: #fff; border: 1px solid var(--line-l); border-radius: 999px; padding: 6px 22px;
	transition: box-shadow 0.4s, border-color 0.3s;
}
.prices__search:focus-within { border-color: var(--ink); box-shadow: 0 12px 40px -18px rgba(29, 30, 32, 0.35); }
.prices__search .icon { width: 22px; height: 22px; opacity: 0.6; }
.prices__search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 14px 0; font-size: 1.1rem; outline: none; }
.prices__search input::-webkit-search-cancel-button { cursor: pointer; }
.prices__count { color: var(--muted-l); font-size: 0.9rem; white-space: nowrap; }
.prices__layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.prices__tabs { position: sticky; top: calc(var(--header-h) + var(--adminbar) + 20px); display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - var(--header-h) - 60px); overflow-y: auto; scrollbar-width: thin; }
.prices__tab {
	display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%;
	padding: 11px 16px; border: 0; border-radius: 12px; background: transparent; text-align: left; font-size: 0.97rem; line-height: 1.35; color: var(--muted-l);
	transition: background 0.3s, color 0.3s;
}
.prices__tab small { font-size: 0.8rem; opacity: 0.7; font-variant-numeric: tabular-nums; }
.prices__tab:hover { color: var(--ink); background: rgba(29, 30, 32, 0.05); }
.prices__tab.is-active { background: var(--ink); color: #fff; }
.prices__panels { min-height: 420px; background: #fff; border-radius: var(--radius-l); padding: clamp(20px, 3vw, 40px); }
.prices__panel { display: none; }
.prices__panel.is-active { display: block; animation: md-panel 0.6s var(--ease); }
@keyframes md-panel { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.prices__cat { font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 300; margin-bottom: 14px; }
.prices.is-searching .prices__panel { display: block; animation: none; margin-bottom: 28px; }
.prices.is-searching .prices__panel.is-empty, .prices.is-searching .price-lines li.is-hidden { display: none; }
.prices.is-searching .prices__tabs { opacity: 0.35; pointer-events: none; }
.prices__empty { color: var(--muted-l); }
.prices__foot { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 32px; flex-wrap: wrap; }
.prices__note { color: var(--muted-l); font-size: 0.93rem; max-width: 60ch; margin: 0; }
.prices__foot-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 960px) {
	.prices__layout { grid-template-columns: 1fr; }
	.prices__tabs {
		position: static; flex-direction: row; overflow-x: auto; max-height: none; gap: 6px;
		margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 6px; scroll-snap-type: x proximity;
		scrollbar-width: none;
	}
	.prices__tabs::-webkit-scrollbar { display: none; }
	.prices__tab { width: auto; flex-shrink: 0; white-space: nowrap; border: 1px solid var(--line-l); border-radius: 999px; padding: 9px 16px; scroll-snap-align: start; }
	.prices__tab small { display: none; }
	.prices__count { display: none; }
}

/* ---------- Наша команда ---------- */
.team-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 5vw, 72px) clamp(20px, 3vw, 40px); }
.team-grid--1 { grid-template-columns: minmax(0, 380px); }
.team-grid--2 { grid-template-columns: repeat(2, minmax(0, 380px)); }
.team-card { position: relative; margin: 0; }
.team-card--mid { margin-top: clamp(40px, 7vw, 110px); } /* середня колонка зміщена вниз: «сходинки» */
.team-card__photo {
	position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-l); overflow: hidden;
	background: var(--graphite); margin-bottom: 22px; isolation: isolate;
}
.team-card__photo::after { /* легкий графітовий відблиск знизу */
	content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background: linear-gradient(180deg, transparent 55%, rgba(18, 19, 20, 0.45));
	opacity: 0.9; transition: opacity 0.7s var(--ease);
}
.team-card__photo img, .team-card__photo .img-placeholder { width: 100%; height: 100%; object-fit: cover; }
/* Роль у клініці (напр. «Засновник клініки»): скляна плашка з легким світінням на фото */
.team-card__role {
	position: absolute; left: 14px; bottom: 14px; z-index: 2; max-width: calc(100% - 28px);
	display: inline-flex; align-items: center; gap: 8px;
	padding: 8px 14px 8px 12px; border-radius: 999px;
	font-size: 0.74rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.2; color: #fff;
	background: rgba(29, 30, 32, 0.55); border: 1px solid rgba(255, 255, 255, 0.28);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	box-shadow: 0 0 22px rgba(var(--glow-rgb), 0.28);
}
.team-card__role::before {
	content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%;
	background: var(--glow); box-shadow: 0 0 8px rgba(var(--glow-rgb), 0.95);
}
.team-card__photo img { filter: grayscale(0.4) contrast(1.02); }
.team-card__photo img, .js .team-card__photo[data-reveal-img] > img { transition: transform 1.2s var(--ease), filter 0.8s var(--ease), clip-path 1.3s var(--ease-io); }
.team-card__name { margin: 0 0 14px; font-weight: 300; line-height: 1.1; letter-spacing: -0.02em; }
.team-card__surname { display: block; font-size: clamp(1.5rem, 2.2vw, 1.95rem); color: #fff; }
.team-card__given { display: block; font-size: clamp(1rem, 1.3vw, 1.15rem); color: var(--muted-d); margin-top: 4px; letter-spacing: 0; }
.team-card__specs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.team-card__specs li {
	font-size: 0.82rem; line-height: 1.2; padding: 7px 12px; border-radius: 999px;
	border: 1px solid var(--line-d); color: var(--text-d);
	transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease), color 0.5s var(--ease);
}
.team-card__specs li::first-letter { text-transform: uppercase; }
/* Наведення (тільки миша): фото оживає в кольорі, бейджі світлішають */
@media (hover: hover) {
	.team-card:hover .team-card__photo img { filter: none; }
	.js .team-card:hover [data-reveal-img].is-in > img, .team-card:hover .team-card__photo img { transform: scale(1.1); }
	.team-card:hover .team-card__photo::after { opacity: 0.4; }
	.team-card:hover .team-card__specs li { border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.06); }
}
/* Телефон: фото одразу в кольорі (наведення немає) */
@media (hover: none) { .team-card__photo img { filter: none; } }
/* Кнопка під командою: відступ з урахуванням опущеної середньої колонки */
.team__more { margin-top: calc(clamp(40px, 7vw, 110px) + clamp(56px, 6vw, 88px)); }
@media (max-width: 992px) {
	.team__more { margin-top: 56px; }
	.team-grid, .team-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.team-card--mid { margin-top: 0; translate: none !important; }
}
@media (max-width: 560px) {
	.team-grid { gap: 32px 14px; }
	.team-card__photo { border-radius: var(--radius); margin-bottom: 14px; }
	.team-card__surname { font-size: 1.2rem; }
	.team-card__given { font-size: 0.92rem; }
	.team-card__name { margin-bottom: 10px; }
	.team-card__specs { gap: 6px; }
	.team-card__specs li { font-size: 0.72rem; padding: 5px 9px; }
	.team-card__role { left: 8px; bottom: 8px; max-width: calc(100% - 16px); white-space: nowrap; font-size: 0.56rem; letter-spacing: 0.06em; padding: 5px 9px 5px 8px; gap: 5px; }
	.team-card__role::before { width: 5px; height: 5px; }
}

.team-list { display: flex; flex-direction: column; gap: 56px; }
.team-doctor { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.team-doctor__photo { display: block; aspect-ratio: 4 / 5; border-radius: var(--radius-l); overflow: hidden; background: var(--mist); }
.team-doctor__photo img, .team-doctor__photo .img-placeholder { width: 100%; height: 100%; object-fit: cover; }
.team-doctor__name { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 300; margin-bottom: 14px; }
.team-doctor__name a { text-decoration: none; }
.team-doctor__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.team-doctor__tags .chip:hover { background: transparent; color: inherit; border-color: var(--line-l); }
.team-doctor__exp { color: var(--muted-l); }
.team-doctor__bio { margin-bottom: 18px; }
.team-doctor__quote { font-size: 1.15rem; font-weight: 300; border-left: 2px solid var(--ink); padding-left: 18px; margin: 18px 0 24px; }
@media (max-width: 700px) {
	.team-doctor { grid-template-columns: 1fr; }
	.team-doctor__photo { max-width: 320px; }
}
.doctor { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.doctor__photo { aspect-ratio: 4 / 5; border-radius: var(--radius-l); overflow: hidden; background: var(--mist); }
.doctor__photo img, .doctor__photo .img-placeholder { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 800px) { .doctor { grid-template-columns: 1fr; } }

.img-placeholder { display: grid !important; place-items: center; width: 100%; height: 100%; background: linear-gradient(160deg, var(--brand), var(--ink)); color: rgba(255, 255, 255, 0.5); }
.img-placeholder__mark { width: 34%; height: auto; }

/* Лайтбокс лікаря */
.team-lightbox { position: fixed; inset: 0; z-index: 1100; display: none; align-items: center; justify-content: center; padding: 2rem; }
.team-lightbox.is-open { display: flex; }
.team-lightbox__overlay { position: absolute; inset: 0; background: rgba(15, 16, 17, 0.75); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.team-lightbox__dialog { position: relative; width: 100%; max-width: 860px; max-height: 100%; animation: md-pop 0.5s var(--ease); }
@keyframes md-pop { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: none; } }
.team-lightbox__card { max-height: calc(100vh - 4rem); overflow-y: auto; display: grid; grid-template-columns: 300px minmax(0, 1fr); background: #fff; color: var(--text-l); border-radius: var(--radius-l); }
.team-lightbox__photo { background: var(--mist); }
.team-lightbox__photo img { width: 100%; height: 100%; object-fit: cover; }
.team-lightbox__body { padding: clamp(24px, 3vw, 40px); }
.team-lightbox__name { font-size: 1.8rem; font-weight: 300; margin-bottom: 6px; }
.team-lightbox__pos { color: var(--muted-l); margin-bottom: 18px; }
.team-lightbox__close, .team-lightbox__arrow { position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); display: grid; place-items: center; z-index: 2; }
.team-lightbox__close { top: -14px; right: -14px; }
.team-lightbox__arrow { top: 50%; transform: translateY(-50%); }
.team-lightbox__arrow[hidden] { display: none; }
.team-lightbox__photo { min-height: 260px; }
.team-lightbox__photo.img-placeholder { background: linear-gradient(160deg, var(--brand), var(--ink)); }
.team-lightbox__arrow--prev { left: -64px; }
.team-lightbox__arrow--next { right: -64px; }
@media (max-width: 1000px) { .team-lightbox__arrow--prev { left: 6px; } .team-lightbox__arrow--next { right: 6px; } .team-lightbox__close { right: 6px; top: 6px; } }
@media (max-width: 700px) {
	.team-lightbox { padding: 1rem; }
	.team-lightbox__card { grid-template-columns: 1fr; }
	.team-lightbox__photo { aspect-ratio: 16 / 10; }
	.team-lightbox__photo img { object-fit: contain; }
	.team-lightbox__arrow { top: auto; bottom: 10px; transform: none; }
}

/* ---------- Відгуки ---------- */
.reviews__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr); gap: 32px 64px; align-items: center; }
.reviews__head .section-title { margin-bottom: 22px; }
.rating-card { background: var(--ink); color: #fff; border-radius: var(--radius-l); padding: clamp(28px, 3vw, 40px); position: relative; overflow: hidden; }
.rating-card::before { content: ''; position: absolute; width: 260px; height: 260px; right: -80px; top: -80px; background: radial-gradient(circle, rgba(var(--glow-rgb), 0.25), transparent 70%); }
.rating-card__score { display: flex; align-items: center; gap: 18px; margin-bottom: 10px; }
.rating-card__num { font-size: clamp(4rem, 7vw, 5.6rem); font-weight: 200; line-height: 1; letter-spacing: -0.04em; }
.rating-card__stars { display: flex; gap: 3px; color: #fff; filter: drop-shadow(0 0 6px rgba(var(--glow-rgb), 0.8)); }
.rating-card__stars .icon { width: 22px; height: 22px; }
.rating-card__label { display: flex; align-items: center; gap: 10px; color: var(--muted-d); margin-bottom: 24px; }
.rating-card .btn--dark { --b-bg: #fff; --b-fg: var(--ink); }
.rating-card .btn--dark:hover { box-shadow: 0 0 28px rgba(var(--glow-rgb), 0.55); }
.reviews__track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 380px); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 56px 0 8px; scrollbar-width: thin; }
.review-card { margin: 0; background: #fff; border-radius: var(--radius); padding: 28px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 16px; }
.review-card__stars { display: flex; gap: 2px; }
.review-card__stars .icon { width: 16px; height: 16px; }
.review-card blockquote { margin: 0; flex: 1; }
.review-card figcaption { display: flex; flex-direction: column; font-size: 0.95rem; }
.review-card figcaption span { color: var(--muted-l); font-size: 0.85rem; }
@media (max-width: 860px) { .reviews__grid { grid-template-columns: 1fr; } }
/* Віджет відгуків Google (Trustindex): обгортка в стилі сайту; тонке підлаштування після перегляду на живому сайті */
.reviews__aside { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.reviews__aside .btn .icon { width: 18px; height: 18px; margin-right: 8px; }
.reviews__widget { min-height: 220px; }
/* Картки Trustindex під стиль сайту (плагін ставить !important, тому й тут !important) */
.reviews__widget .ti-widget.ti-goog .ti-review-item { padding-left: 10px !important; padding-right: 10px !important; }
.reviews__widget .ti-widget.ti-goog .ti-review-item > .ti-inner {
	background: var(--ink) !important; border: 1px solid rgba(255, 255, 255, 0.06) !important; border-radius: var(--radius-l) !important;
	padding: 26px 24px 22px !important; transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease) !important;
}
.reviews__widget .ti-widget.ti-goog .ti-review-item > .ti-inner:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -24px rgba(29, 30, 32, 0.55) !important; }
.reviews__widget .ti-widget.ti-goog .ti-name { font-weight: 500 !important; }
.reviews__widget .ti-widget.ti-goog .ti-date { color: var(--muted-d) !important; }
.reviews__widget .ti-widget.ti-goog .ti-review-text-container { color: #e9eaeb !important; }
.reviews__widget .ti-widget.ti-goog .ti-read-more, .reviews__widget .ti-widget.ti-goog .ti-read-more span { color: var(--muted-d) !important; text-decoration: none !important; }
.reviews__widget .ti-widget.ti-goog .ti-next, .reviews__widget .ti-widget.ti-goog .ti-prev {
	width: 46px !important; height: 46px !important; border-radius: 50% !important; background: #fff !important; margin-top: -8px !important;
	box-shadow: 0 8px 24px -8px rgba(29, 30, 32, 0.35), 0 0 0 1px rgba(29, 30, 32, 0.08) !important; transition: transform 0.4s var(--ease) !important;
}
.reviews__widget .ti-widget.ti-goog .ti-next { right: -14px !important; }
.reviews__widget .ti-widget.ti-goog .ti-prev { left: -14px !important; }
.reviews__widget .ti-widget.ti-goog .ti-next:hover, .reviews__widget .ti-widget.ti-goog .ti-prev:hover { transform: scale(1.08); }
.reviews__widget .ti-widget.ti-goog .ti-next::before, .reviews__widget .ti-widget.ti-goog .ti-prev::before { border-color: var(--ink) !important; }
.reviews__widget .ti-widget.ti-goog .ti-rating-text strong { font-weight: 300 !important; font-size: 28px !important; letter-spacing: 0.04em !important; color: var(--ink) !important; }

/* ---------- Галерея ---------- */
.gallery-track {
	display: grid; grid-auto-flow: column; grid-auto-columns: clamp(260px, 32vw, 440px); gap: 18px;
	overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
	padding: 0 max(var(--gutter), calc((100vw - var(--container)) / 2));
	scroll-padding: 0 max(var(--gutter), calc((100vw - var(--container)) / 2));
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track__item { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; scroll-snap-align: start; }
.gallery-card { position: relative; display: block; width: 100%; border: 0; padding: 0; background: var(--graphite); cursor: zoom-in; overflow: hidden; }
.gallery-card img, .gallery-card video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.gallery-card:hover img { transform: scale(1.05); }
.gallery-card__play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.gallery-card__play .icon { width: 56px; height: 56px; padding: 16px; border-radius: 50%; background: rgba(29, 30, 32, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.slider-arrows { display: flex; gap: 8px; }
.slider-arrow { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-d); background: transparent; color: #fff; display: grid; place-items: center; transition: background 0.3s, color 0.3s; }
.slider-arrow:hover { background: #fff; color: var(--ink); }
.gallery-masonry { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.gallery-masonry__item { aspect-ratio: 4 / 3; border-radius: var(--radius); margin: 0; }
.gallery-masonry__item.is-hidden { display: none; }
@media (max-width: 900px) { .gallery-masonry { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gallery-masonry { grid-template-columns: 1fr; gap: 12px; } }

/* Лайтбокс медіа (головна) */
.media-lightbox { position: fixed; inset: 0; z-index: 1200; background: rgba(15, 16, 17, 0.94); display: flex; align-items: center; justify-content: center; padding: 60px 70px; }
.media-lightbox[hidden] { display: none; }
.media-lightbox__stage { max-width: 100%; max-height: 100%; display: flex; }
.media-lightbox__stage img, .media-lightbox__stage video { max-width: min(1400px, 100%); max-height: calc(100vh - 120px); border-radius: 12px; animation: md-pop 0.45s var(--ease); }
.media-lightbox__close, .media-lightbox__arrow { position: absolute; width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--line-d); background: rgba(29, 30, 32, 0.6); color: #fff; display: grid; place-items: center; }
.media-lightbox__close { top: calc(var(--adminbar) + 14px); right: 14px; }
.media-lightbox__arrow { top: 50%; transform: translateY(-50%); }
.media-lightbox__arrow--prev { left: 12px; }
.media-lightbox__arrow--next { right: 12px; }
@media (max-width: 600px) { .media-lightbox { padding: 60px 10px; } .media-lightbox__arrow { top: auto; bottom: 14px; transform: none; } }

/* ---------- FAQ ---------- */
.faq__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq__head { position: sticky; top: calc(var(--header-h) + var(--adminbar) + 30px); }
.faq__head .section-title { margin-bottom: 20px; }
.faq__head .section-lead { margin-bottom: 26px; }
.faq-item { border-bottom: 1px solid var(--line-l); }
.faq-item:first-child { border-top: 1px solid var(--line-l); }
.faq-item summary {
	display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 0;
	cursor: pointer; list-style: none; font-size: clamp(1.08rem, 1.5vw, 1.25rem); font-weight: 400; line-height: 1.35;
	transition: color 0.3s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--brand); }
.faq-item__icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-l); display: grid; place-items: center; transition: transform 0.5s var(--ease), background 0.3s, color 0.3s; }
.faq-item[open] .faq-item__icon { transform: rotate(45deg); background: var(--ink); color: #fff; border-color: var(--ink); }
.faq-item__answer { overflow: hidden; }
.faq-item__answer p { padding: 0 56px 26px 0; color: var(--muted-l); }
@media (max-width: 860px) {
	.faq__grid { grid-template-columns: 1fr; }
	.faq__head { position: static; }
	.faq-item__answer p { padding-right: 0; }
}

/* ---------- Статті ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.post-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease); }
.post-card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(29, 30, 32, 0.35); }
.post-card__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--mist); }
.post-card__img img, .post-card__img .img-placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.post-card:hover .post-card__img img { transform: scale(1.05); }
.post-card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.85rem; color: var(--muted-l); margin: 0; }
.post-card__title { font-size: 1.3rem; font-weight: 400; line-height: 1.25; }
.post-card__title a { text-decoration: none; }
.post-card__title a::after { content: ''; position: absolute; inset: 0; }
.post-card { position: relative; }
.post-card__excerpt { color: var(--muted-l); font-size: 0.96rem; margin: 0; }
@media (max-width: 960px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .post-grid { grid-template-columns: 1fr; } }

.pagination, .nav-links { display: flex; justify-content: center; gap: 6px; margin-top: 48px; flex-wrap: wrap; }
.page-numbers { min-width: 46px; height: 46px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 999px; border: 1px solid var(--line-l); text-decoration: none; }
.page-numbers.current, .page-numbers:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty-state { text-align: center; max-width: 640px; margin: 0 auto; display: grid; gap: 22px; justify-items: center; color: var(--muted-l); }
.admin-hint { background: #fff8d6; color: #5b4a00; border-radius: 12px; padding: 14px 18px; font-size: 0.95rem; }

/* ---------- Блок запису ---------- */
.cta { position: relative; overflow: hidden; background: var(--graphite); color: #fff; padding: clamp(72px, 9vw, 130px) 0; isolation: isolate; }
.cta__inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px 64px; align-items: center; }
.cta__glow { position: absolute; right: -4%; top: 50%; width: clamp(240px, 32vw, 460px); transform: translateY(-50%); color: #fff; opacity: 0.06; z-index: -1; filter: drop-shadow(0 0 30px rgba(var(--glow-rgb), 0.8)); pointer-events: none; }
.cta__glow svg { width: 100%; height: auto; }
.cta__title { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 300; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 18px; }
.cta__text p { color: var(--muted-d); max-width: 46ch; }
/* Форма запису в блоці CTA: ім'я і телефон в один рядок (обидва достатньо широкі), кнопка на всю ширину під ними */
.lead-form--row { grid-template-columns: minmax(0, 1fr) minmax(250px, 1.2fr); align-items: stretch; }
.lead-form--row > .btn { grid-column: 1 / -1; }
.lead-form--row input[type="tel"] { font-variant-numeric: tabular-nums; }
@media (min-width: 621px) and (max-width: 960px) {
	/* Блок на всю ширину: місця вистачає на три в ряд */
	.lead-form--row { grid-template-columns: minmax(160px, 1fr) minmax(250px, 1.2fr) auto; }
	.lead-form--row > .btn { grid-column: auto; }
}
.lead-form--row .lead-form__error, .lead-form--row .lead-form__success { grid-column: 1 / -1; }
@media (max-width: 960px) { .cta__inner { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .lead-form--row { grid-template-columns: 1fr; } }

/* ---------- Контакти ---------- */
.contacts__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: stretch; }
.contacts__info .section-title { margin-bottom: 20px; }
.contacts__info .section-lead { margin-bottom: 32px; }
.contacts__list { display: grid; gap: 0; border-top: 1px solid var(--line-l); }
.contacts__row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 20px; padding: 18px 0; border-bottom: 1px solid var(--line-l); margin: 0; }
.contacts__row a { text-decoration: none; }
.contacts__row a:hover { text-decoration: underline; }
.contacts__label { color: var(--muted-l); font-size: 0.92rem; padding-top: 2px; }
.contacts__phone { font-size: 1.35rem; font-weight: 500; }
.hours { list-style: none; display: grid; gap: 4px; }
.hours li { display: flex; justify-content: space-between; gap: 16px; }
.contacts__actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 30px; }
.contacts__map { position: relative; min-height: 520px; border-radius: var(--radius-l); overflow: hidden; background: var(--mist); }
.contacts__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05); transition: filter 0.8s; }
.contacts__map:hover iframe { filter: grayscale(0.2); }
.contacts__facade { position: absolute; left: 18px; bottom: 18px; width: 38%; max-width: 230px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; border: 5px solid #fff; box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.4); }
@media (max-width: 900px) {
	.contacts__grid { grid-template-columns: 1fr; }
	.contacts__map { min-height: 380px; }
	.contacts__row { grid-template-columns: 1fr; }
}

/* ---------- Футер ---------- */
.site-footer { background: var(--ink); color: var(--muted-d); padding: clamp(64px, 8vw, 110px) 0 32px; }
.site-footer__top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(270px, 1.3fr) minmax(0, 0.9fr); gap: 40px; padding-bottom: 56px; border-bottom: 1px solid var(--line-d); }
.site-footer__logo { display: inline-block; color: #fff; margin-bottom: 22px; }
.site-footer__logo-svg { width: 170px; height: auto; }
.site-footer__brand p { max-width: 34ch; font-size: 0.95rem; }
.site-footer__title { color: #fff; font-weight: 500; margin-bottom: 18px; }
.site-footer__links { list-style: none; display: grid; gap: 10px; font-size: 0.97rem; }
.site-footer__links a, .site-footer__links span { display: inline-flex; gap: 10px; align-items: flex-start; text-decoration: none; transition: color 0.3s; }
.site-footer__links a:hover { color: #fff; }
/* Іконка по центру першого рядка тексту, усі іконки в одну колонку однакової ширини */
.site-footer__contacts { line-height: 1.5; }
.site-footer__contacts .icon { width: 18px; height: 18px; margin-top: calc((1.5em - 18px) / 2); opacity: 0.7; flex: 0 0 18px; }
.site-footer__links .site-footer__txt { display: block; }
.site-footer__links .nowrap { display: inline; white-space: nowrap; }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 28px; font-size: 0.86rem; }
.site-footer__legal { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer__legal a { text-decoration: none; }
.site-footer__legal a:hover { color: #fff; }
@media (max-width: 1200px) { .site-footer__top { grid-template-columns: 1fr 1fr; } }

@media (max-width: 640px) { .site-footer__top { grid-template-columns: 1fr; } }
/* Пошта завжди в один рядок: колонка «Контакти» для цього достатньо широка */
.site-footer__contacts a[href^="mailto:"] .site-footer__txt { white-space: nowrap; }

/* ---------- Нижня панель дій (телефон) ---------- */
.action-bar { display: none; }
@media (max-width: 782px) {
	.action-bar {
		position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 800;
		display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 6px; padding: 6px;
		background: rgba(29, 30, 32, 0.88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
		border: 1px solid var(--line-d); border-radius: 22px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.5);
		transform: translateY(140%); transition: transform 0.6s var(--ease);
	}
	.action-bar.is-visible { transform: none; }
	.action-bar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 8px 4px; border: 0; border-radius: 16px; background: transparent; color: #fff; text-decoration: none; font-size: 0.74rem; }
	.action-bar__item .icon { width: 20px; height: 20px; }
	.action-bar__item--main { background: #fff; color: var(--ink); font-weight: 500; }
	.site-footer { padding-bottom: 110px; }
	body.modal-open .action-bar, body.panel-open .action-bar, body.menu-open .action-bar { transform: translateY(140%); }
}

/* ---------- Модальне вікно ---------- */
.modal { position: fixed; inset: 0; z-index: 1300; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__overlay { position: absolute; inset: 0; background: rgba(12, 13, 14, 0.7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.45s; }
.modal__dialog {
	position: relative; width: min(500px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; overflow-x: hidden;
	background: linear-gradient(165deg, #333436, var(--ink) 60%); color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--radius-l);
	padding: clamp(28px, 4vw, 42px);
	box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(var(--glow-rgb), 0.05);
	opacity: 0; transform: translateY(24px) scale(0.98); transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
.modal.is-open .modal__overlay { opacity: 1; }
.modal.is-open .modal__dialog { opacity: 1; transform: none; }
.modal__glow { position: absolute; right: -50px; top: -40px; width: 200px; opacity: 0.07; pointer-events: none; color: #fff; }
.modal__glow svg { width: 100%; height: auto; }
.modal__close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-d); background: transparent; color: #fff; display: grid; place-items: center; z-index: 2; }
.modal__close:hover { background: #fff; color: var(--ink); }
.modal__title { font-size: 1.9rem; font-weight: 300; letter-spacing: -0.02em; margin-bottom: 10px; }
.modal__text { color: var(--muted-d); margin-bottom: 22px; }
.modal__text a { color: #fff; }
.modal__step--done { text-align: center; padding: 20px 0; }
.modal__done-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: #fff; color: var(--ink); margin-bottom: 20px; box-shadow: 0 0 40px rgba(var(--glow-rgb), 0.6); }
.modal__done-icon .icon { width: 32px; height: 32px; }
body.modal-open { overflow: hidden; }

/* ---------- Банер внутрішньої сторінки ---------- */
.page-header {
	position: relative; overflow: hidden; isolation: isolate;
	background: var(--ink); color: #fff;
	padding: calc(var(--header-h) + var(--adminbar) + clamp(48px, 7vw, 100px)) 0 clamp(52px, 6vw, 90px);
}
.page-header__media { position: absolute; inset: 0; z-index: -2; }
.page-header__media img, .page-header__media video { width: 100%; height: 100%; object-fit: cover; }
.page-header--media::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(29, 30, 32, 0.92), rgba(29, 30, 32, 0.55)); }
.page-header__glow { position: absolute; right: max(var(--gutter), calc((100vw - var(--container)) / 2)); bottom: -40px; width: clamp(160px, 22vw, 300px); color: #fff; opacity: 0.07; z-index: -1; pointer-events: none; }
.page-header__glow svg { width: 100%; height: auto; }
.page-header__title { font-size: clamp(2.3rem, 5.2vw, 4.4rem); font-weight: 300; letter-spacing: -0.035em; line-height: 1.02; max-width: 20ch; }
.page-header__subtitle { margin-top: 20px; color: var(--muted-d); font-size: 1.12rem; max-width: 60ch; }
.page-header__meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 26px; color: var(--muted-d); font-size: 0.93rem; }
.page-header__meta span { display: inline-flex; align-items: center; gap: 8px; }
.page-header__meta a { color: #fff; }
.page-header__meta .icon { width: 16px; height: 16px; flex-shrink: 0; }
.page-header__meta .page-header__meta-txt { display: inline; }

/* Шапка статті з головним зображенням: фото на фоні, затемнення під текст, повільне наближення */
.page-header--article.page-header--media { min-height: clamp(420px, 62vh, 640px); display: flex; align-items: flex-end; }
.page-header--article.page-header--media .page-header__inner { width: 100%; }
.page-header--article.page-header--media::before {
	background:
		linear-gradient(90deg, rgba(20, 21, 23, 0.94) 0%, rgba(20, 21, 23, 0.82) 38%, rgba(20, 21, 23, 0.45) 72%, rgba(20, 21, 23, 0.3) 100%),
		linear-gradient(0deg, rgba(20, 21, 23, 0.85) 0%, rgba(20, 21, 23, 0) 45%);
}
.page-header--article .page-header__media img { animation: md-hero-zoom 18s var(--ease) both; transform-origin: 70% 40%; }
@keyframes md-hero-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.page-header--article.page-header--media .page-header__title { text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35); }
.page-header--article.page-header--media .page-header__subtitle,
.page-header--article.page-header--media .page-header__meta { color: rgba(255, 255, 255, 0.82); }
/* Контурний знак клініки лишається поверх фото, трохи яскравіше, щоб його було видно */
.page-header--article.page-header--media .page-header__glow { opacity: 0.16; }
@media (max-width: 760px) {
	/* На телефоні текст на всю ширину, тож затемнення рівномірне */
	.page-header--article.page-header--media::before { background: linear-gradient(0deg, rgba(20, 21, 23, 0.92) 0%, rgba(20, 21, 23, 0.72) 55%, rgba(20, 21, 23, 0.6) 100%); }
}
@media (prefers-reduced-motion: reduce) { .page-header--article .page-header__media img { animation: none; } }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.88rem; color: var(--muted-d); margin-bottom: 22px; }
.breadcrumbs li:not(:last-child)::after { content: '/'; margin-left: 6px; opacity: 0.5; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs li[aria-current] { color: rgba(255, 255, 255, 0.55); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Стаття ---------- */
.read-progress { position: fixed; top: var(--adminbar); left: 0; right: 0; height: 2px; z-index: 950; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: #fff; box-shadow: 0 0 10px rgba(var(--glow-rgb), 0.9); transform: scaleX(var(--p, 0)); transform-origin: left; }
.article { background: var(--marble); padding-bottom: clamp(60px, 8vw, 110px); }
.article__hero { padding-top: clamp(28px, 4vw, 48px); }
.article__hero img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: var(--radius-l); }
.article__grid { display: grid; grid-template-columns: 280px minmax(0, 760px); justify-content: center; gap: clamp(32px, 5vw, 80px); padding-top: clamp(40px, 5vw, 64px); }
.article__aside { position: sticky; top: calc(var(--header-h) + var(--adminbar) + 24px); align-self: start; display: grid; gap: 20px; }
/* Колонка завжди вміщається в екран: якщо зміст довгий, прокручується лише список змісту, а блок «Консультація лікаря» лишається видимим */
@media (min-width: 1001px) {
	.article__aside { display: flex; flex-direction: column; max-height: calc(100vh - var(--header-h) - var(--adminbar) - 48px); }
	.article__aside .aside-card { flex-shrink: 0; }
	.article__aside .toc { display: flex; flex-direction: column; min-height: 0; flex: 0 1 auto; }
	.article__aside .toc ol {
		min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(29, 30, 32, 0.25) transparent;
		margin-right: -8px; padding-right: 8px;
	}
	.article__aside .toc ol.is-scrollable:not(.is-end) { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 32px), transparent); }
	.article__aside .toc ol::-webkit-scrollbar { width: 4px; }
	.article__aside .toc ol::-webkit-scrollbar-thumb { background: rgba(29, 30, 32, 0.25); border-radius: 4px; }
}
.toc { background: #fff; border-radius: var(--radius); padding: 22px 22px 18px; }
.toc__title { font-weight: 500; margin-bottom: 10px; }
.toc ol { list-style: none; counter-reset: toc; display: grid; gap: 2px; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 6px 0; text-decoration: none; color: var(--muted-l); font-size: 0.93rem; line-height: 1.35; transition: color 0.3s; }
.toc a::before { content: counter(toc); font-variant-numeric: tabular-nums; opacity: 0.5; min-width: 1.2em; }
.toc a:hover, .toc a.is-active { color: var(--ink); }
.toc a.is-active::before { opacity: 1; }
.aside-card { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 22px; }
.aside-card__title { font-size: 1.15rem; margin-bottom: 6px; }
.aside-card p { color: var(--muted-d); font-size: 0.93rem; }
.aside-card .btn--dark { --b-bg: #fff; --b-fg: var(--ink); margin-top: 6px; }
.aside-card__phone { display: block; text-align: center; margin-top: 12px; text-decoration: none; }
.reviewer-card { display: flex; gap: 18px; align-items: center; margin-top: 48px; padding: 20px; background: #fff; border-radius: var(--radius); }
.reviewer-card__photo { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.reviewer-card__photo img, .reviewer-card__photo .img-placeholder { width: 100%; height: 100%; object-fit: cover; }
.reviewer-card p { margin: 0; }
.reviewer-card__label { font-size: 0.85rem; color: var(--muted-l); }
.reviewer-card__name { font-size: 1.15rem; }
.reviewer-card__pos { color: var(--muted-l); font-size: 0.93rem; }
.article__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
@media (max-width: 1000px) {
	.article__grid { grid-template-columns: minmax(0, 1fr); } /* minmax(0,…): широкі таблиці й зміст не розпирають колонку ширше за екран */
	.article__aside { position: static; order: 2; }
	/* Телефон і планшет: «Зміст» угорі статті (згорнутий), «Консультація лікаря» лишається після тексту */
	.article__aside { display: contents; }
	.article__aside .toc { order: -1; padding: 0; overflow: hidden; }
	.article__aside .aside-card { display: none; } /* нижче і так блок запису «Маєте схожу ситуацію?» */
	.article__content { order: 1; }
	.toc .toc__title { display: none; }
	.toc__toggle {
		display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px;
		padding: 16px 20px; border: 0; background: transparent; font: inherit; font-weight: 500; color: var(--ink); cursor: pointer; text-align: left;
	}
	.toc__count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-left: 8px; padding: 0 7px; border-radius: 999px; background: var(--marble); color: var(--muted-l); font-size: 0.8rem; font-weight: 500; }
	.toc__toggle .icon { width: 20px; height: 20px; transition: transform 0.4s var(--ease); }
	.toc.is-open .toc__toggle .icon { transform: rotate(180deg); }
	.toc ol { display: block; max-height: 0; overflow: hidden; transition: max-height 0.5s var(--ease), padding 0.5s var(--ease); }
	.toc.is-open ol { max-height: 1200px; padding: 0 20px 14px; }
}
@media (min-width: 1001px) { .toc__toggle { display: none; } }

/* Типографіка контенту */
.entry-content { font-size: 1.1rem; line-height: 1.75; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content p { margin: 0; }
.entry-content h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 400; letter-spacing: -0.02em; margin-top: 2.2em; margin-bottom: 0.2em; scroll-margin-top: calc(var(--header-h) + var(--adminbar) + 24px); }
.entry-content h3 { font-size: 1.35rem; font-weight: 500; margin-top: 1.8em; }
.entry-content a { color: var(--ink); text-decoration-color: rgba(29, 30, 32, 0.4); }
.entry-content a:hover { text-decoration-color: currentColor; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li + li { margin-top: 0.4em; }
.entry-content ul li::marker { color: var(--steel); }
.entry-content blockquote { margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 2px solid var(--ink); font-size: 1.2rem; font-weight: 300; }
.entry-content img, .entry-content figure img { border-radius: var(--radius); }
.entry-content figure { margin: 1.8em 0; }
.entry-content figcaption { font-size: 0.9rem; color: var(--muted-l); margin-top: 8px; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 0.98rem; background: #fff; border-radius: var(--radius-s); overflow: hidden; }
.entry-content th, .entry-content td { padding: 12px 14px; border-bottom: 1px solid var(--line-l); text-align: left; }
.entry-content th { background: var(--ink); color: #fff; font-weight: 500; }
.entry-content .wp-block-table { overflow-x: auto; }
@media (max-width: 560px) {
	.entry-content table { font-size: 0.88rem; }
	.entry-content th, .entry-content td { padding: 10px 10px; }
}
.entry-content hr { border: 0; height: 1px; background: var(--line-l); margin: 2.4em 0; }

.search-form { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line-l); border-radius: 999px; padding: 6px 6px 6px 20px; width: 100%; max-width: 520px; }
.search-form input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; padding: 10px 0; }
.search-form .icon { opacity: 0.5; }

/* PDF-прайс */
.price-page__intro { margin-bottom: 28px; }
.price-page__alt { text-align: center; margin-top: 28px; color: var(--muted-l); }
.price-viewer { max-width: 780px; margin: 0 auto; }
.price-viewer__page-wrap { position: relative; display: flex; justify-content: center; align-items: center; min-height: 320px; background: #fff; border: 1px solid var(--line-l); border-radius: var(--radius); padding: 16px; overflow: hidden; }
.price-viewer__canvas { max-width: 100%; height: auto; box-shadow: 0 10px 40px -20px rgba(0, 0, 0, 0.35); background: #fff; }
.price-viewer__zone { position: absolute; top: 0; bottom: 0; width: 30%; border: 0; background: transparent; cursor: pointer; padding: 0; z-index: 2; }
.price-viewer__zone--prev { left: 0; cursor: w-resize; }
.price-viewer__zone--next { right: 0; cursor: e-resize; }
.price-viewer__toolbar { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; margin: 18px 0; }
.price-viewer__nav { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-l); background: #fff; display: grid; place-items: center; }
.price-viewer__nav:hover:not(:disabled) { background: var(--ink); color: #fff; }
.price-viewer__nav.is-disabled { opacity: 0.35; cursor: default; }
.price-viewer__page-indicator { font-weight: 500; min-width: 120px; text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .price-viewer__download span { display: none; } }

/* ---------- Кнопка «око» для адмін-панелі ---------- */
.admin-bar-toggle {
	position: fixed; left: 20px; bottom: 20px; z-index: 999999; width: 40px; height: 40px; border-radius: 50%; border: 0;
	background: rgba(29, 30, 32, 0.85); color: #fff; display: flex; align-items: center; justify-content: center;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); transition: background 0.3s, transform 0.3s;
}
.admin-bar-toggle:hover { background: var(--brand); transform: translateY(-2px); }
.admin-bar-toggle .icon { width: 19px; height: 19px; }
.admin-bar-toggle__icon--on { display: none; }
.admin-bar-toggle.is-hidden-state .admin-bar-toggle__icon--off { display: none; }
.admin-bar-toggle.is-hidden-state .admin-bar-toggle__icon--on { display: block; }
html.md-hide-adminbar { margin-top: 0 !important; }
html.md-hide-adminbar #wpadminbar { display: none !important; }
@media (max-width: 782px) { .admin-bar-toggle { bottom: 96px; left: 14px; } }

/* =========================================================================
   Анімації появи при прокрутці
   ====================================================================== */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.js [data-split] .w__i { display: inline-block; transform: translateY(110%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--wi, 0) * 45ms); }
.js [data-split].is-in .w__i { transform: none; }

/* «Шторка» анімується на дочірніх елементах: сам контейнер лишається видимим,
   інакше Chrome вважає повністю обрізаний елемент невидимим і анімація не стартує. */
.js [data-reveal-img] > * { clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--ease-io), transform 1.8s var(--ease); }
.js [data-reveal-img].is-in > * { clip-path: inset(0 0 0 0); }
.js [data-reveal-img] > img { transform: scale(1.18); }
.js [data-reveal-img].is-in > img { transform: scale(1.06); }

/* Переходи між сторінками (Chrome, Edge, Safari 18+) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: md-vt-out 0.35s var(--ease-io) both; }
::view-transition-new(root) { animation: md-vt-in 0.55s var(--ease) both; }
@keyframes md-vt-out { to { opacity: 0; transform: translateY(-12px); } }
@keyframes md-vt-in { from { opacity: 0; transform: translateY(18px); } }

/* Зменшений рух */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
	.js [data-reveal], .js [data-split] .w__i, .js .hero [data-hero-step] { opacity: 1; transform: none; }
	.js [data-reveal-img] > * { clip-path: none; }
	.hero__word { opacity: 1; transform: none; clip-path: none; }
	.hero__sign span { color: #fff; }
	.preloader { display: none; }
	.logo-draw path { fill: currentColor; stroke-width: 0; }
	::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
.js [data-reveal-img] > .contacts__facade { transform: none; transition-delay: 0.5s; }
.js .about__img--main[data-reveal-img].is-in > img { transform: scale(1.14); }
