/**
 * ACF block: Промо матеріалу (acf/promo-material).
 *
 * Type 1 — image left (desktop) / top (mobile); thin gray category label;
 *          "читати повністю" button on mobile only. 7px pink left strip on
 *          desktop, 6px on mobile; 1px pink border, 10px radius.
 * Type 2 — image right (desktop) / bottom (mobile); pink label. Desktop: only a
 *          6px pink left strip. Mobile: 1px pink border, 6px left strip, 8px radius.
 *
 * Mobile-first; the min-width:768px block is the desktop layout.
 */

.promo-material {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

/* Whole-card link overlay (title/label/button stay non-interactive). */
.promo-material__link {
	position: absolute;
	inset: 0;
	z-index: 2;
}

.promo-material__media {
	overflow: hidden;
}

.promo-material__image {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
}

.promo-material__content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	background: #f3f3f3b2;
}

.promo-material__extra {
	font-family: var(--font-family);
	font-weight: var(--font-weight-regular);
	line-height: 1.3;
}

.promo-material__title {
	margin: 0;
	font-family: var(--font-family-display);
	font-weight: var(--font-weight-medium);
	font-size: 16px;
	line-height: 1.25;
	color: var(--color-black);
}

/* "читати повністю" — Type 1, mobile only (hidden elsewhere). */
.promo-material__btn {
	display: none;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 26px;
	margin-top: 25px;
	padding: 4px 20px;
	border-radius: var(--radius-pill);
	background: var(--color-pink);
	color: var(--color-white);
	font-size: 15px;
	font-weight: var(--font-weight-medium);
	line-height: 1;
	text-transform: lowercase;
}

.promo-material__placeholder {
	margin: 0;
	color: var(--color-gray-text);
}

/* ---------------------------------------------------------------- Type 1 */
.promo-material--type-1 {
	border: 1px solid var(--color-pink);
	border-left-width: 6px;
	border-radius: 10px;
}

.promo-material--type-1 .promo-material__content {
	padding: 15px 15px 25px;
}

.promo-material--type-1 .promo-material__extra {
	margin-bottom: 12px;
	font-size: 12px;
	color: #686868;
}

.promo-material--type-1 .promo-material__btn {
	display: flex;
}

/* ---------------------------------------------------------------- Type 2 */
.promo-material--type-2 {
	flex-direction: column-reverse;
	border: 1px solid var(--color-pink);
	border-left-width: 6px;
	border-radius: 8px;
}

.promo-material--type-2 .promo-material__content {
	padding: 18px 20px 15px;
}

.promo-material--type-2 .promo-material__extra {
	margin-bottom: 10px;
	font-size: 16px;
	color: var(--color-pink);
}

/* --------------------------------------------------------------- Desktop */
@media (min-width: 768px) {
	.promo-material {
		flex-direction: row;
		align-items: stretch;
	}

	/* Media absolutely fills its 300px column so the image height follows the
	   content height (object-fit: cover crops) instead of dictating it. */
	.promo-material__media {
		position: relative;
		flex: 0 0 300px;
		width: 300px;
	}

	.promo-material__image {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
	}

	.promo-material__content {
		flex: 1;
		min-width: 0;
	}

	/* Type-specific selectors so these win over the mobile paddings/margins
	   above (media queries don't add specificity). */
	.promo-material--type-1 .promo-material__content,
	.promo-material--type-2 .promo-material__content {
		padding: 18px 40px 40px;
	}

	.promo-material--type-1 .promo-material__extra,
	.promo-material--type-2 .promo-material__extra {
		margin-bottom: 30px;
	}

	/* Type 1 — image left, thicker 7px pink strip, no button. */
	.promo-material--type-1 {
		border-left-width: 7px;
		border-radius: 10px;
	}

	.promo-material--type-1 .promo-material__btn {
		display: none;
	}

	/* Type 2 — image right; only a 6px pink left strip (no full border/radius). */
	.promo-material--type-2 {
		flex-direction: row-reverse;
		border: 0;
		border-left: 6px solid var(--color-pink);
		border-radius: 0;
	}
}
