/* ──────────────────────────────────────────────────────────────────────────
   Stories & Events block
   Porcelain section: heading + subtext + View-all pill, then a two-column body
   — a large cobalt featured card (watermark) on the left and a vertical list of
   recent posts on the right. Tokens only — no raw hex.
   ────────────────────────────────────────────────────────────────────────── */

.uw-se {
	background: var(--wp--preset--color--porcelain);
	color: var(--wp--preset--color--deep-navy);
}

.uw-se__inner {
	padding-top: clamp(64px, 9vw, 120px);
	padding-bottom: clamp(64px, 9vw, 120px);
	display: flex;
	flex-direction: column;
	gap: clamp(2rem, 3vw, 48px);
}

/* ── Header ── */
.uw-se__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 2rem;
	flex-wrap: wrap;
}
.uw-se__actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
}
.uw-se__intro {
	display: flex;
	flex-direction: column;
	gap: clamp(1rem, 1.5vw, 24px);
	max-width: 782px;
}
.uw-se__heading {
	margin: 0;
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 600;
	font-size: clamp(56px, 8vw, 110px);
	line-height: 0.9;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--deep-navy);
}
.uw-se__subtext {
	margin: 0;
	font-family: var(--wp--preset--font-family--pp-mori);
	font-weight: 400;
	font-size: 20px;
	line-height: 1.1;
}

/* View-all pill: shared .uw-pill-btn component (custom-styles.css) via
   unitedway_cb_cta(), same as every other CTA pill in the theme. */

/* ── Inline editing ──
   The heading and intro are inner blocks. `<InnerBlocks class="uw-se__intro">`
   makes ACF's own wrapper div the `.uw-se__intro` element, so every rule above
   keeps matching the same box and nothing is retargeted. The View-all pill
   remains its sibling and the query-driven body below is untouched. */

/* Editor bridge. In the canvas ACF nests the blocks inside
   .block-editor-inner-blocks > .block-editor-block-list__layout, which would sit
   between .uw-se__intro and its flex children; on the front end the blocks are
   direct children. display:contents makes both DOMs lay out identically. */
.uw-se__intro > .block-editor-inner-blocks,
.uw-se__intro > .block-editor-inner-blocks > .block-editor-block-list__layout { display: contents; }

/* An untouched template placeholder serializes as an empty element: an empty
   <h2> is a WCAG violation, and an empty <p> would consume one .uw-se__intro
   flex gap that the legacy render (which omitted the <p> entirely when subtext
   was blank) never drew. The contenteditable guard keeps this off the editor
   canvas, where an empty block must stay visible and clickable. */
.uw-se__heading:empty:not([contenteditable]),
.uw-se__subtext:empty:not([contenteditable]) { display: none; }

/* ── Top hairline (spans both columns) ── */
.uw-se__topline {
	height: 1px;
	width: 100%;
	background: color-mix(in srgb, var(--wp--preset--color--deep-navy) 10%, transparent);
}

/* ── Body: featured (left) + list (right) ── */
.uw-se__body {
	display: flex;
	align-items: stretch;
	gap: 0;
}

/* ── Featured card ── */
.uw-se__featured {
	position: relative;
	overflow: hidden;
	flex: 0 0 47.8%;
	margin-right: clamp(24px, 3vw, 48px);
	border-radius: 12px;
	background: var(--wp--preset--color--cobalt-blue);
	color: var(--wp--preset--color--white);
	min-height: 600px;
	padding: clamp(40px, 5vw, 72px) clamp(28px, 3vw, 43px);
	text-decoration: none;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
/* Hover/focus: lift the card and keep the text white — the global link:hover
   colour (deep-navy) would be illegible on the cobalt card. */
.uw-se__featured:hover,
.uw-se__featured:focus-visible {
	color: var(--wp--preset--color--white);
	transform: translateY(-4px);
	box-shadow: 0 18px 40px color-mix(in srgb, var(--wp--preset--color--deep-navy) 30%, transparent);
}
.uw-se__featured-content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: clamp(1.5rem, 2.5vw, 36px); 
	color: var(--wp--preset--color--white);
}
.uw-se__featured-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	color: var(--wp--preset--color--white);
}
.uw-se__featured-tag {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 600;
	font-size: 18px;
	line-height: 0.8;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}
.uw-se__featured-date {
	font-family: var(--wp--preset--font-family--pp-mori);
	font-weight: 600;
	font-size: 15px;
	line-height: 0.9;
}
.uw-se__featured-mid {
	display: flex;
	flex-direction: column;
	gap: clamp(1.25rem, 2vw, 29px);
}
.uw-se__featured-title {
	margin: 0;
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 600;
	font-size: clamp(40px, 5.5vw, var(--wp--preset--font-size--heading-3));
	line-height: 1;
	letter-spacing: -0.01em;
}
.uw-se__featured-excerpt {
	margin: 0;
	font-family: var(--wp--preset--font-family--pp-mori);
	font-weight: 400;
	font-size: 20px;
	line-height: 1.3;
	letter-spacing: -0.02em;
}

/* Watermark — concentric rings filling the lower card, faint. */
.uw-se__featured-wm {
	position: absolute;
	right: 0; 
	bottom: 0;
	width: 94%;
	z-index: 0;
	opacity: 0.12;
	pointer-events: none;
}
.uw-se__featured-wm svg,
.uw-se__featured-wm img { width: 100%; height: auto; display: block; }
.uw-se__featured-wm * { fill: var(--wp--preset--color--white); }

/* ── Dots (category marker) ── */
/* Base .uw-se__dot lives in custom-styles.css (shared with .uw-card__dot). */
.uw-se__dot--light { background: var(--wp--preset--color--red); }

/* ── Read more — animated underline via shared pseudo-element pattern ── */
.uw-se__more {
	align-self: flex-start;
	font-family: var(--wp--preset--font-family--test-national-2-condensed);
	font-weight: 500;
	font-size: 20px;
	line-height: 1;
	color: var(--wp--preset--color--deep-navy);
}
/* Light variant (white on dark backgrounds e.g. featured card) */
.uw-se__more--light { color: var(--wp--preset--color--white); }


/* ── List column ── */
.uw-se__list {
	flex: 1 1 0;
	min-width: 0;
	border-left: 1px solid color-mix(in srgb, var(--wp--preset--color--deep-navy) 10%, transparent);
	padding-left: clamp(24px, 3vw, 48px);
}
.uw-se__row {
	display: flex;
	gap: clamp(20px, 2.5vw, 40px);
	padding: clamp(20px, 2vw, 27px) 16px;
	margin: 0 -16px; 
	text-decoration: none;
	color: inherit;
	transition: background-color 0.2s ease;
}
.uw-se__row + .uw-se__row {
	border-top: 2px solid color-mix(in srgb, var(--wp--preset--color--deep-navy) 10%, transparent);
}
/* Hover/focus tints the whole row; the border-top sits flush so the tint reads
   as one block. */
.uw-se__row:hover,
.uw-se__row:focus-visible {
	background: color-mix(in srgb, var(--wp--preset--color--deep-navy) 5%, transparent);
	border-radius: 8px;
	border-top-color: color-mix(in srgb, var(--wp--preset--color--deep-navy) 1%, transparent);
}
.uw-se__thumb {
	flex: none;
	width: 240px;
	height: 160px;
	border-radius: 8px;
	overflow: hidden;
}
.uw-se__thumb-img,
.uw-se__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.uw-se__thumb-img--ph {
	background: color-mix(in srgb, var(--wp--preset--color--deep-navy) 8%, transparent);
}
.uw-se__rc-body {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: clamp(14px, 1.4vw, 20px);
	justify-content: space-between;
}

.uw-se__rc-info {
    gap: clamp(20px, 2.5vw, 10px);
    display: flex;
    flex-wrap: wrap;
}

.uw-se__rc-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
}
/* .uw-se__tag lives in custom-styles.css (shared with .uw-card__tag). */
.uw-se__rc-date {
	font-family: var(--wp--preset--font-family--pp-mori);
	font-weight: 600;
	font-size: 15px;
	line-height: 0.9;
	white-space: nowrap;
}
.uw-se__rc-title {
	margin: 0;
	font-family: var(--wp--preset--font-family--test-national-2-condensed);
	font-weight: 600;
	font-size: 28px;
	line-height: 1;
	letter-spacing: 0.01em;
	color: var(--wp--preset--color--deep-navy);
	/* At most two lines; a longer title ends in an ellipsis. The bottom padding
	   keeps descenders on the second line from being clipped (line-height 1). */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	padding-bottom: 3px;
}

/* ── Bottom 3-card grid ── */
.uw-se__cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(16px, 2vw, 24px);
}

/*
 * The card itself is the shared .uw-card component (shape/hover, format
 * backgrounds --light/--cobalt/--image, and every .uw-card__* sub-element —
 * content, meta, tag, dot, date, title, bottom, img*, wm) — same classes as
 * Related Content's card grid, defined once in custom-styles.css.
 * .uw-se__card only carries this block's unique min-height.
 */
.uw-se__card {
	min-height: 340px;
}

/* ── Tablet / mobile ── */
@media (max-width: 1024px) {
	.uw-se__body { flex-direction: column; gap: 2.5rem; }
	.uw-se__featured {
		flex: none;
		width: 100%;
		margin-right: 0;
		min-height: 0;
		aspect-ratio: auto;
		min-height: 520px;
	}
	.uw-se__list {
		border-left: none;
		padding-left: 0;
	}
}
@media (max-width: 767px) {
	.uw-se__cards { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
	.uw-se__row { flex-direction: column; gap: 1rem; }
	.uw-se__thumb { width: 100%; height: auto; aspect-ratio: 3 / 2; }
	.uw-se__rc-title { font-size: 24px; }
	.uw-se__card, .uw-se__featured { min-height: 520px; }
}
/* Shared .uw-card responsive tuning (title/wm/img) lives in custom-styles.css. */