/* Adantis theme — layout chrome that block styles/theme.json cannot express:
   header, mobile navigation, footer, skip link, floating WhatsApp button,
   and a few section/hero utility classes used inside patterns. */

/* Manrope itself (self-hosted, Cyrillic + Latin, variable 200–800) is
   registered through theme.json's typography.fontFamilies[].fontFace —
   WordPress generates the @font-face rules and resolves the file paths,
   so it isn't duplicated here. */

/* ---------- global text stability ----------
   One font, everywhere; tabular digits so prices/stats/phone numbers never
   shift width as they update; no letter-spacing left to inherit oddly. */

html {
	scroll-behavior: smooth;
	font-family: var(--wp--preset--font-family--body);
	font-variant-numeric: tabular-nums;
	letter-spacing: normal;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

/* ---------- compact scale (a touch smaller) ----------
   Shrink the global type presets a notch: body text, headings, section
   titles and prices all derive from these --wp--preset--font-size--*
   custom properties that theme.json's fluid presets emit. Overriding the
   variables here scales the whole typographic system down slightly on the
   frontend. */
:root {
	--wp--preset--font-size--medium:   clamp(0.9375rem, 1.2vw, 1rem);
	--wp--preset--font-size--large:    clamp(1rem, 1.2vw, 1.125rem);
	--wp--preset--font-size--x-large:  clamp(1.5rem, 3vw, 2rem);
	--wp--preset--font-size--xx-large: clamp(1.875rem, 3.6vw, 2.375rem);
}

* {
	box-sizing: border-box;
}

/* ---------- responsive root padding ----------
   theme.json's styles.spacing.padding is a single static value (1.25rem,
   right for mobile) with no native per-breakpoint support. WordPress reads
   the --wp--style--root--padding-* custom properties live wherever it uses
   root-padding-aware alignment, so overriding them here at wider breakpoints
   is the correct way to get 32–64px desktop side margins instead of the
   thin mobile gutter stretching all the way up to 1920px. */
@media (min-width: 768px) {
	body { --wp--style--root--padding-left: 2rem; --wp--style--root--padding-right: 2rem; }
}
@media (min-width: 1440px) {
	body { --wp--style--root--padding-left: 3rem; --wp--style--root--padding-right: 3rem; }
}
@media (min-width: 1920px) {
	body { --wp--style--root--padding-left: 4rem; --wp--style--root--padding-right: 4rem; }
}

img, svg {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ---------- accessibility ---------- */

.adantis-skip-link {
	position: absolute;
	left: 1rem;
	top: 0;
	z-index: 10000;
	background: var(--wp--preset--color--contrast, #241811);
	color: #fff;
	padding: .75rem 1.25rem;
	border-radius: 0 0 10px 10px;
	transform: translateY(-100%);
	transition: transform .2s ease;
}
/* translateY(-100%) is relative to the element's own rendered height, so it
   fully clears the viewport regardless of how long the link text is or how
   many lines it wraps to — a fixed "top: -3rem" doesn't, which is exactly
   why a sliver of this dark pill used to peek out above the logo on every
   page. Never hide the real WP admin bar to fix this — this link was the
   actual cause, not the toolbar. */
.adantis-skip-link:focus { transform: translateY(0); }

*:focus-visible { outline: 2.5px solid var(--wp--preset--color--primary, #4F2C1D); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- header ---------- */

/* The header must stay pinned to the top on scroll. Sticking .adantis-header
   alone did nothing: its own template-part wrapper is only header-height, so
   there was no room for it to stick within. Stick the wrapper itself — its
   parent (.wp-site-blocks) spans the whole page, so it holds for the full
   scroll. (footer.wp-block-template-part is deliberately not matched.) */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
}

/* Logged-in users have WordPress's fixed admin toolbar at the very top; offset
   the pinned header by its height so it doesn't tuck under the bar. The toolbar
   is fixed at ≥601px (32px, 46px tall at ≤782px) and scrolls away at ≤600px, so
   no offset is needed there. Visitors have no toolbar and are unaffected. */
.admin-bar header.wp-block-template-part { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar header.wp-block-template-part { top: 46px; } }
@media screen and (max-width: 600px) { .admin-bar header.wp-block-template-part { top: 0; } }

.adantis-header {
	position: relative;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: saturate(160%) blur(10px);
	border-bottom: 1px solid var(--wp--preset--color--border, #E7DCCC);
}

/* Keep anchored targets (article "Содержание" links, "Записаться" → form)
   from hiding under the now-pinned header when jumped to. */
:where(h2, h3, h4), #adantis-form, #adantis-form-anchor, .adantis-price-group[id] { scroll-margin-top: 92px; }

.adantis-header__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: .75rem;
}

.adantis-header__logo img { height: 52px; width: auto; display: block; }

.adantis-header nav.wp-block-navigation { flex-wrap: nowrap; }

/* Dropdown menus ("Услуги", "Филиалы", "О клинике") — WP core's default
   submenu box is a narrow ~200px column, which wraps long Russian service
   names like "Диагностика, КТ и лечение под микроскопом" onto three lines
   with barely any padding. Give it real width and breathing room. */
.adantis-header .wp-block-navigation__submenu-container {
	min-width: 320px !important;
	max-width: 360px;
	padding: .5rem;
	gap: 0 !important;
	border-radius: var(--wp--custom--radius--medium, 16px);
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	background: #fff;
	box-shadow: 0 12px 28px rgba(36, 24, 17, .12);
}
.adantis-header .wp-block-navigation__submenu-container .wp-block-navigation-item {
	width: 100%;
}
.adantis-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	display: block !important;
	padding: .7rem .9rem !important;
	line-height: 1.35 !important;
	white-space: normal !important;
	border-radius: var(--wp--custom--radius--small, 10px);
	text-decoration: none !important;
}
.adantis-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.adantis-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus {
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	text-decoration: none !important;
}

.adantis-header__nav-row { gap: 1.6rem; }

/* ---------- mega-menu ("Услуги") ---------- */

.adantis-megamenu { position: relative; }

.adantis-megamenu__trigger {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	font: inherit;
	font-size: .95rem;
	font-weight: 500;
	color: var(--wp--preset--color--primary, #4F2C1D);
	background: none;
	border: none;
	padding: .5em 1em;
	margin: 0;
	cursor: pointer;
	border-radius: var(--wp--custom--radius--small, 10px);
}
.adantis-megamenu__trigger:hover,
.adantis-megamenu.is-open .adantis-megamenu__trigger {
	color: var(--wp--preset--color--contrast, #241811);
	background: var(--wp--preset--color--base-soft, #FBF6EF);
}
.adantis-megamenu__chevron { transition: transform .2s ease; flex-shrink: 0; }
.adantis-megamenu.is-open .adantis-megamenu__chevron { transform: rotate(180deg); }

.adantis-megamenu__panel {
	position: absolute;
	top: 100%;
	left: 0;
	width: min(880px, 90vw);
	margin-top: .5rem;
	background: #fff;
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	border-radius: var(--wp--custom--radius--medium, 16px);
	box-shadow: 0 20px 45px rgba(36, 24, 17, .16);
	display: grid;
	grid-template-columns: 260px 1fr;
	grid-template-rows: minmax(0, 1fr) auto;
	max-height: 72vh;
	overflow: hidden;
	z-index: 200;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(8px);
	transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.adantis-megamenu.is-open .adantis-megamenu__panel {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}

.adantis-megamenu__directions {
	grid-row: 1 / 2;
	display: flex;
	flex-direction: column;
	gap: .15rem;
	padding: .75rem;
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	border-right: 1px solid var(--wp--preset--color--border, #E7DCCC);
	overflow-y: auto;
}
.adantis-megamenu__direction {
	display: flex;
	align-items: center;
	gap: .6rem;
	padding: .6rem .7rem;
	border-radius: var(--wp--custom--radius--small, 10px);
	text-decoration: none !important;
	color: var(--wp--preset--color--contrast, #241811);
	font-size: .88rem;
	font-weight: 600;
	line-height: 1.25;
}
.adantis-megamenu__direction-icon { display: inline-flex; flex-shrink: 0; }
.adantis-megamenu__direction-icon svg { width: 18px; height: 18px; display: block; color: var(--wp--preset--color--accent-gold, #CEA276); }
.adantis-megamenu__direction:hover,
.adantis-megamenu__direction:focus-visible,
.adantis-megamenu__direction.is-active {
	background: #fff;
	color: var(--wp--preset--color--primary, #4F2C1D);
	box-shadow: 0 2px 8px rgba(36, 24, 17, .08);
}

.adantis-megamenu__services {
	grid-row: 1 / 2;
	padding: 1.1rem 1.3rem;
	overflow-y: auto;
}
.adantis-megamenu__service-panel { display: none; }
.adantis-megamenu__service-panel.is-active { display: block; }
.adantis-megamenu__service-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: .85rem;
}
.adantis-megamenu__service-title { font-weight: 700; font-size: 1.05rem; color: var(--wp--preset--color--contrast, #241811); }
.adantis-megamenu__service-all { font-size: .82rem; white-space: nowrap; }
.adantis-megamenu__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: .35rem .75rem;
}
.adantis-megamenu__item {
	display: block;
	padding: .55rem .7rem;
	border-radius: var(--wp--custom--radius--small, 10px);
	color: var(--wp--preset--color--contrast-2, #6C5B4E);
	text-decoration: none !important;
	font-size: .88rem;
	line-height: 1.35;
}
.adantis-megamenu__item:hover,
.adantis-megamenu__item:focus-visible {
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	color: var(--wp--preset--color--primary, #4F2C1D);
}

.adantis-megamenu__panel-footer {
	grid-column: 1 / -1;
	grid-row: 2 / 3;
	border-top: 1px solid var(--wp--preset--color--border, #E7DCCC);
	padding: .75rem 1.3rem;
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	text-align: right;
}
.adantis-megamenu__all-link { font-size: .88rem; font-weight: 600; }

@media (max-width: 1100px) {
	.adantis-megamenu__panel { width: min(760px, 86vw); }
}

.adantis-header__actions { display: flex; align-items: center; gap: .6rem; }

.adantis-phone-link {
	font-weight: 600;
	white-space: nowrap;
	text-decoration: none;
	color: var(--wp--preset--color--contrast, #241811);
}

.adantis-menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: var(--wp--custom--radius--small, 10px);
	border: 1.5px solid var(--wp--preset--color--border, #E7DCCC);
	background: #fff;
	cursor: pointer;
}
.adantis-menu-toggle svg { width: 22px; height: 22px; }

/* 1120px, not 781px: with the full 8-item nav plus the mega-menu trigger,
   phone number and "Записаться" button, the desktop row genuinely runs out
   of room well above typical "mobile" widths — at 1024px specifically the
   button text itself was wrapping onto two lines. Widening this breakpoint
   hands 782–1120px screens (1024px included) the already-solid mobile
   accordion instead of a cramped, wrapping desktop row. (It was 1100px: at
   1101–1109px "Контакты" wrapped to a second row and the button text broke.) */
@media (max-width: 1120px) {
	.adantis-header__row > .adantis-header__nav-row { display: none; }
	.adantis-menu-toggle { display: inline-flex; }
	/* The mobile bottom bar already gives a dedicated "Позвонить" action, so
	   the header's phone number text is redundant here — and at narrow widths
	   logo + phone text + "Записаться" + hamburger genuinely don't fit on one
	   row (the phone link was overflowing the viewport before this rule). */
	.adantis-phone-link { display: none; }
}

#adantis-mobile-nav {
	display: none;
	border-top: 1px solid var(--wp--preset--color--border, #E7DCCC);
	background: #fff;
	padding: 1rem 1.25rem 1.5rem;
}
#adantis-mobile-nav.is-open { display: block; }
#adantis-mobile-nav .wp-block-navigation { align-items: stretch; }
#adantis-mobile-nav .wp-block-navigation__container { flex-direction: column; align-items: stretch; gap: .25rem !important; }
#adantis-mobile-nav a.wp-block-navigation-item__content { padding: .85rem .25rem; font-size: 1.05rem; }
body.adantis-menu-open { overflow: hidden; }

/* ---------- hero image safety ---------- */

/* Current hero photo (family, id 478) is landscape ~4:3 (1448x1086). The box
   ratio matches the source so `contain` shows the full frame with no
   letterboxing and no crop — if the photo is ever swapped for one with a
   different ratio, update this aspect-ratio to match it, or this reverts to
   pillarboxing (harmless) rather than the older 4:5 `cover` crop bug. */
.adantis-hero__media {
	position: relative;
	width: 100%;
	max-width: 560px;
	margin-inline: auto;
	border-radius: var(--wp--custom--radius--large, 24px);
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: var(--wp--preset--color--base-soft, #FBF6EF);
}
.adantis-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: 50% 50%;
	display: block;
	/* Blend the photo's own (light cream) background into the warm hero
	   gradient so the family image reads as part of the section rather than
	   as a pasted-on rectangle with a mismatched backdrop. */
	mix-blend-mode: multiply;
}

/* Hero lead: sized by its own class, not the "medium" preset. Cause (confirmed
   via REST /global-styles/themes/adantis): WordPress here keeps its default
   small/medium/large/x-large presets (13px, clamp 14–20px, …) and drops the
   theme.json entries with those slugs — only "caption" and "xx-large" reach
   the theme layer. Site-wide headings were tuned against the served values,
   so the presets are left alone; components size themselves in rem. */
.adantis-hero__lead { font-size: 1.0625rem; line-height: 1.6; }
@media (min-width: 1024px) { .adantis-hero__lead { font-size: 1.2rem; } }
.adantis-hero .wp-block-button__link { font-size: 1rem; }

/* ---------- floating WhatsApp button ---------- */

/* ".adantis-footer a { color:#fff }" (specificity 0,1,1) otherwise beats a
   bare ".adantis-float-whatsapp" (0,1,0) and silently overrides the fix
   below back to white — qualify with .adantis-footer to win outright. */
.adantis-footer .adantis-float-whatsapp {
	position: fixed;
	right: 1.1rem;
	bottom: 1.1rem;
	z-index: 90;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #25D366;
	/* WhatsApp's own bright green fails WCAG text contrast against white
	   (1.98:1, needs 4.5:1) — a dark green keeps the button unmistakably
	   "WhatsApp-branded" (same background swatch) while the icon/label is
	   actually readable, at 6.2:1. */
	color: #0B3D1E;
	box-shadow: 0 10px 24px rgba(37, 211, 102, .35);
	text-decoration: none;
	font-size: 1.6rem;
}
.adantis-float-whatsapp:hover { filter: brightness(1.05); }

/* ---------- floating contact button (call / WhatsApp choice) ---------- */

/* The widget lives inside .adantis-footer, whose a { color:#fff } rule
   (specificity 0,1,1) would otherwise override the pill link text back to
   white against the white pill — qualify with .adantis-footer to win. */
.adantis-footer .adantis-float-contact {
	position: fixed;
	right: 1.1rem;
	bottom: 1.1rem;
	z-index: 90;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: .7rem;
}
.adantis-float-contact__menu {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	opacity: 0;
	transform: translateY(8px);
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
}
.adantis-float-contact.is-open .adantis-float-contact__menu {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}
.adantis-footer .adantis-float-contact__action {
	display: flex;
	align-items: center;
	gap: .6rem;
	padding: .55rem .9rem .55rem .55rem;
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--contrast, #241811) !important;
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	border-radius: 999px;
	box-shadow: 0 8px 20px rgba(36, 24, 17, .14);
	text-decoration: none;
	white-space: nowrap;
	font-size: .92rem;
	font-weight: 700;
}
.adantis-footer .adantis-float-contact__action--wa {
	background: #25D366;
	border-color: #25D366;
	color: #0B3D1E !important;
}
.adantis-float-contact__action small {
	display: block;
	font-weight: 600;
	font-size: .78rem;
	opacity: .85;
}
.adantis-float-contact__icon {
	display: flex;
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	align-items: center;
	justify-content: center;
	color: var(--wp--preset--color--primary, #4F2C1D);
}
.adantis-float-contact__action--wa .adantis-float-contact__icon {
	background: rgba(255, 255, 255, .35);
	color: #0B3D1E;
}
.adantis-float-contact__icon svg { width: 20px; height: 20px; }
.adantis-float-contact__fab {
	background: transparent;
	border: 0;
	padding: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}
.adantis-float-contact__logo {
	display: block;
	height: 64px;
	width: auto;
	max-width: 140px;
	filter: drop-shadow(0 8px 16px rgba(36, 24, 17, .22));
}
.adantis-float-contact__fab:focus-visible { outline: 3px solid var(--wp--preset--color--primary, #4F2C1D); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
	.adantis-float-contact__menu { transition: none; }
}

/* Journal article header icon badge (was an inline-styled html div). */
.adantis-journal-badge {
	width: 84px;
	height: 84px;
	border-radius: 999px;
	background: var(--wp--preset--color--base-soft, #FBF6EF);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1.25rem;
	/* It's now a core/group with a constrained layout, which would center the
	   84px box in the column; the original badge sat flush-left, so undo the
	   auto centring and the flow block-gap added above it. */
	margin-inline: 0 !important;
	margin-block-start: 0;
}
.adantis-journal-badge svg { width: 46px; height: 46px; }

/* ---------- mobile bottom action bar ---------- */
/* Hidden by default (desktop uses the floating WhatsApp circle instead);
   swaps in below the header's own mobile-nav breakpoint. */

.adantis-mobile-bar {
	display: none;
}

@media (max-width: 781px) {
	/* Must match/exceed .adantis-footer .adantis-float-whatsapp's specificity
	   (added for the color-contrast fix above) or this hide-on-mobile rule
	   silently loses and the floating button stays on top of the mobile bar. */
	.adantis-footer .adantis-float-contact { display: none; }

	.adantis-mobile-bar {
		display: flex;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 95;
		gap: 1px;
		background: var(--wp--preset--color--border, #E7DCCC);
		box-shadow: 0 -4px 16px rgba(36, 24, 17, .1);
		padding-bottom: env(safe-area-inset-bottom, 0);
	}
	.adantis-mobile-bar__btn {
		flex: 1 1 50%;
		display: flex;
		align-items: center;
		justify-content: center;
		gap: .5rem;
		min-height: 56px;
		background: var(--wp--preset--color--base, #fff);
		color: var(--wp--preset--color--contrast, #241811);
		font-weight: 700;
		font-size: .95rem;
		text-decoration: none;
	}
	/* ".adantis-footer a { color:#fff }" (specificity 0,1,1) otherwise beats
	   a bare ".adantis-mobile-bar__btn--wa" (0,1,0) and silently overrides
	   this back to white — qualify with .adantis-footer to win outright
	   rather than relying on !important or source-order luck. */
	/* Same specificity problem hit the "Позвонить" button: it was white on white.
	   Restore its text color here; the --wa rule below comes later and overrides it. */
	.adantis-footer .adantis-mobile-bar__btn {
		color: var(--wp--preset--color--contrast, #241811);
	}
	.adantis-footer .adantis-mobile-bar__btn--wa {
		background: #25D366;
		/* Same WCAG contrast fix as .adantis-float-whatsapp above — white
		   text on this green is 1.98:1, well under the 4.5:1 minimum. */
		color: #0B3D1E;
	}
	body { padding-bottom: 56px; }
}

@media print {
	.adantis-float-contact, .adantis-mobile-bar, .adantis-header, .adantis-footer { display: none !important; }
}

/* ---------- footer ---------- */

.adantis-footer {
	background: var(--wp--preset--color--contrast, #241811);
	color: rgba(255,255,255,.82);
}
.adantis-footer a { color: #fff; }
.adantis-footer h3, .adantis-footer h4 { color: #fff; }
/* Unify footer type: column headings and list links were much larger (30px
   headings, ~17.5px links) than the small body text, so the footer read as
   uneven. Bring everything to one compact, readable scale. */
.adantis-footer h3, .adantis-footer h4 { font-size: .9375rem; line-height: 1.35; margin: 0 0 .75rem; font-weight: 700; }
/* Pin the three column headings to one baseline: no wrapping and identical
   metrics so «Разделы», «Пациентам» and «Контакты» sit on the exact same line. */
.adantis-footer__grid h3, .adantis-footer__grid h4 { margin-top: 0; white-space: nowrap; }
.adantis-footer ul.wp-block-list li a { font-size: .875rem; line-height: 1.35; }
/* The logo file is dark brown + gold on a transparent background — made for
   light surfaces. Rendered as-is on this footer's near-black background
   (#241811) it's essentially unreadable. A brightness/invert filter turns it
   into a clean white silhouette for this one dark context only; the actual
   logo file and every light-background use of it elsewhere are untouched. */
.adantis-footer .wp-block-site-logo img { filter: brightness(0) invert(1); opacity: .94; }
.adantis-footer .adantis-footer__bottom {
	border-top: 1px solid rgba(255,255,255,.14);
	font-size: .85rem;
	color: rgba(255,255,255,.6);
}
.adantis-footer .adantis-footer__bottom a { color: rgba(255,255,255,.75); text-decoration: underline; }
/* Footer nav links were plain 19px-tall inline text — under the 24px
   minimum touch-target size. Padding the link itself (not just the <li>)
   grows the actual clickable/tappable area without changing the visual
   list spacing much. */
.adantis-footer ul.wp-block-list { list-style: none; margin: 0; padding: 0; }
.adantis-footer ul.wp-block-list li { margin: 0; }
.adantis-footer ul.wp-block-list li a { display: inline-block; padding: .4rem 0; }

/* The 4-column footer grid (WP core's grid layout, columnCount:4) never
   collapses on its own at narrow widths — at 390px each column shrinks to
   ~85px, and the global `a { word-break: break-word }` rule then breaks
   button text like "Все контакты" one letter per line. Explicit responsive
   track counts, same fix already applied to the doctors/promos/services
   grids elsewhere in this stylesheet. */
.adantis-footer__grid { grid-template-columns: repeat(1, 1fr) !important; }
@media (min-width: 600px)  { .adantis-footer__grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (min-width: 1024px) { .adantis-footer__grid { grid-template-columns: repeat(4, 1fr) !important; } }

/* Homepage "Журнал" teaser (wp:post-template, columnCount:3): the block
   can render as is-layout-flow (display:block), which ignores a bare
   grid-template-columns — so the cards sprawl full-width down the page.
   Force display:grid and drive the responsive 3/2/1 desktop/tablet/mobile
   column split here, with a matching gap for a tidy row of cards. */
.adantis-grid--journal { display: grid !important; grid-template-columns: repeat(1, 1fr) !important; gap: var(--wp--preset--spacing--30, 1.5rem) !important; }
@media (min-width: 600px)  { .adantis-grid--journal { grid-template-columns: repeat(2, 1fr) !important; } }
@media (min-width: 1024px) { .adantis-grid--journal { grid-template-columns: repeat(3, 1fr) !important; } }

/* ---------- misc section utilities used in patterns ---------- */

.adantis-eyebrow {
	display: inline-block;
	font-size: .9375rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary, #4F2C1D);
	margin-bottom: .5rem;
}
/* An inline-block element ignores its own text-align (it shrinks to content
   width, so centering its own text does nothing to its position) — the
   "has-text-align-center" utility class WordPress adds needs the eyebrow to
   go full-width first so that centering actually applies. */
.adantis-eyebrow.has-text-align-center {
	display: block;
}

/**
 * Two-line homepage USP: line one is an overline kicker, line two the claim;
 * the closing phrase gets a soft gold highlighter. Both stay in Manrope
 * (the same typeface) so the pair reads as one brand statement.
 */
.adantis-usp__kicker {
	margin: 0;
	font-size: clamp(1rem, 1.6vw, 1.15rem);
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary, #4F2C1D);
}
.adantis-usp__statement {
	margin: .9rem 0 0;
	white-space: nowrap;
	font-size: clamp(1.45rem, 4.4vw, 3.1rem);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -.02em;
	color: var(--wp--preset--color--contrast, #241811);
}
.adantis-usp__accent {
	white-space: nowrap;
}
@media (max-width: 480px) {
	.adantis-usp__statement { font-size: clamp(1.25rem, 6.4vw, 1.55rem); }
}

/* Journal article FAQ: an accordion built from editable core blocks
   (group.adantis-faq → question h3 + answer p). Progressive enhancement:
   answers are visible without JS; main.js adds .adantis-faq--accordion,
   collapses them (hidden), and toggles open on question click (or Enter). */
.adantis-faq {
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	border-radius: var(--wp--custom--radius--small, 12px);
	overflow: hidden;
	margin: 0 0 .85rem;
}
.adantis-faq__question {
	margin: 0;
	padding: 1rem 1.25rem;
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-size: 1.0625rem;
	line-height: 1.35;
	color: var(--wp--preset--color--contrast, #241811);
}
.adantis-faq__answer {
	margin: 0;
	padding: 0 1.25rem 1.15rem;
	font-size: .975rem;
	line-height: 1.65;
	color: var(--wp--preset--color--contrast, #241811);
}
/* Accordion state (added by main.js): the question becomes a row trigger */
.adantis-faq--accordion .adantis-faq__question {
	cursor: pointer;
	user-select: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}
.adantis-faq--accordion .adantis-faq__question::after {
	content: "+";
	flex: 0 0 auto;
	font-size: 1.35rem;
	font-weight: 500;
	line-height: 1;
	color: var(--wp--preset--color--primary, #4F2C1D);
}
.adantis-faq--accordion.adantis-faq--open .adantis-faq__question::after {
	content: "\2212";
}
.adantis-faq--accordion.adantis-faq--open .adantis-faq__question {
	border-bottom: 1px solid var(--wp--preset--color--border, #E7DCCC);
}

/* Section header: a centered title with an optional action link that must
   not pull the title off-center. Two equal flanking columns absorb the
   action's width so the middle (auto-width) column stays truly centered,
   regardless of how long the button label is. */
.adantis-section-header {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	column-gap: 1rem;
}
.adantis-section-header__title { grid-column: 2; margin: 0; text-align: center; }
.adantis-section-header__action { grid-column: 3; justify-self: end; }
@media (max-width: 781px) {
	.adantis-section-header {
		grid-template-columns: 1fr;
		justify-items: center;
		row-gap: 1rem;
	}
	.adantis-section-header__title,
	.adantis-section-header__action { grid-column: 1; justify-self: center; }
}

.adantis-stat-row { display: flex; flex-wrap: wrap; gap: 2rem; }
.adantis-stat { min-width: 140px; }
.adantis-stat strong { display: block; font-family: var(--wp--preset--font-family--heading); font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: normal; color: var(--wp--preset--color--primary); }
.adantis-stat span { color: var(--wp--preset--color--contrast-2); font-size: .92rem; }

.adantis-map-frame {
	border-radius: var(--wp--custom--radius--large, 24px);
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
}

/* ---------- "О нас": visit-steps cards ---------- */

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

.adantis-step {
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	border-radius: var(--adantis-radius-lg, 20px);
	padding: 1.75rem;
}
.adantis-step__num {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin-bottom: 1rem;
	border-radius: 50%;
	background: var(--wp--preset--color--primary, #4F2C1D);
	color: #fff;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
}
.adantis-step h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.adantis-step p { margin: 0; font-size: .9rem; color: var(--wp--preset--color--contrast-2, #6C5B4E); }

/* ---------- "О нас": guarantees/documents/financing info cards ---------- */

.adantis-info-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}
@media (max-width: 899px) { .adantis-info-cards { grid-template-columns: 1fr; } }

.adantis-info-card {
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid var(--wp--preset--color--border, #E7DCCC);
	border-radius: var(--adantis-radius-lg, 20px);
	padding: 1.75rem;
	display: flex;
	flex-direction: column;
	gap: .6rem;
}
.adantis-info-card h3 { margin: 0; font-size: 1.1rem; }
.adantis-info-card p { margin: 0; font-size: .92rem; color: var(--wp--preset--color--contrast-2, #6C5B4E); flex-grow: 1; }

/* "Для всей семьи" (страница «О нас»): пять одинаковых карточек одной шириной в аккуратной сетке с центрированными рядами. Карточка «Вся семья» — обычная, не на всю ширину. Контейнер ограничен, чтобы карточки не растягивались. */
.adantis-family-sub {
	max-width: 600px !important;
	margin-left: auto !important;
	margin-right: auto !important;
}
.adantis-info-cards--family {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	justify-content: center;
	align-self: center;
	gap: 1.5rem;
	max-width: 1120px;
	margin-left: auto;
	margin-right: auto;
}
.adantis-info-cards--family .adantis-info-card {
	min-width: 0;
	max-width: none;
}
@media (max-width: 899px) {
	.adantis-info-cards--family { grid-template-columns: repeat(2, 1fr); max-width: 620px; }
}
@media (max-width: 560px) {
	.adantis-info-cards--family { grid-template-columns: 1fr; max-width: none; }
}

/* ---------- "О нас": intro columns keep a real photo's corners on-brand ---------- */

.adantis-about-intro img {
	border-radius: var(--adantis-radius-lg, 20px);
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* End-of-article callback box. Its border colour is set here, not as a
   block border colour: the palette has a colour with the slug "border", so
   WordPress's .has-border-color class (added to any block with a border
   colour) is also the "text in the border colour" utility, with !important.
   That turned the whole box's text pale beige (found 07.11.2026). */
.adantis-article-callback {
	border-color: var(--wp--preset--color--border);
	border-style: solid;
}
