/* ============================================================
   FORESTOR — modulnye-bani.css
   Постраничные стили лендинга «Модульные бани под ключ».
   Токены и общие компоненты — из main.css (.container,.btn,.gbox…).
   Mobile-first; брейкпоинты 1024px и 680px как в main.css.
   ============================================================ */

/* Контейнер этой страницы уже общего: центрованный ~1290px как в оригинале */
.p-modulnye-bani .container {
	max-width: 1290px;
	padding-inline: 0;
}
@media (max-width: 1360px) {
	.p-modulnye-bani .container {
		padding-inline: clamp(20px, 4vw, 44px);
	}
}

/* ---------- Заголовок страницы ---------- */
.p-modulnye-bani__hero {
	padding-block: clamp(18px, 2.2vw, 34px) 0;
}
.p-modulnye-bani__back {
	display: inline-grid;
	place-items: center;
	width: 30px;
	height: 30px;
	margin: 0 0 clamp(8px, 1.1vw, 16px) -4px;
	color: var(--ink);
	transition: color .2s ease, transform .2s ease;
}
.p-modulnye-bani__back:hover {
	color: var(--red);
	transform: translateX(-3px);
}
.p-modulnye-bani__title {
	margin: 0;
	font-size: clamp(36px, 4.6vw, 72px);
	font-weight: 600;
	line-height: 1.02;
	letter-spacing: -0.01em;
	color: var(--ink);
	max-width: 900px;
}

/* ---------- Хлебные крошки ---------- */
.p-modulnye-bani__crumbs-wrap {
	padding-block: clamp(26px, 3.2vw, 50px) 0;
}
.p-modulnye-bani__crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
	line-height: 1.4;
}
.p-modulnye-bani__crumbs a {
	color: var(--ink);
	font-weight: 500;
	transition: color .2s ease;
}
.p-modulnye-bani__crumbs a:hover {
	color: var(--red);
}
.p-modulnye-bani__crumbs-sep {
	display: inline-flex;
	color: var(--muted);
}
.p-modulnye-bani__crumbs-current {
	color: var(--muted);
}

/* ---------- Кнопка + описание ---------- */
.p-modulnye-bani__intro {
	padding-block: clamp(24px, 2.8vw, 40px) 0;
}
.p-modulnye-bani__intro-btn {
	margin-bottom: clamp(22px, 2.6vw, 36px);
}
.p-modulnye-bani__lead {
	margin: 0;
	max-width: 1200px;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.62;
	color: var(--text);
	text-align: justify;
}

/* ---------- Каталог ---------- */
.p-modulnye-bani__catalog {
	padding-block: clamp(28px, 3.2vw, 44px) clamp(48px, 5vw, 80px);
}

/* фильтр «Все / Бани» с красными номерами */
.p-modulnye-bani__filter {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(18px, 2vw, 30px);
	margin-bottom: clamp(20px, 2.4vw, 34px);
}
.p-modulnye-bani__filter-btn {
	display: inline-flex;
	align-items: flex-start;
	gap: 3px;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
	font-family: var(--font);
	font-weight: 600;
	font-size: 17px;
	line-height: 1;
	color: var(--ink);
	transition: color .2s ease;
}
.p-modulnye-bani__filter-btn:hover {
	color: var(--red);
}
.p-modulnye-bani__filter-btn.is-active {
	color: var(--red);
}
.p-modulnye-bani__filter-num {
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
	color: var(--red);
	top: -0.2em;
}

/* сетка карточек — 3 колонки, одиночная карточка занимает ~1/3 */
.p-modulnye-bani__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--gutter);
}

/* карточка проекта — «Оверлей-стекло» (единый стиль с выдачей проектов) */
.p-modulnye-bani__card {
	position: relative; aspect-ratio: 1 / 1;
	border-radius: 20px; overflow: hidden; isolation: isolate;
	display: flex; flex-direction: column; justify-content: flex-end;
	background: var(--bg-soft);
}
.p-modulnye-bani__card[hidden] {
	display: none;
}
.p-modulnye-bani__card-media {
	position: absolute; inset: 0; z-index: 0;
	display: block; width: 100%; height: 100%; overflow: hidden;
}
.p-modulnye-bani__card-media img {
	width: 100%; height: 100%; aspect-ratio: auto;
	object-fit: cover; display: block;
	transition: transform .5s ease;
}
.p-modulnye-bani__card:hover .p-modulnye-bani__card-media img {
	transform: scale(1.05);
}
.p-modulnye-bani__card::after {
	content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background: linear-gradient(180deg, rgba(10,10,12,0) 42%, rgba(10,10,12,.28) 100%);
}
.p-modulnye-bani__card-body {
	position: relative; z-index: 2;
	margin: 14px; padding: 15px 18px; border-radius: 16px;
	color: #fff;
	background: rgba(20,20,24,.46); border: 1px solid rgba(255,255,255,.22);
	display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 12px;
}
@supports ( ( -webkit-backdrop-filter: blur(2px) ) or ( backdrop-filter: blur(2px) ) ) {
	.p-modulnye-bani__card-body { background: rgba(20,20,24,.30); -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%); }
}
.p-modulnye-bani__card-title {
	grid-column: 1; margin: 0;
	font-size: 20px; font-weight: 800; color: #fff; line-height: 1.15;
}
.p-modulnye-bani__card-price {
	grid-column: 2; text-align: right; white-space: nowrap; margin: 0;
	font-size: 14px; font-weight: 600; color: rgba(255,255,255,.9);
}
.p-modulnye-bani__card-actions {
	grid-column: 1 / -1; margin-top: 14px;
	display: grid; grid-template-columns: 1fr 1fr; gap: 9px;
}
.p-modulnye-bani__card-actions .btn {
	padding: 12px 10px; font-size: 13.5px; border-radius: 10px;
	background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.32); color: #fff;
	transition: background .2s, color .2s, border-color .2s;
}
.p-modulnye-bani__card-actions .btn:hover { background: #fff; border-color: #fff; color: var(--ink); }

/* ---------- Модалка «Заказать проект» ---------- */
.p-modulnye-bani-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.p-modulnye-bani-modal[hidden] {
	display: none;
}
.p-modulnye-bani-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(17, 16, 19, .55);
	backdrop-filter: blur(2px);
}
.p-modulnye-bani-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 440px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: #fff;
	border-radius: 20px;
	padding: clamp(26px, 3vw, 40px);
	box-shadow: 0 30px 70px rgba(0, 0, 0, .3);
}
.p-modulnye-bani-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: var(--bg-soft);
	color: var(--ink);
	cursor: pointer;
	transition: .2s ease;
}
.p-modulnye-bani-modal__close:hover {
	background: var(--ink);
	color: #fff;
}
.p-modulnye-bani-modal__title {
	margin: 0 0 20px;
	font-size: 24px;
	font-weight: 600;
	color: var(--ink);
}

/* оформление полей CF7 внутри модалки */
.p-modulnye-bani-modal .wpcf7-form p {
	margin: 0 0 14px;
}
.p-modulnye-bani-modal input[type="text"],
.p-modulnye-bani-modal input[type="tel"] {
	width: 100%;
	padding: 14px 16px;
	font-family: var(--font);
	font-size: 15px;
	color: var(--text);
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: 8px;
	transition: border-color .2s ease;
}
.p-modulnye-bani-modal input[type="text"]:focus,
.p-modulnye-bani-modal input[type="tel"]:focus {
	outline: none;
	border-color: var(--ink);
}
.p-modulnye-bani-modal .wpcf7-list-item {
	margin: 0;
	font-size: 13px;
	line-height: 1.4;
	color: var(--muted);
}
.p-modulnye-bani-modal .wpcf7-list-item a {
	color: var(--red);
}
.p-modulnye-bani-modal .wpcf7-submit {
	width: 100%;
	margin-top: 6px;
	padding: 16px 24px;
	font-family: var(--font);
	font-weight: 600;
	font-size: 15.5px;
	color: #fff;
	background: var(--ink);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	transition: background .2s ease;
}
.p-modulnye-bani-modal .wpcf7-submit:hover {
	background: var(--red);
}

/* ============ АДАПТИВ ============ */
@media (max-width: 1024px) {
	.p-modulnye-bani__grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.p-modulnye-bani__title {
		max-width: none;
	}
}

@media (max-width: 680px) {
	.p-modulnye-bani__grid {
		grid-template-columns: 1fr;
		max-width: 460px;
	}
	.p-modulnye-bani__lead {
		text-align: left;
	}
	.p-modulnye-bani__card-actions .btn {
		flex: 1 1 auto;
	}
}
