.mfr-section {
	/* зазор до «Популярные» как между «Рекомендуемые» и «Этапы работы» */
	margin: 8px 0 72px;
	padding: 0;
	font-family: "Inter", "HelveticaNeueCyr", Arial, sans-serif;
	font-weight: 400;
	color: #333;
	-webkit-font-smoothing: antialiased;
}

/* Единый вертикальный зазор между блоками главной */
.home-section-spacer {
	display: block;
	width: 100%;
	height: 72px;
	clear: both;
	pointer-events: none;
}

.mfr-section__title {
	margin: 0 0 17px;
	padding: 0;
	font-family: "Inter", "HelveticaNeueCyr", Arial, sans-serif;
	font-size: 22px;
	line-height: 31px;
	font-weight: 700;
	color: #000;
}

.mfr-section__viewport {
	overflow: visible;
}

.mfr-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	row-gap: 15px;
	column-gap: 10px;
	align-items: stretch;
}

.mfr-card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	box-sizing: border-box;
	min-height: 213px;
	padding: 15px 18px;
	gap: 10px;
	border-radius: 12px;
	background: #fff;
	border: 0.5px solid #d0d0d0;
	text-decoration: none;
	color: inherit;
	overflow: hidden;
}

.mfr-card--sm {
	grid-column: span 1;
}

.mfr-card--gallery {
	grid-column: span 3;
	flex-direction: row;
	align-items: stretch;
	padding: 0;
	background: linear-gradient(95deg, #a8b9b6 0%, #b8c6c3 28%, #d5dedc 62%, #eef2f1 100%);
	border: none;
	overflow: visible;
}

.mfr-card--design {
	grid-column: span 2;
	flex-direction: row;
	align-items: stretch;
	padding: 0;
	background: linear-gradient(95deg, #fada86 0%, #fce3a0 35%, #fff0c8 70%, #fffaf0 100%);
	border: none;
	overflow: visible;
}

.mfr-card__body {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	flex: 1 1 auto;
	padding: 20px 17px;
	max-width: 55%;
}

.mfr-card--gallery .mfr-card__body {
	max-width: 48%;
	padding: 25px 20px 16px;
	justify-content: flex-start;
	gap: 10px;
	min-height: 213px;
	box-sizing: border-box;
}

.mfr-card--design .mfr-card__body {
	max-width: 55%;
	padding: 20px 17px 16px;
	justify-content: flex-start;
	gap: 10px;
	min-height: 213px;
	box-sizing: border-box;
}

.mfr-card--gallery .mfr-card__more,
.mfr-card--design .mfr-badge {
	margin-top: auto;
}

.mfr-card__icon {
	display: block;
	height: 35px;
	max-width: 57px;
	margin: 0;
	flex-shrink: 0;
	object-fit: contain;
}

.mfr-card__icon--price {
	height: 34px;
	width: 34px;
}

.mfr-card__title {
	margin: 0;
	padding: 0;
	font-family: "HelveticaNeueCyr", Arial, sans-serif;
	font-size: 18px;
	line-height: 16px;
	font-weight: 700;
	color: #000;
}

.mfr-card__text {
	margin: 0;
	padding: 0;
	font-family: "Inter", "HelveticaNeueCyr", Arial, sans-serif;
	font-size: 14px;
	line-height: 18px;
	font-weight: 400;
	color: #333;
	flex: 1 1 auto;
}

.mfr-card__more,
a.mfr-card__more {
	display: inline-block;
	margin-top: auto;
	padding-top: 0;
	border: 0;
	background: none;
	font-family: "Inter", "HelveticaNeueCyr", Arial, sans-serif;
	font-size: 12px;
	line-height: 18px;
	font-weight: 400;
	color: #4a4a4a;
	text-decoration: underline;
	text-decoration-style: dotted;
	text-underline-offset: 3px;
	cursor: pointer;
	text-align: left;
	align-self: flex-start;
}

.mfr-card__more:hover,
.mfr-card__more:focus {
	color: #012e46;
}

a.mfr-card:hover .mfr-card__more--link {
	color: #012e46;
}

.mfr-card__photo {
	position: absolute;
	right: 0;
	bottom: 0;
	height: 100%;
	width: auto;
	max-width: 48%;
	object-fit: contain;
	object-position: right bottom;
	pointer-events: none;
	z-index: 1;
}

.mfr-card--gallery .mfr-card__photo {
	right: 2%;
	top: auto;
	height: 101%;
	max-width: 44%;
}

.mfr-card--design .mfr-card__photo {
	right: 2%;
	bottom: 0;
	height: 88%;
	max-width: 46%;
}

.mfr-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	margin-top: 16px;
	padding: 2px 9px 3px;
	border-radius: 9px;
	background: #f0ca6a;
	font-family: "Manrope", Arial, sans-serif;
	font-size: 9.5px;
	font-weight: 600;
	line-height: 13px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #022f47;
	align-self: flex-start;
}

.mfr-badge img {
	display: block;
	width: 9px;
	height: 8px;
}

.mfr-dots {
	display: none;
}

.mfr-modal {
	display: none;
	position: fixed;
	z-index: 100000;
	inset: 0;
	align-items: center;
	justify-content: center;
	padding: 24px 12px;
	box-sizing: border-box;
}

.mfr-modal.is-open {
	display: flex;
}

.mfr-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

.mfr-modal__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 796px;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	overflow: hidden;
	box-sizing: border-box;
	padding: 0;
	border-radius: 17px;
	background: #fff;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
	isolation: isolate;
}

.mfr-modal--wide .mfr-modal__dialog {
	max-width: 1200px;
}

.mfr-modal__scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	box-sizing: border-box;
	padding: 50px 50px 56px;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	touch-action: pan-y;
	scrollbar-width: thin;
	scrollbar-color: #c8c8c8 transparent;
	border-radius: 0 0 17px 17px;
}

.mfr-modal__scroll::-webkit-scrollbar {
	width: 8px;
}

.mfr-modal__scroll::-webkit-scrollbar-track {
	background: transparent;
	margin: 12px 0;
}

.mfr-modal__scroll::-webkit-scrollbar-thumb {
	background: #c8c8c8;
	border-radius: 4px;
}

.mfr-modal__close {
	position: absolute;
	top: 28px;
	right: 28px;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
}

.mfr-modal__close img {
	display: block;
	width: 11px;
	height: 9px;
}

.mfr-modal__head {
	margin: 0 0 20px;
	padding-right: 36px;
}

.mfr-modal__head--video {
	margin-top: 20px;
}

.mfr-modal__title {
	margin: 0;
	padding: 0;
	font-family: "HelveticaNeueCyr", Arial, sans-serif;
	font-size: 28px;
	line-height: 34px;
	font-weight: 700;
	color: #012e46;
}

.mfr-modal__line {
	display: block;
	width: 395px;
	max-width: 100%;
	height: 3px;
	margin-top: 12px;
	background: #d5ae48;
	border-radius: 1px;
}

.mfr-modal__line--wide {
	width: 628px;
	height: 5px;
}

.mfr-modal__lead {
	margin: 0 0 28px;
	font-family: "Inter", "HelveticaNeueCyr", Arial, sans-serif;
	font-size: 15px;
	line-height: 22px;
	font-weight: 400;
	color: #333;
}

.mfr-modal__row {
	display: flex;
	align-items: flex-start;
	gap: 40px;
	margin-bottom: 28px;
}

.mfr-modal__row--reverse {
	flex-direction: row-reverse;
}

.mfr-modal__img {
	display: block;
	width: 55%;
	max-width: 383px;
	height: auto;
	border-radius: 12px;
	object-fit: cover;
	flex-shrink: 0;
}

.mfr-modal__col {
	flex: 1 1 auto;
	min-width: 0;
}

.mfr-modal__subtitle {
	margin: 0 0 12px;
	font-family: "HelveticaNeueCyr", Arial, sans-serif;
	font-size: 22px;
	line-height: 28px;
	font-weight: 700;
	color: #000;
}

.mfr-modal__text {
	margin: 0 0 10px;
	font-family: "Inter", "HelveticaNeueCyr", Arial, sans-serif;
	font-size: 14px;
	line-height: 22px;
	font-weight: 400;
	color: #333;
}

.mfr-modal__link {
	display: inline-block;
	margin-top: 4px;
	font-family: "Inter", "HelveticaNeueCyr", Arial, sans-serif;
	font-size: 12px;
	line-height: 22px;
	font-weight: 400;
	color: #4a4a4a;
	text-decoration: underline;
	text-decoration-style: dotted;
	text-underline-offset: 3px;
}

.mfr-modal__link:hover {
	color: #012e46;
}

.mfr-team-list {
	display: none;
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
}

.mfr-team-list li {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 25px;
	padding: 0;
}

.mfr-team-list li:last-child {
	margin-bottom: 0;
}

.mfr-team-list__num {
	flex: 0 0 auto;
	min-width: 18px;
	font-family: "HelveticaNeueCyr", Arial, sans-serif;
	font-size: 22px;
	line-height: 26px;
	font-weight: 700;
	color: transparent;
	-webkit-text-stroke: 1.2px #012e46;
	paint-order: stroke fill;
}

.mfr-team-list__name {
	font-family: "HelveticaNeueCyr", Arial, sans-serif;
	font-size: 20px;
	line-height: 24px;
	font-weight: 700;
	color: #012e46;
}

.mfr-steps {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-template-rows: auto 20px auto;
	column-gap: 40px;
	row-gap: 28px;
	margin: 8px 0 36px;
	position: relative;
	overflow: visible;
}

/* шаги 1–4 */
.mfr-step:nth-child(-n+4) {
	grid-row: 1;
}

/*
 * Мост 4→5 (Figma 599:1365).
 * Path рисует JS по getBoundingClientRect фото 4 и 5 — одна непрерывная линия.
 */
.mfr-steps__bridge {
	grid-row: 2;
	grid-column: 1 / -1;
	position: relative;
	z-index: 2;
	pointer-events: none;
	height: 20px;
	opacity: 0;
	transition: opacity 0.15s ease;
	overflow: visible;
}

.mfr-steps__bridge.is-ready {
	opacity: 1;
}

.mfr-steps__bridge-svg {
	position: absolute;
	left: 0;
	top: 0;
	overflow: visible;
	pointer-events: none;
}

/* шаги 5–8 (после bridge — дети 6–9) */
.mfr-step:nth-child(n+6) {
	grid-row: 3;
}

.mfr-step {
	position: relative;
}

/* стрелки 1→2→3→4 и 5→6→7→8 */
.mfr-step:nth-child(-n+3)::after,
.mfr-step:nth-child(n+6):nth-child(-n+8)::after {
	content: "";
	position: absolute;
	top: 42px;
	right: -30px;
	width: 22px;
	height: 16px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='16' viewBox='0 0 22 16' fill='none'%3E%3Cpath d='M1 8h16M13 2.5L19.5 8 13 13.5' stroke='%23D5AE48' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	pointer-events: none;
	z-index: 3;
}

.mfr-step__media {
	position: relative;
	margin-bottom: 12px;
	border-radius: 10px;
	overflow: hidden;
	aspect-ratio: 222 / 118;
	background: #eee;
}

.mfr-step__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mfr-step__num {
	position: absolute;
	left: 6px;
	top: auto;
	bottom: -4px;
	transform: none;
	font-size: 72px;
	line-height: 1;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.92);
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	pointer-events: none;
	z-index: 1;
}

.mfr-step__title {
	margin: 0 0 6px;
	font-family: "HelveticaNeueCyr", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.2;
	font-weight: 700;
	color: #000;
}

.mfr-step__text {
	margin: 0;
	font-family: "Inter", "HelveticaNeueCyr", Arial, sans-serif;
	font-size: 12px;
	line-height: 1.35;
	font-weight: 400;
	color: #333;
}

.mfr-video {
	position: relative;
	width: 100%;
	border-radius: 12px;
	overflow: hidden;
	background: #1a1a1a;
	aspect-ratio: 16 / 9;
}

.mfr-video__frame {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 12px;
}

/* без position:fixed на body — иначе за оверлеем белая половина экрана */
html.mfr-modal-open,
html.mfr-modal-open body {
	overflow: hidden;
	overscroll-behavior: none;
	touch-action: none;
}

html.mfr-modal-open .mfr-modal.is-open,
html.mfr-modal-open .mfr-modal.is-open .mfr-modal__scroll {
	touch-action: pan-y;
}

@media (max-width: 1199px) {
	.mfr-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.mfr-card--sm {
		grid-column: span 1;
	}

	.mfr-card--gallery {
		grid-column: span 2;
	}

	.mfr-card--design {
		grid-column: span 2;
	}

	.mfr-modal__scroll {
		padding: 32px 24px;
	}

	.mfr-steps {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: none;
		gap: 28px 32px;
	}

	.mfr-step:nth-child(-n+4),
	.mfr-step:nth-child(n+6) {
		grid-row: auto;
	}

	.mfr-step::after,
	.mfr-steps__bridge {
		display: none;
	}
}

@media (max-width: 767px) {
	.mfr-section {
		margin: 0 0 48px;
		max-width: 100%;
		overflow-x: hidden;
	}

	.home-section-spacer {
		height: 48px;
	}

	.mfr-section__title {
		margin: 0 0 16px;
		padding: 0;
		font-family: "Inter", "HelveticaNeueCyr", Arial, sans-serif;
		font-size: 22px;
		line-height: 31px;
		font-weight: 700;
		color: #000;
	}

	.mfr-section__viewport {
		margin: 0;
		padding: 0;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		overscroll-behavior-x: contain;
	}

	.mfr-section__viewport::-webkit-scrollbar {
		display: none;
	}

	.mfr-grid {
		display: flex;
		flex-wrap: nowrap;
		gap: 12px;
		overflow: visible;
		width: 100%;
		min-width: 0;
		padding: 0 0 4px;
		row-gap: 12px;
		column-gap: 12px;
	}

	.mfr-card {
		flex: 0 0 calc(100% - 12px);
		width: calc(100% - 12px);
		max-width: none;
		min-height: 179px;
		scroll-snap-align: start;
		grid-column: auto;
		padding: 15px 19px;
		justify-content: flex-start;
		gap: 10px;
		box-sizing: border-box;
	}

	.mfr-card--gallery,
	.mfr-card--design {
		flex-direction: row;
		min-height: 179px;
		padding: 0;
		overflow: hidden;
		border: none;
	}

	.mfr-card__body {
		max-width: 72% !important;
		padding: 20px 16px 16px !important;
		min-height: 0 !important;
		gap: 10px;
	}

	.mfr-card--gallery .mfr-card__body,
	.mfr-card--design .mfr-card__body {
		max-width: 68% !important;
	}

	.mfr-card--gallery {
		background: linear-gradient(95deg, #a8b9b6 0%, #b8c6c3 28%, #d5dedc 62%, #eef2f1 100%);
	}

	.mfr-card--design {
		background: linear-gradient(95deg, #fada86 0%, #fce3a0 35%, #fff0c8 70%, #fffaf0 100%);
	}

	.mfr-card__photo {
		position: absolute;
		right: 4px;
		bottom: 0;
		width: auto;
		max-width: 36% !important;
		height: 55%;
		object-fit: contain;
		object-position: right bottom;
		margin: 0;
	}

	.mfr-card--gallery .mfr-card__photo {
		height: 58%;
		max-width: 34% !important;
	}

	.mfr-card__icon {
		margin: 0;
	}

	.mfr-card__title {
		font-size: 18px;
		line-height: 16px;
		margin: 0;
	}

	.mfr-card__text {
		font-size: 14px;
		line-height: 18px;
	}

	.mfr-card__more {
		margin-top: auto;
		padding-top: 0;
	}

	.mfr-dots {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		margin-top: 14px;
	}

	.mfr-dots__item {
		width: 6px;
		height: 6px;
		border-radius: 50%;
		background: #d0d0d0;
		border: 0;
		padding: 0;
		cursor: pointer;
	}

	.mfr-dots__item.is-active {
		width: 8px;
		height: 8px;
		background: #8a8a8a;
	}

	.mfr-modal {
		padding: 20px 10px;
		align-items: center;
		justify-content: center;
		overflow: hidden;
		box-sizing: border-box;
	}

	.mfr-modal__dialog {
		width: 100%;
		max-width: 100%;
		max-height: 100%;
		min-height: 0;
		flex: 0 1 auto;
		border-radius: 16px;
		padding: 0;
		box-sizing: border-box;
	}

	.mfr-modal__scroll {
		padding: 24px 16px 32px;
	}

	.mfr-modal__close {
		top: 18px;
		right: 12px;
	}

	.mfr-modal__head {
		text-align: center;
		padding-right: 28px;
		padding-left: 28px;
	}

	.mfr-modal__title {
		font-size: 22px;
		text-align: center;
	}

	.mfr-modal__line,
	.mfr-modal__line--wide {
		width: 100%;
		max-width: 360px;
		height: 3px;
		margin-left: auto;
		margin-right: auto;
	}

	.mfr-modal__row,
	.mfr-modal__row--reverse {
		flex-direction: column;
		gap: 16px;
	}

	.mfr-modal__row--reverse {
		flex-direction: column;
	}

	.mfr-modal__img {
		width: 100%;
		max-width: none;
		order: -1;
	}

	.mfr-modal__row--reverse .mfr-modal__img {
		order: -1;
	}

	.mfr-modal__subtitle {
		font-size: 20px;
		line-height: 1.25;
	}

	.mfr-steps {
		display: none;
	}

	.mfr-team-list {
		display: block;
		margin: 10px 0 32px;
	}

	.mfr-modal--wide .mfr-modal__dialog {
		max-width: 100%;
	}

	.mfr-video {
		aspect-ratio: 360 / 170;
	}
}