/*
 * Milk First Base — основные стили.
 *
 * Все значения берутся из CSS-переменных, которые генерирует inc/design/css.php
 * из настроек «Оформление Milk First». Жёстких цветов, шрифтов и размеров здесь нет.
 *
 * Содержание:
 *  1. Основа
 *  2. Цветовые схемы
 *  3. Типографика
 *  4. Раскладка и секции
 *  5. Кнопки, иконки, поля
 *  6. Шапка и меню
 *  7. Первый экран
 *  8. Призыв к действию
 *  9. Текст страницы
 * 10. Контакты
 * 11. Подвал
 * 12. Полоса срочного выезда, панель звонка
 * 13. Стайлгайд
 * 14. Движение
 * 15. Служебное
 */

/* 1. Основа ------------------------------------------------------------- */

:root {
	--mf-gutter: clamp(16px, 4vw, 40px);
	--mf-header-h: 72px;
}

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

/* Атрибут hidden сильнее любых display у компонентов (кнопки — inline-flex и т. п.). */
[hidden] {
	display: none !important;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--mf-header-h) + 16px);
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	font-family: var(--mf-body-font);
	font-size: var(--mf-body-size);
	font-weight: var(--mf-body-weight);
	line-height: var(--mf-body-lh);
	letter-spacing: var(--mf-body-ls);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

.mf-main {
	flex: 1 0 auto;
}

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

img {
	display: block;
}

a {
	color: var(--mf-s-link);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a:hover {
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 2px solid var(--mf-s-focus);
	outline-offset: 3px;
	border-radius: 2px;
}

strong,
b {
	font-weight: var(--mf-strong-weight);
}

h1, h2, h3, h4, h5, h6, p, ul, ol, dl, figure, blockquote {
	margin: 0;
}

/* 2. Цветовые схемы ------------------------------------------------------
 * Каждая секция объявляет data-scheme. Внутри неё переменные --mf-s-*
 * означают «фон», «текст», «заголовок», «кнопка» именно этой схемы.
 */

[data-scheme] {
	background-color: var(--mf-s-bg);
	color: var(--mf-s-fg);
}

[data-scheme="light"] {
	--mf-s-bg: var(--mf-bg);
	--mf-s-fg: var(--mf-text);
	--mf-s-heading: var(--mf-text);
	--mf-s-muted: var(--mf-muted);
	--mf-s-surface: var(--mf-surface);
	--mf-s-card: color-mix(in srgb, var(--mf-surface) 45%, var(--mf-bg));
	--mf-s-border: color-mix(in srgb, var(--mf-text) 16%, transparent);
	--mf-s-link: var(--mf-link);
	--mf-s-eyebrow: var(--mf-link);
	--mf-s-accent: var(--mf-accent);
	--mf-s-btn-bg: var(--mf-btn-bg);
	--mf-s-btn-fg: var(--mf-btn-fg);
	--mf-s-focus: var(--mf-text);
}

[data-scheme="muted"] {
	--mf-s-bg: var(--mf-surface);
	--mf-s-fg: var(--mf-text);
	--mf-s-heading: var(--mf-text);
	--mf-s-muted: var(--mf-muted);
	--mf-s-surface: var(--mf-bg);
	--mf-s-card: var(--mf-bg);
	--mf-s-border: color-mix(in srgb, var(--mf-text) 18%, transparent);
	--mf-s-link: var(--mf-link);
	--mf-s-eyebrow: var(--mf-link);
	--mf-s-accent: var(--mf-accent);
	--mf-s-btn-bg: var(--mf-btn-bg);
	--mf-s-btn-fg: var(--mf-btn-fg);
	--mf-s-focus: var(--mf-text);
}

[data-scheme="dark"] {
	--mf-s-bg: var(--mf-dark);
	--mf-s-fg: color-mix(in srgb, var(--mf-on-dark) 86%, var(--mf-dark));
	--mf-s-heading: var(--mf-on-dark);
	--mf-s-muted: color-mix(in srgb, var(--mf-on-dark) 66%, var(--mf-dark));
	--mf-s-surface: color-mix(in srgb, var(--mf-on-dark) 7%, var(--mf-dark));
	--mf-s-card: color-mix(in srgb, var(--mf-on-dark) 6%, var(--mf-dark));
	--mf-s-border: color-mix(in srgb, var(--mf-on-dark) 20%, transparent);
	--mf-s-link: var(--mf-on-dark);
	--mf-s-eyebrow: var(--mf-accent);
	--mf-s-accent: var(--mf-accent);
	--mf-s-btn-bg: var(--mf-accent);
	--mf-s-btn-fg: var(--mf-on-accent);
	--mf-s-focus: var(--mf-accent);
}

[data-scheme="accent"] {
	--mf-s-bg: var(--mf-accent);
	--mf-s-fg: var(--mf-on-accent);
	--mf-s-heading: var(--mf-on-accent);
	--mf-s-muted: color-mix(in srgb, var(--mf-on-accent) 78%, var(--mf-accent));
	--mf-s-surface: color-mix(in srgb, var(--mf-on-accent) 8%, var(--mf-accent));
	--mf-s-card: color-mix(in srgb, var(--mf-on-accent) 7%, var(--mf-accent));
	--mf-s-border: color-mix(in srgb, var(--mf-on-accent) 24%, transparent);
	--mf-s-link: var(--mf-on-accent);
	--mf-s-eyebrow: var(--mf-on-accent);
	--mf-s-accent: var(--mf-on-accent);
	--mf-s-btn-bg: var(--mf-dark);
	--mf-s-btn-fg: var(--mf-on-dark);
	--mf-s-focus: var(--mf-on-accent);
}

/* 3. Типографика ---------------------------------------------------------
 * Элементы h1–h4 и классы .mf-t-* берут значения из текстовых стилей.
 */

h1, h2, h3, h4, h5, h6,
.mf-t-display, .mf-t-h1, .mf-t-h2, .mf-t-h3, .mf-t-h4 {
	color: var(--mf-s-heading);
	text-wrap: balance;
	font-optical-sizing: auto;
}

.mf-t-display {
	font-family: var(--mf-display-font);
	font-size: var(--mf-display-size);
	font-weight: var(--mf-display-weight);
	line-height: var(--mf-display-lh);
	letter-spacing: var(--mf-display-ls);
	text-transform: var(--mf-display-tt);
}

h1,
.mf-t-h1 {
	font-family: var(--mf-h1-font);
	font-size: var(--mf-h1-size);
	font-weight: var(--mf-h1-weight);
	line-height: var(--mf-h1-lh);
	letter-spacing: var(--mf-h1-ls);
	text-transform: var(--mf-h1-tt);
}

h2,
.mf-t-h2 {
	font-family: var(--mf-h2-font);
	font-size: var(--mf-h2-size);
	font-weight: var(--mf-h2-weight);
	line-height: var(--mf-h2-lh);
	letter-spacing: var(--mf-h2-ls);
	text-transform: var(--mf-h2-tt);
}

h3,
.mf-t-h3 {
	font-family: var(--mf-h3-font);
	font-size: var(--mf-h3-size);
	font-weight: var(--mf-h3-weight);
	line-height: var(--mf-h3-lh);
	letter-spacing: var(--mf-h3-ls);
	text-transform: var(--mf-h3-tt);
}

h4, h5, h6,
.mf-t-h4 {
	font-family: var(--mf-h4-font);
	font-size: var(--mf-h4-size);
	font-weight: var(--mf-h4-weight);
	line-height: var(--mf-h4-lh);
	letter-spacing: var(--mf-h4-ls);
	text-transform: var(--mf-h4-tt);
}

.mf-t-lead {
	font-family: var(--mf-lead-font);
	font-size: var(--mf-lead-size);
	font-weight: var(--mf-lead-weight);
	line-height: var(--mf-lead-lh);
	letter-spacing: var(--mf-lead-ls);
	text-transform: var(--mf-lead-tt);
}

.mf-t-body {
	font-family: var(--mf-body-font);
	font-size: var(--mf-body-size);
	font-weight: var(--mf-body-weight);
	line-height: var(--mf-body-lh);
	letter-spacing: var(--mf-body-ls);
	text-transform: var(--mf-body-tt);
}

small,
.mf-t-small {
	font-family: var(--mf-small-font);
	font-size: var(--mf-small-size);
	font-weight: var(--mf-small-weight);
	line-height: var(--mf-small-lh);
	letter-spacing: var(--mf-small-ls);
	text-transform: var(--mf-small-tt);
}

.mf-eyebrow,
.mf-t-eyebrow {
	font-family: var(--mf-eyebrow-font);
	font-size: var(--mf-eyebrow-size);
	font-weight: var(--mf-eyebrow-weight);
	line-height: var(--mf-eyebrow-lh);
	letter-spacing: var(--mf-eyebrow-ls);
	text-transform: var(--mf-eyebrow-tt);
	color: var(--mf-s-eyebrow);
}

/* 4. Раскладка и секции -------------------------------------------------- */

.mf-container {
	width: min(100% - 2 * var(--mf-gutter), var(--mf-container));
	margin-inline: auto;
}

.mf-section {
	--mf-pad: var(--mf-section-space);
	padding-block: var(--mf-pad);
}

.mf-space-compact {
	--mf-pad: clamp(40px, 6vw, 72px);
}

.mf-space-normal {
	--mf-pad: clamp(56px, 8vw, 112px);
}

.mf-space-spacious {
	--mf-pad: clamp(72px, 11vw, 160px);
}

.mf-width-narrow > .mf-container,
.mf-container.mf-width-narrow {
	width: min(100% - 2 * var(--mf-gutter), 760px);
}

.mf-width-full > .mf-container {
	width: calc(100% - 2 * var(--mf-gutter));
	max-width: none;
}

.mf-align-center {
	text-align: center;
}

/* Подряд идущие секции с одной схемой не удваивают отступ. */
.mf-section[data-scheme="light"] + .mf-section[data-scheme="light"],
.mf-section[data-scheme="muted"] + .mf-section[data-scheme="muted"] {
	padding-top: 0;
}

/* 5. Кнопки, иконки, поля ------------------------------------------------ */

.mf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55em;
	min-height: 48px;
	padding: 0.8em 1.45em;
	border: max(var(--mf-border-w), 1px) solid transparent;
	border-radius: var(--mf-btn-radius);
	font-family: var(--mf-button-font);
	font-size: var(--mf-button-size);
	font-weight: var(--mf-button-weight);
	line-height: var(--mf-button-lh);
	letter-spacing: var(--mf-button-ls);
	text-transform: var(--mf-button-tt);
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.mf-btn .mf-icon {
	width: 1.15em;
	height: 1.15em;
}

.mf-btn--primary {
	background-color: var(--mf-s-btn-bg);
	border-color: var(--mf-s-btn-bg);
	color: var(--mf-s-btn-fg);
}

.mf-btn--primary:hover {
	background-color: color-mix(in srgb, var(--mf-s-btn-bg) 84%, var(--mf-s-fg));
	border-color: color-mix(in srgb, var(--mf-s-btn-bg) 84%, var(--mf-s-fg));
}

.mf-btn--secondary {
	background-color: transparent;
	border-color: color-mix(in srgb, var(--mf-s-heading) 40%, transparent);
	color: var(--mf-s-heading);
}

.mf-btn--secondary:hover {
	border-color: var(--mf-s-heading);
	background-color: color-mix(in srgb, var(--mf-s-heading) 6%, transparent);
}

.mf-btn--link {
	min-height: 0;
	padding: 0.4em 0;
	border: 0;
	background: none;
	color: var(--mf-s-link);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.25em;
}

.mf-btn--link:hover {
	text-decoration-thickness: 2px;
}

/* Стиль главной кнопки: контур. */
html[data-mf-btn="outline"] .mf-btn--primary {
	background-color: transparent;
	border-width: max(var(--mf-border-w), 2px);
	color: var(--mf-s-heading);
}

html[data-mf-btn="outline"] .mf-btn--primary:hover {
	background-color: var(--mf-s-btn-bg);
	color: var(--mf-s-btn-fg);
}

/* Стиль главной кнопки: подчёркивание. */
html[data-mf-btn="underline"] .mf-btn--primary {
	min-height: 0;
	padding: 0.35em 0;
	border: 0;
	border-bottom: 3px solid var(--mf-s-btn-bg);
	border-radius: 0;
	background: none;
	color: var(--mf-s-heading);
}

html[data-mf-btn="underline"] .mf-btn--primary:hover {
	border-bottom-color: var(--mf-s-heading);
}

.mf-icon {
	width: 1.25em;
	height: 1.25em;
	flex: none;
	stroke-width: var(--mf-icon-stroke);
	vertical-align: -0.22em;
}

.mf-icon-badge {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 2.75rem;
	height: 2.75rem;
	color: var(--mf-s-heading);
}

.mf-icon-badge .mf-icon {
	width: 1.5rem;
	height: 1.5rem;
}

html[data-mf-icons="circle"] .mf-icon-badge,
html[data-mf-icons="square"] .mf-icon-badge {
	background-color: var(--mf-s-surface);
}

html[data-mf-icons="circle"] .mf-icon-badge {
	border-radius: 50%;
}

html[data-mf-icons="square"] .mf-icon-badge {
	border-radius: var(--mf-radius);
}

label {
	display: block;
	margin-bottom: 0.4em;
	font-weight: var(--mf-strong-weight);
	color: var(--mf-s-heading);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
select,
textarea {
	width: 100%;
	min-height: 48px;
	padding: 0.7em 0.9em;
	border: max(var(--mf-border-w), 1px) solid color-mix(in srgb, var(--mf-s-fg) 28%, transparent);
	border-radius: var(--mf-radius-sm);
	background-color: var(--mf-s-card);
	color: var(--mf-s-fg);
	font: inherit;
}

/* Браузер не даёт списку высоту строки из font: inherit — выравниваем с полями ввода. */
select {
	height: calc(var(--mf-body-lh) * 1em + 1.4em + 2 * max(var(--mf-border-w), 1px));
}

input::placeholder,
textarea::placeholder {
	color: var(--mf-s-muted);
	opacity: 1;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--mf-s-focus);
	outline-offset: 1px;
	border-color: var(--mf-s-focus);
}

/* 6. Шапка и меню -------------------------------------------------------- */

.mf-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: max(var(--mf-border-w), 1px) solid var(--mf-s-border);
}

.admin-bar .mf-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media (max-width: 600px) {
	.admin-bar .mf-header {
		top: 0;
	}
}

.mf-header__inner {
	position: relative;
	display: flex;
	align-items: center;
	gap: clamp(16px, 3vw, 40px);
	min-height: var(--mf-header-h);
}

.mf-brand {
	display: inline-flex;
	align-items: center;
	flex: none;
	color: var(--mf-s-heading);
	text-decoration: none;
}

.mf-brand__name {
	font-family: var(--mf-h3-font);
	font-size: var(--mf-h4-size);
	font-weight: var(--mf-h3-weight);
	letter-spacing: var(--mf-h3-ls);
	text-transform: var(--mf-h3-tt);
	line-height: 1.1;
}

.mf-brand__logo {
	width: auto;
	max-height: 48px;
}

.mf-nav {
	margin-inline-start: auto;
}

.mf-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px clamp(16px, 2vw, 28px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.mf-nav__list a {
	display: block;
	padding-block: 8px;
	color: var(--mf-s-fg);
	text-decoration: none;
	font-weight: var(--mf-button-weight);
}

.mf-nav__list a:hover,
.mf-nav__list .current-menu-item > a,
.mf-nav__list .current-menu-ancestor > a {
	color: var(--mf-s-heading);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-decoration-color: var(--mf-s-accent);
	text-underline-offset: 0.45em;
}

.mf-nav__list .sub-menu {
	display: none;
}

.mf-nav__cta {
	display: none;
}

.mf-header__actions {
	display: flex;
	align-items: center;
	gap: 16px;
}

.mf-header__cta {
	min-height: 44px;
	padding: 0.55em 1.15em;
	font-size: min(var(--mf-button-size), 1.0625rem);
}

.mf-header__phone {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	color: var(--mf-s-heading);
	font-weight: var(--mf-strong-weight);
	text-decoration: none;
	white-space: nowrap;
}

.mf-header__phone:hover span {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.mf-nav-toggle {
	display: none;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: max(var(--mf-border-w), 1px) solid var(--mf-s-border);
	border-radius: var(--mf-btn-radius);
	background: none;
	color: var(--mf-s-heading);
	cursor: pointer;
}

.mf-nav-toggle .mf-icon {
	width: 24px;
	height: 24px;
}

.mf-nav-toggle__close,
.mf-nav-toggle[aria-expanded="true"] .mf-nav-toggle__open {
	display: none;
}

.mf-nav-toggle[aria-expanded="true"] .mf-nav-toggle__close {
	display: block;
}

@media (min-width: 1024px) {
	.mf-nav__list .menu-item-has-children {
		position: relative;
	}

	.mf-nav__list .menu-item-has-children:hover > .sub-menu,
	.mf-nav__list .menu-item-has-children:focus-within > .sub-menu {
		display: block;
		position: absolute;
		top: 100%;
		left: -16px;
		min-width: 220px;
		padding: 8px 16px;
		list-style: none;
		background-color: var(--mf-s-bg);
		border: max(var(--mf-border-w), 1px) solid var(--mf-s-border);
		border-radius: var(--mf-radius);
		box-shadow: var(--mf-shadow);
	}
}

@media (max-width: 1023px) {
	.mf-header__inner {
		gap: 12px;
	}

	.mf-header__actions {
		margin-inline-start: auto;
		gap: 8px;
	}

	.mf-header__cta {
		display: none;
	}

	.mf-header__phone {
		display: inline-grid;
		place-items: center;
		width: 48px;
		height: 48px;
		border: max(var(--mf-border-w), 1px) solid var(--mf-s-border);
		border-radius: var(--mf-btn-radius);
	}

	.mf-header__phone span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.mf-nav-toggle {
		display: inline-grid;
	}

	.mf-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: calc(-1 * var(--mf-gutter));
		right: calc(-1 * var(--mf-gutter));
		max-height: calc(100vh - var(--mf-header-h));
		overflow-y: auto;
		margin: 0;
		padding: 8px var(--mf-gutter) 24px;
		background-color: var(--mf-s-bg);
		border-bottom: max(var(--mf-border-w), 1px) solid var(--mf-s-border);
		box-shadow: var(--mf-shadow-lg);
	}

	.mf-nav.is-open {
		display: block;
	}

	.mf-nav__list {
		flex-direction: column;
		gap: 0;
	}

	.mf-nav__list a {
		padding-block: 14px;
		border-bottom: 1px solid var(--mf-s-border);
		font-size: var(--mf-lead-size);
	}

	.mf-nav__list .sub-menu {
		display: block;
		margin: 0;
		padding: 0 0 0 16px;
		list-style: none;
	}

	.mf-nav__cta {
		display: block;
		margin-top: 20px;
	}

	.mf-nav__cta .mf-btn {
		width: 100%;
	}
}

/* 7. Первый экран -------------------------------------------------------- */

.mf-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

.mf-hero__inner {
	display: grid;
	gap: clamp(32px, 5vw, 72px);
	align-items: center;
}

.mf-hero__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: clamp(14px, 1.6vw, 22px);
	max-width: 48rem;
}

.mf-hero__sub {
	max-width: 40rem;
	color: var(--mf-s-fg);
}

.mf-align-center .mf-hero__content {
	align-items: center;
	margin-inline: auto;
	text-align: center;
}

.mf-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 6px;
}

.mf-align-center .mf-hero__actions,
.mf-align-center .mf-hero__trust {
	justify-content: center;
}

.mf-hero__trust {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
	color: var(--mf-s-muted);
	font-size: var(--mf-small-size);
	font-weight: var(--mf-small-weight);
}

.mf-hero__trust li {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
}

.mf-hero__trust .mf-icon {
	color: var(--mf-s-accent);
}

/* Фото на весь экран. */
/* Фото на весь экран: первый экран ровно по окну — за вычетом шапки,
 * полосы срочного выезда и панели админки. Если текст не помещается, экран растёт. */
.mf-hero--full {
	--mf-pad: clamp(32px, 7vh, 96px);
	--mf-hero-h: calc(100vh - var(--mf-chrome-top, var(--mf-header-h)) - var(--wp-admin--admin-bar--height, 0px));
	display: flex;
	align-items: center;
	min-height: max(420px, var(--mf-hero-h));
}

@supports (height: 100svh) {
	.mf-hero--full {
		--mf-pad: clamp(32px, 7svh, 96px);
		--mf-hero-h: calc(100svh - var(--mf-chrome-top, var(--mf-header-h)) - var(--wp-admin--admin-bar--height, 0px));
	}

	/* Заголовок на фото не крупнее, чем позволяет высота окна. */
	.mf-hero--full .mf-t-display {
		font-size: min(var(--mf-display-size), 10.5svh);
	}

	.mf-hero--full .mf-t-h1 {
		font-size: min(var(--mf-h1-size), 9svh);
	}
}

.mf-hero--full .mf-hero__inner {
	width: min(100% - 2 * var(--mf-gutter), var(--mf-container));
}

.mf-hero__media {
	position: absolute;
	inset: 0;
	z-index: -2;
}

.mf-hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--mf-image-position, center);
}

.mf-hero--full::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-color: var(--mf-dark);
	opacity: var(--mf-overlay, 0.45);
}

.mf-hero--full .mf-hero__sub,
.mf-hero--full .mf-hero__trust {
	color: var(--mf-s-heading);
}

/* Текст и фото рядом. */
.mf-hero__figure img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	object-position: var(--mf-image-position, center);
	border-radius: var(--mf-radius-lg);
}

/* Вертикальное или квадратное фото рядом с текстом — в вертикальной рамке, не выше окна. */
.mf-hero.has-portrait-image .mf-hero__figure img {
	aspect-ratio: 4 / 5;
	max-height: 78vh;
}

@media (min-width: 900px) {
	.mf-hero--split .mf-hero__inner {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	}
}

@media (max-width: 479px) {
	.mf-hero__actions .mf-btn,
	.mf-cta__actions .mf-btn {
		flex: 1 1 100%;
	}
}

/* 8. Призыв к действию --------------------------------------------------- */

.mf-cta__inner {
	display: grid;
	gap: 24px 64px;
	align-items: center;
}

.mf-cta__text {
	display: grid;
	gap: 12px;
	max-width: 44rem;
}

.mf-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

@media (min-width: 900px) {
	.mf-cta__inner {
		grid-template-columns: minmax(0, 1fr) auto;
	}
}

/* 9. Текст страницы ------------------------------------------------------ */

.mf-prose {
	max-width: 70ch;
}

.mf-width-narrow .mf-prose,
.mf-align-center .mf-prose {
	margin-inline: auto;
}

.mf-prose > * + * {
	margin-top: 1em;
}

.mf-prose > h2 {
	margin-top: 1.6em;
}

.mf-prose > h3,
.mf-prose > h4 {
	margin-top: 1.4em;
}

.mf-prose > :first-child {
	margin-top: 0;
}

.mf-prose h2 + *,
.mf-prose h3 + *,
.mf-prose h4 + * {
	margin-top: 0.6em;
}

.mf-prose ul,
.mf-prose ol {
	padding-left: 1.25em;
}

.mf-prose li + li {
	margin-top: 0.35em;
}

.mf-prose li::marker {
	color: var(--mf-s-muted);
}

.mf-prose blockquote {
	padding-left: 1.1em;
	border-left: 3px solid var(--mf-s-accent);
	font-family: var(--mf-lead-font);
	font-size: var(--mf-lead-size);
	line-height: var(--mf-lead-lh);
	color: var(--mf-s-heading);
}

.mf-prose img {
	border-radius: var(--mf-radius);
}

.mf-prose figcaption {
	margin-top: 0.5em;
	color: var(--mf-s-muted);
	font-size: var(--mf-small-size);
}

.mf-prose hr {
	border: 0;
	border-top: 1px solid var(--mf-s-border);
	margin-block: 2em;
}

.mf-prose .wp-block-button__link {
	display: inline-flex;
	padding: 0.8em 1.45em;
	border-radius: var(--mf-btn-radius);
	background-color: var(--mf-s-btn-bg);
	color: var(--mf-s-btn-fg);
	font-family: var(--mf-button-font);
	font-weight: var(--mf-button-weight);
	text-decoration: none;
	text-transform: var(--mf-button-tt);
}

/* 10. Контакты ----------------------------------------------------------- */

.mf-contact__grid {
	display: grid;
	gap: 24px;
}

@media (min-width: 800px) {
	.mf-contact__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: start;
	}
}

.mf-contact__card {
	display: grid;
	gap: 20px;
	padding: clamp(20px, 3vw, 36px);
	border: var(--mf-border-w) solid var(--mf-s-border);
	border-radius: var(--mf-radius-lg);
	background-color: var(--mf-s-card);
	box-shadow: var(--mf-shadow);
}

.mf-contact__list {
	display: grid;
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mf-contact__list li {
	display: flex;
	align-items: center;
	gap: 14px;
}

.mf-contact__label {
	display: block;
	color: var(--mf-s-muted);
	font-size: var(--mf-small-size);
}

.mf-contact__list a {
	color: var(--mf-s-heading);
	font-weight: var(--mf-strong-weight);
	text-decoration: none;
}

.mf-contact__list a:hover {
	text-decoration: underline;
}

.mf-hours {
	display: grid;
	gap: 6px;
	margin: 0;
}

.mf-hours__row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--mf-s-border);
}

.mf-hours__row:last-child {
	border-bottom: 0;
}

.mf-hours dd {
	margin: 0;
	color: var(--mf-s-heading);
	font-variant-numeric: tabular-nums;
}

/* 11. Подвал ------------------------------------------------------------- */

.mf-footer {
	padding-block: clamp(48px, 7vw, 88px) 28px;
	border-top: 1px solid var(--mf-s-border);
}

.mf-footer a {
	color: var(--mf-s-fg);
	text-decoration: none;
}

.mf-footer a:hover {
	color: var(--mf-s-heading);
	text-decoration: underline;
}

.mf-footer__grid {
	display: grid;
	gap: 40px 32px;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}

@media (min-width: 1024px) {
	.mf-footer__grid {
		grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
	}
}

.mf-footer__brand .mf-brand__logo {
	max-height: 56px;
}

.mf-footer__tagline {
	max-width: 32ch;
	margin-top: 16px;
	color: var(--mf-s-muted);
}

.mf-footer__title {
	margin-bottom: 16px;
	font-family: var(--mf-eyebrow-font);
	font-size: var(--mf-eyebrow-size);
	font-weight: var(--mf-eyebrow-weight);
	letter-spacing: var(--mf-eyebrow-ls);
	text-transform: var(--mf-eyebrow-tt);
	line-height: var(--mf-eyebrow-lh);
	color: var(--mf-s-eyebrow);
}

.mf-footer__contact,
.mf-footer__menu {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mf-footer__contact a {
	overflow-wrap: anywhere;
}

.mf-footer__contact li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.mf-footer__contact .mf-icon {
	margin-top: 0.15em;
	color: var(--mf-s-muted);
}

.mf-footer .mf-hours__row {
	border-bottom-color: var(--mf-s-border);
}

.mf-social {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

.mf-social a {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: var(--mf-btn-radius);
	background-color: var(--mf-s-surface);
	color: var(--mf-s-heading);
}

.mf-social a:hover {
	background-color: var(--mf-s-btn-bg);
	color: var(--mf-s-btn-fg);
}

.mf-footer__bottom {
	display: grid;
	justify-items: center;
	gap: 12px;
	margin-top: clamp(40px, 6vw, 64px);
	padding-top: 28px;
	border-top: 1px solid var(--mf-s-border);
	color: var(--mf-s-muted);
	font-size: var(--mf-small-size);
	line-height: var(--mf-small-lh);
	text-align: center;
}

.mf-footer__legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mf-footer__copy {
	color: var(--mf-s-fg);
}

.mf-footer__company {
	display: grid;
	gap: 2px;
	max-width: 64ch;
}

/* 12. Полоса срочного выезда, панель звонка ------------------------------- */

.mf-emergency {
	font-size: var(--mf-small-size);
	font-weight: var(--mf-strong-weight);
}

.mf-emergency__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px 10px;
	min-height: 40px;
	padding-block: 6px;
	text-align: center;
}

.mf-emergency a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	white-space: nowrap;
}

.mf-callbar {
	display: none;
}

@media (max-width: 767px) {
	.has-mf-callbar .mf-footer {
		padding-bottom: calc(28px + 68px + env(safe-area-inset-bottom));
	}

	.has-mf-callbar .mf-callbar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 60;
		display: grid;
		grid-auto-flow: column;
		grid-auto-columns: 1fr;
		gap: 8px;
		padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
		border-top: 1px solid var(--mf-s-border);
	}

	.mf-callbar .mf-btn {
		width: 100%;
		padding-inline: 0.8em;
	}

	/* Первый экран с фото не уходит под панель звонка. */
	.has-mf-callbar .mf-hero--full {
		min-height: max(420px, calc(var(--mf-hero-h) - 65px - env(safe-area-inset-bottom)));
	}
}

/* 13. Стайлгайд ---------------------------------------------------------- */

.mf-sg__heading {
	margin: 48px 0 20px;
}

.mf-sg .mf-container > .mf-sg__heading:first-child {
	margin-top: 0;
}

.mf-sg__swatches {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.mf-sg__swatch {
	display: grid;
	gap: 8px;
}

.mf-sg__chip {
	display: block;
	height: 72px;
	border: 1px solid var(--mf-s-border);
	border-radius: var(--mf-radius);
}

.mf-sg__type {
	display: grid;
	gap: 28px;
}

.mf-sg__type-row {
	display: grid;
	gap: 8px 32px;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--mf-s-border);
}

@media (min-width: 900px) {
	.mf-sg__type-row {
		grid-template-columns: 200px minmax(0, 1fr);
		align-items: baseline;
	}
}

.mf-sg__meta {
	color: var(--mf-s-muted);
}

.mf-sg-scheme__grid {
	display: grid;
	gap: 32px;
	align-items: center;
}

.mf-sg-scheme__grid > div:first-child {
	display: grid;
	gap: 16px;
}

@media (min-width: 900px) {
	.mf-sg-scheme__grid {
		grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
	}
}

.mf-sg-card {
	display: grid;
	gap: 12px;
	padding: 28px;
	border: var(--mf-border-w) solid var(--mf-s-border);
	border-radius: var(--mf-radius-lg);
	background-color: var(--mf-s-card);
	box-shadow: var(--mf-shadow);
}

.mf-sg-card__muted {
	color: var(--mf-s-muted);
}

.mf-sg__icons {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
}

.mf-sg__icon {
	display: grid;
	justify-items: center;
	gap: 6px;
	padding: 12px 4px;
	text-align: center;
	word-break: break-word;
}

.mf-sg__form {
	display: grid;
	gap: 16px;
	max-width: 720px;
}

@media (min-width: 700px) {
	.mf-sg__form {
		grid-template-columns: 1fr 1fr;
	}

	.mf-sg__form-wide {
		grid-column: 1 / -1;
	}
}

/* 14. Движение -----------------------------------------------------------
 * Одна сцена — появление первого экрана при загрузке. Остальное не двигается.
 */

@keyframes mf-rise {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes mf-settle {
	from {
		transform: scale(1.05);
	}
	to {
		transform: none;
	}
}

@media (prefers-reduced-motion: no-preference) {
	html[data-mf-motion="on"] .mf-hero__content > * {
		animation: mf-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
	}

	html[data-mf-motion="on"] .mf-hero__content > :nth-child(2) { animation-delay: 0.07s; }
	html[data-mf-motion="on"] .mf-hero__content > :nth-child(3) { animation-delay: 0.14s; }
	html[data-mf-motion="on"] .mf-hero__content > :nth-child(4) { animation-delay: 0.21s; }
	html[data-mf-motion="on"] .mf-hero__content > :nth-child(5) { animation-delay: 0.28s; }

	html[data-mf-motion="on"] .mf-hero__img {
		animation: mf-settle 1.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
	}
}

/* 15. Служебное ---------------------------------------------------------- */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.mf-skip-link {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 100;
	padding: 12px 16px;
	background-color: var(--mf-dark);
	color: var(--mf-on-dark);
	transform: translateY(-200%);
}

.mf-skip-link:focus {
	transform: none;
}

.mf-posts {
	display: grid;
	gap: 32px;
}

.mf-post-card {
	display: grid;
	gap: 8px;
	padding-bottom: 32px;
	border-bottom: 1px solid var(--mf-s-border);
}

.mf-post-card a {
	color: inherit;
	text-decoration: none;
}

.alignwide {
	width: min(100vw - 2 * var(--mf-gutter), var(--mf-container));
	max-width: none;
	margin-inline: calc(50% - min(50vw - var(--mf-gutter), var(--mf-container) / 2));
}

.alignfull {
	width: 100vw;
	max-width: none;
	margin-inline: calc(50% - 50vw);
}

/* 16. Содержимое: карточки, сетки, блоки --------------------------------- */

.mf-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px 32px;
	margin-bottom: clamp(24px, 3vw, 40px);
}

.mf-section-head__text {
	display: grid;
	gap: 10px;
	max-width: 44rem;
}

.mf-section-head__lead {
	color: var(--mf-s-muted);
}

.mf-block__label {
	margin-bottom: 16px;
	color: var(--mf-s-muted);
}

.mf-grid {
	display: grid;
	gap: clamp(16px, 2.5vw, 32px);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

/* Карточка: вся кликабельна через ссылку в заголовке. */
.mf-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: var(--mf-border-w) solid var(--mf-s-border);
	border-radius: var(--mf-radius-lg);
	background-color: var(--mf-s-card);
	box-shadow: var(--mf-shadow);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mf-card:hover {
	border-color: color-mix(in srgb, var(--mf-s-heading) 35%, transparent);
	box-shadow: var(--mf-shadow-lg);
}

.mf-card:focus-within {
	outline: 2px solid var(--mf-s-focus);
	outline-offset: 2px;
}

.mf-card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	background-color: var(--mf-s-surface);
}

.mf-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mf-card__placeholder {
	display: grid;
	place-items: center;
	height: 100%;
	color: var(--mf-s-muted);
}

.mf-card__placeholder .mf-icon {
	width: 40px;
	height: 40px;
}

.mf-card__icon {
	margin: clamp(20px, 2.5vw, 28px) clamp(20px, 2.5vw, 28px) 0;
}

.mf-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	padding: clamp(20px, 2.5vw, 28px);
}

.mf-card__link {
	color: var(--mf-s-heading);
	text-decoration: none;
}

.mf-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
}

.mf-card__link:focus-visible {
	outline: none;
}

.mf-card:hover .mf-card__link {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
}

.mf-card__text {
	color: var(--mf-s-fg);
}

.mf-card__meta,
.mf-card__place {
	color: var(--mf-s-muted);
	font-size: var(--mf-small-size);
}

.mf-card__meta {
	margin-top: auto;
}

.mf-card__place {
	display: flex;
	align-items: center;
	gap: 6px;
}

.mf-pill {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 0.3em 0.8em;
	border-radius: var(--mf-btn-radius);
	background-color: var(--mf-accent);
	color: var(--mf-on-accent);
	font-size: var(--mf-small-size);
	font-weight: var(--mf-strong-weight);
}

/* Метки-фильтры. */
.mf-filter {
	display: grid;
	gap: 12px;
	margin-bottom: clamp(24px, 3vw, 40px);
}

.mf-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mf-chip {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0.4em 1em;
	border: 1px solid var(--mf-s-border);
	border-radius: var(--mf-btn-radius);
	color: var(--mf-s-heading);
	font-size: var(--mf-small-size);
	font-weight: var(--mf-strong-weight);
	text-decoration: none;
}

a.mf-chip:hover {
	border-color: var(--mf-s-heading);
}

.mf-chip.is-active {
	border-color: var(--mf-s-heading);
	background-color: var(--mf-s-heading);
	color: var(--mf-s-bg);
}

.mf-chips--static .mf-chip {
	min-height: 32px;
	font-weight: var(--mf-body-weight);
}

.mf-empty {
	color: var(--mf-s-muted);
}

/* Текст + колонка сбоку. */
.mf-split {
	display: grid;
	gap: clamp(32px, 5vw, 72px);
	align-items: start;
}

@media (min-width: 960px) {
	.mf-split {
		grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
	}

	.mf-split--single {
		grid-template-columns: minmax(0, 1fr);
	}

	.mf-aside {
		position: sticky;
		top: calc(var(--mf-header-h) + var(--wp-admin--admin-bar--height, 0px) + 24px);
	}
}

.mf-aside {
	display: grid;
	gap: 16px;
	padding: clamp(20px, 2.5vw, 32px);
	border: var(--mf-border-w) solid var(--mf-s-border);
	border-radius: var(--mf-radius-lg);
	background-color: var(--mf-s-card);
	box-shadow: var(--mf-shadow);
}

.mf-aside__title:not(:first-child) {
	margin-top: 8px;
}

.mf-aside__actions {
	display: grid;
	gap: 10px;
}

.mf-checklist {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mf-checklist li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.mf-checklist .mf-icon {
	margin-top: 0.15em;
	color: var(--mf-s-link);
}

.mf-checklist a {
	color: var(--mf-s-heading);
}

.mf-facts {
	display: grid;
	margin: 0;
}

.mf-facts__row {
	display: grid;
	gap: 2px;
	padding-block: 12px;
	border-bottom: 1px solid var(--mf-s-border);
}

.mf-facts__row:first-child {
	padding-top: 0;
}

.mf-facts__row:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.mf-facts dt {
	color: var(--mf-s-muted);
	font-size: var(--mf-small-size);
}

.mf-facts dd {
	margin: 0;
	color: var(--mf-s-heading);
	font-weight: var(--mf-strong-weight);
}

.mf-facts dd a {
	color: inherit;
}

/* Отзывы. */
.mf-review {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
	padding: clamp(20px, 2.5vw, 28px);
	border: var(--mf-border-w) solid var(--mf-s-border);
	border-radius: var(--mf-radius-lg);
	background-color: var(--mf-s-card);
	box-shadow: var(--mf-shadow);
}

.mf-review__text {
	flex: 1;
	margin: 0;
	color: var(--mf-s-heading);
}

.mf-review__text p + p {
	margin-top: 0.8em;
}

.mf-review__by {
	display: grid;
	gap: 2px;
	font-size: var(--mf-small-size);
}

.mf-review__author {
	color: var(--mf-s-heading);
	font-weight: var(--mf-strong-weight);
}

.mf-review__source {
	color: var(--mf-s-muted);
}

.mf-review__source a {
	color: inherit;
}

.mf-review--large {
	align-items: center;
	gap: 20px;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	text-align: center;
}

.mf-review--large .mf-review__text {
	font-family: var(--mf-h3-font);
	font-size: var(--mf-h3-size);
	line-height: 1.35;
	font-weight: var(--mf-lead-weight);
}

.mf-stars {
	display: inline-flex;
	gap: 2px;
	color: color-mix(in srgb, var(--mf-accent) 82%, var(--mf-text));
}

[data-scheme="dark"] .mf-stars {
	color: var(--mf-accent);
}

.mf-stars .mf-icon {
	width: 1.1em;
	height: 1.1em;
}

.mf-stars .is-off {
	opacity: 0.35;
}

.mf-reviews-wall {
	columns: 3 300px;
	column-gap: clamp(16px, 2.5vw, 32px);
}

.mf-reviews-wall .mf-review {
	margin-bottom: clamp(16px, 2.5vw, 32px);
	break-inside: avoid;
}

.mf-review-sites {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: clamp(24px, 3vw, 40px);
}

/* Вопросы и ответы. */
.mf-faq-layout {
	display: grid;
	gap: 8px clamp(32px, 5vw, 72px);
}

@media (min-width: 960px) {
	.mf-faq-layout {
		grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
		align-items: start;
	}
}

.mf-faq {
	border-top: 1px solid var(--mf-s-border);
}

.mf-faq__item {
	border-bottom: 1px solid var(--mf-s-border);
}

.mf-faq__q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-block: 20px;
	cursor: pointer;
	list-style: none;
	color: var(--mf-s-heading);
}

.mf-faq__q::-webkit-details-marker {
	display: none;
}

.mf-faq__icon {
	flex: none;
	transition: transform 0.2s ease;
}

.mf-faq__item[open] .mf-faq__icon {
	transform: rotate(45deg);
}

.mf-faq__a {
	padding-bottom: 20px;
}

/* Аккредитации. */
.mf-badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px clamp(24px, 4vw, 48px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.mf-badges__item {
	display: grid;
	justify-items: center;
	gap: 6px;
	text-align: center;
}

.mf-badges__item a,
.mf-badges__box {
	display: grid;
	justify-items: center;
	gap: 6px;
	color: inherit;
	text-decoration: none;
}

.mf-badges__logo {
	width: auto;
	max-width: 160px;
	max-height: 64px;
}

.mf-badges__name {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--mf-s-heading);
	font-weight: var(--mf-strong-weight);
}

.mf-badges__number {
	color: var(--mf-s-muted);
	font-size: var(--mf-small-size);
}

.mf-block--badges .mf-badges {
	justify-content: center;
}

.mf-block--badges .mf-block__label {
	text-align: center;
}

/* В подвале логотипы стоят на светлых плашках: у большинства логотипов тёмный текст. */
.mf-footer__badges {
	margin-top: clamp(40px, 6vw, 56px);
}

.mf-badges--compact {
	justify-content: center;
	gap: 12px;
}

.mf-badges--compact .mf-badges__item a,
.mf-badges--compact .mf-badges__box {
	padding: 8px 14px;
	border-radius: var(--mf-radius);
	background-color: var(--mf-bg);
	color: var(--mf-text);
}

/* Без логотипа — название на плашке, цветом плашки (а не светлым текстом тёмного подвала). */
.mf-badges--compact .mf-badges__name {
	color: var(--mf-text);
	font-size: var(--mf-small-size);
}

.mf-badges--compact .mf-badges__logo {
	max-height: 40px;
	max-width: 120px;
}

/* «Почему мы». */
.mf-features {
	display: grid;
	gap: clamp(24px, 3vw, 40px);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

.mf-features__item {
	display: grid;
	align-content: start;
	gap: 12px;
}

/* Команда. */
.mf-team {
	display: grid;
	gap: clamp(24px, 3vw, 40px);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

.mf-team__person {
	display: grid;
	align-content: start;
	gap: 8px;
}

.mf-team__photo img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: var(--mf-radius-lg);
	margin-bottom: 8px;
}

.mf-team__role {
	color: var(--mf-s-muted);
}

.mf-team__bio p + p {
	margin-top: 0.6em;
}

.mf-team__quals {
	display: grid;
	gap: 6px;
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
	font-size: var(--mf-small-size);
}

.mf-team__quals li {
	display: flex;
	gap: 8px;
}

/* Районы. */
.mf-areas {
	display: grid;
	gap: clamp(16px, 2.5vw, 32px);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Галерея и просмотр фото. */
.mf-gallery {
	display: grid;
	gap: clamp(8px, 1.5vw, 16px);
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 700px) {
	.mf-gallery {
		grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	}
}

.mf-gallery__item {
	display: block;
	overflow: hidden;
	border-radius: var(--mf-radius);
	background-color: var(--mf-s-surface);
}

.mf-gallery__item img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.mf-gallery__item:hover img {
	transform: scale(1.03);
}

.mf-lightbox {
	width: 100vw;
	max-width: none;
	height: 100vh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
}

.mf-lightbox::backdrop {
	background: rgb(10 10 10 / 0.9);
}

.mf-lightbox__figure {
	display: grid;
	place-items: center;
	align-content: center;
	gap: 12px;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 56px 16px;
}

.mf-lightbox__img {
	max-width: min(92vw, 1600px);
	max-height: calc(100vh - 140px);
	width: auto;
	height: auto;
	object-fit: contain;
}

.mf-lightbox__caption,
.mf-lightbox__count {
	font-size: var(--mf-small-size);
	color: rgb(255 255 255 / 0.8);
	text-align: center;
}

.mf-lightbox__count {
	position: absolute;
	top: 16px;
	left: 50%;
	transform: translateX(-50%);
	margin: 0;
}

.mf-lightbox__btn {
	position: absolute;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid rgb(255 255 255 / 0.3);
	border-radius: 50%;
	background: rgb(0 0 0 / 0.4);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.mf-lightbox__btn:hover {
	background: rgb(0 0 0 / 0.7);
}

.mf-lightbox__close {
	top: 12px;
	right: 12px;
}

.mf-lightbox__prev {
	top: 50%;
	left: 12px;
	transform: translateY(-50%);
}

.mf-lightbox__next {
	top: 50%;
	right: 12px;
	transform: translateY(-50%);
}

.mf-lightbox.is-single .mf-lightbox__prev,
.mf-lightbox.is-single .mf-lightbox__next,
.mf-lightbox.is-single .mf-lightbox__count {
	display: none;
}

/* До и после. */
.mf-ba {
	position: relative;
	overflow: hidden;
	max-width: 1000px;
	margin-inline: auto;
	aspect-ratio: 3 / 2;
	border-radius: var(--mf-radius-lg);
	background-color: var(--mf-s-surface);
	user-select: none;
}

.mf-ba__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mf-ba__img--before {
	clip-path: inset(0 calc(100% - var(--mf-ba, 50%)) 0 0);
}

.mf-ba__line {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--mf-ba, 50%);
	width: 2px;
	margin-left: -1px;
	background: #fff;
	box-shadow: 0 0 0 1px rgb(0 0 0 / 0.15);
	pointer-events: none;
}

.mf-ba__knob {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #fff;
	color: #111;
	box-shadow: 0 2px 10px rgb(0 0 0 / 0.25);
	transform: translate(-50%, -50%);
}

.mf-ba__knob .mf-icon {
	width: 16px;
	height: 16px;
}

.mf-ba__label {
	position: absolute;
	top: 12px;
	padding: 0.25em 0.75em;
	border-radius: var(--mf-btn-radius);
	background: rgb(0 0 0 / 0.55);
	color: #fff;
	font-size: var(--mf-small-size);
	font-weight: var(--mf-strong-weight);
	pointer-events: none;
}

.mf-ba__label--before {
	left: 12px;
}

.mf-ba__label--after {
	right: 12px;
}

.mf-ba__range {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: ew-resize;
}

.mf-ba:focus-within {
	outline: 2px solid var(--mf-s-focus);
	outline-offset: 3px;
}

/* Нумерация страниц. */
.mf-pagination {
	margin-top: clamp(32px, 4vw, 48px);
}

.mf-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mf-pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid var(--mf-s-border);
	border-radius: var(--mf-btn-radius);
	color: var(--mf-s-heading);
	text-decoration: none;
}

.mf-pagination .page-numbers.current {
	border-color: var(--mf-s-heading);
	background-color: var(--mf-s-heading);
	color: var(--mf-s-bg);
}

.mf-pagination .page-numbers.dots {
	border: 0;
}

/* Подсказка для администратора (посетители её не видят). */
.mf-admin-note {
	padding: 16px 20px;
	border: 2px dashed color-mix(in srgb, var(--mf-s-fg) 30%, transparent);
	border-radius: var(--mf-radius);
	color: var(--mf-s-muted);
	font-size: var(--mf-small-size);
}

.mf-admin-note a {
	font-weight: var(--mf-strong-weight);
}

.mf-admin-note__tag {
	margin-left: 8px;
	opacity: 0.7;
}

/* 17. Главная: секции ----------------------------------------------------
 * Раскладки секций из метабокса «Секции главной». Класс раскладки: .mf-home-{секция}--{раскладка}.
 */

.mf-home-empty {
	padding-block: 12px;
	background-color: var(--mf-bg);
}

/* Фон-фото секции: затемнение поверх, текст светлый. */
.mf-section.has-bg-image {
	background-image:
		linear-gradient(rgb(0 0 0 / var(--mf-overlay, 0.55)), rgb(0 0 0 / var(--mf-overlay, 0.55))),
		var(--mf-bg-image);
	background-position: center;
	background-size: cover;
}

/* Заголовок секции: надзаголовок, выравнивание по центру. */
.mf-section-head__eyebrow {
	margin: 0;
}

.mf-align-center .mf-section-head {
	flex-direction: column;
	align-items: center;
}

.mf-align-center .mf-section-head__text {
	justify-items: center;
	margin-inline: auto;
}

.mf-home__label {
	margin: 0 0 18px;
}

.mf-home__more {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: clamp(28px, 3.5vw, 44px);
}

.mf-align-center .mf-home__more,
.mf-home-reviews--quote .mf-home__more {
	justify-content: center;
}

/* Сетки с фиксированным числом колонок. */
@media (min-width: 640px) {
	.mf-grid--cols-3,
	.mf-grid--cols-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 960px) {
	.mf-grid--cols-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.mf-grid--cols-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.mf-align-center .mf-grid,
.mf-align-center .mf-svc-list,
.mf-align-center .mf-faq,
.mf-align-center .mf-scroller__track {
	text-align: left;
}

/* Логотипы: полоса доверия, клиенты. */
.mf-align-center .mf-badges {
	justify-content: center;
}

.mf-badges--cards,
.mf-badges--tiles {
	align-items: stretch;
	gap: clamp(12px, 2vw, 20px);
}

.mf-badges--cards .mf-badges__item,
.mf-badges--tiles .mf-badges__item {
	flex: 0 1 200px;
	align-content: center;
	min-height: 128px;
	padding: 20px;
	border: var(--mf-border-w) solid var(--mf-s-border);
	border-radius: var(--mf-radius-lg);
	background-color: var(--mf-s-card);
}

.mf-badges--cards .mf-badges__item a,
.mf-badges--cards .mf-badges__box {
	display: grid;
	justify-items: center;
	gap: 10px;
	color: inherit;
	text-decoration: none;
}

.mf-badges__caption {
	color: var(--mf-s-heading);
	font-size: var(--mf-small-size);
	font-weight: var(--mf-strong-weight);
}

.mf-badges--clients .mf-badges__logo,
.mf-badges--tiles .mf-badges__logo {
	max-height: 56px;
	filter: grayscale(1);
	opacity: 0.78;
	transition: filter 0.2s ease, opacity 0.2s ease;
}

.mf-badges--clients .mf-badges__item:hover .mf-badges__logo,
.mf-badges--tiles .mf-badges__item:hover .mf-badges__logo {
	filter: none;
	opacity: 1;
}

/* Услуги: список с иконками. */
.mf-svc-list {
	display: grid;
	gap: 0 clamp(24px, 4vw, 56px);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 760px) {
	.mf-svc-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.mf-svc-list__item {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding-block: 20px;
	border-bottom: 1px solid var(--mf-s-border);
}

.mf-svc-list__body {
	display: grid;
	gap: 6px;
}

.mf-svc-list__title a {
	color: var(--mf-s-heading);
	text-decoration: none;
}

.mf-svc-list__title a:hover {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.mf-svc-list__text {
	margin: 0;
	color: var(--mf-s-muted);
}

/* Услуги: карточки с фото — фото на всю карточку, текст поверх. */
.mf-service-card--photo {
	justify-content: flex-end;
	min-height: clamp(300px, 30vw, 380px);
	border-color: transparent;
}

.mf-service-card--photo .mf-card__media {
	position: absolute;
	inset: 0;
	aspect-ratio: auto;
}

.mf-service-card--photo .mf-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgb(0 0 0 / 0.8), rgb(0 0 0 / 0.05) 62%);
}

.mf-service-card--photo .mf-card__img {
	transition: transform 0.4s ease;
}

.mf-service-card--photo:hover .mf-card__img {
	transform: scale(1.04);
}

.mf-service-card--photo .mf-card__body {
	position: relative;
	z-index: 1;
	flex: none;
	--mf-s-heading: #fff;
	--mf-s-fg: rgb(255 255 255 / 0.9);
	--mf-s-muted: rgb(255 255 255 / 0.78);
}

/* О компании. */
.mf-about {
	display: grid;
	gap: clamp(32px, 5vw, 72px);
	align-items: center;
}

@media (min-width: 900px) {
	.mf-home-about.has-media .mf-about {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.mf-home-about--image_right .mf-about__media {
		order: 2;
	}
}

.mf-about__img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--mf-radius-lg);
}

.mf-about__body {
	display: grid;
	justify-items: start;
	gap: 20px;
}

.mf-about__body .mf-section-head {
	margin-bottom: 0;
}

.mf-about__body .mf-home__more {
	margin-top: 4px;
}

.mf-about__text {
	display: grid;
	gap: 1em;
	max-width: 40rem;
}

.mf-about__text p {
	margin: 0;
}

.mf-home-about--image_bg .mf-about__body {
	max-width: 46rem;
}

.mf-align-center .mf-about__body {
	justify-items: center;
	margin-inline: auto;
}

.mf-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 16px clamp(28px, 4vw, 56px);
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}

.mf-align-center .mf-facts {
	justify-content: center;
}

.mf-facts__item {
	display: grid;
	gap: 2px;
}

.mf-facts__value {
	color: var(--mf-s-heading);
}

.mf-facts__label {
	color: var(--mf-s-muted);
	font-size: var(--mf-small-size);
}

/* Почему мы: раскладки. */
.mf-features__body {
	display: grid;
	gap: 8px;
}

.mf-features__body > * {
	margin: 0;
}

.mf-features--cards .mf-features__item {
	padding: clamp(20px, 2.5vw, 28px);
	border: var(--mf-border-w) solid var(--mf-s-border);
	border-radius: var(--mf-radius-lg);
	background-color: var(--mf-s-card);
	box-shadow: var(--mf-shadow);
}

.mf-features--list {
	grid-template-columns: minmax(0, 1fr);
	gap: 28px clamp(24px, 4vw, 56px);
}

@media (min-width: 760px) {
	.mf-features--list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.mf-features--list .mf-features__item {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.mf-align-center .mf-features--grid .mf-features__item,
.mf-align-center .mf-features--cards .mf-features__item {
	justify-items: center;
}

.mf-align-center .mf-features--list {
	text-align: left;
}

/* Объекты: мозаика из фото. */
.mf-mosaic {
	display: grid;
	gap: clamp(12px, 1.5vw, 20px);
	grid-template-columns: minmax(0, 1fr);
	grid-auto-rows: 260px;
}

@media (min-width: 600px) {
	.mf-mosaic {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-rows: clamp(180px, 24vw, 280px);
	}

	.mf-mosaic > :first-child {
		grid-column: span 2;
	}
}

/* Последняя плитка без пары растягивается на свободное место. */
@media (min-width: 600px) and (max-width: 959px) {
	.mf-mosaic > :last-child:nth-child(even) {
		grid-column: span 2;
	}
}

@media (min-width: 960px) {
	.mf-mosaic {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.mf-mosaic > :first-child {
		grid-row: span 2;
	}

	.mf-mosaic > :last-child:nth-child(3n + 4) {
		grid-column: span 3;
	}

	.mf-mosaic > :last-child:nth-child(3n + 5) {
		grid-column: span 2;
	}
}

.mf-tile {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--mf-radius-lg);
	background-color: var(--mf-s-surface);
	text-align: left;
	text-decoration: none;
}

.mf-tile::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgb(0 0 0 / 0.75), rgb(0 0 0 / 0) 58%);
}

.mf-tile__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.mf-tile:hover .mf-tile__img {
	transform: scale(1.04);
}

.mf-tile:focus-visible {
	outline: 2px solid var(--mf-s-focus);
	outline-offset: 2px;
}

.mf-tile__placeholder {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: var(--mf-s-muted);
}

.mf-tile .mf-pill {
	z-index: 1;
}

.mf-tile__text {
	position: absolute;
	inset: auto 0 0;
	z-index: 1;
	display: grid;
	gap: 4px;
	padding: clamp(14px, 2vw, 24px);
}

.mf-tile__title {
	color: #fff;
}

.mf-tile__place {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: rgb(255 255 255 / 0.85);
	font-size: var(--mf-small-size);
}

/* Объекты: до и после. */
.mf-ba-grid {
	display: grid;
	gap: clamp(28px, 3.5vw, 44px) clamp(20px, 3vw, 32px);
}

@media (min-width: 900px) {
	.mf-ba-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.mf-ba-item {
	display: grid;
	gap: 14px;
	margin: 0;
	text-align: left;
}

.mf-ba-item .mf-ba {
	max-width: none;
	width: 100%;
}

.mf-ba-item__caption {
	display: grid;
	gap: 4px;
}

.mf-ba-item__caption a {
	color: var(--mf-s-heading);
	text-decoration: none;
}

.mf-ba-item__caption a:hover {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* Как мы работаем: шаги. */
.mf-steps {
	display: grid;
	gap: clamp(24px, 3vw, 40px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.mf-steps--row {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.mf-steps__item {
	display: grid;
	align-content: start;
	gap: 14px;
	text-align: left;
}

.mf-steps--row .mf-steps__item {
	padding-top: 20px;
	border-top: 2px solid var(--mf-s-border);
}

.mf-steps__marker {
	display: flex;
	align-items: center;
	gap: 12px;
}

.mf-steps__num {
	color: var(--mf-s-eyebrow);
	font-family: var(--mf-h2-font);
	font-size: var(--mf-h3-size);
	font-weight: var(--mf-h2-weight);
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.mf-steps__body {
	display: grid;
	gap: 8px;
}

.mf-steps__body > * {
	margin: 0;
}

.mf-steps__text {
	color: var(--mf-s-muted);
}

.mf-steps--list {
	max-width: 48rem;
}

.mf-steps--list .mf-steps__item {
	grid-template-columns: 56px minmax(0, 1fr);
	column-gap: 20px;
}

.mf-steps--list .mf-steps__marker {
	flex-direction: column;
	align-items: flex-start;
}

.mf-align-center .mf-steps--list {
	margin-inline: auto;
}

.mf-align-center .mf-steps--row .mf-steps__item {
	justify-items: center;
	text-align: center;
}

/* Отзывы: раскладки. */
.mf-grid--reviews {
	align-items: start;
}

.mf-quote {
	max-width: 52rem;
	margin-inline: auto;
}

.mf-scroller {
	display: grid;
	gap: 16px;
}

.mf-scroller__track {
	display: grid;
	grid-auto-columns: min(86%, 380px);
	grid-auto-flow: column;
	gap: clamp(16px, 2.5vw, 24px);
	margin: 0;
	padding: 0 0 10px;
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
}

.mf-scroller__item {
	display: flex;
	scroll-snap-align: start;
}

.mf-scroller__item .mf-review {
	width: 100%;
}

.mf-scroller__nav {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}

.mf-scroller__nav[hidden] {
	display: none;
}

.mf-align-center .mf-scroller__nav,
.mf-align-center .mf-review-sites {
	justify-content: center;
}

.mf-scroller__btn {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--mf-s-border);
	border-radius: 50%;
	background: none;
	color: var(--mf-s-heading);
	cursor: pointer;
}

.mf-scroller__btn:hover:not(:disabled) {
	border-color: var(--mf-s-heading);
}

.mf-scroller__btn:disabled {
	opacity: 0.35;
	cursor: default;
}

/* Кому мы работаем. */
.mf-sectors {
	display: grid;
	gap: clamp(20px, 3vw, 32px);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

.mf-sectors__item {
	display: grid;
	align-content: start;
	justify-items: start;
	gap: 10px;
}

.mf-sectors__item > * {
	margin: 0;
}

.mf-sectors--cards .mf-sectors__item {
	padding: clamp(20px, 2.5vw, 28px);
	border: var(--mf-border-w) solid var(--mf-s-border);
	border-radius: var(--mf-radius-lg);
	background-color: var(--mf-s-card);
	box-shadow: var(--mf-shadow);
}

.mf-sectors__text {
	color: var(--mf-s-muted);
}

.mf-sectors__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 2px;
	color: var(--mf-s-link);
	font-weight: var(--mf-strong-weight);
	text-decoration: none;
}

.mf-sectors__link:hover span {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.mf-sectors__link .mf-icon {
	width: 1em;
	height: 1em;
}

.mf-align-center .mf-sectors__item {
	justify-items: center;
}

/* Районы. */
.mf-chips--areas .mf-chip {
	gap: 6px;
}

.mf-chips--areas .mf-icon {
	width: 1em;
	height: 1em;
	color: var(--mf-s-muted);
}

.mf-align-center .mf-chips {
	justify-content: center;
}

.mf-area-cols {
	display: grid;
	gap: 18px clamp(24px, 4vw, 48px);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: left;
}

.mf-area-cols__item {
	display: grid;
	gap: 4px;
	padding-top: 14px;
	border-top: 1px solid var(--mf-s-border);
}

.mf-area-cols__name {
	color: var(--mf-s-heading);
	text-decoration: none;
}

.mf-area-cols__name:hover {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.mf-area-cols__codes {
	color: var(--mf-s-muted);
	font-size: var(--mf-small-size);
}

/* Вопросы и ответы: заголовок сверху. */
@media (min-width: 960px) {
	.mf-faq-layout.mf-faq-layout--stack {
		grid-template-columns: minmax(0, 1fr);
	}
}

.mf-faq-layout--stack {
	max-width: 52rem;
	margin-inline: auto;
}

.mf-faq-layout .mf-section-head {
	margin-bottom: 16px;
}

/* Призыв: карточка и крупный телефон. */
.mf-cta__card {
	padding: clamp(32px, 5vw, 64px);
	border-radius: var(--mf-radius-lg);
}

.mf-cta__phone {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	color: var(--mf-s-heading);
	text-decoration: none;
	white-space: nowrap;
}

.mf-cta__phone .mf-icon {
	width: 0.75em;
	height: 0.75em;
}

.mf-cta__phone:hover span {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.15em;
}

.mf-cta--phone .mf-cta__actions {
	align-items: center;
	gap: 16px 24px;
}

.mf-align-center .mf-cta__inner {
	grid-template-columns: minmax(0, 1fr);
	justify-items: center;
}

.mf-align-center .mf-cta__actions {
	justify-content: center;
}

/* Появление секций при прокрутке — если включена анимация. Без JavaScript всё видно сразу. */
@media (prefers-reduced-motion: no-preference) {
	.mf-reveal .mf-home > .mf-container {
		transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
	}

	.mf-reveal .mf-home.is-pending > .mf-container {
		opacity: 0;
		transform: translateY(18px);
	}
}

@media print {
	.mf-reveal .mf-home.is-pending > .mf-container {
		opacity: 1;
		transform: none;
	}
}

/* 18. Форма заявки, страница контактов, cookie-баннер ------------------- */

.mf-form {
	display: grid;
	gap: 20px;
}

/* Колонки формы зависят от ширины места под неё, а не экрана:
   одна и та же форма стоит и в узком первом экране, и на всю ширину. */
.mf-form-wrap {
	container-type: inline-size;
}

.mf-form__grid {
	display: grid;
	align-items: end; /* подпись в две строки не сдвигает поле */
	gap: 16px 20px;
}

@container (min-width: 520px) {
	.mf-form--full .mf-form__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mf-form--full .mf-form__field--wide {
		grid-column: 1 / -1;
	}
}

@container (min-width: 340px) {
	.mf-form--compact .mf-form__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px 12px;
	}

	.mf-form--compact .mf-form__field--wide {
		grid-column: 1 / -1;
	}
}

.mf-form__field {
	display: grid;
	gap: 6px;
	min-width: 0;
}

.mf-form__label {
	margin: 0;
	color: var(--mf-s-heading);
	font-weight: var(--mf-strong-weight);
}

.mf-form__optional {
	color: var(--mf-s-muted);
	font-weight: var(--mf-body-weight);
}

.mf-form__hint {
	margin: -8px 0 0;
	color: var(--mf-s-muted);
	font-size: var(--mf-small-size);
}

.mf-form .mf-input[aria-invalid="true"] {
	border-color: #c0392b;
}

textarea.mf-input {
	resize: vertical;
}

/* Ловушка для ботов: человек её не видит. */
.mf-form__hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Галочки и переключатели. */
.mf-check,
.mf-choice {
	display: inline-flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	color: var(--mf-s-fg);
	font-weight: var(--mf-body-weight);
	cursor: pointer;
}

.mf-check input,
.mf-choice input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: var(--mf-s-btn-bg);
}

.mf-form__callback {
	gap: 12px;
}

.mf-form__times {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
}

.mf-form__times[hidden] {
	display: none;
}

.mf-form__choices {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mf-choice {
	align-items: center;
	padding: 0.45em 0.9em;
	border: 1px solid var(--mf-s-border);
	border-radius: var(--mf-btn-radius);
}

.mf-choice input {
	margin: 0;
}

.mf-choice:has(input:checked) {
	border-color: var(--mf-s-heading);
}

.mf-form__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
}

.mf-form__actions .mf-btn[disabled] {
	opacity: 0.7;
	cursor: progress;
}

.mf-form__or {
	color: var(--mf-s-muted);
}

/* Короткая форма и любая форма в узком месте: кнопки во всю ширину, одна под другой. */
.mf-form--compact .mf-form__actions {
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
}

.mf-form--compact .mf-form__actions .mf-btn {
	justify-content: center;
	width: 100%;
}

.mf-form--compact .mf-form__or {
	display: none;
}

@container (max-width: 519px) {
	.mf-form--full .mf-form__actions {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	.mf-form--full .mf-form__actions .mf-btn {
		justify-content: center;
		width: 100%;
	}

	.mf-form--full .mf-form__or {
		display: none;
	}
}

.mf-form__privacy {
	margin: -4px 0 0;
	color: var(--mf-s-muted);
	font-size: var(--mf-small-size);
}

.mf-form__privacy a {
	color: inherit;
}

.mf-form__errors {
	padding: 14px 18px;
	border-left: 4px solid #c0392b;
	border-radius: var(--mf-radius-sm);
	background-color: color-mix(in srgb, #c0392b 8%, var(--mf-s-card));
	color: var(--mf-s-fg);
}

.mf-form__errors p,
.mf-form__errors ul {
	margin: 0;
}

.mf-form__errors ul {
	padding-left: 1.2em;
}

.mf-form__errors:focus {
	outline: none;
}

.mf-form__sent {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 20px 22px;
	border-radius: var(--mf-radius-lg);
	background-color: var(--mf-s-surface);
}

.mf-form__sent .mf-icon {
	flex: none;
	width: 28px;
	height: 28px;
	color: var(--mf-s-accent);
}

.mf-form__sent p {
	margin: 0;
}

/* Страница контактов: форма и рядом контакты. */
.mf-contact-page__grid {
	display: grid;
	gap: clamp(32px, 5vw, 64px);
	align-items: start;
}

@media (min-width: 960px) {
	.mf-contact-page__grid {
		grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
	}
}

.mf-contact-page__form .mf-section-head {
	margin-bottom: 24px;
}

.mf-contact-page__aside {
	display: grid;
	gap: 20px;
}

/* Секция главной «Форма заявки». */
/* Внутренняя обёртка секции «Форма заявки» (класс секции — mf-home-form). */
.mf-enquiry {
	display: grid;
	gap: clamp(28px, 4vw, 56px);
	align-items: start;
}

@media (min-width: 960px) {
	.mf-enquiry--side {
		grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
	}
}

.mf-enquiry--center {
	max-width: 44rem;
	margin-inline: auto;
}

.mf-enquiry--center .mf-enquiry__text {
	text-align: center;
}

.mf-enquiry--center .mf-section-head {
	flex-direction: column;
	align-items: center;
}

.mf-enquiry__text .mf-section-head {
	margin-bottom: 20px;
}

.mf-enquiry__contacts {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-weight: var(--mf-strong-weight);
}

.mf-enquiry--center .mf-enquiry__contacts {
	justify-content: center;
}

.mf-enquiry__contacts li {
	display: flex;
	align-items: center;
	gap: 10px;
}

.mf-enquiry__contacts a {
	color: var(--mf-s-heading);
	text-decoration: none;
}

.mf-enquiry__contacts a:hover {
	text-decoration: underline;
}

.mf-enquiry__card,
.mf-hero__form {
	padding: clamp(20px, 3vw, 36px);
	border: var(--mf-border-w) solid var(--mf-s-border);
	border-radius: var(--mf-radius-lg);
	background-color: var(--mf-s-bg);
	box-shadow: var(--mf-shadow-lg);
	text-align: left;
}

/* Первый экран с формой. */
.mf-hero__form {
	display: grid;
	gap: 16px;
	width: 100%;
	color: var(--mf-s-fg);
}

.mf-hero__form-title {
	margin: 0;
	color: var(--mf-s-heading);
}

@media (min-width: 960px) {
	.mf-hero--form .mf-hero__inner {
		grid-template-columns: minmax(0, 1.15fr) minmax(340px, 440px);
	}
}

.mf-hero--form.mf-hero--full {
	--mf-pad: clamp(40px, 7vh, 96px);
	padding-block: var(--mf-pad);
}

/* Подвал: «Cookie settings» и «Website by». */
.mf-footer__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 10px;
	margin: 0;
	color: var(--mf-s-muted);
}

.mf-footer__meta a,
.mf-footer__cookies {
	color: inherit;
}

.mf-footer__cookies {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	cursor: pointer;
}

/* Cookie-баннер: внизу экрана, не перекрывает всю страницу. */
.mf-cookie {
	position: fixed;
	right: 16px;
	bottom: 16px;
	left: 16px;
	z-index: 1000;
	max-width: 760px;
	margin-inline: auto;
	padding: clamp(16px, 2.5vw, 24px);
	border-radius: var(--mf-radius-lg);
	box-shadow: 0 12px 40px rgb(0 0 0 / 0.28);
	font-size: var(--mf-small-size);
}

.mf-cookie[hidden] {
	display: none;
}

.mf-cookie__inner {
	display: grid;
	gap: 14px;
}

.mf-cookie__text {
	margin: 0;
}

.mf-cookie__text a {
	color: var(--mf-s-link);
}

.mf-cookie__prefs {
	display: grid;
	gap: 10px;
	padding: 12px 0;
	border-block: 1px solid var(--mf-s-border);
}

.mf-cookie__prefs[hidden] {
	display: none;
}

.mf-cookie__opt {
	color: var(--mf-s-fg);
}

.mf-cookie__opt strong {
	color: var(--mf-s-heading);
}

.mf-cookie__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.mf-cookie__actions .mf-btn {
	min-height: 42px;
	padding: 0.55em 1.2em;
}

.mf-cookie__actions .mf-btn[hidden],
.mf-cookie__more[hidden] {
	display: none;
}

.mf-cookie__more {
	padding: 0.4em 0.2em;
	border: 0;
	background: none;
	color: var(--mf-s-heading);
	font: inherit;
	font-weight: var(--mf-strong-weight);
	text-decoration: underline;
	text-underline-offset: 0.2em;
	cursor: pointer;
}

@media (max-width: 767px) {
	.has-mf-callbar .mf-cookie {
		bottom: calc(72px + env(safe-area-inset-bottom));
	}

	.mf-cookie__actions .mf-btn {
		flex: 1 1 40%;
	}
}

/* 19. Карты -------------------------------------------------------------- */

/* Заглушка до загрузки и сама карта. isolation — чтобы слои Leaflet (z-index 400–1000)
   не вылезали поверх липкой шапки. */
.mf-map {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	min-height: 220px;
	border: var(--mf-border-w) solid var(--mf-s-border);
	border-radius: var(--mf-radius-lg);
	background-color: var(--mf-s-card);
	/* Намёк на карту: редкая сетка «улиц». */
	background-image:
		linear-gradient(color-mix(in srgb, var(--mf-s-fg) 6%, transparent) 1px, transparent 1px),
		linear-gradient(90deg, color-mix(in srgb, var(--mf-s-fg) 6%, transparent) 1px, transparent 1px);
	background-size: 44px 44px;
	color: var(--mf-s-fg);
}

.mf-map--small {
	height: 240px;
}

.mf-map--medium {
	height: clamp(280px, 38vw, 380px);
}

.mf-map--large {
	height: clamp(320px, 45vw, 460px);
}

.mf-map__placeholder {
	position: absolute;
	inset: 0;
	display: grid;
	place-content: center;
	justify-items: center;
	gap: 12px;
	padding: 20px;
	text-align: center;
}

.mf-map__icon .mf-icon {
	width: 32px;
	height: 32px;
	color: var(--mf-s-muted);
}

.mf-map__text {
	max-width: 38ch;
	margin: 0;
	color: var(--mf-s-muted);
	font-size: var(--mf-small-size);
	line-height: var(--mf-small-lh);
}

.mf-map__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px 18px;
}

.mf-map__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--mf-s-heading);
	font-size: var(--mf-small-size);
}

.mf-map__link .mf-icon {
	width: 16px;
	height: 16px;
}

.mf-map.is-loaded .mf-map__placeholder {
	display: none;
}

.mf-map__canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.mf-map.is-failed .mf-map__placeholder::after {
	content: "The map could not be loaded.";
	color: var(--mf-s-muted);
	font-size: var(--mf-small-size);
}

/* Где стоят карты. */
.mf-projects-map {
	margin-bottom: clamp(24px, 3vw, 40px);
}

.mf-contact-page__aside .mf-map {
	height: clamp(260px, 30vw, 340px);
}

.mf-aside__map {
	min-height: 0;
	height: 220px;
}

/* Leaflet: шрифт сайта, булавка цвета акцента, карточка объекта во всплывашке. */
.mf-map .leaflet-container {
	font: inherit;
	font-size: var(--mf-small-size);
	background-color: var(--mf-s-card);
}

.mf-map .leaflet-control-attribution {
	font-size: 11px;
}

.mf-map-pin svg {
	display: block;
	width: 30px;
	height: 40px;
	overflow: visible;
	filter: drop-shadow(0 2px 2px rgb(0 0 0 / 35%));
}

.mf-map-pin path {
	fill: var(--mf-accent);
	stroke: #fff;
	stroke-width: 1.5;
}

.mf-map-pin circle {
	fill: #fff;
}

.mf-map .leaflet-popup-content-wrapper {
	border-radius: var(--mf-radius);
}

.mf-map .leaflet-popup-content {
	margin: 12px;
}

.mf-map-popup {
	display: grid;
	gap: 4px;
}

.mf-map-popup img {
	width: 100%;
	height: 110px;
	margin-bottom: 6px;
	border-radius: var(--mf-radius-sm);
	object-fit: cover;
}

/* Стили Leaflet подгружаются позже наших — нужна большая специфичность. */
.mf-map .leaflet-popup-content .mf-map-popup p {
	margin: 0;
}

.mf-map .leaflet-popup-content .mf-map-popup__title {
	color: #1d1d1d;
	font-weight: var(--mf-strong-weight);
	line-height: 1.3;
}

.mf-map .leaflet-popup-content .mf-map-popup__place {
	color: #5c5c5c;
}

.mf-map .leaflet-popup-content .mf-map-popup a {
	margin-top: 6px;
	color: #1d1d1d;
	font-weight: var(--mf-strong-weight);
}

@media print {
	.mf-map {
		display: none;
	}
}

/* 20. Хлебные крошки ----------------------------------------------------- */

.mf-breadcrumbs {
	max-width: 100%;
	margin-bottom: 4px;
	color: var(--mf-s-muted);
	font-size: var(--mf-small-size);
	line-height: var(--mf-small-lh);
}

.mf-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mf-align-center .mf-breadcrumbs ol {
	justify-content: center;
}

.mf-breadcrumbs li {
	display: inline-flex;
	align-items: center;
	min-width: 0;
}

.mf-breadcrumbs li + li::before {
	content: "›";
	margin-inline: 0.55em;
	opacity: 0.7;
}

.mf-breadcrumbs a {
	color: inherit;
	text-decoration: none;
}

.mf-breadcrumbs a:hover,
.mf-breadcrumbs a:focus-visible {
	color: var(--mf-s-heading);
	text-decoration: underline;
}

/* Текущая страница: длинное название — в одну строку с многоточием. */
.mf-breadcrumbs [aria-current] {
	overflow: hidden;
	max-width: 32ch;
	color: var(--mf-s-fg);
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* 21. Юридические страницы ------------------------------------------------ */

/* Длинный документ: заголовки на ступень меньше обычных страниц. */
.mf-legal h2 {
	font-family: var(--mf-h3-font);
	font-size: var(--mf-h3-size);
	font-weight: var(--mf-h3-weight);
	line-height: var(--mf-h3-lh);
	letter-spacing: var(--mf-h3-ls);
	text-transform: var(--mf-h3-tt);
}

.mf-legal h3 {
	font-family: var(--mf-h4-font);
	font-size: var(--mf-h4-size);
	font-weight: var(--mf-h4-weight);
	line-height: var(--mf-h4-lh);
	letter-spacing: var(--mf-h4-ls);
	text-transform: var(--mf-h4-tt);
}

.mf-legal__updated {
	color: var(--mf-s-muted);
	font-size: var(--mf-small-size);
}

.mf-legal__table {
	overflow-x: auto;
	margin-block: 1em 1.5em;
}

.mf-legal__table table {
	width: 100%;
	min-width: 520px;
	border-collapse: collapse;
	font-size: var(--mf-small-size);
	line-height: var(--mf-small-lh);
}

.mf-legal__table th,
.mf-legal__table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--mf-s-border);
	text-align: left;
	vertical-align: top;
}

.mf-legal__table th {
	color: var(--mf-s-heading);
	font-weight: var(--mf-strong-weight);
}

.mf-legal__table code {
	font-size: 0.95em;
	word-break: break-word;
}

/* 22. Демо-сайт ---------------------------------------------------------- */

.mf-demo-bar {
	padding-block: 6px;
	background-color: var(--mf-s-bg);
	color: var(--mf-s-fg);
	font-size: var(--mf-small-size);
	line-height: var(--mf-small-lh);
	text-align: center;
}

/* 23. Анкеты Get a quote ------------------------------------------------- */

.mf-quote-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: clamp(20px, 3vw, 32px);
	padding: 6px;
	border: var(--mf-border-w) solid var(--mf-s-border);
	border-radius: var(--mf-btn-radius);
	background-color: var(--mf-s-card);
}

.mf-quote-tabs__tab {
	flex: 1 1 auto;
	padding: 0.7em 1.2em;
	border-radius: var(--mf-btn-radius);
	color: var(--mf-s-fg);
	font-weight: var(--mf-strong-weight);
	text-align: center;
	text-decoration: none;
}

.mf-quote-tabs__tab:hover {
	color: var(--mf-s-heading);
}

.mf-quote-tabs__tab.is-active {
	background-color: var(--mf-s-btn-bg);
	color: var(--mf-s-btn-fg, #fff);
}

/* Без JavaScript видны все анкеты; со скриптом — только активная. */
.mf-quote-panel + .mf-quote-panel {
	margin-top: clamp(40px, 6vw, 64px);
}

.has-mf-tabs .mf-quote-panel:not(.is-active) {
	display: none;
}

.has-mf-tabs .mf-quote-panel + .mf-quote-panel {
	margin-top: 0;
}

.mf-quote-panel {
	scroll-margin-top: calc(var(--mf-header-h) + 24px);
}

/* 24. Услуги рядами (секция главной, раскладка «шахматный порядок») ------- */
.mf-svc-rows {
	display: grid;
	gap: clamp(40px, 7vw, 96px);
}

.mf-svc-row {
	display: grid;
	gap: clamp(20px, 4vw, 64px);
	align-items: center;
}

@media (min-width: 900px) {
	.mf-svc-row.has-image {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	}

	.mf-svc-row.has-image:nth-child(even) {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	}

	.mf-svc-row:nth-child(even) .mf-svc-row__media {
		order: 2;
	}
}

.mf-svc-row__media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--mf-radius-lg);
	background: var(--mf-surface);
	aspect-ratio: 16 / 10;
}

.mf-svc-row__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.mf-svc-row__media:hover .mf-svc-row__img {
	transform: scale(1.03);
}

.mf-svc-row__media .mf-pill {
	position: absolute;
	top: 14px;
	left: 14px;
}

.mf-svc-row__body {
	display: grid;
	justify-items: start;
	gap: 16px;
}

.mf-svc-row__title {
	margin: 0;
}

.mf-svc-row__title a {
	color: inherit;
	text-decoration: none;
}

.mf-svc-row__title a:hover {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.mf-svc-row__text,
.mf-svc-row__meta {
	margin: 0;
	max-width: 36rem;
}

.mf-svc-row__meta {
	font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
	.mf-svc-row__img {
		transition: none;
	}
}
