/* ─────────────────────────────────────────────────────────────────────────
   acf/article-header (effectory/refresh)
   Frontend styles.
   ───────────────────────────────────────────────────────────────────────── */

.rf-articleheader {
	position: relative;
	padding: clamp(3rem, 5vw, 5rem) 0 clamp(2.5rem, 6vw, 4rem);
	-webkit-font-smoothing: antialiased;
	max-width: 100% !important;
	border-radius: 0 0 80px 0;
}

.rf-articleheader *,
.rf-articleheader *::before,
.rf-articleheader *::after {
	box-sizing: border-box;
}

/* Atmospheric backdrop. Extended upward past the block's own top edge (and
 * left uncropped there) so it keeps bleeding up behind the nav — which goes
 * transparent for this block via body.has-articleheader-hero in
 * template-parts/header/menu.css — while the sides/bottom stay flush with
 * the block via clip-path (applied to this element's own, already-extended
 * box, so the top bleed itself is never clipped). */
.rf-articleheader::before {
	content: "";
	position: absolute;
	top: -200px;
	left: 0;
	right: 0px;
	bottom: 200px;
	border-radius: 0 0 80px 0;
	background: var(--wp--preset--gradient--atmosphere);
	clip-path: inset(0 0 0 0);
	z-index: 0;
	pointer-events: none;

}

/* ── Header row ──────────────────────────────────────────────────────────── */

.rf-articleheader__inner {
	position: relative;
	z-index: 1;
	max-width: var( --wp--style--global--wide-size, 1440px );
	margin: 0 auto;

	padding: 0 clamp(2.5rem, 4vw, 5rem);
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) minmax( 0, 38%);
	gap: clamp( 2rem, 5vw, 4rem );
	align-items: center;
}

.rf-articleheader__content {
	display: flex;
	flex-direction: column;
	gap: clamp(1rem, 4vw, 1.5rem);
}

.rf-articleheader__eyebrow {
	margin: 0;
	font-family: Poppins;
	font-size: clamp(1.125rem, 4vw, 1.25rem);
	font-weight: 600;
	color: rgba(128, 136, 152, 1);
}

.rf-articleheader__title {
	margin: 0;
	font-family: Poppins;
	font-size: clamp(1.75rem, 4vw, 3rem);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var( --wp--preset--color--dark );
}
@media (max-width:900px) {
	.rf-articleheader__title {
		line-height:1.4;
	}
}

.rf-articleheader__meta {
	margin: 0.5rem 0 0;
	display: grid;
	grid-template-columns: repeat( 3, auto );
	gap: 1.5rem 3rem;
}

.rf-articleheader__metaitem {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.rf-articleheader__metaitem dt {
	font-family: Poppins;
	font-size: 1rem;
	font-weight: 700;
	color: var( --wp--preset--color--dark );
}

.rf-articleheader__metaitem dd {
	margin: 0;
	font-size: 1rem;
	line-height: 1.4;
	color: var( --wp--preset--color--dark );
	opacity: 0.65;
}

/* ── Media ───────────────────────────────────────────────────────────────── */

.rf-articleheader__media {
	position: relative;
}

.rf-articleheader__image {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 1.5rem;
}

.rf-articleheader__logocard {
	position: absolute;
	right: 6%;
	bottom: 8%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border-radius: 0.75rem;
	padding: clamp( 0.6rem, 1.5vw, 1rem ) clamp( 1rem, 2.5vw, 1.5rem );
	box-shadow: 0 10px 30px rgba( 44, 57, 83, 0.15 );
}

.rf-articleheader__logocard img {
	display: block;
	height: clamp( 1.5rem, 2.5vw, 2.25rem );
	width: auto;
	max-width: 10rem;
	object-fit: contain;
}

/* ── Stats card ──────────────────────────────────────────────────────────── */

.rf-articleheader__statscard {
	max-width: calc(980px + (2 * clamp( 2.5rem, 4vw, 3rem )));
	margin: clamp( 2rem, 5vw, 3rem ) auto 0;
	padding: 2.5rem clamp( 2.5rem, 4vw, 3rem );

}
.rf-articleheader__statscard__inner {
	position: relative;
	z-index: 1;
	max-width: 100%;
	padding: 2.5rem clamp( 2.5rem, 4vw, 3rem );
	background: #fff;
	border-radius: 1.5rem;
	box-shadow: 0 20px 60px -20px rgba( 44, 57, 83, 0.18 );
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 2rem;
	border: solid 2px rgba(255, 255, 255, 0.5);
	background-clip: padding-box;

}

.rf-articleheader__stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	text-align: center;
	padding: 0 1rem;
}

.rf-articleheader__statvalue {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 0;
	font-family: Poppins;
	font-size: clamp( 1.5rem, 3vw, 2.5rem );
	font-weight: 700;
	color: var( --wp--preset--color--dark );
}

.rf-articleheader__staticon {
	height: auto;
	max-height:30px;
	display: block;
}

.rf-articleheader__statlabel {
	margin: 0;
	font-size: 1rem;
	line-height: 1.5;
	color: var( --wp--preset--color--dark );
	max-width: 22rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media ( max-width: 900px ) {
	.rf-articleheader__inner {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.rf-articleheader__meta {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.rf-articleheader__image {
		aspect-ratio: 3 / 2;
	}

	.rf-articleheader__statscard__inner {
		grid-template-columns: 1fr;
		gap: 2.5rem;
	}

	.rf-articleheader__stat {
		padding: 0;
	}

	.rf-articleheader__stat:not( :last-child ) {
		padding-bottom: 0rem;
	}

	/* Stacked layout: the backdrop must stop halfway down the image, whatever
	 * follows it (stats card etc.). __inner ends exactly at the media's bottom
	 * edge, so redraw the backdrop from there. The image is 3/2 at the inner's
	 * content width, so half its height is 100cqw / 3. */
	.rf-articleheader:has( .rf-articleheader__image )::before {
		content: none;
	}

	.rf-articleheader:has( .rf-articleheader__image ) .rf-articleheader__inner {
		container-type: inline-size;
	}

	.rf-articleheader:has( .rf-articleheader__image ) .rf-articleheader__inner::before {
		content: "";
		position: absolute;
		top: calc( -200px - clamp( 3rem, 5vw, 5rem ) );
		left: 0;
		right: 0;
		bottom: calc( 100cqw / 3 );
		border-radius: 0 0 80px 0;
		background: var( --wp--preset--gradient--atmosphere );
		z-index: -1;
		pointer-events: none;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.rf-articleheader * {
		animation: none !important;
		transition: none !important;
	}
}
