/**
 * [newsroom_story] card
 * Brand: dark blue #012169, blue #0065ac, yellow #f2bb43. Fonts come from the Typekit kit in new/style.css.
 *
 * Accessibility notes (WCAG 2.1 / 2.2 AA):
 * - All text ≥ 4.5:1 contrast (lowest: eyebrow #0065ac on white = 6.1:1).
 * - Focus ring is two-tone (dark blue + yellow) so it is ≥ 3:1 on white, grey AND dark-blue page backgrounds (1.4.11, 2.4.7).
 * - The button is the card's single real link; it is stretched over the card so the whole card is a large target (2.5.8).
 * - Selectors are scoped under .newsroom-story so theme rules like `main h2 a` / `main p a` can't override them.
 * - Respects prefers-reduced-motion and Windows High Contrast / forced-colors mode.
 */

.newsroom-story {
	position: relative; /* anchors the stretched link */
	display: grid;
	grid-template-columns: 1fr;
	margin: 2.5rem 0;
	background: #ffffff;
	border: 1px solid transparent; /* becomes a visible border in forced-colors mode */
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(1, 33, 105, 0.08), 0 8px 24px rgba(1, 33, 105, 0.12);
	transition: box-shadow 0.25s ease, transform 0.25s ease;
	isolation: isolate;
	scroll-margin: 8rem 0; /* keep the focused card clear of a sticky header (2.4.11) */
}

.newsroom-story:hover {
	box-shadow: 0 2px 4px rgba(1, 33, 105, 0.1), 0 16px 40px rgba(1, 33, 105, 0.2);
	transform: translateY(-3px);
}

/* ---------- Featured image, anchored to its side of the card ---------- */

.newsroom-story__media {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #012169;
	overflow: hidden;
}

.newsroom-story__media::after {
	/* Yellow brand bar along the image's inner edge (decorative) */
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 6px;
	background: #f2bb43;
}

.newsroom-story__media img.newsroom-story__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	object-position: center 30%;
	transition: transform 0.6s ease;
}

.newsroom-story:hover .newsroom-story__img,
.newsroom-story:focus-within .newsroom-story__img {
	transform: scale(1.04);
}

/* ---------- Copy ---------- */

.newsroom-story__body {
	/* Deliberately NOT position:relative — the stretched link must measure from the whole card. */
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 1.75rem 1.5rem 2rem;
	background: #ffffff;
}

.newsroom-story .newsroom-story__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 0.75rem;
	padding: 0;
	font-family: myriad-pro-condensed, sans-serif;
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 1.2;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #0065ac;
}

.newsroom-story .newsroom-story__eyebrow::before {
	content: "";
	flex: none;
	width: 28px;
	height: 3px;
	background: #f2bb43;
}

.newsroom-story .newsroom-story__title {
	margin: 0 0 0.5rem;
	padding: 0;
	font-family: myriad-pro-condensed, sans-serif;
	font-weight: 700;
	font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem);
	line-height: 1.08;
	letter-spacing: normal;
	text-transform: none;
	overflow-wrap: break-word;
	color: #012169;
}

.newsroom-story .newsroom-story__meta {
	margin: 0 0 1rem;
	padding: 0;
	font-family: myriad-pro, sans-serif;
	font-size: 0.95rem;
	line-height: 1.4;
	color: #4a5268;
}

.newsroom-story .newsroom-story__sep {
	margin: 0 0.4rem;
	color: #f2bb43;
}

.newsroom-story .newsroom-story__excerpt {
	margin: 0 0 1.5rem;
	padding: 0;
	font-family: myriad-pro, sans-serif;
	font-size: 1.125rem;
	line-height: 1.55;
	color: #252c41;
}

/* ---------- The link (styled as a button, stretched over the whole card) ---------- */

.newsroom-story a.newsroom-story__cta,
.newsroom-story a.newsroom-story__cta:link,
.newsroom-story a.newsroom-story__cta:visited {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 44px;
	max-width: 100%;
	overflow-wrap: anywhere; /* never spill out of narrow columns, even with user text-spacing (1.4.10 / 1.4.12) */
	padding: 0.75rem 1.4rem;
	border: 2px solid transparent; /* visible in forced-colors mode */
	border-radius: 3px;
	background: #012169;
	color: #ffffff;
	font-family: myriad-pro-condensed, sans-serif;
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.2;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

/* The invisible layer that makes the whole card clickable */
.newsroom-story a.newsroom-story__cta::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.newsroom-story .newsroom-story__arrow {
	font-size: 1.15em;
	line-height: 1;
	transition: transform 0.2s ease;
}

.newsroom-story:hover a.newsroom-story__cta,
.newsroom-story a.newsroom-story__cta:hover,
.newsroom-story a.newsroom-story__cta:focus {
	background: #f2bb43;
	color: #012169;
	text-decoration: none;
}

.newsroom-story:hover .newsroom-story__arrow,
.newsroom-story:focus-within .newsroom-story__arrow {
	transform: translateX(4px);
}

/* Visually hidden, still read by screen readers and matched by voice control */
.newsroom-story .newsroom-story__sr {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ---------- Tablet & up: image anchored to one side, full card height ---------- */

@media only screen and (min-width: 768px) {
	.newsroom-story {
		grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
		min-height: 340px;
	}

	.newsroom-story__media {
		aspect-ratio: auto;
		min-height: 100%;
	}

	.newsroom-story__media::after {
		left: auto;
		top: 0;
		width: 6px;
		height: auto;
	}

	.newsroom-story__body {
		padding: 2.5rem 2.75rem;
	}

	/* image="right" */
	.newsroom-story--image-right {
		grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
	}

	.newsroom-story--image-right .newsroom-story__media {
		order: 2;
	}

	.newsroom-story--image-right .newsroom-story__media::after {
		right: auto;
		left: 0;
	}
}

/* ---------- layout="compact" ---------- */
/* Same card, image still anchored to its side, but a thumbnail-sized column at every width. */

.newsroom-story--compact {
	grid-template-columns: 110px minmax(0, 1fr);
	margin: 1.5rem 0;
	min-height: 0;
	box-shadow: 0 1px 2px rgba(1, 33, 105, 0.08), 0 4px 14px rgba(1, 33, 105, 0.1);
}

.newsroom-story--compact:hover {
	box-shadow: 0 2px 4px rgba(1, 33, 105, 0.1), 0 10px 26px rgba(1, 33, 105, 0.16);
	transform: translateY(-2px);
}

.newsroom-story--compact .newsroom-story__media {
	aspect-ratio: auto;
	min-height: 100%;
}

.newsroom-story--compact .newsroom-story__media::after {
	left: auto;
	right: 0;
	top: 0;
	width: 4px;
	height: auto;
}

.newsroom-story--compact .newsroom-story__body {
	padding: 1rem 1.1rem 1.1rem;
}

.newsroom-story.newsroom-story--compact .newsroom-story__eyebrow {
	margin-bottom: 0.45rem;
	font-size: 0.8rem;
}

.newsroom-story.newsroom-story--compact .newsroom-story__eyebrow::before {
	width: 18px;
}

.newsroom-story.newsroom-story--compact .newsroom-story__title {
	margin-bottom: 0.25rem;
	font-size: clamp(1.15rem, 1rem + 0.5vw, 1.45rem);
	line-height: 1.12;
}

.newsroom-story.newsroom-story--compact .newsroom-story__meta {
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
}

.newsroom-story.newsroom-story--compact .newsroom-story__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	margin-bottom: 0.75rem;
	font-size: 1rem;
	line-height: 1.45;
}

.newsroom-story.newsroom-story--compact a.newsroom-story__cta {
	min-height: 36px;
	padding: 0.45rem 0.9rem;
	font-size: 0.9rem;
}

/* image="right" applies on small screens too (the default layout stacks instead) */
.newsroom-story--compact.newsroom-story--image-right {
	grid-template-columns: minmax(0, 1fr) 110px;
}

/* Very narrow phones: drop the excerpt so the headline gets the room
   (the full story is one tap away, and screen readers still hear the headline). */
@media only screen and (max-width: 479px) {
	.newsroom-story.newsroom-story--compact .newsroom-story__excerpt {
		display: none;
	}
}

/* Tiny screens / 400% zoom: give the text more of the width. */
@media only screen and (max-width: 359px) {
	.newsroom-story--compact {
		grid-template-columns: 72px minmax(0, 1fr);
	}

	.newsroom-story--compact.newsroom-story--image-right {
		grid-template-columns: minmax(0, 1fr) 72px;
	}

	.newsroom-story--compact .newsroom-story__body {
		padding: 0.85rem 0.9rem;
	}
}

@media only screen and (min-width: 768px) {
	.newsroom-story--compact {
		grid-template-columns: 240px minmax(0, 1fr);
		min-height: 0;
	}

	.newsroom-story--compact.newsroom-story--image-right {
		grid-template-columns: minmax(0, 1fr) 240px;
	}

	.newsroom-story--compact .newsroom-story__body {
		padding: 1.25rem 1.5rem;
	}
}

.newsroom-story--compact.newsroom-story--image-right .newsroom-story__media {
	order: 2;
}

.newsroom-story--compact.newsroom-story--image-right .newsroom-story__media::after {
	right: auto;
	left: 0;
}

/* ---------- Keyboard focus (kept last so nothing above overrides it) ---------- */
/*
 * Rings from the card edge outward: 3px white gap, 3px dark blue (#012169), 3px yellow (#f2bb43).
 * Dark blue vs white/grey page ≈ 14:1; yellow vs a dark-blue page ≈ 8:1 — visible on any background.
 */

.newsroom-story .newsroom-story__cta:focus {
	outline: none; /* replaced by the card-level ring below */
}

.newsroom-story:focus-within,
.newsroom-story--compact:focus-within {
	outline: 3px solid #012169;
	outline-offset: 3px;
	box-shadow:
		0 0 0 3px #ffffff,
		0 0 0 9px #f2bb43,
		0 8px 24px rgba(1, 33, 105, 0.2);
	transform: none;
}

/* Fallback for very old browsers without :focus-within: ring the link itself. */
@supports not selector(:focus-within) {
	.newsroom-story .newsroom-story__cta:focus {
		outline: 3px solid #012169;
		outline-offset: 3px;
	}
}

/* ---------- Windows High Contrast / forced colors ---------- */

@media (forced-colors: active) {
	.newsroom-story {
		border-color: CanvasText;
	}

	.newsroom-story a.newsroom-story__cta,
	.newsroom-story a.newsroom-story__cta:link,
	.newsroom-story a.newsroom-story__cta:visited {
		border-color: LinkText;
		color: LinkText;
	}

	.newsroom-story:focus-within,
	.newsroom-story--compact:focus-within {
		outline: 3px solid Highlight;
	}

	.newsroom-story__media::after,
	.newsroom-story__eyebrow::before {
		forced-color-adjust: none;
	}
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.newsroom-story,
	.newsroom-story__img,
	.newsroom-story__cta,
	.newsroom-story__arrow {
		transition: none !important;
	}

	.newsroom-story:hover,
	.newsroom-story--compact:hover,
	.newsroom-story:hover .newsroom-story__img,
	.newsroom-story:focus-within .newsroom-story__img,
	.newsroom-story:hover .newsroom-story__arrow,
	.newsroom-story:focus-within .newsroom-story__arrow {
		transform: none !important;
	}
}

/* ---------- Editor-only notice ---------- */

.newsroom-story-notice {
	padding: 1rem 1.25rem;
	border-left: 4px solid #a72527;
	background: #fcefd2;
	color: #252c41;
}
