/* Страница «О компании»: текст-картинка → сетка фото «Наша продукция это» → заголовок + картинка-текст. */

.lf-about {
	display: flex;
	flex-direction: column;
	gap: clamp(48px, 7vw, 96px);
	margin: 0;
	padding: 0 0 clamp(32px, 6vw, 72px);
	font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #0a0a0a;
}

.lf-about-empty {
	margin: 24px 0;
	padding: 16px 20px;
	background: #fff7ed;
	border: 1px solid #fed7aa;
	border-radius: 8px;
	color: #9a3412;
	font-size: 15px;
}

.lf-about-empty code {
	padding: 1px 6px;
	background: #fde68a;
	border-radius: 4px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 13px;
	color: #78350f;
}

/* ───── Блоки «текст + картинка» (блоки 1 и 3) ───── */

.lf-about-row {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: clamp(20px, 2.4vw, 32px);
}

.lf-about-row__heading {
	margin: 0;
	font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-synthesis: none;
	font-weight: 400;
	font-size: clamp(1.5rem, 2.4vw, 2rem);
	line-height: 1.2;
	color: #0a0a0a;
	text-align: left;
}

.lf-about-row__inner {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: clamp(20px, 2.4vw, 32px);
	align-items: stretch;
}

/* Блок 1: текст слева, картинка справа — текст шире картинки */
.lf-about-row--text-image {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	gap: clamp(20px, 2.4vw, 32px);
	align-items: stretch;
}

/* Блок 3: картинка слева, текст справа (после заголовка) */
.lf-about-row--image-text .lf-about-row__inner > .lf-about-row__image {
	order: 0;
}

.lf-about-row--image-text .lf-about-row__inner > .lf-about-row__text {
	order: 1;
}

.lf-about-row__text {
	font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-weight: 400;
	font-size: 18px;
	line-height: 1.5;
	color: #0a0a0a;
}

.lf-about-row__text p {
	margin: 0 0 16px;
}

.lf-about-row__text p:last-child {
	margin-bottom: 0;
}

.lf-about-row__image {
	position: relative;
	min-height: clamp(220px, 22vw, 340px);
	border-radius: 16px;
	overflow: hidden;
	background-color: #0f172a;
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(20px, 3vw, 40px);
	box-sizing: border-box;
	isolation: isolate;
}

.lf-about-row__image::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background: rgba(0, 0, 0, 0.37);
}

.lf-about-row__image-title {
	position: relative;
	z-index: 1;
	margin: 0;
	max-width: 100%;
	font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-synthesis: none;
	font-weight: 400;
	font-size: 32px;
	line-height: 1.2;
	color: #fff;
	text-align: center;
	text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
	overflow-wrap: anywhere;
	text-wrap: balance;
}

.lf-about-row__image-title p {
	margin: 0 0 0.5em;
}

.lf-about-row__image-title p:last-child {
	margin-bottom: 0;
}

/* ───── Сетка «Наша продукция это» ───── */

.lf-about-products {
	width: 100%;
}

.lf-about-products__heading {
	margin: 0 0 clamp(20px, 2.4vw, 32px);
	font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-synthesis: none;
	font-weight: 400;
	font-size: clamp(1.5rem, 2.4vw, 2rem);
	line-height: 1.2;
	color: #0a0a0a;
	text-align: left;
}

.lf-about-products__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-template-rows: minmax(300px, 1fr) minmax(300px, 1fr);
	gap: clamp(12px, 1.2vw, 18px);
}

.lf-about-products__item {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	background-color: #0f172a;
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	box-sizing: border-box;
	min-height: 220px;
	color: #fff;
	isolation: isolate;
}

/* Лёгкое базовое затемнение картинки #000000 15% — лежит между bg-image и градиентным overlay */
.lf-about-products__item::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background: rgba(0, 0, 0, 0.15);
	pointer-events: none;
}

.lf-about-products__item--featured {
	grid-row: 1 / span 2;
}

.lf-about-products__overlay {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
}

/* У большого фото градиент темнее в нижней части (80% против 70% у малых) */
.lf-about-products__item--featured .lf-about-products__overlay {
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.lf-about-products__caption {
	position: absolute;
	inset: 0;
	z-index: 1;
	padding: clamp(20px, 2.4vw, 36px);
	box-sizing: border-box;
	text-align: center;
}

.lf-about-products__title {
	position: absolute;
	top: 50%;
	left: clamp(20px, 2.4vw, 36px);
	right: clamp(20px, 2.4vw, 36px);
	transform: translateY(-50%);
	margin: 0;
	font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-synthesis: none;
	font-weight: 400;
	font-size: 32px;
	line-height: 1.15;
	color: #fff;
	text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
	overflow-wrap: anywhere;
	text-wrap: balance;
}

.lf-about-products__text {
	position: absolute;
	top: calc(50% + 36.4px); /* 18.4px (пол-высоты строки 32×1.15) + 18px gap */
	left: clamp(20px, 2.4vw, 36px);
	right: clamp(20px, 2.4vw, 36px);
	margin: 0;
	font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-weight: 400;
	font-size: 18px;
	line-height: 1.3;
	color: #fff;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
	overflow-wrap: anywhere;
	text-wrap: balance;
}

/* Featured: title в нижней четверти плитки. */
.lf-about-products__item--featured .lf-about-products__title {
	top: 75%;
}

.lf-about-products__item--featured .lf-about-products__text {
	top: calc(75% + 36.4px);
}

/* ───────── Адаптив ───────── */

/* Большие планшеты / маленькие десктопы — слегка ужимаем шрифты + блоки текст-картинка
 * становятся вертикальным стеком (картинка над текстом), чтобы картинка не зажималась
 * в узкую вертикальную полоску. */
@media (max-width: 1199px) {
	.lf-about-row__image-title {
		font-size: 28px;
	}

	.lf-about-products__title {
		font-size: 28px;
	}

	.lf-about-products__text {
		font-size: 16px;
		top: calc(50% + 34.1px); /* 28 × 1.15 / 2 + 18 */
	}

	.lf-about-products__item--featured .lf-about-products__text {
		top: calc(75% + 34.1px);
	}

	/* Блоки 1 и 3 — в одну колонку, картинка сверху, текст снизу */
	.lf-about-row--text-image,
	.lf-about-row__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.lf-about-row--text-image > .lf-about-row__text {
		order: 1;
	}

	.lf-about-row--text-image > .lf-about-row__image {
		order: 0;
	}

	.lf-about-row--image-text .lf-about-row__inner > .lf-about-row__image {
		order: 0;
	}

	.lf-about-row--image-text .lf-about-row__inner > .lf-about-row__text {
		order: 1;
	}

	/* Картинка теперь во всю ширину — даём ей больше высоты, чтобы не была плоской */
	.lf-about-row__image {
		min-height: clamp(280px, 32vw, 420px);
	}
}

/* Планшеты: блоки текст-картинка остаются в 2 колонки, но шрифты ещё ужимаем; сетка фото — 2 колонки, featured на всю ширину */
@media (max-width: 991px) {
	.lf-about-row__image-title {
		font-size: 24px;
	}

	.lf-about-products__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: minmax(280px, auto);
	}

	.lf-about-products__item--featured {
		grid-row: auto;
		grid-column: 1 / -1;
		min-height: 360px;
	}

	/* Featured теряет «вертикальную башню» — title возвращается в центр */
	.lf-about-products__item--featured .lf-about-products__title {
		top: 50%;
	}

	.lf-about-products__item--featured .lf-about-products__text {
		top: calc(50% + 32.95px); /* 26 × 1.15 / 2 + 18 */
	}

	.lf-about-products__title {
		font-size: 26px;
	}

	.lf-about-products__text {
		font-size: 14px;
		top: calc(50% + 32.95px); /* 26 × 1.15 / 2 + 18 */
	}
}

/* Мобильные: всё в одну колонку, картинки сверху, тексты снизу */
@media (max-width: 767px) {
	.lf-about {
		gap: clamp(32px, 8vw, 56px);
	}

	.lf-about-row--text-image,
	.lf-about-row__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Блок 1: на мобильных картинка над текстом */
	.lf-about-row--text-image > .lf-about-row__text {
		order: 1;
	}

	.lf-about-row--text-image > .lf-about-row__image {
		order: 0;
	}

	/* Блок 3: картинка над текстом */
	.lf-about-row--image-text .lf-about-row__inner > .lf-about-row__image {
		order: 0;
	}

	.lf-about-row--image-text .lf-about-row__inner > .lf-about-row__text {
		order: 1;
	}

	.lf-about-row__text {
		font-size: 16px;
	}

	.lf-about-row__image {
		min-height: clamp(220px, 50vw, 320px);
		border-radius: 12px;
	}

	.lf-about-row__image-title {
		font-size: 22px;
	}

	.lf-about-row__heading,
	.lf-about-products__heading {
		font-size: clamp(1.375rem, 5vw, 1.75rem);
	}

	.lf-about-products__grid {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto;
	}

	.lf-about-products__item,
	.lf-about-products__item--featured {
		grid-row: auto;
		grid-column: auto;
		min-height: clamp(220px, 50vw, 280px);
		border-radius: 12px;
	}

	/* На мобилке featured тоже без «башни» — заголовок по центру плитки */
	.lf-about-products__item .lf-about-products__caption,
	.lf-about-products__item--featured .lf-about-products__caption {
		padding: clamp(28px, 4vw, 40px);
	}

	.lf-about-products__item--featured .lf-about-products__title {
		top: 50%;
	}

	.lf-about-products__item--featured .lf-about-products__text {
		top: calc(50% + 30.65px); /* 22 × 1.15 / 2 + 18 */
	}

	.lf-about-products__title {
		font-size: 22px;
	}

	.lf-about-products__text {
		font-size: 13px;
		top: calc(50% + 30.65px); /* 22 × 1.15 / 2 + 18 */
	}
}

@media (max-width: 479px) {
	.lf-about-row__image-title {
		font-size: 20px;
	}

	.lf-about-products__title {
		font-size: 20px;
	}

	.lf-about-products__text {
		font-size: 12px;
		top: calc(50% + 29.5px); /* 20 × 1.15 / 2 + 18 */
	}

	.lf-about-products__item--featured .lf-about-products__text {
		top: calc(50% + 29.5px);
	}
}
