/* Adantis Core — dynamic component styles.
   Colors/spacing/radius read theme.json custom properties so editors can
   restyle everything from Appearance → Editor → Styles without touching CSS. */

:root {
	--adantis-radius-sm: var(--wp--custom--radius--small, 10px);
	--adantis-radius-md: var(--wp--custom--radius--medium, 16px);
	--adantis-radius-lg: var(--wp--custom--radius--large, 24px);
	--adantis-shadow: 0 1px 2px rgba(34, 21, 16, 0.04), 0 8px 24px rgba(34, 21, 16, 0.06);
}

/* ---------- layout helpers ---------- */

.adantis-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: clamp(1rem, 2vw, 1.75rem);
	margin-block: 0;
}

/* Doctors: 1 col mobile / 2 tablet / 3 small desktop / 4 wide desktop — explicit
   track counts rather than auto-fill/auto-fit, so the count at each width is
   exactly what was specified rather than whatever the minmax math happens to fit. */
.adantis-grid--doctors { grid-template-columns: repeat(1, 1fr); }
@media (min-width: 768px)  { .adantis-grid--doctors { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .adantis-grid--doctors { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .adantis-grid--doctors { grid-template-columns: repeat(4, 1fr); } }

/* Branches: always exactly 3 on desktop so the third card never orphans onto
   its own row — see .adantis-grid--doctors comment above for why this is an
   explicit track count instead of auto-fit/auto-fill. */
.adantis-grid--branches { grid-template-columns: repeat(1, 1fr); }
@media (min-width: 768px)  { .adantis-grid--branches { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .adantis-grid--branches { grid-template-columns: repeat(3, 1fr); } }

/* Promos: same auto-fill/1fr problem as branches — with only 3 cards, auto-fill
   reserves extra empty tracks at 1560px and shoves the cards left with dead
   space on the right. Explicit track counts + centered narrower max-width
   keep exactly 3 equal cards centered on desktop, 2 on tablet, 1 on mobile. */
.adantis-grid--promos {
	grid-template-columns: repeat(1, 1fr);
	max-width: 1180px;
	margin-inline: auto;
}
@media (min-width: 768px)  { .adantis-grid--promos { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .adantis-grid--promos { grid-template-columns: repeat(3, 1fr); } }

/* Services: several sections have exactly one card (one real service per
   category in the client's materials). auto-fill would reserve extra empty
   tracks and leave the lone card stuck at the left with dead space beside it;
   auto-fit alone would stretch that same lone card to the full 1240px width.
   Capping the track max keeps every card a sane, consistent size regardless
   of how many items are in a given category. */
.adantis-grid--services { grid-template-columns: repeat(auto-fit, minmax(260px, 340px)); }

/* Compact services catalog (/uslugi/): small icon cards, explicit track
   counts (same reasoning as promos/branches above) — 3-4 desktop, 2
   tablet, 1 phone, per the brief. */
.adantis-grid--services-compact {
	grid-template-columns: repeat(1, 1fr);
	gap: 1rem;
}
@media (min-width: 768px)  { .adantis-grid--services-compact { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .adantis-grid--services-compact { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1440px) { .adantis-grid--services-compact { grid-template-columns: repeat(4, 1fr); } }

.adantis-service-card {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	padding: 1.25rem 1.35rem;
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	border-radius: var(--adantis-radius-lg);
	box-shadow: var(--adantis-shadow);
	text-decoration: none;
	color: inherit;
	transition: transform .2s ease, box-shadow .2s ease;
}
@media (prefers-reduced-motion: no-preference) {
	.adantis-service-card:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(34,21,16,.06), 0 16px 32px rgba(34,21,16,.1); }
}
.adantis-service-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: var(--adantis-radius-md);
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	color: var(--wp--preset--color--primary, #4F2C1D);
}
.adantis-service-card__icon svg { width: 24px; height: 24px; }
.adantis-service-card__title { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.adantis-service-card__desc {
	font-size: .86rem;
	color: var(--wp--preset--color--contrast-2, #6C5B4E);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.adantis-service-card__price {
	margin-top: auto;
	padding-top: .4rem;
	font-weight: 600;
	font-size: .88rem;
	color: var(--wp--preset--color--primary, #4F2C1D);
}

/* Full /uslugi/ catalog: every direction as its own accordion item, every
   real priced procedure listed inside it. Native <details>/<summary> gives
   the mobile accordion behaviour for free (no JS needed to toggle), and a
   two-column layout on wide screens keeps ten directions from turning into
   one very long single-file scroll — the widest complaint about the earlier
   compact-card-only version. */
.adantis-uslugi-full {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	align-items: start;
}
@media (min-width: 1024px) {
	.adantis-uslugi-full { grid-template-columns: repeat(2, 1fr); }
}
.adantis-uslugi-full__item {
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	border-radius: var(--adantis-radius-lg);
	overflow: hidden;
}
.adantis-uslugi-full__summary {
	display: flex;
	align-items: center;
	gap: .85rem;
	padding: 1.1rem 1.35rem;
	cursor: pointer;
	list-style: none;
	font-weight: 700;
}
.adantis-uslugi-full__summary::-webkit-details-marker { display: none; }
.adantis-uslugi-full__icon {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--adantis-radius-md);
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	color: var(--wp--preset--color--primary, #4F2C1D);
}
.adantis-uslugi-full__icon svg { width: 22px; height: 22px; }
.adantis-uslugi-full__title { flex: 1; }
.adantis-uslugi-full__from { font-weight: 600; font-size: .88rem; color: var(--wp--preset--color--contrast-2, #6C5B4E); white-space: nowrap; }
.adantis-uslugi-full__chevron { flex: none; transition: transform .2s ease; color: var(--wp--preset--color--contrast-2, #6C5B4E); }
.adantis-uslugi-full__item[open] .adantis-uslugi-full__chevron { transform: rotate(180deg); }
.adantis-uslugi-full__body { padding: 0 1.35rem 1.35rem; }
.adantis-uslugi-full__desc { margin: 0 0 .85rem; color: var(--wp--preset--color--contrast-2, #6C5B4E); font-size: .92rem; }
.adantis-uslugi-full__list {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: .1rem;
}
.adantis-uslugi-full__list li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding: .55rem 0;
	border-top: 1px solid var(--wp--preset--color--border, #E7DCCC);
}
.adantis-uslugi-full__list li:first-child { border-top: none; }
.adantis-uslugi-full__list a { color: inherit; text-decoration: none; }
.adantis-uslugi-full__list a:hover { text-decoration: underline; }
.adantis-uslugi-full__price { flex: none; white-space: nowrap; font-weight: 600; color: var(--wp--preset--color--primary, #4F2C1D); font-size: .88rem; }

/* ---------- documents page ("Документы и лицензии") ---------- */

.adantis-docs { display: flex; flex-direction: column; gap: .9rem; }

.adantis-docs__category {
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	border-radius: var(--adantis-radius-md);
	background: #fff;
	overflow: hidden;
}
.adantis-docs__cat-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.1rem 1.35rem;
	cursor: pointer;
	list-style: none;
}
.adantis-docs__cat-summary::-webkit-details-marker { display: none; }
.adantis-docs__cat-title { font-weight: 700; font-size: 1.05rem; color: var(--wp--preset--color--contrast, #241811); }
.adantis-docs__cat-chevron { flex: none; transition: transform .2s ease; color: var(--wp--preset--color--contrast-2, #6C5B4E); }
.adantis-docs__category[open] .adantis-docs__cat-chevron { transform: rotate(180deg); }
.adantis-docs__cat-body {
	padding: 0 1.35rem 1.35rem;
	display: flex;
	flex-direction: column;
	gap: .75rem;
}

.adantis-docs__card {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	padding: 1rem 1.1rem;
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	border-radius: var(--adantis-radius-sm);
	background: var(--wp--preset--color--base-soft, #FBF6EF);
}
.adantis-docs__card-icon {
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--wp--preset--color--accent-gold, #CEA276);
}
.adantis-docs__card-icon svg { width: 22px; height: 22px; }
.adantis-docs__card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.adantis-docs__card-title { font-weight: 700; color: var(--wp--preset--color--contrast, #241811); line-height: 1.35; }
.adantis-docs__card-desc { font-size: .88rem; color: var(--wp--preset--color--contrast-2, #6C5B4E); line-height: 1.45; }
.adantis-docs__card-meta { font-size: .8rem; color: var(--wp--preset--color--contrast-2, #6C5B4E); }
.adantis-docs__card-actions { flex: none; display: flex; flex-direction: column; gap: .4rem; }
.adantis-docs__card--link .adantis-docs__card-icon { color: var(--wp--preset--color--contrast-2, #6C5B4E); }

@media (max-width: 600px) {
	.adantis-docs__card { flex-direction: column; }
	.adantis-docs__card-actions { flex-direction: row; width: 100%; }
	.adantis-docs__card-actions .adantis-btn { flex: 1; }
}

.adantis-empty {
	padding: 2rem;
	border-radius: var(--adantis-radius-md);
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	color: var(--wp--preset--color--contrast-2, #6C5B4E);
	text-align: center;
}

/* ---------- filters ---------- */

.adantis-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
}

.adantis-filter__btn {
	font: inherit;
	font-size: 0.9rem;
	padding: 0.55rem 1.1rem;
	border-radius: 999px;
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--contrast, #241811);
	cursor: pointer;
	transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.adantis-filter__btn:hover { border-color: var(--wp--preset--color--primary, #4F2C1D); }

.adantis-filter__btn.is-active {
	background: var(--wp--preset--color--primary, #4F2C1D);
	border-color: var(--wp--preset--color--primary, #4F2C1D);
	color: #fff;
}

.adantis-filter__btn:focus-visible,
.adantis-btn:focus-visible,
.adantis-card a:focus-visible,
.adantis-form input:focus-visible,
.adantis-form select:focus-visible,
.adantis-form textarea:focus-visible,
.adantis-form button:focus-visible {
	outline: 2.5px solid var(--wp--preset--color--primary, #4F2C1D);
	outline-offset: 2px;
}

[hidden] { display: none !important; }

/* ---------- cards ---------- */

.adantis-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	border-radius: var(--adantis-radius-lg);
	overflow: hidden;
	box-shadow: var(--adantis-shadow);
	transition: transform .25s ease, box-shadow .25s ease;
}

@media (prefers-reduced-motion: no-preference) {
	.adantis-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(34,21,16,.12); }
}

.adantis-card__media {
	display: block;
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	overflow: hidden;
}

.adantis-card__media--portrait { aspect-ratio: 4 / 5; }

.adantis-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
}

/* Doctor portraits: safe crop that keeps the whole head in frame — placed
   after the generic rule above (equal specificity) so it actually wins,
   instead of two same-weight rules fighting based on source order. */
.adantis-card__media--portrait img { object-position: center 22%; }

.adantis-placeholder-photo,
.adantis-placeholder-icon {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3rem;
	font-family: var(--wp--preset--font-family--heading, inherit);
	color: var(--wp--preset--color--primary, #4F2C1D);
	background: linear-gradient(160deg, var(--wp--preset--color--base-soft, #FBF6EF), #fff);
}

.adantis-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: 1.25rem 1.35rem 1.5rem;
	flex: 1;
}

.adantis-card__eyebrow {
	margin: 0;
	font-size: 0.78rem;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary, #4F2C1D);
}

.adantis-card__title { margin: 0 0 .1rem; font-size: 1.1rem; line-height: 1.3; }
.adantis-card__title a { color: inherit; text-decoration: none; }
.adantis-card__title a:hover { text-decoration: underline; }

.adantis-card__meta, .adantis-card__sub, .adantis-card__desc {
	margin: 0;
	font-size: 0.92rem;
	color: var(--wp--preset--color--contrast-2, #6C5B4E);
}

.adantis-card__badge {
	display: inline-block;
	margin: .15rem 0 0;
	font-size: 0.82rem;
	color: var(--wp--preset--color--primary, #4F2C1D);
}

.adantis-card__footer {
	margin-top: auto;
	padding-top: .75rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
	flex-wrap: wrap;
}

.adantis-card__price {
	font-weight: 600;
	color: var(--wp--preset--color--primary, #4F2C1D);
}

/* Digits in a price/stat context sit side by side for comparison (price vs.
   average, one stat next to another) — proportional numerals make the digit
   widths uneven and the row look like it's wobbling. Tabular numerals keep
   every digit the same width so the column reads cleanly. */
.adantis-card__price,
.adantis-price-row__price,
.adantis-price-row__avg,
.adantis-card__price-old,
.adantis-card__price-new,
.adantis-stat strong {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.adantis-badge {
	position: absolute;
	top: .75rem;
	left: .75rem;
	background: var(--wp--preset--color--accent-gold, #CEA276);
	color: var(--wp--preset--color--contrast, #241811);
	font-size: .78rem;
	font-weight: 600;
	padding: .3rem .7rem;
	border-radius: 999px;
	z-index: 1;
}

.adantis-badge--demo {
	position: static;
	display: inline-block;
	margin-bottom: .5rem;
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	color: var(--wp--preset--color--contrast-2, #6C5B4E);
	border: 1px dashed var(--wp--preset--color--border, #E7DCCC);
}

.adantis-stars { color: var(--wp--preset--color--accent-gold, #CEA276); letter-spacing: .1em; }

/* ---------- buttons ---------- */

.adantis-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4rem;
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	border-radius: var(--adantis-radius-sm);
	padding: .85rem 1.5rem;
	border: 1.5px solid transparent;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.adantis-btn--primary {
	background: var(--wp--preset--color--primary, #4F2C1D);
	color: #fff;
}
.adantis-btn--primary:hover { background: var(--wp--preset--color--contrast, #241811); }

.adantis-btn--ghost {
	background: transparent;
	border-color: var(--wp--preset--color--primary, #4F2C1D);
	color: var(--wp--preset--color--primary, #4F2C1D);
}
.adantis-btn--ghost:hover { background: var(--wp--preset--color--primary, #4F2C1D); color: #fff; }

.adantis-btn--sm { padding: .55rem 1.1rem; font-size: .88rem; }

/* ---------- prices ---------- */

.adantis-prices__toolbar {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.adantis-search__input {
	width: 100%;
	max-width: 420px;
	padding: .8rem 1.1rem;
	border-radius: var(--adantis-radius-sm);
	border: 1.5px solid var(--wp--preset--color--border, #E7DCCC);
	font: inherit;
}

.adantis-price-group { margin-bottom: 2.5rem; }
.adantis-price-group__title { margin-bottom: .75rem; }

.adantis-price-table {
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	border-radius: var(--adantis-radius-md);
	overflow: hidden;
}

.adantis-price-row {
	display: grid;
	grid-template-columns: 1.8fr .85fr .85fr;
	gap: 1rem;
	padding: .95rem 1.25rem;
	border-top: 1px solid var(--wp--preset--color--border, #E7DCCC);
	align-items: baseline;
}
.adantis-price-row:first-child { border-top: none; }

.adantis-price-row--head {
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	font-size: .82rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--wp--preset--color--contrast-2, #6C5B4E);
	align-items: center;
}

.adantis-price-row__name { overflow-wrap: break-word; }
.adantis-price-row__name a { color: inherit; }
.adantis-price-row__price,
.adantis-price-row__avg { text-align: right; }
.adantis-price-row__price { font-weight: 700; color: var(--wp--preset--color--primary, #4F2C1D); }
.adantis-price-row__avg { color: var(--wp--preset--color--contrast-2, #6C5B4E); }

/* Homepage price comparison — now a core/table block (editable in the block editor). */
.adantis-home-prices .wp-block-table.adantis-price-compare {
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	border-radius: var(--adantis-radius-md);
	overflow: hidden;
	margin: 0;
}
.adantis-home-prices .adantis-price-compare table {
	width: 100%;
	border-collapse: collapse;
	border: none;
	font-size: 1.0625rem;
	line-height: 1.4;
}
.adantis-home-prices .adantis-price-compare th,
.adantis-home-prices .adantis-price-compare td {
	border: none;
	border-top: 1px solid var(--wp--preset--color--border, #E7DCCC);
	padding: .95rem 1.25rem;
	text-align: left;
	vertical-align: baseline;
	background: none;
}
.adantis-home-prices .adantis-price-compare tbody tr:first-child td { border-top: none; }
.adantis-home-prices .adantis-price-compare thead th {
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	font-size: .82rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--wp--preset--color--contrast-2, #6C5B4E);
}
.adantis-home-prices .adantis-price-compare th:nth-child(2),
.adantis-home-prices .adantis-price-compare th:nth-child(3),
.adantis-home-prices .adantis-price-compare td:nth-child(2),
.adantis-home-prices .adantis-price-compare td:nth-child(3) { text-align: right; }
.adantis-home-prices .adantis-price-compare td:nth-child(2) { font-weight: 700; color: var(--wp--preset--color--primary, #4F2C1D); white-space: nowrap; }
.adantis-home-prices .adantis-price-compare td:nth-child(3) { color: var(--wp--preset--color--contrast-2, #6C5B4E); white-space: nowrap; }
.adantis-home-prices .adantis-price-compare td:first-child a { color: inherit; text-decoration: none; }
.adantis-home-prices .adantis-price-compare td:first-child a:hover { text-decoration: underline; }
@media (max-width: 640px) {
	.adantis-home-prices .adantis-price-compare table,
	.adantis-home-prices .adantis-price-compare thead,
	.adantis-home-prices .adantis-price-compare tbody,
	.adantis-home-prices .adantis-price-compare tr { display: block; width: 100%; }
	.adantis-home-prices .adantis-price-compare thead { display: none; }
	.adantis-home-prices .adantis-price-compare tr {
		border-top: 1px solid var(--wp--preset--color--border, #E7DCCC);
		padding: .95rem 1.25rem;
	}
	.adantis-home-prices .adantis-price-compare tr:first-child { border-top: none; }
	.adantis-home-prices .adantis-price-compare td { display: block; width: 100%; text-align: left; border: none; padding: .2rem 0; }
	.adantis-home-prices .adantis-price-compare td:first-child { font-weight: 600; }
	.adantis-home-prices .adantis-price-compare td:nth-child(2)::before { content: "Адантис: "; font-weight: 400; font-size: .8rem; color: var(--wp--preset--color--contrast-2, #6C5B4E); }
	.adantis-home-prices .adantis-price-compare td:nth-child(3)::before { content: "По городу: "; font-weight: 400; font-size: .8rem; }
}

.adantis-prices__note {
	margin-top: 1.5rem;
	font-size: .85rem;
	color: var(--wp--preset--color--contrast-2, #6C5B4E);
}

.adantis-disclaimer {
	margin-top: 2.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--wp--preset--color--base-soft, #EFE3D2);
	font-size: .85rem;
	color: var(--wp--preset--color--contrast-2, #6C5B4E);
}

/* ---------- sitewide booking modal (footer fallback for #adantis-form) ---------- */

.adantis-modal[hidden] { display: none; }
.adantis-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 5vh 1rem;
	overflow-y: auto;
}
.adantis-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(36, 24, 17, .55);
}
.adantis-modal__dialog {
	position: relative;
	z-index: 1;
	background: var(--wp--preset--color--base, #fff);
	border-radius: var(--wp--custom--radius--large, 24px);
	padding: 24px;
	width: 100%;
	max-width: 660px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 24px 60px rgba(36, 24, 17, .35);
}
/* The modal is rendered inside the footer template part (footer.html), so it
   inherits the footer's light-on-dark ink: `.adantis-footer { color:
   rgba(255,255,255,.82) }` and `.adantis-footer a { color:#fff }`. The dialog
   itself is a white card, so without resetting the ink + link colors the
   form's text, consent links and the ghost "WhatsApp" button all wash out to
   invisible-on-white (a visible outline with no label). Reassert the normal
   dark palette with enough specificity to beat the footer rules. */
.adantis-modal__dialog { color: var(--wp--preset--color--contrast, #241811); }
.adantis-modal__dialog a { color: var(--wp--preset--color--primary, #4F2C1D); }
/* `.adantis-footer h3, .adantis-footer h4 { color: #fff }` targets the
   heading tag directly, not just inherited color — the dialog-wide rule
   above doesn't touch that, so the form's own <h3 class="adantis-form__title">
   (this modal is physically rendered inside the footer template part) stayed
   white-on-white. Match that rule's selector shape so this wins the same way. */
.adantis-modal__dialog h3, .adantis-modal__dialog h4,
.adantis-modal__dialog .adantis-form__title { color: var(--wp--preset--color--contrast, #241811); }
.adantis-modal__dialog .adantis-btn--ghost {
	color: var(--wp--preset--color--primary, #4F2C1D);
	border-color: var(--wp--preset--color--primary, #4F2C1D);
}
.adantis-modal__dialog .adantis-btn--ghost:hover {
	background: var(--wp--preset--color--primary, #4F2C1D);
	color: #fff;
}
/* The consent links sit inside the footer template part, so the theme's
   `.adantis-footer a { color:#fff }` (specificity 0,1,1, loaded after the
   plugin sheet) wins over the generic `.adantis-modal__dialog a` reset and
   renders the links white-on-white. Beat it with a higher-specificity,
   modal-scoped rule and give explicit visited/hover/focus states so the two
   links are always readable on the white dialog. */
.adantis-modal__dialog .adantis-form__consent a {
	color: var(--wp--preset--color--primary, #4F2C1D);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.adantis-modal__dialog .adantis-form__consent a:visited { color: var(--wp--preset--color--primary, #4F2C1D); }
.adantis-modal__dialog .adantis-form__consent a:hover { color: var(--wp--preset--color--primary, #4F2C1D); opacity: .78; }
.adantis-modal__dialog .adantis-form__consent a:focus-visible {
	outline: 2.5px solid var(--wp--preset--color--primary, #4F2C1D);
	outline-offset: 2px;
	border-radius: 2px;
}
.adantis-modal__close {
	position: absolute;
	top: .75rem;
	right: .75rem;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	color: var(--wp--preset--color--primary, #4F2C1D);
	cursor: pointer;
}
.adantis-modal__close:hover { background: var(--wp--preset--color--accent-gold, #CEA276); color: #fff; }
body.adantis-modal-open { overflow: hidden; }
@media (max-width: 480px) {
	.adantis-modal { padding: 0; align-items: flex-end; }
	.adantis-modal__dialog { max-width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; }
}

/* Mobile: each price row becomes its own compact card — service name on its
   own line (wraps freely), price/average as a labelled pair below it (never
   wraps, see the nowrap rule above). */
@media (max-width: 600px) {
	.adantis-price-table { border: none; background: transparent; }
	.adantis-price-row {
		grid-template-columns: 1fr;
		gap: .3rem;
		background: var(--wp--preset--color--base, #fff);
		border: 1px solid var(--wp--preset--color--border, #E7DCCC);
		border-radius: var(--adantis-radius-md);
		margin-bottom: .6rem;
	}
	.adantis-price-row--head { display: none; }
	.adantis-price-row__name { font-weight: 600; white-space: normal; }
	.adantis-price-row__price { text-align: left; }
	.adantis-price-row__avg { text-align: left; }
	.adantis-price-row__price::before { content: "Адантис: "; font-weight: 400; font-size: .8rem; color: var(--wp--preset--color--contrast-2, #6C5B4E); }
	.adantis-price-row__avg::before { content: "По городу: "; font-weight: 400; font-size: .8rem; }
}

/* ---------- breadcrumbs ---------- */

.adantis-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem;
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
	font-size: .85rem;
	color: var(--wp--preset--color--contrast-2, #6C5B4E);
}
.adantis-breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: .35rem; opacity: .5; }
.adantis-breadcrumbs a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.adantis-breadcrumbs [aria-current="page"] span { color: var(--wp--preset--color--contrast, #241811); }

/* ---------- lead form ---------- */

.adantis-alert {
	padding: 1rem 1.25rem;
	border-radius: var(--adantis-radius-sm);
	margin-bottom: 1.25rem;
	font-size: .95rem;
}
.adantis-alert--success { background: #E9F5EE; color: var(--wp--preset--color--success, #2E7D4F); }
.adantis-alert--error { background: #FBEAE9; color: var(--wp--preset--color--error, #B3261E); }

/* ---------- article table of contents ---------- */

.adantis-toc {
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	border-radius: var(--adantis-radius-md);
	padding: 1.25rem 1.5rem;
	margin: 0 0 2rem;
}
.adantis-toc__title { display: block; margin-bottom: .6rem; }
.adantis-toc ul { margin: 0; padding-left: 1.25rem; }
.adantis-toc li { margin-bottom: .3rem; }
.adantis-toc a { color: var(--wp--preset--color--primary, #4F2C1D); }

.adantis-article-related__block { margin-bottom: 1.5rem; }
.adantis-article-related__block h2 { margin-bottom: .75rem; }

.adantis-form__title { margin-top: 0; }
.adantis-form__doctor-note {
	padding: .75rem 1rem;
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	border-radius: var(--adantis-radius-sm);
	font-size: .92rem;
}

.adantis-form {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem 1.25rem;
	max-width: 100%;
	box-sizing: border-box;
}

/* At very narrow widths (360px) a nested FSE constrained layout inside an
   alignwide group can stop correctly subtracting the root padding, so the
   grid ends up sized against the wrong containing block and the row (with
   its stretched input/select/textarea) overflows past the viewport edge.
   Pinning box-sizing and max-width defensively on the whole chain keeps the
   form inside its container regardless of that upstream layout quirk. */
.adantis-form__row { display: flex; flex-direction: column; gap: .4rem; max-width: 100%; box-sizing: border-box; }
.adantis-form__row--wide { grid-column: 1 / -1; }
.adantis-form__hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.adantis-form label { font-size: .88rem; font-weight: 600; color: var(--wp--preset--color--contrast, #241811); }

.adantis-form input[type="text"],
.adantis-form input[type="tel"],
.adantis-form input[type="email"],
.adantis-form select,
.adantis-form textarea {
	font: inherit;
	padding: .8rem 1rem;
	border-radius: var(--adantis-radius-sm);
	border: 1.5px solid var(--wp--preset--color--border, #E7DCCC);
	background: #fff;
	color: var(--wp--preset--color--contrast, #241811);
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.adantis-form__consent { font-size: .85rem; font-weight: 400; }
.adantis-form__consent label { font-weight: 400; display: flex; gap: .5rem; align-items: flex-start; }
.adantis-form__consent a { color: var(--wp--preset--color--primary, #4F2C1D); }

@media (max-width: 640px) {
	.adantis-form { grid-template-columns: 1fr; }
}

/* ---------- detail pages (doctor / service / branch) ---------- */

.adantis-detail__facts {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: .4rem;
	color: var(--wp--preset--color--contrast-2, #6C5B4E);
}

.adantis-faq__item {
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	border-radius: var(--adantis-radius-sm);
	padding: .9rem 1.1rem;
	margin-bottom: .6rem;
}
.adantis-faq__item summary {
	cursor: pointer;
	font-weight: 600;
}

/* ---------- promo cards: struck-through old price + full-card click ---------- */

.adantis-card--promo,
.adantis-card--service {
	position: relative;
}
.adantis-card--promo .adantis-card__title a,
.adantis-card--service .adantis-card__title a {
	position: static;
}
.adantis-card--promo .adantis-card__title a::after,
.adantis-card--service .adantis-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}
.adantis-card--promo .adantis-card__footer,
.adantis-card--promo .adantis-card__media {
	position: relative;
	z-index: 2;
}
.adantis-card--service .adantis-card__footer,
.adantis-card--service .adantis-card__media {
	position: relative;
	z-index: 2;
	pointer-events: none;
}

/* ---------- reviews summary (real 2GIS aggregate, sourced) ---------- */

/* Compact one-line rating shown next to the "Отзывы пациентов" heading —
   used everywhere show_summary is on; the full branch-cards panel below is
   opt-in per page (show_branch_panel) so the homepage isn't duplicating
   the same rating info in two different visual blocks. */
.adantis-reviews-rating {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: .6rem;
	margin: 0 0 1.5rem;
	font-size: .95rem;
	text-align: center;
}
.adantis-reviews-rating strong {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.3rem;
	color: var(--wp--preset--color--primary, #4F2C1D);
}

/* Full reviews page: a simpler two-line rating. The stars + figure sit on
   one line, the “Отзывы по трём филиалам” note on a quieter second line. */
.adantis-reviews-rating--simple {
	flex-direction: column;
	gap: .35rem;
	margin: 0 0 2.25rem;
}
.adantis-reviews-rating--simple .adantis-reviews-rating__main {
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--wp--preset--color--contrast, #241811);
}
.adantis-reviews-rating--simple .adantis-stars {
	color: var(--wp--preset--color--accent-gold, #CEA276);
}
.adantis-reviews-rating--simple .adantis-reviews-rating__sub {
	font-size: .9rem;
	color: var(--wp--preset--color--contrast-2, #6C5B4E);
}

/* Short trust blurb right under the „Что говорят наши пациенты“ eyebrow:
   muted, capped width, centered to match the eyebrow/rating block. */
.adantis-reviews-intro.adantis-reviews-intro {
	max-width: 640px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	margin-top: .25rem;
	margin-bottom: 1.5rem;
	font-size: .98rem;
	line-height: 1.6;
	color: var(--wp--preset--color--contrast-2, #6C5B4E);
}

.adantis-reviews-summary {
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	border-radius: var(--adantis-radius-lg);
	padding: 2rem;
	margin-bottom: 2.5rem;
}
.adantis-reviews-summary__branches {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
}
@media (max-width: 767px) { .adantis-reviews-summary__branches { grid-template-columns: 1fr; } }
.adantis-reviews-summary__branch {
	display: flex;
	flex-direction: column;
	gap: .3rem;
	padding: 1.1rem 1.25rem;
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	border-radius: var(--adantis-radius-md);
	color: inherit;
}
.adantis-reviews-summary__branch > span { font-size: .88rem; color: var(--wp--preset--color--contrast-2, #6C5B4E); }
.adantis-reviews-summary__branch-links { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .3rem; }
.adantis-reviews-summary__link { color: var(--wp--preset--color--primary, #4F2C1D) !important; font-weight: 600; font-size: .88rem; }

/* Review cards: same auto-fill 1fr-track problem as every other grid on this
   site, plus the card content used to sit directly inside .adantis-card with
   NO .adantis-card__body wrapper at all — meaning zero padding, text flush
   against the card edges, no consistent gap between quote/meta/button, and
   no margin-top:auto to pin the button to the bottom. Explicit track counts
   + a dedicated body/desc/meta treatment fixes all of that at once. */
.adantis-grid--reviews {
	grid-template-columns: repeat(1, 1fr);
}
@media (min-width: 600px)  { .adantis-grid--reviews { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .adantis-grid--reviews { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1440px) { .adantis-grid--reviews { grid-template-columns: repeat(4, 1fr); } }
/* A card count that's a clean multiple of 4 (the homepage's 4-review
   teaser) skips the 3-column step entirely — 3 columns would leave one
   card alone on its own row (4 = 3+1). 2 columns stay even at every count
   this variant is used for, right up to the 4-column step at 1440px. */
@media (min-width: 1024px) and (max-width: 1439px) { .adantis-grid--reviews-compact { grid-template-columns: repeat(2, 1fr); } }

/* When the branch filter leaves a partial row (e.g. 3 cards in a 4-column
   track), switch from grid to a centered flex row instead of letting the
   cards stretch to fill the empty column — only kicks in at the widths
   where the grid actually has more than one column. */
@media (min-width: 600px) {
	.adantis-grid--reviews.is-centered { display: flex; flex-wrap: wrap; justify-content: center; }
	.adantis-grid--reviews.is-centered .adantis-card--review { flex: 0 1 320px; }
}

.adantis-card--review { height: 100%; }
.adantis-card--review .adantis-card__body {
	padding: 1.5rem;
	gap: .85rem;
}
.adantis-card__desc--review {
	font-size: 1.05rem;
	line-height: 1.55;
	color: var(--wp--preset--color--contrast, #241811);
	text-align: left;
	overflow-wrap: break-word;
}
.adantis-card__meta--review {
	font-size: .92rem;
	line-height: 1.5;
	display: flex;
	flex-wrap: wrap;
	gap: .3rem .4rem;
}
.adantis-card__meta--review strong { color: var(--wp--preset--color--contrast, #241811); }
.adantis-card--review .adantis-stars { font-size: .95rem; letter-spacing: .05em; }
.adantis-card--review a.adantis-card__footer {
	align-self: flex-start;
}

.adantis-service-group { margin-bottom: 2.5rem; }
.adantis-service-group:last-child { margin-bottom: 0; }
.adantis-service-group__title { margin-bottom: 1rem; }

/* Journal cards (query-loop): whole card clickable via the title link,
   same stretched-link technique as promo cards above. */
.wp-block-query .adantis-card { position: relative; }
.wp-block-query .adantis-card .adantis-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.wp-block-query .adantis-card .adantis-card__footer,
.wp-block-query .adantis-card .adantis-card__media,
.wp-block-query .adantis-card .wp-block-post-featured-image { position: relative; z-index: 2; }

.adantis-card__price-row {
	display: flex;
	align-items: baseline;
	gap: .6rem;
	margin: .25rem 0;
}
.adantis-card__price-old {
	text-decoration: line-through;
	color: var(--wp--preset--color--contrast-2, #6C5B4E);
	font-size: .95rem;
}
.adantis-card__price-new {
	font-size: 1.3rem;
	font-weight: 800;
	color: var(--wp--preset--color--primary, #4F2C1D);
}

/* ---------- animated stat counters + trust row ---------- */

/* Three equal cards in one row (2 counters + the Like.Doctor rating card) —
   explicit 3-track grid, not auto-fit (see .claude/rules/css.md: bare
   auto-fit/auto-fill with few real items reserves phantom tracks and shoves
   cards to one side). Stacks to 1 column on phones so the rating card's
   longer text never has to fight for width against the two number cards. */
.adantis-trust-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
	align-items: stretch;
}
@media (max-width: 767px) { .adantis-trust-grid { grid-template-columns: 1fr; } }

.adantis-trust-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: .4rem;
	padding: 1.5rem 1.25rem;
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	border-radius: var(--adantis-radius-md);
	height: 100%;
}
.adantis-trust-card__value {
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(1.75rem, 2.4vw, 2.5rem);
	font-weight: 800;
	color: var(--wp--preset--color--primary, #4F2C1D);
	font-variant-numeric: tabular-nums;
	line-height: 1;
}
.adantis-trust-card__label {
	font-size: .9rem;
	color: var(--wp--preset--color--contrast-2, #6C5B4E);
}
.adantis-trust-card__icon {
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--adantis-radius-sm);
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	color: var(--wp--preset--color--primary, #4F2C1D);
	flex-shrink: 0;
}
.adantis-trust-card__icon svg { width: 22px; height: 22px; }
.adantis-trust-card__text {
	margin: 0;
	font-size: .9rem;
	color: var(--wp--preset--color--contrast-2, #6C5B4E);
	flex-grow: 1;
	display: flex;
	align-items: center;
}
.adantis-trust-card__link {
	font-size: .88rem;
	font-weight: 600;
	color: var(--wp--preset--color--primary, #4F2C1D);
	text-decoration: none;
}
.adantis-trust-card__link:hover { text-decoration: underline; }

/* Five equal cards (с 2011 / 3 филиала / 23 врача / 40 184 / ТОП-4). Explicit
   track counts per breakpoint, never auto-fit: 5 on desktop; 3+2 centred on a
   6-track grid for tablet; 2 columns on phones with the last card full width.
   Later in the cascade than the 3-track rules above on purpose — they are
   superseded, not merged. Type floor for this block: label 16px, link 15px. */
.adantis-trust-grid {
	grid-template-columns: repeat(5, 1fr);
	gap: 1rem;
}
.adantis-trust-card {
	padding: 1.5rem 1rem;
	gap: .5rem;
}
.adantis-trust-card__value {
	font-size: clamp(1.75rem, 2.2vw, 2.25rem);
	white-space: nowrap;
}
.adantis-trust-card__label {
	font-size: 1rem;
	line-height: 1.4;
}
.adantis-trust-card__link {
	font-size: .9375rem;
	margin-top: auto;
}
.adantis-trust-note {
	margin: 1rem 0 0;
	text-align: center;
	font-size: .875rem;
	line-height: 1.5;
	color: var(--wp--preset--color--contrast-2, #6C5B4E);
}
@media (max-width: 1099px) {
	.adantis-trust-grid { grid-template-columns: repeat(6, 1fr); }
	.adantis-trust-grid .adantis-trust-card { grid-column: span 2; }
	.adantis-trust-grid .adantis-trust-card:nth-child(4) { grid-column: 2 / span 2; }
	.adantis-trust-grid .adantis-trust-card:nth-child(5) { grid-column: 4 / span 2; }
}
@media (max-width: 767px) {
	.adantis-trust-grid { grid-template-columns: repeat(2, 1fr); }
	.adantis-trust-grid .adantis-trust-card,
	.adantis-trust-grid .adantis-trust-card:nth-child(4) { grid-column: auto; }
	.adantis-trust-grid .adantis-trust-card:nth-child(5) { grid-column: 1 / -1; }
}

/* ---------- compact direction / advantage cards ---------- */

.adantis-mini-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.25rem;
}
@media (max-width: 899px) { .adantis-mini-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .adantis-mini-grid { grid-template-columns: 1fr; } }

/* Cards are now editable core/group blocks; WordPress' flow block-gap adds a
   24px margin-block-start to every sibling after the first, which offsets
   cards 2-4 down inside the grid. The grid owns its own gap (1.25rem) — zero
   the inherited margin so the row stays top-aligned. */
.adantis-mini-grid > * { margin-block-start: 0; }

/* Same block-gap leak affects every grid/flex container whose children were
   converted to editable blocks: zero the inherited margin there too so the
   rows/cards stay top-aligned instead of "jumping" down. */
.adantis-trust-grid > *,
.adantis-steps > *,
.adantis-info-cards > *,
.adantis-doctors-mosaic > * { margin-block-start: 0; }

/* The .adantis-mosaic shortcode output is a grid item next to the __copy block.
   In deeply nested contexts (e.g. /o-nas/ inside entry-content + a wrapper
   group) auto-placement drops it to a second row in column 1 instead of the
   intended column 2. Pin both to their tracks explicitly so copy+photos stay
   side by side everywhere. */
.adantis-doctors-mosaic__copy { grid-column: 1; grid-row: 1; align-self: start; }
.adantis-doctors-mosaic > .adantis-mosaic { grid-column: 2; grid-row: 1; align-self: start; }
@media (max-width: 899px) {
  .adantis-doctors-mosaic__copy,
  .adantis-doctors-mosaic > .adantis-mosaic { grid-column: 1 / -1; grid-row: auto; }
}

.adantis-mini-card {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	padding: 1.25rem 1.35rem;
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	border-radius: var(--adantis-radius-md);
	box-shadow: var(--adantis-shadow);
	transition: transform .2s ease, box-shadow .2s ease;
	height: 100%;
}
@media (prefers-reduced-motion: no-preference) {
	.adantis-mini-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(36,24,17,.1); }
}
.adantis-mini-card__icon {
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--adantis-radius-sm);
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	color: var(--wp--preset--color--primary, #4F2C1D);
	flex-shrink: 0;
}
.adantis-mini-card__icon svg { width: 22px; height: 22px; }
.adantis-mini-card h3 { margin: 0; font-size: 1rem; }
.adantis-mini-card p { margin: 0; font-size: .88rem; color: var(--wp--preset--color--contrast-2, #6C5B4E); }
.adantis-mini-card a.adantis-mini-card__link { margin-top: auto; font-size: .88rem; font-weight: 600; color: var(--wp--preset--color--primary, #4F2C1D); text-decoration: none; }
.adantis-mini-card a.adantis-mini-card__link:hover { text-decoration: underline; }

/* ---------- doctors mosaic (home) ---------- */

.adantis-doctors-mosaic {
	display: grid;
	grid-template-columns: minmax(280px, 39%) 1fr;
	gap: 2rem;
	align-items: start;
}
@media (max-width: 899px) { .adantis-doctors-mosaic { grid-template-columns: 1fr; } }

.adantis-doctors-mosaic__copy { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; align-self: start; margin-top: 0; padding-top: 0; }
.adantis-doctors-mosaic__copy h2 { margin: 0; }
.adantis-doctors-mosaic__copy p { margin: 0; color: var(--wp--preset--color--contrast-2, #6C5B4E); }

/* Photo mosaic: name and specialty appear over the photo on hover / keyboard
   focus (restored at the owner's request). Touch screens have no hover, so
   there the caption is always shown over the photo's lower edge. */
.adantis-mosaic {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: .5rem;
}
.adantis-mosaic__item {
	position: relative;
	aspect-ratio: 4 / 5;
	border-radius: var(--adantis-radius-md);
	overflow: hidden;
	background: var(--wp--preset--color--base-soft, #FBF6EF);
}
.adantis-mosaic__item:nth-child(5n+2),
.adantis-mosaic__item:nth-child(5n+4) { margin-top: .9rem; }
.adantis-mosaic__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 22%;
	transition: transform .3s ease;
}
.adantis-mosaic__item .adantis-placeholder-photo { position: absolute; inset: 0; font-size: 1.6rem; }
.adantis-mosaic__caption {
	position: absolute;
	inset: auto 0 0 0;
	padding: 1.5rem .75rem .75rem;
	background: linear-gradient(0deg, rgba(36,24,17,.85), rgba(36,24,17,0));
	color: #fff;
	font-size: .875rem;
	line-height: 1.3;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity .2s ease, transform .2s ease;
}
.adantis-mosaic__item:hover .adantis-mosaic__caption,
.adantis-mosaic__item:focus-within .adantis-mosaic__caption {
	opacity: 1;
	transform: translateY(0);
}
@media (hover: none) {
	.adantis-mosaic__caption { opacity: 1; transform: none; }
}
.adantis-mosaic__caption strong { display: block; font-weight: 700; }
.adantis-mosaic__item a { position: absolute; inset: 0; }
@media (prefers-reduced-motion: no-preference) {
	.adantis-mosaic__item:hover img { transform: scale(1.04); }
}
/* Phones: two wider cards per row so the always-visible caption fits at a
   readable size; first 12 doctors only (the full team is one tap away). */
@media (max-width: 599px) {
	.adantis-mosaic { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
	.adantis-mosaic__item:nth-child(3n+2) { margin-top: 0; }
	.adantis-mosaic__item:nth-child(even) { margin-top: 1.25rem; }
	.adantis-mosaic__item:nth-child(n+13) { display: none; }
	.adantis-mosaic__caption { opacity: 1; transform: none; font-size: .875rem; padding: 1.25rem .6rem .6rem; }
}

/* ---------- prices + offers split (home) ---------- */

.adantis-home-prices {
	display: grid;
	grid-template-columns: 2.3fr 1fr;
	gap: 2rem;
	align-items: start;
}
@media (max-width: 899px) { .adantis-home-prices { grid-template-columns: 1fr; } }
.adantis-home-prices--solo { grid-template-columns: 1fr; }

.adantis-home-prices__offers {
	display: grid;
	gap: 1rem;
}
/* The two curated offer cards reuse the promo card component, but stacked in
   a single narrow column here instead of the multi-column promos grid. */
.adantis-home-prices__offers .adantis-grid--promos {
	grid-template-columns: 1fr;
	max-width: none;
	margin-inline: 0;
	gap: 1rem;
}
.adantis-home-prices__offers .adantis-card--promo { height: 100%; }

/* /tseny/ sidebar: the estimate form card stays pinned while the (much
   taller) price table scrolls past it, without ever covering the footer.
   align-self:stretch gives the grid cell the full row height to stick
   within; the card itself only fills its own content height and, on a
   short window, scrolls internally instead of clipping the submit button. */
.adantis-home-prices__offers--form { align-self: stretch; }
.adantis-estimate-card {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + 96px);
	max-height: calc(100vh - 116px);
	overflow-y: auto;
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	border-radius: var(--adantis-radius-lg);
	padding: 1.75rem;
}
.adantis-estimate-card .adantis-form__title { margin-top: 0; }
.adantis-estimate-card .adantis-form__intro {
	font-size: .92rem;
	color: var(--wp--preset--color--contrast-2, #6C5B4E);
	margin: 0 0 1.25rem;
}
.adantis-estimate-card .adantis-form__note {
	margin-top: 1rem;
	font-size: .8rem;
	color: var(--wp--preset--color--contrast-2, #6C5B4E);
}
/* The estimate card is only ~286px wide, so the default 2-column form grid
   forces the phone field into a cramped half-width cell (~104px) where the
   mask "+7 (999) 123-45-67" wraps/overflows. In this card the phone row is
   the only non-wide row, so stretch it (and any odd non-wide row) across
   the full grid so the whole number is always visible on one line while
   keeping the digits large and readable. */
.adantis-estimate-card .adantis-form__row:not(.adantis-form__row--wide) { grid-column: 1 / -1; }
/* The example hint inherited the body size/color (17.5px, near-black) and
   stole attention from the actual field. Dial it down to a quiet, secondary
   secondary hint: 14px, regular weight, muted gray. */
.adantis-estimate-card .adantis-form__hint {
	font-size: .875rem;
	line-height: 1.4;
	font-weight: 400;
	color: var(--wp--preset--color--contrast-3, #8a7a6d);
}
@media (max-width: 899px) {
	.adantis-estimate-card { position: static; max-height: none; }
}
.adantis-offer-banner {
	position: relative;
	display: block;
	padding: 1.5rem;
	border-radius: var(--adantis-radius-lg);
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	text-decoration: none;
	color: inherit;
	transition: transform .2s ease, box-shadow .2s ease;
}
@media (prefers-reduced-motion: no-preference) {
	.adantis-offer-banner:hover { transform: translateY(-3px); box-shadow: var(--adantis-shadow); }
}
.adantis-offer-banner__badge {
	display: inline-block;
	margin-bottom: .5rem;
	padding: .25rem .6rem;
	border-radius: 999px;
	background: var(--wp--preset--color--accent-gold, #CEA276);
	color: var(--wp--preset--color--contrast, #241811);
	font-size: .75rem;
	font-weight: 700;
}
.adantis-offer-banner h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.adantis-offer-banner p { margin: 0; font-size: .88rem; color: var(--wp--preset--color--contrast-2, #6C5B4E); }
.adantis-offer-banner__arrow { position: absolute; top: 1.25rem; right: 1.25rem; opacity: .5; }

/* ---------- map ---------- */

.adantis-map { position: relative; }
.adantis-map__canvas {
	display: block;
	width: 100%;
	height: 480px;
	border: 0;
	border-radius: var(--adantis-radius-lg);
	margin-bottom: 1.5rem;
	background: var(--wp--preset--color--base-soft, #FBF6EF);
}
.adantis-map__fallback {
	padding: 0;
}
.adantis-map__fallback-list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
}
@media (max-width: 1023px) { .adantis-map__fallback-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px) { .adantis-map__fallback-list { grid-template-columns: 1fr; } }
.adantis-map__branch {
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	border-radius: var(--adantis-radius-md);
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: .4rem;
	height: 100%;
}
.adantis-map__branch h3 { margin: 0; font-size: 1rem; }
.adantis-map__branch-address, .adantis-map__branch-meta { margin: 0; font-size: .85rem; color: var(--wp--preset--color--contrast-2, #6C5B4E); }
.adantis-map__branch-meta a { color: inherit; }
.adantis-map__branch-actions { margin-top: auto; padding-top: .6rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.adantis-map__branch-link { background: var(--wp--preset--color--primary, #4F2C1D); color: #fff; }

/* Leaflet marker popup content, styled minimally to match the site. */
.adantis-map-balloon h3 { margin: 0 0 .35rem; font-size: 1rem; }
.adantis-map-balloon p { margin: 0 0 .3rem; font-size: .85rem; }
.adantis-map-balloon a { color: var(--wp--preset--color--primary, #4F2C1D); }
.leaflet-popup-content-wrapper { border-radius: var(--adantis-radius-sm); }

/* ---------- lead form: validation + states ---------- */

.adantis-form input:focus-visible,
.adantis-form select:focus-visible,
.adantis-form textarea:focus-visible {
	outline: 2.5px solid var(--wp--preset--color--primary, #4F2C1D);
	outline-offset: 1px;
}
.adantis-form input:hover,
.adantis-form select:hover,
.adantis-form textarea:hover {
	border-color: var(--wp--preset--color--primary, #4F2C1D);
}
.adantis-form [aria-invalid="true"] {
	border-color: var(--wp--preset--color--error, #B3261E) !important;
}
.adantis-form__error {
	display: none;
	font-size: .82rem;
	color: var(--wp--preset--color--error, #B3261E);
	margin: .3rem 0 0;
}
.adantis-form__row.has-error .adantis-form__error { display: block; }
.adantis-form__row.has-error input,
.adantis-form__row.has-error select,
.adantis-form__row.has-error textarea {
	border-color: var(--wp--preset--color--error, #B3261E);
}
.adantis-form__row.is-valid input,
.adantis-form__row.is-valid select {
	border-color: var(--wp--preset--color--success, #2E7D4F);
}
.adantis-form__actions {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	align-items: center;
	margin-top: .25rem;
}
.adantis-faq__item[open] summary { margin-bottom: .5rem; }

/* /vrachi/ intro paragraph: the page content is a constrained layout, which
   caps every plain paragraph at the 820px content size and centres it. The
   intro sits directly above the doctors list, so it is matched structurally
   (a paragraph that has the .adantis-doctors list as a later sibling) instead
   of by page ID or an editor class. Only max-width needs overriding — WordPress
   sets it with a zero-specificity :where() rule; with no cap the block fills
   the container and the auto side margins collapse to 0, so no !important. */
.entry-content > p:has(~ .adantis-doctors) { max-width: none; text-align: left; }
/* /otzyvy/ intro: same treatment. Matched as a plain paragraph above the
   branch-rating panel; .alignwide paragraphs (the rating line) are excluded
   because they already span the container and stay centred. */
.entry-content > p:not(.alignwide):has(~ .adantis-reviews-summary) { max-width: none; text-align: left; }

/* ---------- /tseny/ layout: search width + offer aligned to the first table ----------
   The list wrapper and .adantis-prices become display:contents so the toolbar,
   every price group and the estimate card are cells of ONE grid. The card
   sits in column 2 from row 2 (the first row after the toolbar) and is pushed
   down by exactly the group-title block, so its top edge equals the top of the
   first visible table — whatever the toolbar's height (wrapped filter chips),
   the active filter or the search results. Sticky still works: the card's
   containing block is the tall column-2 cell. Row gap is 0 because the card
   spans many (mostly empty) implicit rows; spacing comes from margins. */
.adantis-search__input { max-width: 440px; padding: .8rem 1rem; }
.adantis-home-prices--full { --pg-title-h: 3rem; --pg-title-gap: .75rem; row-gap: 0; }
.adantis-home-prices--full .adantis-home-prices__list,
.adantis-home-prices--full .adantis-prices { display: contents; }
.adantis-home-prices--full .adantis-prices__toolbar { grid-column: 1; grid-row: 1; }
.adantis-home-prices--full .adantis-price-group { grid-column: 1; margin: 0 0 3.5rem; }
.adantis-home-prices--full .adantis-price-group__title {
	margin: 0 0 var(--pg-title-gap);
	height: var(--pg-title-h);
	line-height: var(--pg-title-h);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.adantis-home-prices--full .adantis-prices__note { grid-column: 1; }
.adantis-home-prices--full .adantis-home-prices__offers--form {
	grid-column: 2;
	grid-row: 2 / span 60;
	align-self: stretch;
	margin-top: calc(var(--pg-title-h) + var(--pg-title-gap));
}
.adantis-home-prices--full .adantis-estimate-card { align-self: start; }
@media (max-width: 899px) {
	.adantis-home-prices--full .adantis-home-prices__offers--form { grid-column: 1; grid-row: auto; margin-top: 2rem; }
	.adantis-home-prices--full .adantis-price-group { margin-bottom: 2.5rem; }
	.adantis-home-prices--full .adantis-price-group__title { height: auto; line-height: 1.3; white-space: normal; }
}

/* ---------- compact booking form (home only: layout="compact") ----------
   Fields 46px high, 14px between rows, comment folded under a link, consent
   and both buttons packed below. Scoped to .adantis-form--compact so the
   modal, doctor/service and price-estimate forms keep their own layout. */
.adantis-booking__head h2 { margin: 0; }
.adantis-booking__sub { margin: .25rem 0 0; font-size: 1rem; color: var(--wp--preset--color--contrast-2, #6C5B4E); }
.adantis-booking { margin-top: .75rem; }
.adantis-form--compact {
	gap: .875rem 1rem;
	max-width: 760px;
	margin-inline: auto;
}
/* Keep hidden honeypot + service fields out of the CSS grid so they never
   occupy an implicit cell (which previously pushed the visible rows into a
   staircase / left empty cells). The honeypot value is still submitted and
   checked server-side, so spam protection is unchanged; only layout is fixed. */
.adantis-form--compact input[type="hidden"],
.adantis-form--compact .adantis-form__hp { display: none; }
/* wpautop occasionally injects an empty <p></p> at the start of this inline
   shortcode output; as an in-flow grid child it occupied the first cell and
   pushed the visible fields into a staircase. Collapse empty paragraphs so
   they never become phantom grid items (safe: empty, no content/function). */
.adantis-form--compact > p:empty { display: none; }
.adantis-form--compact .adantis-form__row { gap: .3rem; }
.adantis-form--compact label { font-size: .875rem; }
.adantis-form--compact .adantis-form__hint { font-size: .8125rem; line-height: 1.3; color: var(--wp--preset--color--contrast-3, #8a7a6d); }
.adantis-form--compact input[type="text"],
.adantis-form--compact input[type="tel"],
.adantis-form--compact select {
	height: 46px;
	padding: 0 .9rem;
	font-size: 1rem;
}
.adantis-form--compact textarea { padding: .65rem .9rem; min-height: 5.5rem; resize: vertical; font-size: 1rem; }
.adantis-form__comment summary {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	cursor: pointer;
	list-style: none;
	font-size: .9375rem;
	font-weight: 600;
	color: var(--wp--preset--color--primary, #4F2C1D);
}
.adantis-form__comment summary::-webkit-details-marker { display: none; }
.adantis-form__comment summary::before { content: "+"; display: inline-block; width: 1.25rem; font-size: 1.25rem; line-height: 1; }
.adantis-form__comment[open] summary::before { content: "−"; }
.adantis-form__comment summary:hover { text-decoration: underline; }
.adantis-form__comment[open] summary { min-height: 36px; }
.adantis-form--compact .adantis-form__consent { font-size: .875rem; }
.adantis-form--compact .adantis-form__consent label { gap: .625rem; align-items: center; padding: .25rem 0; cursor: pointer; }
.adantis-form--compact .adantis-form__consent input[type="checkbox"] {
	flex: 0 0 auto;
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
	accent-color: var(--wp--preset--color--primary, #4F2C1D);
}
/* .adantis-form__row sets flex-direction: column; the actions row needs an
   explicit row direction or both buttons stack (and stretch tall on phones). */
.adantis-form--compact .adantis-form__actions { flex-direction: row; flex-wrap: nowrap; gap: .75rem; margin-top: 0; justify-content: flex-start; align-items: center; }
.adantis-form--compact .adantis-form__actions .adantis-btn { flex: 0 0 auto; white-space: nowrap; min-height: 46px; padding-block: .6rem; font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; }
.adantis-form--compact .adantis-form__row:has(> .adantis-form__comment) { margin-block: -.35rem; }
/* Consent + buttons share one row on desktop; flex so the consent text takes
   the remaining width and the two buttons sit compactly on the right. */
.adantis-form--compact .adantis-form__bottom { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.adantis-form--compact .adantis-form__bottom .adantis-form__consent { flex: 1 1 0; min-width: 0; margin: 0; }
.adantis-form--compact .adantis-form__bottom .adantis-form__actions { flex: 0 0 auto; margin: 0; }
/* The modal dialog: the generic compact bottom row packs the consent into a
   narrow ~174px column beside the two buttons, so the consent wording wraps
   into a tall, cramped vertical sliver. In the modal, lay it out as a normal
   form instead — consent full-width and readable, buttons in their own row
   underneath (side by side, or stacked on phones). */
.adantis-modal .adantis-form__bottom { flex-direction: column; align-items: stretch; gap: .5rem 1rem; }
.adantis-modal .adantis-form__bottom .adantis-form__consent { flex: 1 1 auto; width: 100%; }
.adantis-modal .adantis-form__bottom .adantis-form__actions { flex: 1 1 auto; width: 100%; justify-content: flex-end; }
@media (max-width: 640px) {
	.adantis-form--compact { grid-template-columns: 1fr; }
	.adantis-form--compact .adantis-form__bottom { flex-direction: column; align-items: stretch; }
	.adantis-form--compact .adantis-form__bottom .adantis-form__consent { flex: 1 1 auto; }
	.adantis-form--compact .adantis-form__bottom .adantis-form__actions { flex: 1 1 auto; justify-content: stretch; }
	.adantis-form--compact .adantis-form__actions { flex-wrap: wrap; }
	.adantis-form--compact .adantis-form__actions .adantis-btn { flex: 1 1 100%; justify-content: center; text-align: center; }
}

/* ---------- home below-the-fold pass (2026-09-28) ----------
   Type floor: running text and captions >= 15px, uppercase micro-labels and
   table heads >= 14px. Components size themselves in rem here because the
   theme.json small/medium presets are not what WordPress serves (see the
   note at .adantis-hero__lead in the theme stylesheet). These rules follow
   the originals on purpose and supersede them at equal specificity. */
.adantis-card__meta, .adantis-card__sub, .adantis-card__desc { font-size: .9375rem; line-height: 1.55; }
.adantis-card__eyebrow, .adantis-card__badge, .adantis-badge, .adantis-price-row--head { font-size: .875rem; }
.adantis-btn--sm { font-size: .9375rem; }
.adantis-mini-card p, .adantis-mini-card a.adantis-mini-card__link { font-size: .9375rem; }
.adantis-reviews-summary__branch > span, .adantis-reviews-summary__link { font-size: .9375rem; }
.adantis-offer-banner p { font-size: .9375rem; }
.adantis-offer-banner__badge { font-size: .875rem; }
.adantis-prices__note { font-size: .875rem; line-height: 1.5; }
.adantis-card__link { font-size: .9375rem; font-weight: 600; color: var(--wp--preset--color--primary, #4F2C1D); text-decoration: none; }
.adantis-card__link:hover { text-decoration: underline; }

/* Home price teaser: service, our price, average in Yakutsk (column kept at the
   owner's request). Names are plain-weight links (underline on hover only);
   the price never wraps. */
.adantis-prices--compact .adantis-price-row {
	align-items: center;
	padding: 1rem 1.25rem;
}
.adantis-prices--compact .adantis-price-row { grid-template-columns: 1fr auto; }
.adantis-prices--compact .adantis-price-row__name { font-size: 1.0625rem; line-height: 1.4; }
.adantis-prices--compact .adantis-price-row__name a { text-decoration: none; }
.adantis-prices--compact .adantis-price-row__name a:hover { text-decoration: underline; }
.adantis-prices--compact .adantis-price-row__price { font-size: 1.0625rem; }
/* On narrow phones the name column of the home teaser is only ~170px, so long
   single words ("Металлокерамическая") were split mid-word. Stack name over
   price here, like the full price table's mobile cards. */
@media (max-width: 440px) {
	.adantis-prices--compact .adantis-price-row { grid-template-columns: 1fr; gap: .3rem; align-items: start; }
	.adantis-prices--compact .adantis-price-row__price { text-align: left; }
}
@media (max-width: 600px) {
	.adantis-prices--compact .adantis-price-row__price::before,
	.adantis-prices--compact .adantis-price-row__avg::before { font-size: .875rem; }
}
/* Offer cards next to the table: a short banner image so both columns end at
   about the same height instead of the offers running ~500px past the table. */
.adantis-home-prices__offers .adantis-card__media { aspect-ratio: 3 / 1; }
/* Side by side (>= 900px) the table column stretches to the offers' height and
   spreads its rows evenly, so the left column doesn't end 250px early. */
@media (min-width: 900px) {
	.adantis-home-prices:not(.adantis-home-prices--solo):not(.adantis-home-prices--full) { align-items: stretch; }
	.adantis-home-prices:not(.adantis-home-prices--full) .adantis-home-prices__list { display: flex; flex-direction: column; }
	.adantis-home-prices:not(.adantis-home-prices--full) .adantis-home-prices__list .adantis-prices { flex: 1; display: flex; flex-direction: column; }
	.adantis-home-prices:not(.adantis-home-prices--full) .adantis-home-prices__list .adantis-price-table { flex: 1; display: flex; flex-direction: column; }
	.adantis-home-prices:not(.adantis-home-prices--full) .adantis-home-prices__list .adantis-price-row:not(.adantis-price-row--head) { flex: 1; }
}

/* Journal cards: equal height, left-aligned text, footer pinned to the bottom.
   The card body is a plain group now (not "constrained", whose auto margins
   centred everything). */
.adantis-grid--journal > .wp-block-post { display: flex; }
.adantis-grid--journal .adantis-card { width: 100%; }
.adantis-grid--journal .adantis-card__body { text-align: left; }
.adantis-grid--journal .adantis-card__footer { width: 100%; }

/* Branch cards (home map + contacts): readable addresses, two equal action
   buttons per row, "О филиале" as a plain link on its own line. */
.adantis-map__branch h3 { font-size: 1.125rem; }
.adantis-map__branch-address, .adantis-map__branch-meta { font-size: .9375rem; line-height: 1.5; }
.adantis-map__branch-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.adantis-map__branch-actions .adantis-btn { justify-content: center; text-align: center; }
.adantis-map__branch-actions .adantis-map__branch-link {
	grid-column: 1 / -1;
	background: none;
	color: var(--wp--preset--color--primary, #4F2C1D);
	justify-content: flex-start;
	padding-inline: 0;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}
@media (max-width: 420px) { .adantis-map__branch-actions { grid-template-columns: 1fr; } }
