/*
 * Правки для неопытных посетителей (одобрены владельцем 2026-11-18, витрина правок).
 * Подключается последним, после home-v2.css. Цвета и шрифты темы не меняются.
 */

:root {
	--ux-header-h: 0px;
}

html {
	scroll-padding-top: calc(var(--ux-header-h) + 12px);
}

/* ---------- Шапка: остаётся наверху при прокрутке ---------- */

body.home-v2-chrome-preview .home-v2-header {
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	z-index: 1000;
}

body.admin-bar.home-v2-chrome-preview .home-v2-header {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar.home-v2-chrome-preview .home-v2-header {
		top: 46px;
	}
}

@media (max-width: 600px) {
	body.admin-bar.home-v2-chrome-preview .home-v2-header {
		top: 0;
	}
}

/* Компьютер: после прокрутки шапка становится ниже */
@media (min-width: 75em) {
	body.home-v2-chrome-preview .home-v2-header__container {
		transition: min-height .2s ease, padding .2s ease;
	}

	body.home-v2-chrome-preview .home-v2-header__logo {
		transition: transform .2s ease;
	}

	body.home-v2-chrome-preview.is-header-compact .home-v2-header__container {
		min-height: 62px;
		padding-top: 8px;
		padding-bottom: 8px;
	}

	body.home-v2-chrome-preview.is-header-compact .home-v2-header__logo {
		transform: scale(.86);
		transform-origin: left center;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.home-v2-chrome-preview .home-v2-header__container,
	body.home-v2-chrome-preview .home-v2-header__logo {
		transition: none;
	}
}

/* Липкие элементы страниц опускаем под шапку */
.company__elements,
.sidebar__title {
	top: calc(var(--ux-header-h) + 24px);
}

@media (min-width: 64em) {
	.service__menu,
	.art-project__thumb {
		top: calc(var(--ux-header-h) + 20px);
	}

	.art-project__menu {
		top: var(--ux-header-h);
	}
}

.homes .homes__filter-button {
	top: var(--ux-header-h);
}

/* ---------- Мобильная шапка: «Позвонить» и «Меню» ---------- */

.home-v2-header__call {
	display: none;
}

@media (max-width: 74.99em) {
	.home-v2-header__call.phone-reveal {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		flex: 0 0 auto;
		min-width: 136px;
		height: 44px;
		margin-left: auto;
		padding: 0 16px;
		border-radius: 999px;
		background: var(--color-primary);
		color: #fff;
		font-size: 15px;
		font-weight: 500;
		line-height: 1;
		text-decoration: none;
		white-space: nowrap;
		-webkit-tap-highlight-color: transparent;
	}

	.home-v2-header__call.phone-reveal:hover,
	.home-v2-header__call.phone-reveal:focus-visible {
		background: var(--color-primary-hover);
		color: #fff;
	}

	.home-v2-header__call .phone-reveal__icon {
		flex: 0 0 auto;
		width: 20px;
		height: 20px;
	}

	.home-v2-header__call .phone-reveal__action,
	.home-v2-header__call.phone-reveal.is-revealed .phone-reveal__action {
		display: inline;
		color: inherit;
		font-weight: 500;
	}

	.home-v2-header__call.phone-reveal.is-loading {
		opacity: .85;
	}

	body.home-v2-chrome-preview .home-v2-header__burger,
	.home-v2-header__burger {
		width: auto;
		min-width: 44px;
		height: 44px;
		margin-left: 8px;
		padding: 0 14px;
		gap: 8px;
		border: 1px solid rgba(56, 43, 36, 0.18);
		border-radius: 999px;
		background: #fff;
		color: #382b24;
	}

	.home-v2-header__burger-icon {
		flex: 0 0 20px;
		width: 20px;
	}

	/* Открытое меню: та же «таблетка», крестик и слово «Закрыть» */
	body.home-v2-chrome-preview .home-v2-header.is-menu-open .home-v2-header__burger,
	.home-v2-header.is-menu-open .home-v2-header__burger {
		width: auto;
		min-width: 44px;
		height: 44px;
		padding: 0 14px;
		gap: 8px;
		border-radius: 999px;
	}

	.home-v2-header__burger-label--close,
	.home-v2-header.is-menu-open .home-v2-header__burger-label--open {
		display: none;
	}

	.home-v2-header.is-menu-open .home-v2-header__burger-label--close {
		display: inline;
	}

	.home-v2-header__burger-label {
		font-size: 15px;
		font-weight: 500;
		line-height: 1;
		color: #382b24;
	}

	.home-v2-header__logo {
		flex-shrink: 1;
		min-width: 0;
		background-position: left center;
		background-size: contain;
	}
}

@media (max-width: 23.75em) {
	.home-v2-header__container {
		gap: 8px;
		padding-left: 12px;
		padding-right: 12px;
	}

	.home-v2-header__call.phone-reveal {
		min-width: 0;
		padding: 0 12px;
		gap: 6px;
	}

	body.home-v2-chrome-preview .home-v2-header__burger,
	.home-v2-header__burger {
		margin-left: 6px;
		padding: 0 11px;
		gap: 6px;
	}
}

/* ---------- Формы заявки: подписи над полями, подсказка, понятные ошибки ---------- */

.ux-field__label {
	display: block;
	margin: 0 0 6px;
	color: #1b1b1b;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
}

.ux-field__optional {
	color: #5a5a5a;
	font-size: 14px;
	font-weight: 400;
}

.ux-field__hint {
	margin: 6px 0 0;
	color: #5a5a5a;
	font-size: 14px;
	line-height: 1.35;
}

.ux-field__error {
	display: flex;
	align-self: stretch;
	align-items: flex-start;
	justify-content: flex-start;
	text-align: left;
	gap: 8px;
	margin: 8px 0 0;
	color: #a90707;
	font-size: 15px;
	line-height: 1.35;
}

.ux-field__error::before {
	content: "!";
	flex: 0 0 20px;
	height: 20px;
	border-radius: 50%;
	background: #a90707;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
}

/* Звёздочка не нужна: у поля есть подпись, а имя помечено «необязательно» */
.home-v2-order-form__row--required.ux-field::after {
	content: none;
}

.home-v2-order-form__row--required.ux-field .home-v2-order-form__input {
	padding-left: 18px;
}

.ux-field.is-invalid .ux-field__hint {
	display: none;
}

.ux-field.is-invalid .input {
	border-color: #a90707;
	box-shadow: 0 0 0 1px #a90707 inset;
}

/* Тень кнопки при наведении не должна обрезаться краем окна */
.popup .home-v2-order-form {
	padding-bottom: 16px;
}

/* ---------- После отправки заявки ---------- */

.ux-success {
	width: 100%;
	max-width: 460px;
	margin: 0 auto;
	padding: 8px 0 4px;
	text-align: center;
}

.ux-success__icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: var(--color-primary);
	color: #fff;
	font-size: 34px;
	line-height: 64px;
}

.home-v2-order-success__caption.ux-success__title {
	margin: 0 0 14px;
	color: #1b1b1b;
	font-size: clamp(30px, 4vw, 40px);
	line-height: 1;
}

.home-v2-order-success__description.ux-success__text {
	margin: 0 0 18px;
	color: #1b1b1b;
	font-size: 17px;
	line-height: 1.5;
	white-space: normal;
}

.ux-success__phone {
	margin: 0 0 6px;
	color: var(--color-primary);
	font-size: 24px;
	font-weight: 700;
	letter-spacing: .01em;
	white-space: nowrap;
}

.ux-success__note {
	margin: 0 0 22px;
	color: #5a5a5a;
	font-size: 15px;
	line-height: 1.45;
}

.ux-success__close.btn {
	width: 100%;
	min-height: 52px;
}

/* Крупнее крестик закрытия окна заявки */
#popupOrderHomeV2 .popup__close {
	width: 48px;
	height: 48px;
}

/* ---------- Карточка проекта ---------- */

.project__cost-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--color-primary);
	font: inherit;
	font-size: 16px;
	text-decoration: underline;
	text-underline-offset: 4px;
	cursor: pointer;
}

.project__cost-link:hover,
.project__cost-link:focus-visible {
	color: var(--color-primary-hover);
}

@media (min-width: 64em) {
	.project__cost-actions--desktop {
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		gap: 24px;
	}

	.ux-sticky-cta {
		display: none !important;
	}
}

/* Телефон: «Заказать смету» внизу экрана */
.ux-sticky-cta {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 900;
	padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
	background: rgba(255, 255, 255, 0.97);
	box-shadow: 0 -6px 20px rgba(31, 29, 27, 0.08);
}

.ux-sticky-cta[hidden] {
	display: none;
}

.ux-sticky-cta .btn {
	width: 100%;
	min-height: 52px;
}

@media (max-width: 63.99em) {
	body.has-ux-sticky-cta {
		padding-bottom: 74px;
	}

	body.has-ux-sticky-cta .cookie-consent {
		bottom: calc(82px + env(safe-area-inset-bottom));
	}
}

/* ---------- Главная: ссылка «Выбрать проект дома» видна и на телефоне ---------- */

@media (max-width: 48em) {
	.home-v2-hero__actions {
		gap: 12px;
	}

	.home-v2-hero__link {
		display: inline-flex;
		align-self: center;
		justify-content: center;
		min-height: 44px;
	}
}

/* ---------- 404: куда идти дальше ---------- */

.p404__links {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	width: 100%;
	max-width: 360px;
	margin: 16px auto 0;
}

.p404__links .btn {
	min-height: 52px;
	padding-left: 24px;
	padding-right: 24px;
}

@media (min-width: 48em) {
	/* Три кнопки не помещаются поверх цифр: текст и кнопки ставим под «404», по центру */
	.p404__bg {
		font-size: min(24vw, 300px);
		margin-bottom: 8px;
	}

	.p404__content {
		position: static;
	}

	.p404__content-box {
		display: block;
		text-align: center;
	}

	.p404__links {
		grid-template-columns: repeat(3, auto);
		justify-content: center;
		max-width: none;
		margin-top: 24px;
	}

	.p404__content .p404__links .btn {
		padding-left: 28px;
		padding-right: 28px;
	}
}

/* ---------- «О компании»: карточки «Проекты домов» и «Построенные дома» ---------- */

.ux-routes {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 0 0 28px;
}

.ux-routes--mobile {
	display: none;
}

.ux-route {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 240px;
	padding: 22px;
	overflow: hidden;
	border-radius: 14px;
	background: #382b24;
	color: #fff;
	text-decoration: none;
	isolation: isolate;
}

.ux-route__image {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.ux-route::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(0, 0, 0, .12) 0%, rgba(0, 0, 0, .45) 50%, rgba(0, 0, 0, .78) 100%);
}

.ux-route:hover .ux-route__image,
.ux-route:focus-visible .ux-route__image {
	transform: scale(1.03);
}

.ux-route__title {
	margin: 0 0 6px;
	font-family: "Bebas Neue", Arial, sans-serif;
	font-size: 34px;
	line-height: 1;
}

.ux-route__text {
	margin: 0 0 14px;
	font-size: 15px;
	line-height: 1.4;
	opacity: .92;
}

.ux-route__go {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	font-weight: 500;
}

.ux-route__go::after {
	content: "→";
	transition: transform .2s ease;
}

.ux-route:hover .ux-route__go::after,
.ux-route:focus-visible .ux-route__go::after {
	transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
	.ux-route__image,
	.ux-route__go::after {
		transition: none;
	}
}

/* Компьютер: карточки сразу под заголовком, без пустого места над текстом */
@media (min-width: 62.0625em) {
	.about__company .company__container {
		padding-top: 24px;
	}

	.about__company .company__elements {
		margin-top: 0;
	}

	.about__company .company__content > p:first-of-type {
		margin-top: 0;
	}
}

@media (max-width: 62.0625em) {
	.ux-routes--desktop {
		display: none;
	}

	.ux-routes--mobile {
		display: grid;
		margin: 20px 0;
	}
}

@media (max-width: 48em) {
	.ux-routes--mobile {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.ux-route {
		min-height: 180px;
		padding: 18px;
	}

	.ux-route__title {
		font-size: 30px;
	}
}

/* Блок заявки перед «Нашей командой» */
.ux-about-cta-section .company__container {
	padding-top: 40px;
}

.ux-about-cta-section .company__content {
	padding-bottom: 0;
	border-bottom: 0;
}

.ux-about-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 24px;
	padding: 28px;
	border-radius: 14px;
	background: var(--color-bg-alt);
}

.ux-about-cta__title {
	margin: 0 0 6px;
	color: #1b1b1b;
	font-family: "Bebas Neue", Arial, sans-serif;
	font-size: 32px;
	font-weight: 400;
	line-height: 1.05;
}

.ux-about-cta__text {
	margin: 0;
	color: #434343;
	font-size: 16px;
	line-height: 1.45;
}

.ux-about-cta__btn.btn {
	flex: 0 0 auto;
	min-height: 52px;
}

@media (max-width: 48em) {
	.ux-about-cta {
		padding: 22px 18px;
	}

	.ux-about-cta__btn.btn {
		width: 100%;
	}
}

/* ---------- «Построенные дома»: карта открывается по кнопке ---------- */

.ux-map-toggle-wrap[hidden],
.contacts__map[hidden] {
	display: none;
}

.ux-map-toggle {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 56px;
	margin: 0 0 8px;
	padding: 0 16px;
	overflow: hidden;
	border: 1px solid rgba(126, 4, 15, 0.3);
	border-radius: 10px;
	background: #fff;
	color: var(--color-primary);
	font: inherit;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	isolation: isolate;
}

.ux-map-toggle__label {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.ux-map-toggle__preview {
	display: none;
}

.ux-map-toggle:hover,
.ux-map-toggle:focus-visible {
	border-color: var(--color-primary);
}

/* Компьютер: крупная кнопка с картинкой карты, по ширине списка домов */
@media (min-width: 64em) {
	.ux-map-toggle--preview {
		min-height: 220px;
		align-items: flex-end;
		padding: 0 0 22px;
		border-color: rgba(31, 29, 27, 0.12);
	}

	.ux-map-toggle--preview .ux-map-toggle__preview {
		position: absolute;
		inset: 0;
		z-index: -2;
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
		transition: transform .4s ease;
	}

	.ux-map-toggle--preview::before {
		content: "";
		position: absolute;
		inset: 0;
		z-index: -1;
		background: linear-gradient(180deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, .55) 100%);
	}

	.ux-map-toggle--preview .ux-map-toggle__label {
		min-height: 52px;
		padding: 0 26px;
		border-radius: 999px;
		background: var(--color-primary);
		color: #fff;
		box-shadow: 0 8px 24px rgba(31, 29, 27, 0.18);
	}

	.ux-map-toggle--preview:hover .ux-map-toggle__preview,
	.ux-map-toggle--preview:focus-visible .ux-map-toggle__preview {
		transform: scale(1.02);
	}

	.ux-map-toggle--preview:hover .ux-map-toggle__label,
	.ux-map-toggle--preview:focus-visible .ux-map-toggle__label {
		background: var(--color-primary-hover);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ux-map-toggle__preview {
		transition: none;
	}
}

/* ---------- «Контакты» на телефоне: сначала адрес и телефон, карта ниже ---------- */

@media (max-width: 63.99em) {
	.contacts:not(.contacts__update) {
		display: flex;
		flex-direction: column;
	}

	/* Порядок на телефоне: адрес и телефон → карта → юридический адрес и реквизиты */
	.contacts:not(.contacts__update) .contacts__data,
	.contacts:not(.contacts__update) .contacts__data > .container {
		display: contents;
	}

	.contacts:not(.contacts__update) .contacts__card {
		order: 1;
		padding-left: 10px;
		padding-right: 10px;
	}

	.contacts:not(.contacts__update) .contacts__map {
		order: 2;
	}

	.contacts:not(.contacts__update) .contacts__legally-container {
		order: 3;
		padding-left: 10px;
		padding-right: 10px;
	}

	.contacts:not(.contacts__update) .map {
		margin-top: 24px;
	}
}

@media (min-width: 48em) and (max-width: 63.99em) {
	.contacts:not(.contacts__update) .contacts__card,
	.contacts:not(.contacts__update) .contacts__legally-container {
		padding-left: 40px;
		padding-right: 40px;
	}
}

/* ---------- Каталог: пустая выдача ведёт к индивидуальному проекту ---------- */

.projects-empty {
	margin: 8px 0 24px;
	padding: 32px 24px;
	border-radius: 14px;
	background: var(--color-bg-alt);
}

.projects-empty__title {
	margin: 0 0 10px;
	color: #1b1b1b;
	font-family: "Bebas Neue", Arial, sans-serif;
	font-size: 32px;
	font-weight: 400;
	line-height: 1.05;
}

.projects-empty__text {
	max-width: 520px;
	margin: 0 auto 20px;
	color: #434343;
	font-size: 16px;
	line-height: 1.5;
}

.projects-empty__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
}

.projects-empty__actions .btn {
	min-height: 52px;
	padding-left: 28px;
	padding-right: 28px;
	font-size: 15px;
}

@media (max-width: 48em) {
	.projects-empty__actions .btn {
		width: 100%;
	}
}

/* ---------- «Расценки»: инструкция по левому краю ---------- */

.rates__input-intro {
	text-align: left;
}

/* Постер первого экрана в <picture>: обёртка не влияет на раскладку */
.home-v2-hero__video-poster-picture {
	display: contents;
}

/* ---------- Cookie на компьютере: карточка в правом нижнем углу, не мешает читать ---------- */

@media (min-width: 64em) {
	#cookie-consent-banner.cookie-consent {
		left: auto;
		right: 24px;
		bottom: 24px;
		width: 400px;
		max-width: calc(100% - 48px);
		margin: 0;
	}
}

/* ---------- Окно заявки на компьютере: поля не шире обычного ---------- */

@media (min-width: 48em) {
	#popupOrderHomeV2 .popup__container {
		max-width: 580px;
	}
}

/* ---------- «Расценки»: плитки типа дома не уходят под край экрана ---------- */

.rates .houseType {
	margin-left: 0;
	margin-right: 0;
}

/* ---------- Подписи темнее (счётчики проектов остаются серыми) ---------- */

.crumbs a,
.crumbs li:not(:last-of-type),
.crumbs li:not(:last-of-type)::after {
	color: #4a4442;
}

.homeFilter__popular-caption,
.homeFilter__range-label {
	color: #2b2523;
	font-weight: 600;
}

.project__characteristic dt {
	color: #4a4442;
}

/* ---------- Зоны нажатия не меньше 44–48 px; вид кнопок прежний ---------- */

.home-v2-header__socials a,
.catalog-nav__item,
.homeFilter__section-close {
	position: relative;
}

.home-v2-header__socials a::after,
.catalog-nav__item::after,
.homeFilter__section-close::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: max(100%, 48px);
	height: max(100%, 48px);
	transform: translate(-50%, -50%);
}

.project-collections__more {
	min-height: 44px;
}

.homeFilter__range-input .input,
.projects-v2 .homeFilter__range-input input {
	height: 48px;
}
