/*--------------------------------------------------------------
# DL Hero widget (side card / featured card / side card)
--------------------------------------------------------------*/
.dlh {
	--dlh-gap: 30px;
	--dlh-feature: 2.1fr;
	--dlh-radius: var(--image_radius-top, 12px);
	--dlh-overlay: 0.82;
	--dlh-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, var(--dlh-feature)) minmax(0, 1fr);
	gap: var(--dlh-gap);
	align-items: stretch;
}

.dlh-col {
	display: flex;
	flex-direction: column;
	gap: var(--dlh-gap);
	min-width: 0;
}

.dlh .entry-title,
.dlh .entry-meta,
.dlh .entry-excerpt {
	margin: 0;
}

.dlh .entry-title {
	text-wrap: balance;
}

.dlh .text-center .entry-meta {
	justify-content: center;
}

/* Side card */
.dlh-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.dlh-card__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: var(--dlh-radius);
	background-color: rgba(23, 30, 46, 0.06);
	isolation: isolate;
}

.dlh-card__media img {
	display: block;
	width: 100%;
	height: 100% !important;
	margin: 0;
	object-fit: cover;
	transition: transform 0.7s var(--dlh-ease);
}

.dlh-card:hover .dlh-card__media img {
	transform: scale(1.045);
}

.dlh-card__body {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding-top: 22px;
}

.dlh-card .dlh-excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	overflow: hidden;
	line-height: 1.7;
	color: var(--light-text-color-rgba, #666);
}

.dlh-card .dlh-meta {
	margin-top: 2px;
}

/* Featured card */
.dlh-feature {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-width: 0;
	min-height: 560px;
	overflow: hidden;
	border-radius: var(--dlh-radius);
	background-color: #171e2e;
	color: #fff;
	isolation: isolate;
}

.dlh-feature__media {
	position: absolute;
	inset: 0;
	z-index: -2;
}

.dlh-feature__media img {
	display: block;
	width: 100%;
	height: 100% !important;
	margin: 0;
	object-fit: cover;
	transition: transform 0.9s var(--dlh-ease);
}

.dlh-feature:hover .dlh-feature__media img {
	transform: scale(1.035);
}

.dlh-feature::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, var(--dlh-overlay)) 0%,
		rgba(0, 0, 0, calc(var(--dlh-overlay) * 0.55)) 32%,
		rgba(0, 0, 0, 0) 62%
	);
	pointer-events: none;
}

.dlh-feature__body {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: clamp(24px, 3.2vw, 48px);
}

.dlh-feature .entry-title {
	max-width: 22ch;
	text-shadow: 0 1px 18px rgba(0, 0, 0, 0.25);
}

.dlh-feature .entry-title a {
	color: #fff;
}

/* Whole featured card is clickable; inner links stay on top. */
.dlh-feature__link::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}

.dlh-feature .dlh-cat,
.dlh-feature .dlh-meta,
.dlh-feature .dlh-excerpt {
	position: relative;
	z-index: 2;
}

.dlh-feature .dlh-excerpt {
	max-width: 52ch;
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.88);
}

.dlh-feature .dlh-excerpt a[href]:hover,
.dlh-feature .dlh-excerpt a[href]:focus-visible {
	color: #fff;
	text-decoration-color: #fff;
}

.dlh-feature .dlh-meta,
.dlh-feature .dlh-meta a {
	color: rgba(255, 255, 255, 0.92);
}

.dlh-feature:has(.dlh-feature__link:focus-visible) {
	outline: 2px solid var(--color-accent, #fc3c68);
	outline-offset: 3px;
}

.dlh-feature__link:focus-visible {
	outline: none;
}

.dlh-empty {
	padding: 40px 20px;
	border: 1px dashed rgba(23, 30, 46, 0.25);
	border-radius: var(--image_radius-top, 12px);
	text-align: center;
}

/* Tablet: featured on top, side cards side by side below */
@media (max-width: 1024px) {
	.dlh {
		--dlh-gap: 24px;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.dlh-feature {
		grid-column: 1 / -1;
		grid-row: 1;
		min-height: 460px;
	}
}

/* Mobile: single column */
@media (max-width: 767px) {
	.dlh {
		--dlh-gap: 28px;
		grid-template-columns: minmax(0, 1fr);
	}

	.dlh-feature {
		min-height: 420px;
	}

	.dlh-card__body {
		padding-top: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dlh-card__media img,
	.dlh-feature__media img {
		transition: none;
	}

	.dlh-card:hover .dlh-card__media img,
	.dlh-feature:hover .dlh-feature__media img {
		transform: none;
	}
}
