/*
Theme Name: TeploZver
Theme URI: https://teploproekt.ru
Author: ТеплоПроект
Description: Тема сайта ТеплоПроект — проектирование и монтаж отопления.
Version: 1.0.10
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: teplozver
*/

:root {
	--ink: #13201c;
	--muted: #64716c;
	--green: #0d694f;
	--lime: #d8f56a;
	--paper: #f5f6f1;
	--white: #fff;
	--line: #dce3de;
	--dark: #0d2d24;
	--max: 1200px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: Inter, Arial, sans-serif;
	background: var(--paper);
	color: var(--ink);
	line-height: 1.5;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--green);
}

h1,
h2,
h3,
p {
	margin-top: 0;
}

h1 {
	font-size: clamp(36px, 5vw, 56px);
	line-height: 1.05;
	letter-spacing: -0.04em;
}

.container {
	width: min(var(--max), calc(100% - 40px));
	margin: 0 auto;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(245, 246, 241, 0.92);
	backdrop-filter: blur(18px);
	border-bottom: 1px solid rgba(19, 32, 28, 0.08);
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 28px;
	min-height: 74px;
}

.site-logo {
	font-weight: 900;
	font-size: 19px;
	color: var(--ink);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.site-logo img {
	width: auto;
	max-height: 40px;
}

.menu {
	display: flex;
	gap: 22px;
	margin: 0 0 0 auto;
	padding: 0;
	list-style: none;
}

.menu a {
	font-size: 14px;
	font-weight: 700;
	color: var(--ink);
	text-decoration: none;
}

.site-main {
	padding: 64px 0 96px;
}

.entry-content > * + * {
	margin-top: 1em;
}

.site-footer {
	background: #082219;
	color: #afc2bb;
	padding: 30px 0;
	font-size: 12px;
}

.site-footer a {
	color: #afc2bb;
}

/* Landing: не ломать размеры иконок глобальным img { max-width: 100% }. */
#home .service-benefits__card-icon-img,
#home .service-benefits__card-icon img {
	display: block;
	max-width: none;
	width: 28px;
	height: 28px;
	object-fit: contain;
}

#home .service-benefits__card-icon svg,
#home .service-benefits__aside svg {
	flex-shrink: 0;
	max-width: none;
}

/* About: блок руководителя — типографика как в прототипе (перебивает стили темы). */
#home .about__lead-name,
#home .about__lead h3 {
	margin: 0 0 8px;
	color: #242524;
	font-family: Manrope, sans-serif;
	font-size: clamp(32px, 3.2vw, 42px);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.8px;
}

#home .about__lead-role {
	margin: 0 0 18px;
	color: rgb(36 37 36 / 0.58);
	font: 500 14px / 1.4 Manrope, sans-serif;
}

#home .about__quote {
	display: block;
	margin: 0 0 6px;
	color: #c74b13;
	font: italic 600 42px / 0.7 "Playfair Display", serif;
}

#home .about__lead-quote,
#home .about__lead blockquote {
	margin: 0 0 18px;
	padding: 0;
	border: 0;
	color: #000;
	font: italic 700 17px / 1.5 "Playfair Display", serif;
}

#home .about__company-text p {
	margin: 0;
	color: rgb(36 37 36 / 0.7);
	font: 500 13px / 1.55 Manrope, sans-serif;
}

#home .about__lead-label {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 14px;
	color: #c74b13;
	font: 700 11px / 1 Manrope, sans-serif;
	letter-spacing: 2px;
	text-transform: uppercase;
}

@media (max-width: 780px) {
	.site-nav {
		flex-wrap: wrap;
		padding: 16px 0;
	}

	.menu {
		width: 100%;
		margin: 0;
		flex-direction: column;
		gap: 12px;
	}
}

/* Carousel chevrons — stroke on path, color from button or default terracotta. */
#home .works__chevron,
#home .reviews__chevron,
#home .specialists__chevron {
	display: block;
	color: inherit;
}

#home .works__chevron path,
#home .reviews__chevron path,
#home .specialists__chevron path {
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Sticky landing header + WordPress admin-bar support. */
html {
	scroll-padding-top: 76px;
}

body.admin-bar {
	scroll-padding-top: 108px;
}

#home > .header {
	position: sticky;
	top: 0;
	z-index: 40;
	height: auto;
	min-height: 72px;
	padding-top: 8px;
	padding-bottom: 8px;
}

#home > .header::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 100vw;
	transform: translateX(-50%);
	background: var(--milk, #f5f1e9);
	border-bottom: 1px solid transparent;
	box-shadow: 0 0 0 rgba(25, 29, 28, 0);
	transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
	z-index: -1;
	pointer-events: none;
}

#home > .header.is-scrolled::before {
	border-bottom-color: rgba(58, 43, 35, 0.18);
	box-shadow: 0 10px 28px rgba(25, 29, 28, 0.14), 0 2px 6px rgba(25, 29, 28, 0.08);
}

body.admin-bar #home > .header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar #home > .header {
		top: var(--wp-admin--admin-bar--height, 46px);
	}
}

@media screen and (max-width: 600px) {
	/* На мобильных <600px верхняя панель WP (#wpadminbar) становится position: absolute и уезжает при скролле */
	body.admin-bar #home > .header {
		top: 0;
	}
}

@media (max-width: 700px) {
	#home > .header::before {
		background: linear-gradient(105deg, #f5f1e9 0%, #caa88e 58%, #65473a 100%);
	}

	#home > .header .menu-button {
		position: relative;
		z-index: 60;
	}

	#home > .header .menu-button[aria-expanded="true"],
	#home > .header .menu-button[aria-expanded="true"] span {
		color: var(--text, #242524);
	}

	#home > .header .navigation {
		display: flex !important;
		position: fixed !important;
		top: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		left: auto !important;
		width: min(320px, 84vw) !important;
		height: 100dvh !important;
		padding: 84px 28px 36px !important;
		background: var(--milk, #f5f1e9) !important;
		border-bottom: 0 !important;
		border-left: 1px solid var(--border, #d9d3c8);
		box-shadow: -16px 0 40px rgba(25, 29, 28, 0.22);
		flex-direction: column;
		justify-content: flex-start;
		gap: 22px !important;
		font-size: 18px !important;
		font-weight: 600;
		z-index: 55 !important;
		transform: translateX(105%) !important;
		visibility: hidden;
		pointer-events: none;
		transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.32s ease;
		overflow-y: auto;
	}

	#home > .header .navigation.open {
		transform: translateX(0) !important;
		visibility: visible;
		pointer-events: auto;
	}

	.mobile-nav-backdrop {
		position: fixed;
		inset: 0;
		background: rgba(25, 29, 28, 0.45);
		backdrop-filter: blur(2px);
		-webkit-backdrop-filter: blur(2px);
		z-index: 35;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity 0.28s ease, visibility 0.28s ease;
	}

	.mobile-nav-backdrop.is-open {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}
}

.modal-backdrop {
	z-index: 100;
}

/* Advantages panel: 5 updated items & SVG mask icons. */
#home .advantages-panel__icon--warranty {
	-webkit-mask-image: url("assets/icons/01-warranty.svg");
	mask-image: url("assets/icons/01-warranty.svg");
}

#home .advantages-panel__icon--payment {
	-webkit-mask-image: url("assets/icons/02-payment.svg");
	mask-image: url("assets/icons/02-payment.svg");
}

#home .advantages-panel__icon--compliance {
	-webkit-mask-image: url("assets/icons/03-compliance.svg");
	mask-image: url("assets/icons/03-compliance.svg");
}

#home .advantages-panel__icon--project-time {
	-webkit-mask-image: url("assets/icons/04-project-time.svg");
	mask-image: url("assets/icons/04-project-time.svg");
}

#home .advantages-panel__icon--insurance {
	-webkit-mask-image: url("assets/icons/05-insurance.svg");
	mask-image: url("assets/icons/05-insurance.svg");
}

#home .advantages-panel__item--compact .advantages-panel__value {
	font-size: clamp(22px, 2vw, 29px);
}

#home .advantages-panel__caption {
	font-size: 15px;
	line-height: 1.3;
}

/* Header: messengers + callback button + contacts social links. */
#home .header-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-shrink: 0;
}

#home .header-info {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	min-width: 0;
}

#home .header-phone {
	color: var(--text, #242524);
	text-decoration: none;
	white-space: nowrap;
	font: 700 18px/1 "Playfair Display", serif;
	letter-spacing: -0.25px;
}

#home .header-phone:hover,
#home .header-phone:focus-visible {
	color: var(--terracotta, #c74b28);
}

#home .header-meta {
	margin: 0;
	color: rgb(36 37 36 / 0.72);
	font: 500 11px/1.2 Manrope, sans-serif;
	white-space: nowrap;
}

#home .header-messengers {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

#home .header-messenger {
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	overflow: hidden;
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease,
		opacity 0.2s ease;
}

#home a.header-messenger:hover,
#home a.header-messenger:focus-visible,
#home a.contacts__social:hover,
#home a.contacts__social:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 6px 14px rgba(25, 29, 28, 0.18);
	outline: none;
}

#home .header-messenger svg {
	width: 100%;
	height: 100%;
	display: block;
}

#home .contacts__social {
	width: 42px;
	height: 42px;
	border: 0;
	background: transparent;
	overflow: hidden;
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease;
}

#home .contacts__social svg {
	width: 100%;
	height: 100%;
	display: block;
}

#home .header-callback-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 0 15px;
	border: 1px solid var(--terracotta, #c74b28);
	border-radius: 999px;
	background: var(--terracotta, #c74b28);
	color: var(--light, #fcfbf8);
	font: 600 12px / 1 Manrope, sans-serif;
	letter-spacing: 0.2px;
	white-space: nowrap;
	transition:
		background-color 0.2s ease,
		border-color 0.2s ease,
		transform 0.2s ease;
}

#home .header-callback-btn:hover,
#home .header-callback-btn:focus-visible {
	background: var(--copper, #a76e4d);
	border-color: var(--copper, #a76e4d);
	transform: translateY(-1px);
	outline: none;
}

	@media (max-width: 1400px) {
	#home .header .navigation {
		gap: 10px;
		font-size: 14px;
	}

	#home .header-actions {
		gap: 8px;
	}
}

	@media (max-width: 1200px) {
	#home .header-actions {
		gap: 10px;
	}

	#home .header-phone {
		font-size: 15px;
	}

	#home .header-meta {
		font-size: 10px;
	}

	#home .header-messenger {
		width: 30px;
		height: 30px;
	}

	#home .header-callback-btn {
		min-height: 32px;
		padding: 0 12px;
		font-size: 11px;
	}
}

@media (max-width: 1100px) {
	#home .header-meta {
		display: none;
	}
}

@media (max-width: 900px) {
	#home .header-messengers {
		display: none;
	}
}

@media (max-width: 700px) {
	#home .header-actions {
		margin-left: auto;
		gap: 8px;
	}

	#home .header-callback-btn {
		min-height: 30px;
		padding: 0 10px;
		font-size: 11px;
	}
}

/* About leader facts list. */
#home .about__leader-facts {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

#home .about__leader-facts li {
	position: relative;
	padding-left: 18px;
	color: var(--text, #242524);
	font: 500 14px / 1.45 Manrope, sans-serif;
}

#home .about__leader-facts li::before {
	content: "";
	position: absolute;
	top: 0.55em;
	left: 0;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--about-terracotta, #c74b13);
}

/* Quiz panel width: 80% above 1080px, 100% at <=1080px. */
@media (max-width: 1080px) {
	#home .quiz-calc__panel,
	#home .quiz-calc__intro {
		width: 100%;
	}
}

/* Mobile layout adjustments (<= 767px):
 * 1) Hero benefit cards stacked 1 per row full-width
 * 2) Advantages panel right after hero (no overlap) and full-width
 * 3) Service benefits ("Почему клиенты выбирают нас?"): hide background images, tighter spacing, full-width stacked cards
 * 4) Quiz section full-width on mobile
 */
@media (max-width: 767px) {
	/* 1. Hero benefit cards stacked full-width */
	#home .hero-benefits-grid {
		grid-template-columns: 1fr;
		width: 100%;
		max-width: 100%;
		gap: 10px;
		margin-top: 28px;
	}

	#home .hero-benefit-card {
		width: 100%;
		min-height: 64px;
		padding: 14px 16px;
		align-items: center;
		gap: 14px;
	}

	#home .hero-benefit-icon {
		width: 32px;
		height: 32px;
		flex: 0 0 32px;
	}

	#home .hero-benefit-copy {
		padding-top: 0;
		gap: 2px;
	}

	#home .hero-benefit-copy strong {
		font-size: 18px;
	}

	#home .hero-benefit-copy small {
		font-size: 13px;
	}

	/* 2. Advantages panel: remove negative margin overlap with hero & expand full-width */
	#home .advantages-panel {
		margin-top: 0;
		padding-top: 0;
		padding-bottom: 0;
	}

	#home .advantages-panel__inner {
		width: 100%;
		max-width: 100%;
	}

	#home .advantages-panel__glass {
		margin-bottom: 0;
		border-radius: 0;
		border-left: 0;
		border-right: 0;
		padding: 24px 20px;
	}

	#home .advantages-panel__list {
		grid-template-columns: 1fr;
		row-gap: 14px;
	}

	#home .advantages-panel__item {
		padding: 8px 4px;
		gap: 14px;
	}

	#home .advantages-panel__item::after,
	#home .advantages-panel__item:not(:nth-child(2n))::after {
		display: none;
	}

	#home .advantages-panel__item:not(:last-child) {
		padding-bottom: 14px;
		border-bottom: 1px solid rgba(167, 110, 77, 0.24);
	}

	/* 3. "Почему клиенты выбирают нас?" (Service benefits): remove bg images, reduce spacing, full-width cards */
	#home .service-benefits__media,
	#home .service-benefits__row--design .service-benefits__media,
	#home .service-benefits__row--install .service-benefits__media {
		display: none !important;
	}

	#home .service-benefits__row,
	#home .service-benefits__row--design,
	#home .service-benefits__row--install {
		display: block;
		min-height: 0;
		padding-bottom: 0;
	}

	#home .service-benefits__inner,
	#home .service-benefits__row--design .service-benefits__inner,
	#home .service-benefits__row--install .service-benefits__inner {
		display: block;
		width: calc(100% - 32px);
		margin: 0 auto;
		padding: 36px 0 24px;
	}

	#home .service-benefits__row--install .service-benefits__inner {
		padding-top: 12px;
		padding-bottom: 40px;
	}

	#home .service-benefits__stack,
	#home .service-benefits__stack-secondary {
		display: block;
		width: 100%;
	}

	#home .service-benefits__intro {
		width: 100%;
		margin: 0 auto 24px;
		padding-top: 0;
	}

	#home .service-benefits__intro h2 {
		font-size: clamp(30px, 8vw, 36px);
		margin-bottom: 10px;
	}

	#home .service-benefits__intro p {
		font-size: 15px;
	}

	#home .service-benefits__header,
	#home .service-benefits__row--design .service-benefits__header,
	#home .service-benefits__row--install .service-benefits__header {
		width: 100%;
		margin: 0 0 16px;
		padding-top: 0;
		text-align: left;
	}

	#home .service-benefits__row--install .service-benefits__label {
		justify-content: flex-start;
	}

	#home .service-benefits__row--install .service-benefits__label::before {
		order: 0;
	}

	#home .service-benefits__title-row,
	#home .service-benefits__row--install .service-benefits__title-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
		margin-bottom: 16px;
	}

	#home .service-benefits__row--install .service-benefits__lead {
		margin-left: 0;
	}

	#home .service-benefits__aside,
	#home .service-benefits__row--install .service-benefits__aside {
		flex-direction: row;
		text-align: left;
		padding-top: 4px;
	}

	#home .service-benefits__cards,
	#home .service-benefits__row--install .service-benefits__cards {
		grid-template-columns: 1fr;
		width: 100%;
		gap: 12px;
		margin: 0;
	}

	#home .service-benefits__card-slot {
		width: 100%;
		height: auto;
		overflow: visible;
	}

	#home .service-benefits__card {
		width: 100%;
		height: auto;
		padding: 18px 16px;
	}

	#home .service-benefits__card.has-more:not(.is-open) .service-benefits__card-inner {
		-webkit-mask-image: none;
		mask-image: none;
	}

	#home .service-benefits__card.has-more:not(.is-open)::after,
	#home .service-benefits__card-more {
		display: none !important;
	}

	/* 4. Quiz full-width on mobile */
	#home .quiz-calc {
		padding: 36px 0 48px;
	}

	#home .quiz-calc__wrap.wrap {
		width: 100%;
		max-width: 100%;
		padding: 0;
	}

	#home .quiz-calc__intro {
		width: calc(100% - 32px);
		margin: 0 auto 20px;
	}

	#home .quiz-calc__panel {
		width: 100%;
		padding: 22px 16px 20px;
		border-radius: 0;
		border-left: 0;
		border-right: 0;
	}

	/* 5. Specialists & Reviews carousels on mobile:
	 * - 1 item per slide
	 * - Prev/Next buttons directly below the slider (grid-row: 2)
	 * - Pinned CTA ("Хотите устроиться на работу?" / "Хотите оставить отзыв?") after the carousel (grid-row: 3)
	 * - Smooth touch & pointer swipe
	 */
	#home .specialists__carousel--pinned,
	#home .reviews__carousel--pinned {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 14px;
	}

	#home .specialists__carousel-main,
	#home .reviews__carousel-main {
		grid-column: 1 !important;
		grid-row: 1 !important;
	}

	#home .specialists__carousel-nav,
	#home .reviews__carousel-nav {
		grid-column: 1 !important;
		grid-row: 2 !important;
		justify-content: flex-end;
		margin-bottom: 4px;
	}

	#home .specialists__carousel-pin,
	#home .reviews__carousel-pin {
		grid-column: 1 !important;
		grid-row: 3 !important;
	}

	#home .specialists__track,
	#home .reviews__track {
		-webkit-overflow-scrolling: touch;
		touch-action: pan-x pan-y;
		scroll-snap-type: x mandatory;
	}

	#home .specialists__track > li,
	#home .reviews__track > li {
		flex: 0 0 100% !important;
		width: 100% !important;
		scroll-snap-align: start;
		scroll-snap-stop: always;
	}

	#home .specialists__career {
		min-height: 0;
		padding: 28px 20px;
		gap: 22px;
	}
}

#home .specialists__track,
#home .reviews__track {
	-webkit-overflow-scrolling: touch;
	touch-action: pan-x pan-y;
	user-select: none;
}

#home .specialists__card-photo,
#home .reviews__leave-media img {
	-webkit-user-drag: none;
	user-select: none;
}






