/*
  BulgarianDocs – стили темы. Один файл, без сборки.

  Фирменные цвета и шрифты – с текущего сайта (решение владельца от 25.07.2026):
  #0431B8 глубокий синий для заголовков, #007CFB для кнопок и ссылок, Inter для
  заголовков, Source Sans для текста, кнопки-таблетки, скошенная плашка у логотипа.
  Новое в этой версии: мягкие тени и скругления 16px у карточек, выбор воронки на
  первом экране, sticky-шапка с мега-меню, оглавление статей, форма с вкладками.
*/

:root {
	--ink: #16213a;
	--ink-soft: #4a5672;
	--paper: #ffffff;
	--blue-deep: #0431b8;
	--blue-night: #021b6b;
	--blue-accent: #007cfb;
	--blue-tint: #eef4ff;
	--blue-tint-2: #f6f9ff;
	--rule: #dbe4f5;
	--green: #0f9d6b;
	--green-tint: #e7f7f0;
	--danger: #d6373d;

	--font-heading: 'Inter', Arial, sans-serif;
	--font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

	--text-2xs: 0.875rem;
	--text-xs: 1.0625rem;
	--text-sm: 1.125rem;
	--text-md: 1.3125rem;
	--text-lg: 1.625rem;
	--text-xl: 2.125rem;
	--text-2xl: clamp(1.75rem, 1.2rem + 1.8vw, 2.625rem);
	--text-3xl: clamp(2.125rem, 1.3rem + 3vw, 3.5rem);

	--radius-sm: 10px;
	--radius: 16px;
	--radius-lg: 24px;
	--radius-pill: 999px;
	--shadow-sm: 0 1px 2px rgba(4, 49, 184, 0.06), 0 2px 8px rgba(4, 49, 184, 0.05);
	--shadow: 0 2px 4px rgba(4, 49, 184, 0.05), 0 12px 32px rgba(4, 49, 184, 0.09);
	--shadow-lg: 0 24px 60px rgba(2, 27, 107, 0.18);

	--space-1: 8px;
	--space-2: 16px;
	--space-3: 24px;
	--space-4: 32px;
	--space-5: 48px;
	--space-6: 72px;
	--space-7: 104px;

	--header-h: 76px;
	--measure: 70ch;
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* База */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: var(--text-xs);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 {
	font-family: var(--font-heading);
	font-weight: 800;
	line-height: 1.18;
	letter-spacing: -0.02em;
	color: var(--blue-deep);
	margin: 0 0 var(--space-2);
	overflow-wrap: break-word;
	text-wrap: balance;
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-md); letter-spacing: -0.01em; }
h4 { font-size: var(--text-sm); }
p { margin: 0 0 var(--space-2); }
a { color: var(--blue-accent); text-underline-offset: 0.18em; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--blue-accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: #cfe2ff; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-3); }
@media (max-width: 480px) { .container { padding: 0 var(--space-2); } }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.screen-reader-text, .hp-field {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; left: -9999px;
}
.skip-link {
	position: absolute; left: 16px; top: -60px; z-index: 100;
	background: var(--blue-deep); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

.eyebrow {
	display: inline-flex; align-items: center; gap: 8px;
	font-family: var(--font-heading); font-weight: 700; font-size: 0.8125rem;
	text-transform: uppercase; letter-spacing: 0.08em; color: var(--blue-accent);
	margin-bottom: var(--space-2);
}

/* Кнопки */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
	font-family: var(--font-body); font-weight: 700; font-size: var(--text-xs); line-height: 1.2;
	text-decoration: none; border-radius: var(--radius-pill); padding: 0.85em 1.6em;
	border: 2px solid transparent; cursor: pointer;
	transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn .icon { width: 1.1em; height: 1.1em; transition: transform 0.2s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn--primary { background: var(--blue-accent); color: #fff; box-shadow: 0 6px 18px rgba(0, 124, 251, 0.28); }
.btn--primary:hover { background: var(--blue-deep); color: #fff; transform: translateY(-1px); }
.btn--secondary { background: transparent; color: var(--blue-deep); border-color: var(--rule); }
.btn--secondary:hover { border-color: var(--blue-accent); color: var(--blue-accent); background: var(--blue-tint-2); }
.btn--sm { padding: 0.6em 1.2em; font-size: 0.9375rem; }
.btn--lg { padding: 1em 1.9em; font-size: var(--text-sm); }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.link-arrow {
	display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.link-arrow .icon { transition: transform 0.2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }

.tag {
	display: inline-flex; align-items: center; font-size: 0.8125rem; font-weight: 700; line-height: 1;
	padding: 0.45em 0.8em; border-radius: var(--radius-pill); white-space: nowrap;
}
.tag--a { background: var(--blue-tint); color: var(--blue-deep); }
.tag--b { background: var(--green-tint); color: #0b7a53; }

/* Шапка */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: saturate(180%) blur(12px);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); box-shadow: 0 4px 24px rgba(4, 49, 184, 0.06); }
.site-header__row { display: flex; align-items: center; gap: var(--space-3); min-height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--blue-deep); flex: none; }
.logo__mark {
	display: grid; place-items: center; width: 46px; height: 46px;
	font-family: var(--font-heading); font-weight: 800; font-size: 1rem; letter-spacing: -0.03em; color: #fff;
	background: linear-gradient(135deg, var(--blue-accent), var(--blue-deep));
	clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%);
	border-radius: 10px 4px 4px 10px;
	padding-right: 6px;
}
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__name { font-family: var(--font-heading); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.logo__name b { font-weight: 800; color: var(--blue-accent); }
.logo__tagline { font-size: 0.8125rem; color: var(--ink-soft); }
.logo--light { color: #fff; }
.logo--light .logo__name b { color: #8fc3ff; }
.logo--light .logo__tagline { color: rgba(255, 255, 255, 0.7); }
.logo--light .logo__mark { background: #fff; color: var(--blue-deep); }

.nav { display: flex; align-items: center; gap: var(--space-3); flex: 1; justify-content: space-between; }
.nav__list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0 auto; padding: 0; }
.nav__item { position: relative; }
.nav__link {
	display: inline-flex; align-items: center; gap: 4px; padding: 10px 14px; border-radius: var(--radius-pill);
	color: var(--ink); font-weight: 600; text-decoration: none; transition: background-color 0.15s, color 0.15s;
}
.nav__link:hover, .nav__item--has-menu:focus-within > .nav__link { background: var(--blue-tint); color: var(--blue-deep); }
.nav__link[aria-current="page"] { color: var(--blue-deep); box-shadow: inset 0 -2px 0 var(--blue-accent); border-radius: 0; }
.nav__chevron { width: 16px; height: 16px; transition: transform 0.2s; }
.nav__extra { display: flex; align-items: center; gap: var(--space-2); }

.mega {
	position: absolute; top: calc(100% + 10px); left: 50%; transform: translate(-50%, 8px);
	display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); width: min(640px, 90vw);
	padding: var(--space-3); background: #fff; border: 1px solid var(--rule); border-radius: var(--radius);
	box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}
.mega::before { content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.nav__item--has-menu:hover .mega, .nav__item--has-menu:focus-within .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav__item--has-menu:hover .nav__chevron { transform: rotate(180deg); }
.mega__label {
	display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; font-weight: 700; text-transform: uppercase;
	letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 8px; padding: 0 10px;
}
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega a {
	display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm);
	color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.3;
}
.mega a .icon { color: var(--blue-accent); }
.mega a:hover, .mega a[aria-current="page"] { background: var(--blue-tint); color: var(--blue-deep); }

.lang { display: flex; list-style: none; margin: 0; padding: 3px; gap: 2px; background: var(--blue-tint); border-radius: var(--radius-pill); }
.lang a {
	display: block; padding: 5px 10px; border-radius: var(--radius-pill); font-size: 0.8125rem; font-weight: 700;
	color: var(--ink-soft); text-decoration: none;
}
.lang a[aria-current="true"] { background: #fff; color: var(--blue-deep); box-shadow: var(--shadow-sm); }
.header-phone { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--blue-deep); text-decoration: none; white-space: nowrap; }

.nav-toggle {
	display: none; margin-left: auto; width: 46px; height: 46px; border-radius: 50%;
	border: 1px solid var(--rule); background: #fff; color: var(--blue-deep); cursor: pointer;
	align-items: center; justify-content: center;
}
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: inline-flex; }

@media (max-width: 1040px) {
	.header-phone { display: none; }
}
@media (max-width: 920px) {
	:root { --header-h: 66px; }
	/* backdrop-filter делает шапку контейнером для position: fixed – выезжающее меню схлопывалось в ноль. */
	.site-header { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
	.nav-toggle { display: inline-flex; }
	.nav {
		position: fixed; inset: var(--header-h) 0 0 0; z-index: 49; flex-direction: column; align-items: stretch;
		justify-content: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-2) var(--space-5);
		background: #fff; overflow-y: auto; transform: translateX(100%); visibility: hidden;
		transition: transform 0.25s var(--ease), visibility 0.25s;
	}
	.nav.is-open { transform: none; visibility: visible; }
	.nav__list { flex-direction: column; align-items: stretch; margin: 0; gap: 0; }
	.nav__link { width: 100%; padding: 14px 8px; font-size: var(--text-sm); border-radius: 0; border-bottom: 1px solid var(--rule); }
	.nav__link[aria-current="page"] { box-shadow: none; }
	.nav__chevron { display: none; }
	.mega {
		position: static; transform: none; opacity: 1; visibility: visible; width: auto; box-shadow: none; border: 0;
		padding: var(--space-2) 0; grid-template-columns: 1fr; gap: var(--space-2);
	}
	.nav__item--has-menu:hover .mega { transform: none; }
	.nav__extra { flex-direction: column; align-items: stretch; }
	.nav__extra .lang { align-self: flex-start; }
	.header-phone { display: inline-flex; }
	body.nav-open { overflow: hidden; }
}
@media (max-width: 380px) { .logo__tagline { display: none; } }

/* Секции */
.section { padding: var(--space-7) 0; }
.section--tint { background: var(--blue-tint-2); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-5); }
.section__head h2 { max-width: 22ch; margin: 0; }
.section__lead { margin: 12px 0 0; max-width: 56ch; color: var(--ink-soft); font-size: var(--text-sm); }
.section-lead { font-size: var(--text-sm); color: var(--ink-soft); max-width: 60ch; margin-bottom: var(--space-5); }
@media (max-width: 720px) {
	.section { padding: var(--space-6) 0; }
	.section__head { flex-direction: column; align-items: flex-start; }
}

/* Первый экран */
.hero {
	position: relative; overflow: hidden; padding: var(--space-6) 0 var(--space-7);
	background:
		radial-gradient(900px 480px at 85% -10%, rgba(0, 124, 251, 0.14), transparent 60%),
		radial-gradient(600px 400px at -10% 110%, rgba(4, 49, 184, 0.08), transparent 60%),
		var(--paper);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: var(--space-6); align-items: center; }
.hero h1 { max-width: 16ch; }
.hero__lead { font-size: var(--text-md); line-height: 1.55; color: var(--ink-soft); max-width: 52ch; margin-bottom: var(--space-4); }
.hero__choose { font-family: var(--font-heading); font-weight: 700; color: var(--ink); margin-bottom: var(--space-2); }

.funnel-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.funnel-card {
	position: relative; display: flex; flex-direction: column; gap: 6px; padding: var(--space-3);
	background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-sm);
	text-decoration: none; color: var(--ink);
	transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s;
}
.funnel-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue-accent); color: var(--ink); }
.funnel-card__icon {
	display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 6px;
	background: var(--blue-tint); color: var(--blue-deep);
}
.funnel-card--b .funnel-card__icon { background: var(--green-tint); color: #0b7a53; }
.funnel-card__label { font-family: var(--font-heading); font-weight: 800; font-size: var(--text-sm); color: var(--blue-deep); line-height: 1.25; }
.funnel-card__text { color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.5; flex: 1; }
.funnel-card__cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 700; color: var(--blue-accent); }
.funnel-card__cta .icon { transition: transform 0.2s var(--ease); }
.funnel-card:hover .funnel-card__cta .icon { transform: translateX(4px); }

.hero__panel { position: relative; }
.doc-stack { position: relative; height: 300px; margin: 0 auto var(--space-3); max-width: 340px; }
.doc { position: absolute; inset: 0; margin: auto; width: 230px; height: 290px; border-radius: 18px; background: #fff; border: 1px solid var(--rule); }
.doc--back { transform: rotate(-9deg) translate(-38px, 6px); background: var(--blue-tint); }
.doc--mid { transform: rotate(5deg) translate(34px, 2px); background: #f9fbff; box-shadow: var(--shadow-sm); }
.doc--front { display: flex; flex-direction: column; gap: 14px; padding: 30px 26px; box-shadow: var(--shadow-lg); }
.doc__seal {
	display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
	background: linear-gradient(135deg, var(--blue-accent), var(--blue-deep)); color: #fff; margin-bottom: 8px;
}
.doc__seal .icon { width: 30px; height: 30px; }
.doc__line { display: block; height: 10px; border-radius: 6px; background: var(--rule); }
.doc__line--title { height: 14px; width: 75%; background: #b9cdf3; }
.doc__line--short { width: 55%; }
.doc__check {
	position: absolute; right: -18px; bottom: 34px; display: grid; place-items: center; width: 54px; height: 54px;
	border-radius: 50%; background: var(--green); color: #fff; box-shadow: 0 10px 24px rgba(15, 157, 107, 0.35);
}
.doc__check .icon { width: 28px; height: 28px; stroke-width: 2.5; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.stats > div { padding: 14px 12px; border: 1px dashed #9cc5fd; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.8); }
.stats dt { font-family: var(--font-heading); font-weight: 800; font-size: var(--text-md); color: var(--blue-deep); line-height: 1.1; }
.stats dd { margin: 4px 0 0; font-size: 0.8125rem; line-height: 1.35; color: var(--ink-soft); }

/* Колаж на главной: София, паспорт, флаг. */
.hero-photos { position: relative; margin: 0 0 var(--space-4); padding: 0 0 34px 28px; }
.hero-photos figure { margin: 0; }
.hero-photos__main img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.hero-photos__doc,
.hero-photos__flag { position: absolute; display: block; object-fit: cover; border: 4px solid #fff; box-shadow: var(--shadow); }
.hero-photos__doc { left: 0; bottom: 0; width: 34%; aspect-ratio: 3 / 4; border-radius: var(--radius); transform: rotate(-4deg); }
.hero-photos__flag { right: -14px; top: -18px; width: 30%; aspect-ratio: 1; object-position: 72% 40%; border-radius: 50%; }
.hero__panel > .photo-credit { margin: calc(-1 * var(--space-3)) 0 var(--space-3); text-align: right; }
.photo-credit { font-size: 0.75rem; line-height: 1.4; color: var(--ink-soft); margin-top: 6px; }
.photo-credit a { color: inherit; }

@media (max-width: 960px) {
	.hero__grid { grid-template-columns: 1fr; gap: var(--space-5); }
	.doc-stack { display: none; }
	.hero-photos { max-width: 520px; }
}
@media (max-width: 560px) {
	.hero-photos { padding: 0 0 24px 16px; }
	.hero-photos__flag { right: -4px; top: -12px; }
}
@media (max-width: 560px) {
	.hero { padding: var(--space-5) 0 var(--space-6); }
	.funnel-cards { grid-template-columns: 1fr; }
	.stats { grid-template-columns: 1fr 1fr; }
	.stats > div:last-child { grid-column: 1 / -1; }
}

/* Карточки услуг */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-3); }
.service-card {
	display: flex; flex-direction: column; gap: 8px; padding: var(--space-3); background: #fff;
	border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; color: var(--ink);
	transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s;
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; color: var(--ink); }
.service-card__icon {
	display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; margin-bottom: 8px;
	background: var(--blue-tint); color: var(--blue-deep); transition: background-color 0.2s, color 0.2s;
}
.service-card__icon .icon { width: 26px; height: 26px; }
.service-card:hover .service-card__icon { background: var(--blue-accent); color: #fff; }
.service-card__title { font-family: var(--font-heading); font-weight: 800; font-size: var(--text-sm); color: var(--blue-deep); line-height: 1.25; }
.service-card__desc { color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.5; flex: 1; }
.service-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.service-card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 700; color: var(--blue-accent); }
.service-card__more .icon { width: 1em; height: 1em; transition: transform 0.2s var(--ease); }
.service-card:hover .service-card__more .icon { transform: translateX(4px); }

/* Как работаем */
.how { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); list-style: none; margin: 0; padding: 0; counter-reset: how; }
.how__item { position: relative; padding: var(--space-3); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.how__n {
	display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; margin-bottom: var(--space-2);
	background: var(--blue-deep); color: #fff; font-family: var(--font-heading); font-weight: 800;
}
.how__item h3 { margin-bottom: 8px; }
.how__item p { color: var(--ink-soft); margin: 0; font-size: 0.9875rem; }
.how__item:not(:last-child)::after {
	content: ''; position: absolute; top: 44px; right: calc(var(--space-3) * -1); width: var(--space-3); height: 2px;
	background: repeating-linear-gradient(90deg, var(--blue-accent) 0 6px, transparent 6px 10px);
}
@media (max-width: 920px) {
	.how { grid-template-columns: 1fr 1fr; }
	.how__item::after { display: none; }
}
@media (max-width: 520px) { .how { grid-template-columns: 1fr; } }

/* О нас на главной */
.about-teaser { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); align-items: center; }
.about-teaser__text { font-size: var(--text-sm); color: var(--ink-soft); margin-bottom: var(--space-4); }
.trust { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.trust__item {
	display: flex; flex-direction: column; gap: 12px; padding: var(--space-3); border-radius: var(--radius);
	background: var(--blue-tint-2); border: 1px solid var(--rule); font-weight: 600; line-height: 1.4;
}
.trust__item .icon { width: 28px; height: 28px; color: var(--blue-accent); }
@media (max-width: 860px) { .about-teaser { grid-template-columns: 1fr; gap: var(--space-4); } }
@media (max-width: 420px) { .trust { grid-template-columns: 1fr; } }

/* Карточки статей */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-3); }
.post-card { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; transition: box-shadow 0.2s, transform 0.2s var(--ease); }
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.post-card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); }
.post-card__img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--blue-tint); }
/* Без обложки карточка остаётся текстовой, с фирменной полосой сверху. */
.post-card:not(:has(.post-card__img)) { border-top: 4px solid var(--blue-accent); }
.post-card:not(:has(.post-card__img)) .post-card__title { font-size: var(--text-md); }
.post-card__body { display: flex; flex-direction: column; gap: 8px; padding: var(--space-3); flex: 1; }
.post-card__meta { font-size: 0.8125rem; color: var(--ink-soft); }
.post-card__title { font-size: var(--text-sm); line-height: 1.3; margin: 0; }
.post-card:hover .post-card__title { color: var(--blue-accent); }
.post-card__excerpt { color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.5; }

.pagination { margin-top: var(--space-5); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers {
	display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 14px;
	border: 1px solid var(--rule); border-radius: var(--radius-pill); text-decoration: none; font-weight: 700; color: var(--blue-deep);
}
.pagination .current { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }

/* Шапка внутренних страниц */
.page-hero {
	padding: var(--space-4) 0 var(--space-5); margin-bottom: var(--space-5);
	background: linear-gradient(180deg, var(--blue-tint-2), #fff);
	border-bottom: 1px solid var(--rule);
}
.page-hero h1 { max-width: 24ch; margin-bottom: var(--space-2); }
.page-hero__row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); }
.page-hero__lead { font-size: var(--text-sm); color: var(--ink-soft); max-width: 62ch; margin: 0; }
.page-hero__icon {
	display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; margin-bottom: var(--space-2);
	background: linear-gradient(135deg, var(--blue-accent), var(--blue-deep)); color: #fff;
}
.page-hero__icon .icon { width: 28px; height: 28px; }
.page-hero__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--space-2) 0 0; }
.page-hero--post h1 { max-width: 30ch; }
/* Страница с фото: текст слева, фото справа, кнопка заявки под текстом. */
.page-hero--photo .page-hero__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); align-items: center; gap: var(--space-5); }
.page-hero__cta { margin: var(--space-3) 0 0; }
.page-hero__photo { margin: 0; }
.page-hero__photo img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); background: var(--blue-tint); }
.post-cover .photo-credit { text-align: right; }
@media (max-width: 760px) {
	.page-hero__row { flex-direction: column; align-items: flex-start; }
	.page-hero--photo .page-hero__row { grid-template-columns: 1fr; gap: var(--space-4); }
	.page-hero__photo img { aspect-ratio: 16 / 9; }
}

.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 var(--space-3); padding: 0; font-size: 0.875rem; color: var(--ink-soft); }
.breadcrumbs li:not(:last-child)::after { content: '/'; margin-left: 6px; color: #a8b6d3; }
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--blue-accent); text-decoration: underline; }

/* Текст страниц и статей */
.prose { font-size: var(--text-sm); line-height: 1.7; min-width: 0; }
.prose > * { max-width: var(--measure); }
.prose--narrow { max-width: 780px; }
.prose h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin: var(--space-5) 0 var(--space-2); }
.prose h3 { font-size: var(--text-md); margin: var(--space-4) 0 var(--space-1); }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 var(--space-3); }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--blue-accent); }
.prose strong { color: var(--ink); }
.prose img { border-radius: var(--radius); }
.prose figure { margin: var(--space-4) 0; }
.prose figcaption { font-size: 0.875rem; color: var(--ink-soft); margin-top: 8px; }
.prose blockquote {
	margin: var(--space-4) 0; padding: var(--space-3); border-left: 4px solid var(--blue-accent);
	background: var(--blue-tint-2); border-radius: 0 var(--radius) var(--radius) 0;
}
.prose blockquote p:last-child { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: var(--space-3) 0; font-size: 1rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 10px 14px; text-align: left; vertical-align: top; }
.prose th { background: var(--blue-tint); color: var(--blue-deep); font-family: var(--font-heading); font-size: 0.9375rem; }
.prose .wp-block-table { margin: var(--space-3) 0; }

/* Стили списков из редактора */
.prose ol.is-style-steps { list-style: none; padding: 0; counter-reset: step; }
.prose ol.is-style-steps > li {
	position: relative; counter-increment: step; padding: 0 0 var(--space-3) 64px; margin: 0;
}
.prose ol.is-style-steps > li::before {
	content: counter(step); position: absolute; left: 0; top: -4px; display: grid; place-items: center;
	width: 44px; height: 44px; border-radius: 50%; background: var(--blue-tint); color: var(--blue-deep);
	font-family: var(--font-heading); font-weight: 800; font-size: 1.0625rem;
}
.prose ol.is-style-steps > li:not(:last-child)::after {
	content: ''; position: absolute; left: 21px; top: 46px; bottom: 6px; width: 2px; background: var(--rule);
}
.prose ol.is-style-steps > li > strong:first-child { display: block; font-family: var(--font-heading); color: var(--blue-deep); font-size: var(--text-sm); margin-bottom: 2px; }

.prose ul.is-style-checks { list-style: none; padding: 0; display: grid; gap: 10px; }
.prose ul.is-style-checks > li {
	position: relative; padding: 14px 16px 14px 52px; margin: 0; background: var(--blue-tint-2);
	border: 1px solid var(--rule); border-radius: var(--radius-sm); line-height: 1.5;
}
.prose ul.is-style-checks > li::before {
	content: ''; position: absolute; left: 16px; top: 15px; width: 22px; height: 22px; border-radius: 50%;
	background: var(--blue-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* В классической теме WordPress оборачивает детей группы в .wp-block-group__inner-container – сетка на нём. */
.prose .is-style-situations { margin: 0 0 var(--space-3); max-width: none; }
.prose .is-style-situations,
.prose .is-style-situations > .wp-block-group__inner-container { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.prose .is-style-situations:has(> .wp-block-group__inner-container) { display: block; }
.prose .is-style-situations > *, .prose .is-style-situations > .wp-block-group__inner-container > * { margin: 0; }
.prose .is-style-situations .wp-block-group, .prose .situation {
	padding: var(--space-3); background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.prose .situation p:last-child, .prose .is-style-situations .wp-block-group p:last-child { margin: 0; }
.prose .situation h3, .prose .is-style-situations h3 { font-size: var(--text-xs); margin: 0 0 8px; }
@media (max-width: 640px) {
	.prose .is-style-situations, .prose .is-style-situations > .wp-block-group__inner-container { grid-template-columns: 1fr; }
}

.prose .is-style-note, .prose .note {
	padding: var(--space-3); margin: var(--space-3) 0; border-radius: var(--radius);
	background: var(--blue-tint); border-left: 4px solid var(--blue-accent);
}
.prose .is-style-note > :last-child, .prose .note > :last-child,
.prose .wp-block-group__inner-container > :last-child { margin-bottom: 0; }

/* FAQ на блоке «Детали» */
.prose details {
	border: 1px solid var(--rule); border-radius: var(--radius-sm); background: #fff; margin: 0 0 10px;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.prose details[open] { border-color: #b8d3fb; box-shadow: var(--shadow-sm); }
.prose summary {
	position: relative; list-style: none; cursor: pointer; padding: 16px 56px 16px 20px;
	font-family: var(--font-heading); font-weight: 700; font-size: 1.0625rem; line-height: 1.4; color: var(--blue-deep);
}
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after {
	content: ''; position: absolute; right: 18px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%;
	background: var(--blue-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230431B8' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat;
	transition: transform 0.2s var(--ease);
}
.prose details[open] summary::after { transform: rotate(45deg); }
.prose details > :not(summary) { padding: 0 20px; }
.prose details > :last-child { padding-bottom: 16px; margin-bottom: 0; }

/* Страница услуги */
.service-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-6); align-items: start; }
.service-layout__aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: var(--space-2); }
.service-nav { padding: 12px; border: 1px solid var(--rule); border-radius: var(--radius); background: #fff; }
.service-nav__title { font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); padding: 4px 10px; margin: 0 0 4px; }
.service-nav ul { list-style: none; margin: 0; padding: 0; }
.service-nav a {
	display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm);
	color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.3; font-size: 0.9875rem;
}
.service-nav a .icon { color: var(--blue-accent); }
.service-nav a:hover { background: var(--blue-tint); }
.service-nav a[aria-current="page"] { background: var(--blue-deep); color: #fff; }
.service-nav a[aria-current="page"] .icon { color: #fff; }
.aside-cta {
	padding: var(--space-3); border-radius: var(--radius); color: #fff;
	background: linear-gradient(150deg, var(--blue-accent), var(--blue-deep));
}
.aside-cta__title { font-family: var(--font-heading); font-weight: 800; font-size: var(--text-sm); line-height: 1.25; margin-bottom: 6px; }
.aside-cta p { opacity: 0.92; }
.aside-cta .btn--primary { background: #fff; color: var(--blue-deep); box-shadow: none; }
.aside-cta .btn--primary:hover { background: var(--blue-tint); color: var(--blue-deep); }
@media (max-width: 960px) {
	.service-layout { grid-template-columns: 1fr; gap: var(--space-5); }
	.service-layout__aside { position: static; }
}

/* Хаб услуг */
.funnel-block { margin-bottom: var(--space-6); scroll-margin-top: calc(var(--header-h) + 24px); }
.funnel-block__head {
	display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-3);
	padding: var(--space-3); margin-bottom: var(--space-3); background: var(--blue-tint-2); border: 1px solid var(--rule); border-radius: var(--radius);
}
.funnel-block__head h2 { font-size: var(--text-lg); margin: 0 0 4px; }
.funnel-block__head p { margin: 0; color: var(--ink-soft); }
.funnel-block__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--blue-deep); color: #fff; }
.funnel-block__icon .icon { width: 28px; height: 28px; }
#funnel-b .funnel-block__icon { background: var(--green); }
@media (max-width: 720px) { .funnel-block__head { grid-template-columns: 1fr; } }

/* Контакты */
.contact-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-2); list-style: none; margin: 0 0 var(--space-5); padding: 0; }
.contact-card {
	display: flex; flex-direction: column; gap: 6px; padding: var(--space-3); border: 1px solid var(--rule);
	border-radius: var(--radius); background: #fff; line-height: 1.4;
}
.contact-card .icon { width: 28px; height: 28px; color: var(--blue-accent); margin-bottom: 6px; }
.contact-card span { color: var(--ink-soft); font-size: 0.9375rem; }

/* Статья */
.container--post { max-width: 1200px; }
.post-meta { color: var(--ink-soft); font-size: 0.9375rem; margin: 0; }
.post-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--space-6); align-items: start; }
.post-layout__content { grid-column: 2; }
.post-layout__toc { grid-column: 1; grid-row: 1; position: sticky; top: calc(var(--header-h) + 24px); }
.post-layout:not(:has(.post-layout__toc)) { grid-template-columns: minmax(0, 820px); justify-content: center; }
.post-layout:not(:has(.post-layout__toc)) .post-layout__content { grid-column: 1; }
.toc { padding: var(--space-2); border-left: 2px solid var(--rule); }
.toc__title { font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 6px 0; font-size: 0.9375rem; line-height: 1.35; color: var(--ink-soft); text-decoration: none; }
.toc a:hover, .toc a.is-active { color: var(--blue-deep); }
.toc a.is-active { font-weight: 700; }
.post-cover { margin: 0 0 var(--space-4); }
.post-cover img { width: 100%; border-radius: var(--radius); }
.inline-cta {
	display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin: var(--space-6) 0 0;
	padding: var(--space-4); border-radius: var(--radius); background: var(--blue-tint); max-width: none;
}
.inline-cta__title { font-family: var(--font-heading); font-weight: 800; font-size: var(--text-md); color: var(--blue-deep); margin-bottom: 4px; }
.inline-cta p:last-child { margin: 0; color: var(--ink-soft); }
@media (max-width: 1000px) {
	.post-layout { grid-template-columns: 1fr; gap: var(--space-3); }
	.post-layout__toc, .post-layout__content { grid-column: 1; grid-row: auto; position: static; }
	.toc { border: 1px solid var(--rule); border-radius: var(--radius); }
}
@media (max-width: 640px) { .inline-cta { flex-direction: column; align-items: flex-start; } }

/* Форма заявки */
.lead {
	position: relative; padding: var(--space-7) 0; margin-top: var(--space-7); color: #fff; overflow: hidden;
	background:
		radial-gradient(700px 400px at 100% 0, rgba(0, 124, 251, 0.5), transparent 60%),
		linear-gradient(140deg, var(--blue-deep), var(--blue-night));
	scroll-margin-top: var(--header-h);
}
.section--tint + .lead, .post-grid + .lead { margin-top: 0; }
.lead__grid { position: relative; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--space-6); align-items: start; }
.lead h2 { color: #fff; }
.lead .eyebrow { color: #8fc3ff; }
.lead__intro > p { color: rgba(255, 255, 255, 0.85); font-size: var(--text-sm); }
.lead__steps { list-style: none; margin: var(--space-4) 0; padding: 0; display: grid; gap: var(--space-2); }
.lead__steps li { display: flex; gap: 14px; color: rgba(255, 255, 255, 0.85); line-height: 1.5; }
.lead__steps span {
	display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
	background: rgba(255, 255, 255, 0.14); font-family: var(--font-heading); font-weight: 800; color: #fff;
}
.lead__steps strong { color: #fff; }
.lead__contacts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.lead__contacts a {
	display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius-pill);
	background: rgba(255, 255, 255, 0.12); color: #fff; font-weight: 600; text-decoration: none;
}
.lead__contacts a:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.lead__card { padding: var(--space-4); background: #fff; color: var(--ink); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.lead__done { text-align: center; padding: var(--space-5) var(--space-2); }
.lead__done-icon { width: 64px; height: 64px; padding: 14px; border-radius: 50%; background: var(--green-tint); color: var(--green); stroke-width: 2.5; margin-bottom: var(--space-2); }
.lead__done h3 { font-size: var(--text-lg); }
.lead__error { padding: 12px 16px; border-radius: var(--radius-sm); background: #fdecec; color: #a3252a; font-weight: 600; }
@media (max-width: 920px) { .lead__grid { grid-template-columns: 1fr; gap: var(--space-4); } }
@media (max-width: 520px) {
	.lead { padding: var(--space-6) 0; }
	.lead__card { padding: var(--space-3) var(--space-2); border-radius: var(--radius); }
}

.segmented { border: 0; margin: 0 0 var(--space-3); padding: 0; }
.segmented legend { font-weight: 700; margin-bottom: 10px; font-size: 0.9375rem; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented legend { grid-column: 1 / -1; float: left; width: 100%; }
.segmented__option { position: relative; display: block; cursor: pointer; }
.segmented__option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented__option span {
	display: flex; align-items: center; gap: 8px; height: 100%; padding: 12px 14px; border: 2px solid var(--rule); border-radius: var(--radius-sm);
	font-weight: 700; line-height: 1.3; color: var(--ink-soft); transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.segmented__option input:checked + span { border-color: var(--blue-accent); background: var(--blue-tint); color: var(--blue-deep); }
.segmented__option input:focus-visible + span { outline: 3px solid var(--blue-accent); outline-offset: 2px; }
@media (max-width: 420px) { .segmented { grid-template-columns: 1fr; } }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field { margin-bottom: var(--space-2); }
.field label { display: block; font-weight: 700; font-size: 0.9375rem; margin-bottom: 6px; }
.field .req { color: var(--danger); }
.field input, .field select, .field textarea {
	width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
	padding: 12px 14px; border: 1.5px solid var(--rule); border-radius: var(--radius-sm);
	transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue-accent); box-shadow: 0 0 0 4px rgba(0, 124, 251, 0.15); }
.field input:user-invalid { border-color: var(--danger); }
.lead-form [hidden] { display: none; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 var(--space-3); font-size: 0.875rem; line-height: 1.45; color: var(--ink-soft); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--blue-accent); }

/* Подвал */
.site-footer { background: var(--blue-night); color: rgba(255, 255, 255, 0.78); padding: var(--space-6) 0 var(--space-3); font-size: 0.9875rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #8fc3ff; text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 0.8fr 1fr; gap: var(--space-5); }
.site-footer__brand p { margin-top: var(--space-2); max-width: 36ch; }
.site-footer__title { font-family: var(--font-heading); font-weight: 700; color: #fff; margin-bottom: var(--space-2); }
.site-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer__list--icons li { display: flex; gap: 10px; align-items: flex-start; }
.site-footer__list--icons .icon { color: #8fc3ff; margin-top: 2px; }
.site-footer__legal {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2);
	margin-top: var(--space-5); padding-top: var(--space-3); border-top: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 0.875rem; color: rgba(255, 255, 255, 0.55);
}
.site-footer__legal p { margin: 0; }
@media (max-width: 960px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; gap: var(--space-4); } }

/* Липкая кнопка на мобильном */
.sticky-cta {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
	background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--rule); box-shadow: 0 -6px 20px rgba(4, 49, 184, 0.08);
	transform: translateY(110%); transition: transform 0.25s var(--ease);
}
.sticky-cta.is-visible { transform: none; }
@media (min-width: 721px) { .sticky-cta { display: none; } }

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

/* Редактор блоков: те же стили текста */
.editor-styles-wrapper { font-family: var(--font-body); color: var(--ink); }
