/*
Theme Name: Die Genusspartner
Description: Блочная тема под проект Die Genusspartner. Глобальные стили — в theme.json.
Version: 0.2.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.0
Text Domain: diegenusspartner
*/

/* ── Ресет box-sizing ─────────────────────────────────────────────────────────
   Без него заданные width/height/max-width считаются ПО КОНТЕНТУ, а паддинги и
   рамки ложатся сверху — вёрстка молча расходится с макетом. Ловилось трижды:
   кнопка 200×56 выходила 247×60; контейнер лого 1392 → 1425 (заголовок на 48 вместо
   64); карточка бокса 1118 → 1216. На глаз это не видно, только замером live↔Figma.
   Ставим ОДИН раз глобально, а не латаем каждый компонент отдельно. */
*,
*::before,
*::after {
	box-sizing: border-box;
}

/* Якорные ссылки не должны прятаться под фикс-шапку (≈ её высота). */
/* scrollbar-gutter: место под вертикальный скроллбар зарезервировано всегда, чтобы
   при открытии меню (body{overflow:hidden} прячет полосу) страница не прыгала вбок. */
html { scroll-padding-top: 96px; scrollbar-gutter: stable; }

/* Глобальная страховка от горизонтального скролла: любой случайный оверфлоу
   (треки каруселей, длинные строки) клипуется, body не становится шире вьюпорта.
   `clip` (не `hidden`) сохраняет position:sticky шапки. Чинит и уезжающий за край
   бургер на страницах с оверфлоу (references/objekte). */
html, body { overflow-x: clip; }

/* Полноширинные секции лендинга стыкуются без стандартного block gap Gutenberg. */
.entry-content.wp-block-post-content > .wp-block-library-hero-cover,
.entry-content.wp-block-post-content > .wp-block-library-trust-bar,
.entry-content.wp-block-post-content > .wp-block-library-pain-points {
	margin-block-start: 0 !important;
}
.entry-content.wp-block-post-content {
	margin-block-start: 0 !important;
	padding-block-start: 0 !important;
}
main.wp-block-group { margin-block-start: 0 !important; }

/* Прозрачная шапка поверх Hero (первой секции страницы). */
.site-header {
	position: fixed;
	inset: 0 0 auto;
	z-index: 10000;
	box-sizing: border-box;
	width: 100%;
	height: 120px;
	padding: 24px var(--wp--custom--layout--gutter);
	color: var(--wp--preset--color--on-dark);
	align-items: center;
	transition: height var(--wp--custom--transition--base), padding var(--wp--custom--transition--base), background-color var(--wp--custom--transition--base), box-shadow var(--wp--custom--transition--base), transform var(--wp--custom--transition--base);
}
/* Авто-скрытие при скролле вниз (класс ставит header.js); вверх — возвращается. */
.site-header.is-hidden {
	transform: translateY(-100%);
}
.site-header a {
	color: var(--wp--preset--color--on-dark);
	text-decoration: none;
}
.site-header__brand {
	display: block;
	width: 209px;
	height: 72px;
	overflow: hidden;
	text-indent: -9999px;
	background: url("assets/diegenusspartner-logo.svg") center / contain no-repeat;
	transition: width var(--wp--custom--transition--base), height var(--wp--custom--transition--base);
}
/* На hero-страницах шапка прозрачная над тёмным hero → тёмный логотип не виден.
   Пока не проскроллили — показываем белый вариант. */
.site-header:not(.is-scrolled) .site-header__brand {
	background-image: url("assets/diegenusspartner-logo-white.svg");
}
.site-header__actions {
	gap: var(--wp--preset--spacing--r-32);
	align-items: center;
}
.site-header .site-header__cta .wp-block-button__link {
	box-sizing: border-box;
	min-width: 195px;
	height: 56px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	border-radius: var(--wp--custom--radius--pill);
	padding: 18px 24px;
	font-size: var(--wp--preset--font-size--r-18);
	font-weight: 500;
	transition: background-color var(--wp--custom--transition--fast), color var(--wp--custom--transition--fast);
}
.site-header:not(.is-scrolled) .site-header__cta .wp-block-button__link:hover,
.site-header:not(.is-scrolled) .site-header__cta .wp-block-button__link:focus-visible {
	background-color: color-mix(in srgb, var(--wp--preset--color--base) 94%, var(--wp--preset--color--contrast));
}
.site-menu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--r-8);
	width: 129px;
	height: 56px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--on-dark);
	font: inherit;
	cursor: pointer;
}
.site-menu-toggle__label {
	font-size: var(--wp--preset--font-size--r-18);
	font-weight: 600;
	text-transform: uppercase;
}
.site-menu-toggle__icon {
	display: block;
	width: 32px;
	height: 32px;
	background: currentColor;
	-webkit-mask: url("assets/menu-icon.svg") center / contain no-repeat;
	mask: url("assets/menu-icon.svg") center / contain no-repeat;
}
.site-menu-toggle:hover,
.site-menu-toggle:focus-visible { opacity: 0.7; }
.site-header.is-scrolled {
	height: 80px;
	padding-block: var(--wp--preset--spacing--r-8);
	background: color-mix(in srgb, var(--wp--preset--color--surface) 96%, transparent);
	box-shadow: 0 8px 28px color-mix(in srgb, var(--wp--preset--color--contrast) 10%, transparent);
	backdrop-filter: blur(16px);
}
.site-header.is-scrolled .site-header__brand {
	width: 132px;
	height: 46px;
}
.site-header.is-scrolled .site-header__cta .wp-block-button__link {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--on-dark);
}
.site-header.is-scrolled .site-header__cta .wp-block-button__link:hover,
.site-header.is-scrolled .site-header__cta .wp-block-button__link:focus-visible {
	background-color: color-mix(in srgb, var(--wp--preset--color--contrast) 92%, var(--wp--preset--color--base));
}
.site-header.is-scrolled .site-menu-toggle {
	color: var(--wp--preset--color--contrast);
}
/* Светлый Hero (single object): меню/логотип тёмные уже в верхнем состоянии,
   CTA остаётся белой пилюлей с тёмным текстом (дефолт non-scrolled). */
body.has-light-hero .site-header:not(.is-scrolled) {
	color: var(--wp--preset--color--contrast);
}
/* Бургер на светлом hero — тёмный (своя white color иначе делает иконку невидимой,
   напр. references/objekte). */
body.has-light-hero .site-header:not(.is-scrolled) .site-menu-toggle {
	color: var(--wp--preset--color--contrast);
}
.site-menu {
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: hidden;
	pointer-events: none;
	/* Закрытая панель уезжает translateX(100%) за правый край → клипуем,
	   чтобы off-screen панель не давала горизонтальный скролл на мобилке. */
	overflow: hidden;
	transition: visibility 0s linear 360ms;
}
.site-menu.is-open {
	visibility: visible;
	pointer-events: auto;
	transition-delay: 0s;
}
.site-menu__panel {
	position: absolute;
	inset: 0 0 0 auto;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	width: min(562px, 100%);
	height: 100dvh;
	padding: 0 48px 32px;
	overflow-y: auto;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	transform: translateX(100%);
	opacity: 0;
	will-change: transform, opacity;
	transition: transform 460ms cubic-bezier(0.4, 0, 0.2, 1), opacity 260ms ease-out;
}
.site-menu.is-open .site-menu__panel { transform: translateX(0); opacity: 1; }
@media (prefers-reduced-motion: reduce) {
	.site-menu__panel { transition: none; }
}
.site-menu__eyebrow {
	position: absolute;
	top: 32px;
	left: 48px;
	margin: 0;
	font-size: var(--wp--preset--font-size--r-18);
	font-weight: 600;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}
.site-menu__close {
	position: absolute;
	top: 22px;
	right: 24px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: url("assets/menu-close.svg") center / contain no-repeat;
	cursor: pointer;
	transition: transform var(--wp--custom--transition--fast);
}
.site-menu__close:hover,
.site-menu__close:focus-visible { transform: rotate(90deg); }
.site-menu__nav {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 28px;
	margin-top: 117px;
}
.site-menu__nav a {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--r-24);
	font-style: italic;
	font-weight: 400;
	line-height: 1;
	color: var(--wp--preset--color--contrast);
	transition: transform var(--wp--custom--transition--fast), opacity var(--wp--custom--transition--fast);
}
.site-menu__nav a:hover,
.site-menu__nav a:focus-visible {
	transform: translateX(8px);
	opacity: 0.65;
}
/* Группа «Standorte»: заголовок-категория + ряд ссылок на регионы */
.site-menu__group {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
}
.site-menu__group-label {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--r-24);
	font-style: italic;
	font-weight: 400;
	line-height: 1;
	color: var(--wp--preset--color--contrast);
}
.site-menu__sublinks {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
}
.site-menu__sublinks a {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--r-16);
	font-style: normal;
	color: var(--wp--preset--color--muted);
	transition: color var(--wp--custom--transition--fast);
}
.site-menu__sublinks a:hover,
.site-menu__sublinks a:focus-visible {
	color: var(--wp--preset--color--contrast);
}
.site-menu__meta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	margin-top: auto;
	padding-top: 56px;
	padding-right: 110px;
	font-size: var(--wp--preset--font-size--r-16);
	color: var(--wp--preset--color--muted);
}
.site-menu__meta address { font-style: normal; }
.site-menu__meta a { color: var(--wp--preset--color--muted); }
.site-menu__mark {
	position: absolute;
	right: 48px;
	bottom: 48px;
	width: 76px;
	height: 161px;
	background: url("assets/menu-h256.svg") center / contain no-repeat;
}
body.site-menu-open { overflow: hidden; }

@media (max-width: 782px) {
	.site-header {
		height: 84px;
		padding: 16px;
	}
	.site-header__brand { width: 151px; height: 52px; }
	.site-header__actions { gap: var(--wp--preset--spacing--r-8); }
	.site-header .site-header__cta { display: none !important; }
	.site-menu-toggle { width: 44px; height: 44px; }
	.site-menu-toggle__label { display: none; }
	.site-header.is-scrolled {
		height: 68px;
		padding-block: var(--wp--preset--spacing--r-8);
	}
	.site-header.is-scrolled .site-header__brand { width: 128px; height: 44px; }
	.site-menu::before { top: 84px; }
	.site-menu__panel {
		width: 100%;
		padding: 0 16px 32px;
	}
	.site-menu__eyebrow { top: 24px; left: 16px; }
	.site-menu__close { top: 16px; right: 16px; }
	.site-menu__nav { gap: 22px; margin-top: 88px; }
	.site-menu__meta {
		margin-top: 48px;
		padding-top: 0;
		padding-right: 0;
	}
	.site-menu__mark { display: none; }
}

/* ===== Подвал ===== */
.site-footer {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	width: 100%;
}

/* Подвал всегда вплотную к предыдущей секции (CTA): убираем зазор от blockGap
   корневого layout-а шаблона. Глобально — для всех страниц. */
.wp-site-blocks > .site-footer,
.wp-site-blocks > footer.wp-block-template-part,
.wp-block-template-part:has(> .site-footer) {
	margin-top: 0 !important;
	margin-block-start: 0 !important;
}

/* Полноширинные секции страницы сами держат вертикальные отступы. Убираем 24px
   blockGap корневого flow-layout между ними — иначе между двумя секциями одного
   фона (напр. surface+surface: отзывы → FAQ) просвечивает белый фон body. */
.entry-content.is-layout-flow > [class*="wp-block-library-"],
.entry-content.is-layout-flow > [class*="wp-block-diegenusspartner-"] {
	margin-block-start: 0;
}

.site-footer .wp-block-paragraph,
.site-footer .wp-block-heading,
.site-footer a {
	color: var(--wp--preset--color--base);
}

.site-footer a { text-decoration: none; }

/* CTA-зона */
.site-footer__cta {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	justify-content: space-between;
	align-items: flex-start;
	padding: var(--wp--preset--spacing--r-64) var(--wp--custom--layout--gutter) var(--wp--preset--spacing--r-48);
	max-width: 1344px;
	margin-inline: auto;
	box-sizing: border-box;
}

.site-footer__headline {
	font-size: var(--wp--preset--font-size--r-56) !important;
	line-height: 1.4 !important;
	letter-spacing: -0.03em;
	margin: 0 !important;
	color: var(--wp--preset--color--base) !important;
	font-weight: 400;
}

.site-footer__headline em {
	font-weight: 300;
	font-style: italic;
}

.site-footer__h256 {
	width: 60px;
	height: 127px;
	flex-shrink: 0;
}

.site-footer__h256 svg { width: 100%; height: 100%; }

/* Разделитель */
.site-footer__sep {
	height: 1px;
	background: rgba(255, 255, 255, 0.15);
	max-width: calc(1344px - 2 * var(--wp--custom--layout--gutter));
	margin: 0 auto;
}

/* Основная зона */
.site-footer__body {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	justify-content: space-between;
	align-items: flex-start;
	padding: var(--wp--preset--spacing--r-64) var(--wp--custom--layout--gutter) var(--wp--preset--spacing--r-48);
	max-width: 1344px;
	margin-inline: auto;
	box-sizing: border-box;
}

/* Левая колонка — инфо */
.site-footer__info {
	width: 280px;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--r-40);
}

.site-footer__logo {
	display: block;
	width: 209px;
	height: 72px;
	background: url("assets/diegenusspartner-logo-white.svg") left center / contain no-repeat;
	text-indent: -9999px;
	overflow: hidden;
}

.site-footer__tagline {
	font-size: var(--wp--preset--font-size--r-16) !important;
	margin: 0 !important;
}

.site-footer__contact .wp-block-paragraph {
	margin: 0 !important;
	font-size: var(--wp--preset--font-size--r-16);
	line-height: 1.5;
}

.site-footer__contact .wp-block-paragraph + .wp-block-paragraph {
	margin-top: var(--wp--preset--spacing--r-16) !important;
}

/* Правая зона — навигация */
.site-footer__nav {
	display: flex;
	flex-direction: row;
	gap: var(--wp--preset--spacing--r-64);
	flex-shrink: 0;
}

.site-footer__nav-col {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--r-32);
	align-items: flex-end;
	text-align: right;
}

.site-footer__nav-label {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--r-12);
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.5) !important;
	margin: 0;
}

.site-footer__nav-col ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--r-8);
	align-items: flex-end;
}

.site-footer__nav-col li a {
	font-size: var(--wp--preset--font-size--r-18);
	font-weight: 400;
	color: var(--wp--preset--color--base);
	text-decoration: none;
	transition: opacity var(--wp--custom--transition--fast);
}

.site-footer__nav-col li a:hover { opacity: 0.7; }

/* Копирайт */
.site-footer__credit {
	max-width: 1344px;
	margin-inline: auto !important;
	padding: 0 var(--wp--custom--layout--gutter) var(--wp--preset--spacing--r-32) !important;
	text-align: right;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--surface-muted) !important;
	box-sizing: border-box;
}
/* Литеральное красное сердце в копирайте (контентный акцент, не токен темы). */
.site-footer__heart { color: #e0245e; }

/* ===== Глобальные стили кнопок (из дизайна Figma) ===== */

/*
 * Тёмная кнопка (contrast фон, on-dark текст).
 * Hover по дизайну = белый оверлей 8% поверх фона (#142335).
 */
.process-steps__button,
.referral-cta__button,
.sold-showcase__button {
	box-sizing: border-box;
	max-width: 100%;
	height: 56px;
	padding: 0 24px;
	border-radius: var(--wp--custom--radius--pill);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--r-18);
	font-weight: 500;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	transition: background-color var(--wp--custom--transition--fast);
}

.process-steps__button:hover,
.process-steps__button:focus-visible,
.referral-cta__button:hover,
.referral-cta__button:focus-visible,
.sold-showcase__button:hover,
.sold-showcase__button:focus-visible {
	background-color: color-mix(in srgb, var(--wp--preset--color--contrast) 92%, var(--wp--preset--color--base));
	outline: none;
}

/*
 * Светлая кнопка (base фон, contrast текст) — используется на тёмных секциях.
 * Hover = лёгкое затемнение (contrast overlay 6%).
 */
.about__button,
.consultation-cta__button {
	box-sizing: border-box;
	max-width: 100%;
	height: 56px;
	padding: 0 24px;
	border-radius: var(--wp--custom--radius--pill);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--r-18);
	font-weight: 500;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	transition: background-color var(--wp--custom--transition--fast);
}

.about__button:hover,
.about__button:focus-visible,
.consultation-cta__button:hover,
.consultation-cta__button:focus-visible {
	background-color: color-mix(in srgb, var(--wp--preset--color--base) 94%, var(--wp--preset--color--contrast));
	outline: none;
}

/* ===== Мета-блок объекта (diegenusspartner/property-meta) ===== */
.property-meta { margin-block: var(--wp--preset--spacing--r-32) 0; }

.property-meta__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px var(--wp--preset--spacing--r-32);
}

.property-meta__item {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.property-meta__label {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--r-12);
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: rgba(116, 124, 134, 0.5);
}

.property-meta__value {
	font-size: var(--wp--preset--font-size--r-16);
	color: var(--wp--preset--color--contrast);
	line-height: 1.5;
}

.property-meta__status {
	display: inline-block;
	margin-top: var(--wp--preset--spacing--r-16);
	padding: 4px 12px;
	border-radius: var(--wp--custom--radius--pill);
	font-size: var(--wp--preset--font-size--r-12);
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.property-meta__status--reserviert {
	background: #fff4e0;
	color: #a06000;
}

.property-meta__status--verkauft {
	background: #ffeaea;
	color: #a00000;
}

/* ===== Карточка объекта (в архиве и query-loop) ===== */
.property-card {
	border: 1px solid var(--wp--preset--color--accent);
	display: flex;
	flex-direction: column;
}

.property-card .wp-block-post-featured-image { margin: 0; }

.property-card .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}

.property-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--r-32);
	padding: var(--wp--preset--spacing--r-16) var(--wp--preset--spacing--r-16) var(--wp--preset--spacing--r-24);
	flex: 1;
}

.property-card__title {
	font-size: var(--wp--preset--font-size--r-24) !important;
	font-weight: 600 !important;
	letter-spacing: -0.03em;
	margin: 0 !important;
	color: var(--wp--preset--color--contrast);
}

.property-card__title a { color: inherit; text-decoration: none; }
.property-card__title a:hover { opacity: 0.8; }

.property-card__excerpt {
	font-size: var(--wp--preset--font-size--r-16) !important;
	color: var(--wp--preset--color--muted) !important;
	margin: 0 !important;
	line-height: 1.5;
	/* Ограничиваем до 3 строк */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.property-card__more {
	font-size: var(--wp--preset--font-size--r-16);
	font-weight: 700;
	text-decoration: underline;
	text-transform: uppercase;
	color: var(--wp--preset--color--contrast) !important;
	letter-spacing: 0.02em;
	margin-top: auto;
}

/* Сетка архива */
.property-grid.wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--wp--preset--spacing--r-32);
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Пагинация */
.property-pagination { gap: var(--wp--preset--spacing--r-8); }
.property-pagination .wp-block-query-pagination-numbers { gap: 4px; }
.property-pagination a,
.property-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 8px;
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: var(--wp--custom--radius--small);
	font-size: var(--wp--preset--font-size--r-16);
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	transition: background var(--wp--custom--transition--fast);
}
.property-pagination .current { background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); }
.property-pagination a:hover { background: var(--wp--preset--color--surface-muted); }

/* ===== Шапка архива ===== */
.property-archive__header { text-align: center; padding-top: 160px !important; }

.property-archive__title {
	font-size: var(--wp--preset--font-size--r-56) !important;
	letter-spacing: -0.03em;
	line-height: 1.2 !important;
	margin-block: 0 var(--wp--preset--spacing--r-16) !important;
}

.property-archive__title em {
	font-weight: 300;
	font-style: italic;
}

.property-archive__lead {
	font-size: var(--wp--preset--font-size--r-16) !important;
	color: var(--wp--preset--color--muted) !important;
	max-width: 540px;
	margin-inline: auto !important;
}

/* ===== Single property ===== */
.property-single__hero .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	display: block;
}

.property-single__body {
	padding-inline: var(--wp--custom--layout--gutter) !important;
}

.property-single__back {
	font-size: var(--wp--preset--font-size--r-16) !important;
	margin-block: 0 var(--wp--preset--spacing--r-32) !important;
}

.property-single__back a {
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}

.property-single__back a:hover { color: var(--wp--preset--color--contrast); }

.property-single__title {
	font-size: var(--wp--preset--font-size--r-48) !important;
	letter-spacing: -0.03em;
	line-height: 1.2 !important;
	margin-block: 0 0 !important;
}

.property-single__sep { margin-block: var(--wp--preset--spacing--r-40) !important; }

.property-single__content { margin-block: 0 var(--wp--preset--spacing--r-40) !important; }

.property-single__cta {
	border-top: 1px solid var(--wp--preset--color--border);
	padding-top: var(--wp--preset--spacing--r-40);
}

.property-single__cta-heading {
	font-size: var(--wp--preset--font-size--r-24) !important;
	margin: 0 !important;
}

.property-single__cta-btn .wp-block-button__link {
	background: var(--wp--preset--color--contrast) !important;
	color: var(--wp--preset--color--base) !important;
	border-radius: var(--wp--custom--radius--pill) !important;
	padding: 16px 28px !important;
	font-size: var(--wp--preset--font-size--r-18) !important;
	font-weight: 500;
	white-space: nowrap;
}

/* ===== Mobile: property ===== */
@media (max-width: 782px) {
	.property-grid.wp-block-post-template {
		grid-template-columns: 1fr;
		gap: var(--wp--preset--spacing--r-24);
	}

	.property-card .wp-block-post-featured-image img { aspect-ratio: 4 / 3; }

	.property-archive__header { padding-top: 120px !important; }

	.property-archive__title { font-size: clamp(2rem, 8vw, 3.5rem) !important; }

	.property-single__hero .wp-block-post-featured-image img { aspect-ratio: 4 / 3; }

	.property-single__title { font-size: clamp(1.75rem, 6vw, 3rem) !important; }

	.property-single__cta { flex-direction: column; gap: var(--wp--preset--spacing--r-24); }
}

@media (min-width: 783px) and (max-width: 1024px) {
	.property-grid.wp-block-post-template { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Мобильная версия footer ===== */
@media (max-width: 782px) {
	.site-footer__cta,
	.site-footer__body {
		padding-top: var(--wp--preset--spacing--r-48);
		padding-bottom: var(--wp--preset--spacing--r-32);
	}

	.site-footer__headline {
		font-size: clamp(2rem, 8vw, 3.5rem) !important;
	}

	.site-footer__h256 { display: none; }

	.site-footer__body {
		flex-direction: column;
		gap: var(--wp--preset--spacing--r-40);
	}

	.site-footer__info { width: 100%; }

	.site-footer__nav {
		flex-wrap: wrap;
		gap: var(--wp--preset--spacing--r-32);
	}

	.site-footer__nav-col {
		align-items: flex-start;
		text-align: left;
		min-width: calc(50% - var(--wp--preset--spacing--r-16));
	}

	.site-footer__nav-col ul { align-items: flex-start; }

	.site-footer__credit { text-align: left; }
}

/* ===== Tablet: подвал не обрезается по ширине (клиентский QA S4) =====
   В 783–1023px info+nav рядом (~936px) не влезали → 4-я колонка резалась и
   появлялся горизонтальный скролл. Переносим nav под info на всю ширину. */
@media (min-width: 783px) and (max-width: 1023px) {
	.site-footer__body { flex-wrap: wrap; }
	.site-footer__info { width: 100%; }
	.site-footer__nav {
		width: 100%;
		justify-content: flex-start;
		gap: var(--wp--preset--spacing--r-64);
	}
	/* Навигация теперь под инфо слева → выравниваем колонки влево
	   (по умолчанию они flex-end/right от десктопа → рваный вид на планшете). */
	.site-footer__nav-col {
		align-items: flex-start;
		text-align: left;
	}
	.site-footer__nav-col ul { align-items: flex-start; }
	.site-footer__credit { text-align: left; }
}

/* ===== Mobile: CTA-кнопки не во всю ширину (клиентский QA S5) =====
   В Figma-mobile кнопки облегают текст (217–305px) и центрируются, а не
   растягиваются на всю колонку. Часть блоков форсила width:100% / align-self:
   stretch — здесь общий override на 6 затронутых блоков. */
@media (max-width: 782px) {
	.about__button,
	.process-steps__button,
	.referral-cta__button,
	.consultation-cta__button,
	.split-cta__button,
	.sold-showcase__button {
		width: fit-content !important;
		max-width: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
		align-self: center;
		margin-inline: auto;
	}
}

/* ==========================================================================
   Блог (core-посты): общие карточка / мета / бейдж — для blog-grid,
   article-related (карточки) и blog-hero / article-header (мета, featured).
   ========================================================================== */

.blog-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--r-16);
}

.blog-meta__item {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--r-8);
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 400;
	font-size: var(--wp--preset--font-size--r-14);
	line-height: 1.5;
	white-space: nowrap;
}

.blog-meta__item svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.blog-badge {
	position: absolute;
	top: var(--wp--preset--spacing--r-16);
	left: var(--wp--preset--spacing--r-16);
	display: inline-flex;
	align-items: center;
	padding: var(--wp--preset--spacing--r-8) var(--wp--preset--spacing--r-24);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: var(--wp--custom--radius--pill);
	background: rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: var(--wp--preset--color--on-dark);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--r-16);
	line-height: 24px;
	white-space: nowrap;
}

.blog-card {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--r-16);
	text-decoration: none;
	color: inherit;
}

.blog-card__image {
	position: relative;
	aspect-ratio: 437 / 318;
	overflow: hidden;
	background: var(--wp--preset--color--placeholder);
}

.blog-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform var(--wp--custom--transition--base);
}

.blog-card:hover .blog-card__image img,
.blog-card:focus-visible .blog-card__image img {
	transform: scale(1.04);
}

.blog-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--r-16);
	padding-inline: var(--wp--preset--spacing--r-4);
}

.blog-card__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--r-20);
	font-weight: 400;
	line-height: 28px;
	color: var(--wp--preset--color--contrast);
}

.blog-card__more,
.blog-featured__more {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--r-16);
	font-weight: 700;
	text-transform: uppercase;
	text-decoration: underline;
	color: var(--wp--preset--color--contrast);
	transition: opacity var(--wp--custom--transition--fast);
}

.blog-card:hover .blog-card__more,
.blog-card:focus-visible .blog-card__more,
.blog-featured:hover .blog-featured__more,
.blog-featured:focus-visible .blog-featured__more {
	opacity: 0.6;
}

@media (max-width: 600px) {
	.blog-meta { gap: var(--wp--preset--spacing--r-16); }
}

/* Тело статьи (single post): колонка 848px, типографика, якоря под фикс-шапку. */
.single-post .rb-article-content {
	max-width: 848px;
	margin-inline: auto;
	padding-inline: var(--wp--custom--layout--gutter);
	padding-block: var(--wp--preset--spacing--r-48);
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--r-24);
}

.single-post .rb-article-content > * {
	margin-block: 0;
}

.single-post .rb-article-content :is(h2, h3, h4) {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--contrast);
	scroll-margin-top: 140px;
}

.single-post .rb-article-content h2 { font-size: var(--wp--preset--font-size--r-48); }
.single-post .rb-article-content h3 { font-size: var(--wp--preset--font-size--r-32); }
.single-post .rb-article-content h4 { font-size: var(--wp--preset--font-size--r-24); }

.single-post .rb-article-content :is(p, li) {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--r-16);
	line-height: 1.5;
	color: var(--wp--preset--color--muted);
}

.single-post .rb-article-content :is(img, .wp-block-image img) {
	border-radius: var(--wp--custom--radius--medium);
}

.single-post .rb-article-content a {
	color: var(--wp--preset--color--contrast);
	text-decoration: underline;
}

@media (max-width: 782px) {
	.single-post .rb-article-content h2 { font-size: var(--wp--preset--font-size--r-32); }
	.single-post .rb-article-content h3 { font-size: var(--wp--preset--font-size--r-24); }
}

/* ===== Blog: общая карточка статьи (popular + grid + related) ===== */
.gp-bcard {
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--base);
	border-radius: var(--wp--custom--radius--xl);
	padding: var(--wp--preset--spacing--r-8) var(--wp--preset--spacing--r-8) var(--wp--preset--spacing--r-24);
	box-shadow: 0 16px 14.55px rgba(24, 64, 0, 0.04);
	text-decoration: none;
	color: inherit;
	overflow: hidden;
	transition: transform var(--wp--custom--transition--base), box-shadow var(--wp--custom--transition--base);
}
.gp-bcard:hover {
	transform: translateY(-4px);
	box-shadow: 0 20px 28px rgba(24, 64, 0, 0.10);
}
.gp-bcard__image {
	display: block;
	border-radius: var(--wp--custom--radius--large);
	overflow: hidden;
	aspect-ratio: 592 / 287;
	background: var(--wp--custom--blog--placeholder);
}
.gp-bcard__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gp-bcard__body {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--r-16);
	padding: var(--wp--preset--spacing--r-16) var(--wp--preset--spacing--r-16) 0;
}
.gp-bcard__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--r-24);
	line-height: 1.33;
	letter-spacing: -0.02em;
	color: var(--wp--preset--color--contrast);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.gp-bcard__excerpt {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 500;
	font-size: var(--wp--preset--font-size--r-16);
	line-height: 1.4;
	color: var(--wp--custom--blog--excerpt);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
/* горизонтальная карточка (popular side) */
.gp-bcard--h {
	flex-direction: row;
	align-items: center;
	gap: var(--wp--preset--spacing--r-8);
	padding: var(--wp--preset--spacing--r-8);
}
.gp-bcard--h .gp-bcard__image { flex: 0 0 48%; aspect-ratio: 343 / 202; }
.gp-bcard--h .gp-bcard__body { flex: 1 1 auto; padding: 0 var(--wp--preset--spacing--r-8); }
.gp-bcard--h .gp-bcard__title { font-size: var(--wp--preset--font-size--r-20); line-height: 1.25; }

/* мета: дата • время чтения */
.gp-bmeta { display: flex; flex-wrap: wrap; gap: var(--wp--preset--spacing--r-16); }
.gp-bmeta__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--wp--custom--blog--meta);
	font-family: var(--wp--preset--font-family--body);
	font-weight: 500;
	font-size: var(--wp--preset--font-size--r-14);
	line-height: 1.5;
}
.gp-bmeta__item svg { width: 16px; height: 16px; flex-shrink: 0; }

/* автор */
.gp-bauthor { display: flex; align-items: center; gap: var(--wp--preset--spacing--r-8); }
.gp-bauthor__avatar {
	width: 32px; height: 32px;
	border-radius: var(--wp--custom--radius--pill);
	overflow: hidden; flex-shrink: 0;
}
.gp-bauthor__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gp-bauthor__name {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 400;
	font-size: var(--wp--preset--font-size--r-14);
	color: var(--wp--preset--color--contrast);
}

/* пагинация */
.gp-bpagination {
	display: flex; justify-content: center; align-items: center;
	gap: var(--wp--preset--spacing--r-8);
	margin-top: var(--wp--preset--spacing--r-40);
}
.gp-bpage {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; padding: 0 8px;
	border-radius: var(--wp--custom--radius--small);
	font-family: var(--wp--preset--font-family--body);
	font-weight: 500; font-size: var(--wp--preset--font-size--r-16);
	color: var(--wp--preset--color--contrast);
	text-decoration: none; border: 1px solid transparent;
	transition: background var(--wp--custom--transition--fast), color var(--wp--custom--transition--fast);
	cursor: pointer;
}
.gp-bpage:hover { background: var(--wp--preset--color--surface); }
.gp-bpage.is-active {
	border-bottom: 2px solid var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
	border-radius: 0;
}
.gp-bpage--gap { min-width: 24px; color: var(--wp--preset--color--placeholder); }
.gp-bpage--ctrl { color: var(--wp--preset--color--muted); }

@media (max-width: 782px) {
	.gp-bcard--h { flex-direction: column; align-items: stretch; }
	.gp-bcard--h .gp-bcard__image { flex: none; aspect-ratio: 592 / 287; }
	.gp-bcard--h .gp-bcard__body { padding: var(--wp--preset--spacing--r-16) var(--wp--preset--spacing--r-16) var(--wp--preset--spacing--r-8); }
	.gp-bcard--h .gp-bcard__title { font-size: var(--wp--preset--font-size--r-24); }
}

/* ===== Blog: тело одиночной статьи (single.html → .gp-article) ===== */
.gp-article { padding-top: var(--wp--preset--spacing--r-56); }
.gp-article > *:first-child { margin-top: 0; }
.gp-article h2 {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 800;
	font-size: var(--wp--preset--font-size--r-32);
	line-height: 1.1;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--contrast);
	text-align: center;
	margin: var(--wp--preset--spacing--r-40) 0 var(--wp--preset--spacing--r-24);
}
.gp-article h3 {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--r-24);
	line-height: 1.2;
	color: var(--wp--preset--color--contrast);
	margin: var(--wp--preset--spacing--r-32) 0 var(--wp--preset--spacing--r-16);
}
.gp-article p {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 500;
	font-size: var(--wp--preset--font-size--r-18);
	line-height: 1.6;
	color: var(--wp--preset--color--muted);
	margin: 0 0 var(--wp--preset--spacing--r-16);
}
.gp-article .wp-block-image { margin: var(--wp--preset--spacing--r-24) 0; }
.gp-article .wp-block-image img { border-radius: var(--wp--custom--radius--large); width: 100%; }
.gp-article :where(p, li) a { color: var(--wp--preset--color--primary); text-decoration: underline; }

@media (max-width: 782px) {
	.gp-article h2 { font-size: var(--wp--preset--font-size--r-24); }
	.gp-article p { font-size: var(--wp--preset--font-size--r-16); }
}

/* Полноширинные секции лендинга стыкуются встык — без стандартного block gap Gutenberg.
   Ядро вешает `:where(.is-layout-flow) > :not(:first-child) { margin-block-start: 24px }`,
   в дизайне этого отступа нет: каждая секция держит свои вертикальные паддинги сама.
   Специфичности хватает — !important не нужен. */
.wp-site-blocks .is-layout-flow > section[class^="gp-"] {
	margin-block-start: 0;
}


/* ── Кнопка бренда (.gp-btn) — ОБЩИЙ компонент темы ──────────────────────────
   Раньше правила жили в блоке home-hero → на страницах без hero (Lieferanten)
   кнопки других секций оставались без стилей. Место общего компонента — здесь. */
.gp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: var(--wp--preset--spacing--r-16) var(--wp--preset--spacing--r-32);
	border-radius: var(--wp--custom--radius--pill);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--r-14);
	font-weight: 700;
	text-decoration: none;
	transition: background var(--wp--custom--transition--fast), color var(--wp--custom--transition--fast), transform var(--wp--custom--transition--fast);
}
.gp-btn--primary { background: var(--wp--preset--color--primary); color: var(--wp--preset--color--on-dark); border: 2px solid var(--wp--preset--color--primary); }
.gp-btn--primary:hover { background: var(--wp--preset--color--contrast); border-color: var(--wp--preset--color--contrast); transform: translateY(-1px); }
.gp-btn--outline { background: transparent; color: var(--wp--preset--color--primary); border: 2px solid var(--wp--preset--color--primary); }
.gp-btn--outline:hover { background: var(--wp--preset--color--primary); color: var(--wp--preset--color--on-dark); transform: translateY(-1px); }
/* Кнопка ждёт ответа Store API (добавление в корзину доходит до ~5 с) — гасим её,
   чтобы клик не выглядел «непринятым» и не жали повторно. */
.gp-btn.is-loading { opacity: 0.6; pointer-events: none; cursor: progress; }

/* ─── Правовые страницы (Impressum, AGB, Rücktrittsrecht, Datenschutz, Cookies,
   Lieferung & Zahlung). Длинный текст: узкая колонка, крупный интерлиньяж,
   таблицы реквизитов. Отступ сверху резервирует фиксированную шапку (120px). */
.legal-page .gp-legal {
	padding-top: calc(120px + var(--wp--preset--spacing--r-64));
	padding-bottom: var(--wp--preset--spacing--r-96);
}
.legal-page .gp-legal > * {
	max-width: 860px;
	margin-inline: auto;
}
.legal-page .gp-legal p {
	font-size: var(--wp--preset--font-size--r-18);
	line-height: 1.65;
	color: var(--wp--preset--color--muted);
	margin: 0 0 var(--wp--preset--spacing--r-16);
}
.legal-page .gp-legal h2 {
	font-size: var(--wp--preset--font-size--r-32);
	line-height: 1.25;
	color: var(--wp--preset--color--contrast);
	margin: var(--wp--preset--spacing--r-48) 0 var(--wp--preset--spacing--r-16);
}
.legal-page .gp-legal h3 {
	font-size: var(--wp--preset--font-size--r-24);
	color: var(--wp--preset--color--contrast);
	margin: var(--wp--preset--spacing--r-32) 0 var(--wp--preset--spacing--r-12);
}
.legal-page .gp-legal ul {
	margin: 0 0 var(--wp--preset--spacing--r-16);
	padding-left: var(--wp--preset--spacing--r-24);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--r-18);
	line-height: 1.65;
}
.legal-page .gp-legal li { margin-bottom: var(--wp--preset--spacing--r-8); }
.legal-page .gp-legal a { color: var(--wp--preset--color--primary); }
/* Таблица реквизитов: на мобилке уезжает вбок внутри себя, а не тянет страницу. */
.legal-page .gp-legal .wp-block-table {
	margin: 0 0 var(--wp--preset--spacing--r-24);
	overflow-x: auto;
}
.legal-page .gp-legal .wp-block-table table {
	border-collapse: collapse;
	width: 100%;
	font-size: var(--wp--preset--font-size--r-16);
}
.legal-page .gp-legal .wp-block-table td,
.legal-page .gp-legal .wp-block-table th {
	border: 1px solid var(--wp--custom--shop--step-bg, #e6ece3);
	padding: var(--wp--preset--spacing--r-12) var(--wp--preset--spacing--r-16);
	text-align: left;
	vertical-align: top;
	color: var(--wp--preset--color--muted);
}
.legal-page .gp-legal .wp-block-table th { color: var(--wp--preset--color--contrast); font-weight: 700; }
.legal-page .gp-legal .wp-block-table td:first-child { color: var(--wp--preset--color--contrast); font-weight: 600; white-space: nowrap; }
.legal-page .gp-legal h1 {
	font-size: var(--wp--preset--font-size--r-48);
	line-height: 1.15;
	color: var(--wp--preset--color--contrast);
	margin: 0 0 var(--wp--preset--spacing--r-24);
}
