/* Долги Спишу — оформление секций. Палитра и типографика берутся из theme.json. */

:root {
	--ds-primary: #10305B;
	--ds-primary-dark: #0A2140;
	--ds-accent: #A67C2E;
	--ds-ink: #1B2733;
	--ds-muted: #5A6B7C;
	--ds-line: #E2E8F0;
	--ds-bg: #F5F7FA;
	--ds-shadow: 0 1px 2px rgba(16, 48, 91, .06), 0 8px 24px rgba(16, 48, 91, .07);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; }
body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { max-width: 100%; }

/* ---------- Шапка ---------- */
.ds-header {
	border-bottom: 1px solid var(--ds-line);
	background: #fff;
	position: sticky;
	top: 0;
	z-index: 50;
}
.ds-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	padding: .9rem 0;
	max-width: 100%;
}
.ds-header__inner > * { min-width: 0; }
.ds-logo { display: flex; flex-direction: column; line-height: 1.15; text-decoration: none; }
.ds-logo__name {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 1.35rem;
	letter-spacing: .02em;
	color: var(--ds-primary);
}
.ds-logo__tagline { font-size: .8125rem; color: var(--ds-muted); }

.ds-nav { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.ds-nav a { color: var(--ds-ink); font-size: .9375rem; text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; }
.ds-nav a:hover, .ds-nav .current-menu-item > a { color: var(--ds-primary); border-bottom-color: var(--ds-accent); }

.ds-phone { display: block; font-size: 1.1875rem; font-weight: 600; color: var(--ds-primary); text-decoration: none; white-space: nowrap; }
.ds-phone__note { display: block; font-size: .75rem; color: var(--ds-muted); text-align: right; }
.ds-phone--empty { font-size: .8125rem; font-weight: 400; color: var(--ds-accent); }

/* ---------- Первый экран ---------- */
.ds-hero {
	position: relative;
	background:
		radial-gradient(120% 120% at 78% 40%, rgba(38, 84, 140, .55) 0%, rgba(10, 33, 64, 0) 60%),
		linear-gradient(160deg, #0A2140 0%, #10305B 100%);
	color: #fff;
	padding: clamp(3rem, 6vw, 5rem) 0 clamp(3.5rem, 7vw, 5.5rem);
	overflow: hidden;
}
.ds-hero > * { position: relative; z-index: 1; }
.ds-hero__grid {
	display: grid;
	grid-template-columns: 1.05fr .95fr;
	align-items: center;
	gap: clamp(2rem, 4vw, 3.5rem);
}
.ds-hero__art {
	margin: 0;
	background: linear-gradient(180deg, #FFFFFF 0%, #EDF2F8 100%);
	border-radius: 10px;
	padding: 1.75rem 1.5rem;
	box-shadow: 0 18px 44px rgba(0, 0, 0, .28);
}
.ds-hero__art img { display: block; width: 100%; height: auto; }
.ds-hero__art figcaption {
	margin-top: .85rem;
	text-align: center;
	font-size: .8125rem;
	color: #5A6B7C;
}
@media (max-width: 860px) {
	.ds-hero__grid { grid-template-columns: 1fr; }
	.ds-hero__art { order: -1; max-width: 460px; }
}
.ds-hero h1 {
	color: #fff !important;
	max-width: 24ch;
	font-size: clamp(1.9rem, 3.2vw, 2.7rem);
	line-height: 1.18;
	margin: 0 0 1.25rem;
}
.ds-hero__lead { max-width: 46ch; font-size: 1.125rem; color: rgba(255, 255, 255, .85); margin: 0 0 2rem; }
.ds-hero__marks { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin-top: 2.5rem; }
.ds-hero__mark { display: flex; align-items: center; gap: .7rem; font-size: .9375rem; color: rgba(255, 255, 255, .92); }
.ds-hero__mark .ds-icon { width: 26px; height: 26px; color: var(--ds-accent); flex: none; }

/* ---------- Заголовки секций ---------- */
.ds-section { padding: clamp(3rem, 6vw, 5rem) 0; }
.ds-hero + .wp-block-group .ds-form,
.ds-hero + div .ds-form { margin-top: -3.5rem; }
.ds-hero + .wp-block-group, .ds-hero + div.ds-section { padding-top: 0; padding-bottom: clamp(2rem, 3vw, 2.75rem); }
.ds-section--bg { background: var(--ds-bg); }
.ds-section--dark { background: var(--ds-primary-dark); color: #fff; }
.ds-section--dark h2, .ds-section--dark h3 { color: #fff !important; }

.ds-head { max-width: 42rem; margin: 0 0 2.5rem; }
.ds-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.ds-head__kicker {
	display: inline-block;
	font-size: .75rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ds-accent);
	margin: 0 0 .75rem;
}
.ds-head h2 { margin: 0; }
.ds-head__sub { color: var(--ds-muted); margin: .85rem 0 0; }
.ds-section--dark .ds-head__sub { color: rgba(255, 255, 255, .75); }

/* ---------- Карточки ---------- */
.ds-grid { display: grid; gap: 1.25rem; }
.ds-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ds-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ds-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.ds-card {
	background: #fff;
	border: 1px solid var(--ds-line);
	border-radius: 6px;
	padding: 1.6rem 1.5rem;
	box-shadow: var(--ds-shadow);
}
.ds-card__icon {
	width: 54px; height: 54px;
	display: grid; place-items: center;
	border-radius: 50%;
	background: rgba(16, 48, 91, .07);
	color: var(--ds-primary);
	margin-bottom: 1.1rem;
}
.ds-card__icon .ds-icon { width: 28px; height: 28px; }
.ds-card h3 { margin: 0 0 .5rem; font-size: 1.0625rem; }
.ds-card p { margin: 0; color: var(--ds-muted); font-size: .9375rem; }

/* ---------- Шаги ---------- */
.ds-steps { counter-reset: step; display: grid; gap: 1rem; }
.ds-step {
	display: grid;
	grid-template-columns: 3.25rem 1fr;
	gap: 1.25rem;
	align-items: start;
	background: #fff;
	border: 1px solid var(--ds-line);
	border-left: 3px solid var(--ds-accent);
	border-radius: 6px;
	padding: 1.25rem 1.4rem;
}
.ds-step__num {
	width: 3rem; height: 3rem;
	display: grid; place-items: center;
	border-radius: 50%;
	background: var(--ds-primary);
	color: #fff;
	font-family: Georgia, serif;
	font-size: 1.3rem;
}
.ds-step p { margin: 0; }
.ds-step strong { display: block; margin-bottom: .2rem; }

/* ---------- Цифры ---------- */
.ds-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.ds-stat { text-align: center; padding: 1.5rem 1rem; border: 1px solid rgba(255, 255, 255, .18); border-radius: 6px; }
.ds-stat__value { font-family: Georgia, serif; font-size: clamp(1.9rem, 3.4vw, 2.6rem); color: #fff; line-height: 1.1; }
.ds-stat__label { font-size: .9375rem; color: rgba(255, 255, 255, .75); margin-top: .4rem; }

/* ---------- Список условий ---------- */
.ds-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.ds-checklist li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .85rem; align-items: start; }
.ds-checklist .ds-icon { width: 22px; height: 22px; color: var(--ds-accent); margin-top: .15rem; }

/* ---------- Форма ---------- */
.ds-form {
	background: #fff;
	border: 1px solid var(--ds-line);
	border-radius: 8px;
	padding: 1.75rem;
	box-shadow: var(--ds-shadow);
}
.ds-form__title { font-family: Georgia, serif; font-size: 1.25rem; color: var(--ds-primary); margin: 0 0 1.25rem; }
.ds-form__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.ds-field { display: block; }
.ds-field__label { display: block; font-size: .8125rem; color: var(--ds-muted); margin-bottom: .35rem; }
.ds-field input, .ds-field select {
	width: 100%;
	padding: .8rem .9rem;
	border: 1px solid var(--ds-line);
	border-radius: 4px;
	font-size: 1rem;
	background: #fff;
	color: var(--ds-ink);
}
.ds-field input:focus, .ds-field select:focus { outline: 2px solid rgba(16, 48, 91, .25); border-color: var(--ds-primary); }
.ds-form__submit { display: flex; align-items: center; gap: 1.25rem; margin-top: 1.25rem; flex-wrap: wrap; }
.ds-form__note { font-size: .78rem; color: var(--ds-muted); margin: 0; max-width: 38ch; }
.ds-form__state { padding: .8rem 1rem; border-radius: 4px; font-size: .9375rem; margin: 0 0 1rem; }
.ds-form__state--ok { background: #EAF4EC; color: #1F5C33; }
.ds-form__state--err { background: #FBECEC; color: #8A2B2B; }
.ds-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.ds-btn {
	display: inline-block;
	background: var(--ds-primary);
	color: #fff;
	border: 0;
	border-radius: 4px;
	padding: .95rem 2.1rem;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background .15s ease;
}
.ds-btn:hover { background: var(--ds-primary-dark); color: #fff; }
.ds-btn--accent { background: var(--ds-accent); }
.ds-btn--accent:hover { background: #8C6725; }
.ds-btn--ghost { background: transparent; border: 1px solid rgba(255, 255, 255, .5); }
.ds-btn--ghost:hover { background: rgba(255, 255, 255, .1); }

/* ---------- Подвал ---------- */
.ds-footer { background: var(--ds-primary-dark); color: rgba(255, 255, 255, .78); padding: 3rem 0 2rem; font-size: .9375rem; }
.ds-footer a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.ds-footer a:hover { color: #fff; text-decoration: underline; }
.ds-footer__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.ds-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 2rem; padding-top: 1.25rem; font-size: .8125rem; color: rgba(255, 255, 255, .6); }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
	.ds-grid--3, .ds-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ds-form__row { grid-template-columns: 1fr; }
	.ds-footer__cols { grid-template-columns: 1fr 1fr; }
	.ds-stats { grid-template-columns: 1fr; }
	.ds-header__inner { flex-wrap: wrap; gap: 1rem; }
	.ds-nav { order: 3; width: 100%; gap: 1.1rem; }
}
@media (max-width: 600px) {
	.ds-header__inner { gap: .6rem; align-items: center; flex-wrap: wrap; }
	.ds-logo__name { font-size: 1.05rem; }
	.ds-logo__tagline { display: none; }
	.ds-phone { font-size: 1rem; }
	.ds-phone__note { font-size: .6875rem; }
	.ds-grid--2, .ds-grid--3, .ds-grid--4 { grid-template-columns: 1fr; }
	.ds-step { grid-template-columns: 2.6rem 1fr; gap: .9rem; padding: 1.1rem; }
	.ds-step__num { width: 2.5rem; height: 2.5rem; font-size: 1.1rem; }
	.ds-hero__marks { gap: 1rem; }
}

/* Узкие телефоны: логотип и номер не помещаются в одну строку */
@media (max-width: 440px) {
	.ds-header__inner { flex-direction: column; align-items: flex-start; gap: .5rem; }
	.ds-header__contact { width: 100%; }
	.ds-phone { font-size: 1.05rem; }
	.ds-phone__note { text-align: left; }
	.ds-hero__art { padding: 1rem .9rem; }
	.ds-form { padding: 1.25rem; }
}
