/*
 * Post Hero — shared editor + frontend styles.
 * Plain CSS — no Sass / Vite style entry.
 * Visual: Figma BLOG-POST Desktop — single (71:55) + dual (71:56 / 53:13).
 * Mobile: Figma BLOG-POST Mobile — Title Banner (2024:32); dual drops to one image.
 *
 * Single: full-height image | text on wheat (~830/1762 | remainder), banner max 879px.
 * Dual: two 502×753 portraits (55px gap, ~63px vertical inset) | text; secondary left, primary right.
 * Tall photos crop (object-fit: cover) at those heights so the hero cannot grow past the banner.
 * Mobile: full-bleed primary image (440/413) → centered category / title / meta on wheat.
 */

.lwt-post-hero {
	box-sizing: border-box;
	width: 100%;
	background-color: var(--wp--preset--color--wheat);
	color: var(--wp--preset--color--black);
	overflow: visible;
}

.lwt-post-hero *,
.lwt-post-hero *::before,
.lwt-post-hero *::after {
	box-sizing: border-box;
}

.lwt-post-hero__inner {
	display: grid;
	align-items: stretch;
	width: 100%;
	max-width: 110.125rem; /* 1762px wheat panel */
	min-height: 54.9375rem; /* 879px */
	margin-inline: auto;
}

/* ——— Single hero: image | text (71:55) ——— */
.lwt-post-hero--single .lwt-post-hero__inner {
	/* Image ~830 / panel 1762 ≈ 47% */
	grid-template-columns: minmax(0, 0.47fr) minmax(0, 0.53fr);
}

.lwt-post-hero--single .lwt-post-hero__media-row {
	display: block;
	align-self: start;
	width: 100%;
	/* Definite height so a portrait photo cannot stretch the banner. */
	height: 54.9375rem; /* 879px */
	max-height: 54.9375rem;
	min-height: 0;
	overflow: hidden;
}

.lwt-post-hero--single .lwt-post-hero__media--primary {
	height: 100%;
	max-height: 100%;
	min-height: 0;
}

.lwt-post-hero--single .lwt-post-hero__media--secondary {
	display: none;
}

.lwt-post-hero--single .lwt-post-hero__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	/* Title at x1064 with image ending ~832 → ~234px inset into text column */
	padding: 5rem clamp(1.5rem, 4vw, 4rem) 5rem clamp(2rem, 12vw, 14.625rem);
}

/* ——— Dual hero: image | image | text (71:56) ——— */
.lwt-post-hero--dual .lwt-post-hero__inner {
	grid-template-columns: minmax(0, 60%) minmax(0, 40%);
	gap: 0;
	padding: 0;
}

.lwt-post-hero--dual .lwt-post-hero__media-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 3.4375rem; /* 55px between portraits */
	align-content: center;
	/* ~63px vertical inset (images 753 within 879) */
	padding-block: 3.9375rem;
	/* Images overhang wheat panel left edge (~81px in Figma) */
	margin-left: clamp(-2rem, -3vw, -3.5rem);
	min-height: 100%;
}

.lwt-post-hero--dual .lwt-post-hero__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	/* Extra left padding only — keeps both portraits equal. */
	padding: 5rem clamp(1.5rem, 4vw, 3.5rem) 5rem clamp(2.5rem, 4vw, 4.5rem);
}

.lwt-post-hero__media {
	display: block;
	margin: 0;
	width: 100%;
	overflow: hidden;
	background-color: var(--wp--preset--color--taupe);
}

.lwt-post-hero--dual .lwt-post-hero__media {
	aspect-ratio: 502 / 753;
	width: 100%;
	height: auto;
	max-height: 47.0625rem; /* 753px — design portrait, then crop */
	min-height: 0;
	align-self: center;
}

.lwt-post-hero--single .lwt-post-hero__media {
	aspect-ratio: auto;
	height: 100%;
	max-height: 54.9375rem; /* 879px */
}

.lwt-post-hero__image,
.lwt-post-hero__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-height: 100%;
	object-fit: cover;
	object-position: center;
}

.lwt-post-hero__media-fallback {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 20rem;
	background-color: var(--wp--preset--color--taupe);
}

.lwt-post-hero__category {
	display: inline-flex;
	flex-direction: column;
	align-items: stretch;
	width: fit-content;
	max-width: 100%;
	gap: 0.55rem; /* ~9px text → underline */
	margin: 0;
	color: var(--wp--preset--color--black);
	font-family: var(--wp--preset--font-family--manrope);
	font-size: var(--wp--preset--font-size--heading-4);
	font-style: normal;
	font-weight: 500;
	letter-spacing: 0.13em;
	line-height: normal;
	text-transform: uppercase;
}

.lwt-post-hero__category a {
	color: inherit;
	text-decoration: none;
	transition: color var(--wp--custom--category-link--hover-duration) ease;
}

.lwt-post-hero__category a:hover,
.lwt-post-hero__category a:focus-visible {
	color: var(--wp--custom--category-link--hover-color);
}

.lwt-post-hero__category-underline {
	display: block;
	width: 100%;
	height: 3px;
	margin: 0;
	border: 0;
	background-color: #7fa6af;
}

.lwt-post-hero__title {
	margin: 4.75rem 0 0; /* ~76px after category underline */
	max-width: 26.9375rem; /* ~431px title column */
	color: var(--wp--preset--color--black);
	font-family: var(--wp--preset--font-family--editors-note);
	font-size: var(--wp--preset--font-size--heading-1);
	font-style: normal;
	font-weight: 200;
	letter-spacing: 0;
	line-height: 1.35;
	font-synthesis: none;
}

.lwt-post-hero__meta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.5rem;
	margin-top: 5rem; /* ~80px after title */
}

.lwt-post-hero__byline,
.lwt-post-hero__date {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.65rem 1rem;
	margin: 0;
	color: var(--wp--preset--color--black);
	font-family: var(--wp--preset--font-family--manrope);
	font-size: var(--wp--preset--font-size--heading-4);
	font-weight: 500;
	letter-spacing: 0.13em;
	line-height: normal;
	text-transform: uppercase;
}

.lwt-post-hero__author {
	display: inline-block;
	font-family: var(--wp--preset--font-family--september-spirit-all-caps);
	font-size: var(--wp--preset--font-size--heading-6);
	font-weight: 400;
	letter-spacing: 0;
	line-height: 0.93;
	text-transform: none;
	transform: rotate(-0.74deg);
	transform-origin: left center;
}

.lwt-post-hero__date time {
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
}

.lwt-post-hero-editor__empty {
	margin: 0;
	padding: var(--wp--preset--spacing--47);
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--body);
}

@media (max-width: 1100px) {
	.lwt-post-hero__inner {
		min-height: 0;
	}

	.lwt-post-hero--single .lwt-post-hero__media-row,
	.lwt-post-hero--single .lwt-post-hero__media,
	.lwt-post-hero--single .lwt-post-hero__media--primary,
	.lwt-post-hero--single .lwt-post-hero__media img {
		height: auto;
		max-height: 54.9375rem; /* Still crop, but don’t force the desktop banner. */
	}

	.lwt-post-hero--single .lwt-post-hero__body {
		padding: var(--wp--preset--spacing--80) var(--wp--preset--spacing--47);
	}

	.lwt-post-hero--dual .lwt-post-hero__media-row {
		margin-left: 0;
		padding-block: var(--wp--preset--spacing--47);
		gap: var(--wp--preset--spacing--30);
		padding-inline: var(--wp--preset--spacing--20) 0;
	}

	.lwt-post-hero--dual .lwt-post-hero__body {
		padding: var(--wp--preset--spacing--47) var(--wp--preset--spacing--47)
			var(--wp--preset--spacing--47) var(--wp--preset--spacing--30);
	}

	.lwt-post-hero__title {
		line-height: 1.25;
	}
}

/*
 * Mobile — Figma BLOG-POST Mobile / Title Banner (2024:32).
 * Full-bleed single image → centered wheat text. Dual heroes drop the
 * secondary portrait and reuse the same single-image stack.
 */
@media (max-width: 781px) {
	.lwt-post-hero__inner,
	.lwt-post-hero--single .lwt-post-hero__inner,
	.lwt-post-hero--dual .lwt-post-hero__inner {
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
		padding: 0;
	}

	.lwt-post-hero--single .lwt-post-hero__media-row,
	.lwt-post-hero--dual .lwt-post-hero__media-row {
		display: block;
		grid-template-columns: none;
		gap: 0;
		margin: 0;
		padding: 0;
		height: auto;
		max-height: none;
		min-height: 0;
	}

	/* Dual → one: hide secondary featured image. */
	.lwt-post-hero--dual .lwt-post-hero__media--secondary {
		display: none;
	}

	.lwt-post-hero--single .lwt-post-hero__media--primary,
	.lwt-post-hero--dual .lwt-post-hero__media,
	.lwt-post-hero--dual .lwt-post-hero__media--primary {
		width: 100%;
		height: auto;
		max-height: none;
		aspect-ratio: 440 / 413; /* Figma Feature Image */
		min-height: 0;
		align-self: stretch;
	}

	.lwt-post-hero--single .lwt-post-hero__media img,
	.lwt-post-hero--dual .lwt-post-hero__media img {
		height: 100%;
		max-height: none;
	}

	.lwt-post-hero--single .lwt-post-hero__body,
	.lwt-post-hero--dual .lwt-post-hero__body {
		align-items: center;
		padding: 3.0625rem 1.3125rem 3.375rem;
		text-align: center;
	}

	.lwt-post-hero__category {
		align-items: center;
		gap: 0.625rem; /* 10px text → underline (594→622) */
		font-size: 0.8125rem; /* 13px */
		letter-spacing: 0.13em;
	}

	.lwt-post-hero__category-underline {
		height: 2px;
	}

	.lwt-post-hero__title {
		max-width: 20.9375rem; /* 335px */
		margin-top: 2.375rem; /* ~38px after underline */
		margin-inline: auto;
		font-size: 2.5rem; /* 40px */
		line-height: 55px;
		text-align: center;
	}

	.lwt-post-hero__meta {
		align-items: center;
		gap: 0.75rem; /* ~12px byline → date */
		margin-top: 3.0625rem; /* ~49px after title */
	}

	.lwt-post-hero__byline,
	.lwt-post-hero__date {
		justify-content: center;
		gap: 0.5rem 0.75rem;
		font-size: 0.625rem; /* 10px */
		letter-spacing: 0.13em;
	}

	.lwt-post-hero__author {
		font-size: 2.0289rem; /* ~32.5px */
		line-height: 1.875rem; /* ~30px */
	}
}
