/**
 * TwoImageHighlight: мобильный — текст сверху, два фото в ряд; от 500px — текст слева, фото справа.
 * Десктоп: текст слева (flex-grow), блок фото по ширине картинок, прижат вправо (padding-right 30px у .inner).
 */

.stomarus-two-image-highlight {
	--stomarus-two-image-bg: #b7a68b;
	--stomarus-two-image-pad: clamp(20px, 4vw, 48px);
	--stomarus-two-image-gap: clamp(16px, 3vw, 32px);
	/* Между текстом и блоком фото (десктоп) */
	--stomarus-two-image-inner-gap: 30px;
	/* Между двумя картинками — отдельно, уже */
	--stomarus-two-image-media-gap: clamp(12px, 2vw, 20px);
	width: 100%;
	box-sizing: border-box;
	background: var(--stomarus-two-image-bg);
	color: #fff;
}

.stomarus-two-image-highlight__inner {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: var(--stomarus-two-image-gap);
	padding: 12px;
	box-sizing: border-box;
	max-width: 100%;
}

.stomarus-two-image-highlight__content {
	flex: 1 1 auto;
	min-width: 0;
}

.stomarus-two-image-highlight__text {
	margin: 0;
	font-family: 'Roboto', 'Arial', sans-serif;
	font-weight: 400;
	line-height: 1.5;
	color: #fff;
}

.stomarus-two-image-highlight__text h1,
.stomarus-two-image-highlight__text h2,
.stomarus-two-image-highlight__text h3 {
	margin: 0 0 0.5em;
	font-family: inherit;
	font-weight: 700;
	color: #fff;
}

.stomarus-two-image-highlight__text h1:last-child,
.stomarus-two-image-highlight__text h2:last-child,
.stomarus-two-image-highlight__text h3:last-child {
	margin-bottom: 0;
}

.stomarus-two-image-highlight__text p {
	margin: 0 0 0.75em;
}

.stomarus-two-image-highlight__text p:last-child {
	margin-bottom: 0;
}

.stomarus-two-image-highlight__media {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: flex-end;
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	gap: var(--stomarus-two-image-media-gap);
	align-self: flex-end;
}

.stomarus-two-image-highlight__figure {
	margin: 0;
	padding: 0;
	overflow: hidden;
	line-height: 0;
	background: transparent;
	min-width: 0;
	display: block;
}

/* Мобилка: две равные колонки, img на всю ширину колонки — высота от пропорций исходника, не обрезка на ~240px от узкой max-content */
@media (max-width: 499px) {
	.stomarus-two-image-highlight__figure {
		flex: 1 1 0;
		width: auto;
		max-width: none;
	}

	.stomarus-two-image-highlight__img {
		width: 100%;
		height: auto;
		max-width: none;
		object-fit: cover;
	}
}

/* Десктоп: фигура по ширине картинки, фиксированная высота img */
@media (min-width: 500px) {
	.stomarus-two-image-highlight__inner {
		flex-direction: row;
		align-items: stretch;
		gap: var(--stomarus-two-image-inner-gap);
		padding-top: 0;
		padding-bottom: 0;
		padding-left: var(--stomarus-two-image-pad);
		padding-right: 30px;
	}

	.stomarus-two-image-highlight__content {
		flex: 1 1 0;
		min-width: 0;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}

	.stomarus-two-image-highlight__media {
		flex: 0 0 auto;
		margin-left: auto;
		width: auto;
		max-width: 48%;
		align-self: stretch;
	}

	.stomarus-two-image-highlight__figure {
		flex: 0 0 auto;
		width: max-content;
		max-width: calc((100% - var(--stomarus-two-image-media-gap)) / 2);
	}

	.stomarus-two-image-highlight__img {
		width: auto;
		max-width: 100%;
		height: 160px;
		min-height: 160px;
		object-fit: cover;
	}
}
