/*
 * NEMRA Blocks — Events Featured widget (V2 events hero, Figma 571:23133).
 *
 * Full-bleed band: the event photo blurred (15px) + blue-washed as a
 * backdrop that hard-stops to the #f6f6f6 page ground, a centered white
 * intro (eyebrow + serif heading), and a 1312×584 featured card that
 * overlaps the band's bottom edge. The card is the event photo with a
 * centered play button and a white content panel inset on the right.
 *
 * The card image is exposed by PHP as `--nemra-ev-backdrop` (same pattern
 * as .nemra-single-article-hero).
 */

.nemra-events-featured {
	position: relative;
	width: 100%;
	/* Full-bleed, same trick as the homepage hero (.nemra-page-hero--has-bg):
	 * the washed band spans the whole viewport while the intro and the card
	 * stay in a 1440-wide centred column with 64px gutters. Capping the
	 * section at 1440 instead left the blue stopping short of the edges —
	 * 240px of page ground each side at 1920. The side padding is
	 * (100vw - 1440)/2 + 64, clamped to 64px below 1440. */
	max-width: none;
	margin: 0 auto;
	padding: 184px max(64px, calc(50vw - 656px)) 0;
	box-sizing: border-box;
	overflow: hidden;
	background: #f6f6f6;
	font-family: var(--nemra-font-body, 'Poppins', system-ui, sans-serif);
	color: var(--nemra-dark, #17171a);
}

.nemra-events-featured *,
.nemra-events-featured *::before,
.nemra-events-featured *::after {
	box-sizing: border-box;
}

/* ---------- Blurred / washed backdrop band ---------------------------- */
/* Band occupies everything except the card's 90px overlap onto the page
   ground below. */

.nemra-events-featured__backdrop {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 90px;
	overflow: hidden;
	pointer-events: none;
	background: linear-gradient(180deg, var(--nemra-blue, #2173b3) 0%, var(--nemra-blue-dark, #042a48) 100%);
}

.nemra-events-featured--has-image .nemra-events-featured__backdrop::before {
	content: "";
	position: absolute;
	inset: -30px;
	background-image: var(--nemra-ev-backdrop);
	background-size: cover;
	background-position: center;
	filter: blur(15px);
}

.nemra-events-featured__backdrop::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(33, 115, 179, 0.8) 0%, rgba(4, 42, 72, 0.8) 100%), rgba(26, 26, 23, 0.3);
}

/* ---------- Centered intro -------------------------------------------- */

.nemra-events-featured__intro {
	position: relative;
	max-width: 680px;
	margin: 0 auto 52px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-align: center;
}

.nemra-events-featured__eyebrow {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: rgba(252, 253, 253, 0.64);
}

.nemra-events-featured__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--nemra-blue, #2173b3);
	flex: 0 0 auto;
}

/* Comp 571:23133: hero heading + panel title are Poppins Medium. */
.nemra-events-featured__heading {
	margin: 0;
	font-family: var(--nemra-font-body, 'Poppins', system-ui, sans-serif);
	font-size: 48px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -1.5px;
	color: var(--nemra-light, #fcfdfd);
}

/* ---------- Featured card ---------------------------------------------- */

.nemra-events-featured__card {
	position: relative;
	width: 100%;
	max-width: 1312px;
	height: 584px;
	margin: 0 auto;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	padding: 12px;
	background-color: #d9d9d9;
	background-size: cover;
	background-position: center;
}

.nemra-events-featured--has-image .nemra-events-featured__card {
	background-image: var(--nemra-ev-backdrop);
}

/* Mobile card (next event, comp 797:23269) — only ever shown below 768px,
 * where it replaces the desktop signup card. */
.nemra-events-featured__card--mobile {
	display: none;
}

/* Top scrim: the comp's 160px "Dark Overlay" layer, 64% dark at the top
 * edge fading to nothing. */
.nemra-events-featured__card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 160px;
	background: linear-gradient(180deg, rgba(26, 26, 23, 0.64) 0%, rgba(26, 26, 23, 0) 100%);
	pointer-events: none;
}

/* Blue-navy wash over the photo. Figma's stops start at -58.08%, so the
 * tint covers the whole image (~0.16 alpha at the top edge) and deepens
 * to 0.4 by 85% — a 58% start renders as no visible gradient at all. */
.nemra-events-featured__card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(2, 27, 47, 0) -58.08%, rgba(4, 42, 72, 0.4) 85.23%);
	pointer-events: none;
}

/* ---------- White content panel ---------------------------------------- */

.nemra-events-featured__panel {
	position: relative;
	z-index: 2;
	width: 469px;
	max-width: 100%;
	background: var(--nemra-light, #fcfdfd);
	border-radius: 5px;
	padding: 48px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
}

.nemra-events-featured__card-eyebrow {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: rgba(23, 23, 26, 0.64);
}

.nemra-events-featured__title {
	margin: 0;
	font-family: var(--nemra-font-body, 'Poppins', system-ui, sans-serif);
	font-size: 32px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -1px;
	color: var(--nemra-dark, #17171a);
}

.nemra-events-featured__title-accent {
	color: var(--nemra-blue, #2173b3);
}

.nemra-events-featured__desc {
	margin: 0;
	font-size: 12px;
	line-height: 1.5;
	color: var(--nemra-dark, #17171a);
}

/* Meta rows — Date / Location / Status. */

.nemra-events-featured__meta {
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
}

.nemra-events-featured__meta-row {
	display: grid;
	grid-template-columns: 108px 1fr;
	align-items: center;
}

.nemra-events-featured__meta-row dt {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.5;
	/* 0.48 blends to #8e8f90 on the near-white ground — 3.18:1 at 12px,
	   well under AA. 0.66 measures 5.71:1. */
	color: rgba(23, 23, 26, 0.66);
}

.nemra-events-featured__meta-row dt svg {
	flex: 0 0 auto;
}

.nemra-events-featured__meta-row dd {
	margin: 0;
	font-size: 12px;
	line-height: 1.5;
	color: var(--nemra-dark, #17171a);
	white-space: nowrap;
}

/* CTAs */

.nemra-events-featured__ctas {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
	padding-top: 16px;
}

.nemra-events-featured__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	line-height: 20px;
	text-decoration: none;
	transition: background-color 150ms ease, color 150ms ease;
}

.nemra-events-featured__cta--primary {
	padding: 12px 16px;
	border-radius: 5px;
	background-color: var(--nemra-blue, #2173b3);
	border: 1px solid rgba(252, 253, 253, 0.08);
	color: var(--nemra-light, #fcfdfd);
}

.nemra-events-featured__cta--primary:hover,
.nemra-events-featured__cta--primary:focus-visible {
	background-color: var(--neutral-dark-88, rgba(23, 23, 26, 0.88));
	color: var(--nemra-light, #fcfdfd);
	outline: 0;
}

.nemra-events-featured__cta--secondary {
	color: var(--nemra-dark, #17171a);
}

.nemra-events-featured__cta-circle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--nemra-blue-vibrant, #0074cf);
	color: var(--nemra-light, #fcfdfd);
	transition: background-color 150ms ease;
}

.nemra-events-featured__cta--secondary:hover .nemra-events-featured__cta-circle,
.nemra-events-featured__cta--secondary:focus-visible .nemra-events-featured__cta-circle {
	background: var(--neutral-dark-88, rgba(23, 23, 26, 0.88));
}

/* ---------- Responsive ------------------------------------------------- */

@media (max-width: 991px) {
	.nemra-events-featured {
		padding: 150px 24px 0;
	}

	.nemra-events-featured__heading {
		font-size: var(--nemra-t-h2-size, 36px);
		letter-spacing: var(--nemra-t-h2-ls, -1.5px);
	}

}

@media (max-width: 768px) {
	/* Mobile comp 797:23269: the card runs wider than the intro's 24px
	 * margins (380 in a 400 frame) — 10px on the section, 14px more on the
	 * intro. The section keeps 16px below the card. */
	.nemra-events-featured {
		padding: 140px 10px 16px;
	}

	.nemra-events-featured__intro {
		margin-bottom: 48px;
		padding: 0 14px;
	}

	.nemra-events-featured__heading {
		font-size: 32px;
	}

	/* No photo card on mobile — the blurred/washed photo backs the WHOLE
	 * band and the white panel sits directly on it, so the backdrop loses
	 * its hard-stop and the card loses its photo + scrims. */
	.nemra-events-featured__backdrop {
		bottom: 0;
	}

	.nemra-events-featured__card,
	.nemra-events-featured--has-image .nemra-events-featured__card {
		height: auto;
		padding: 0;
		background-image: none;
		background-color: transparent;
		overflow: visible;
	}

	.nemra-events-featured__card::before,
	.nemra-events-featured__card::after {
		display: none;
	}

	.nemra-events-featured__panel {
		width: 100%;
		padding: 32px 24px;
		gap: 16px;
	}

	.nemra-events-featured__title {
		font-size: 28px;
	}

	.nemra-events-featured__meta-row {
		grid-template-columns: 96px 1fr;
	}

	.nemra-events-featured__meta-row dd {
		white-space: normal;
	}

	/* When a next-event card is set, it replaces the signup card on mobile. */
	.nemra-events-featured--has-mobile-card .nemra-events-featured__card:not(.nemra-events-featured__card--mobile) {
		display: none;
	}

	.nemra-events-featured__card--mobile {
		display: flex;
	}

	/* Comp CTA is a single full-width blue button — stack them. */
	.nemra-events-featured__ctas {
		width: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.nemra-events-featured__cta {
		justify-content: center;
	}
}

/* -----------------------------------------------------------------
 * Split layout (agents comp 571:22147): light ground, header column
 * left (divider + eyebrow + Poppins H2 + body), 680px photo card
 * right with a white inset panel bottom-right (title, body,
 * Register + green circle arrow). No backdrop, no play button.
 * --------------------------------------------------------------- */
.nemra-events-featured--split {
	display: flex;
	align-items: flex-start;
	gap: 32px;
	width: 100%;
	max-width: 1440px;
	margin: 0 auto;
	/* Comp 571:22147 ends flush after the card; the next section provides
	 * its own top spacing. */
	padding: 120px 64px 0;
	background: none;
	font-family: var(--nemra-font-body, 'Poppins', system-ui, sans-serif);
	box-sizing: border-box;
}

.nemra-events-featured--split *,
.nemra-events-featured--split *::before,
.nemra-events-featured--split *::after {
	box-sizing: border-box;
}

.nemra-events-featured__split-header {
	flex: 0 0 355px;
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.nemra-events-featured--split .nemra-events-featured__eyebrow {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding-top: 24px;
	border-top: 1px solid rgba(23, 23, 26, 0.16);
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: rgba(23, 23, 26, 0.64);
}

.nemra-events-featured__dot--green {
	background-color: var(--nemra-green, #4c7f39);
}

.nemra-events-featured--split .nemra-events-featured__heading {
	margin: 0;
	font-family: var(--nemra-font-body, 'Poppins', system-ui, sans-serif);
	font-size: 48px;
	line-height: 1.2;
	font-weight: 500;
	letter-spacing: -1.5px;
	color: var(--nemra-dark, #17171a);
}

.nemra-events-featured__split-body {
	margin: -20px 0 0;
	max-width: 355px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--nemra-dark, #17171a);
}

.nemra-events-featured__photo {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	min-height: 680px;
	border-radius: 8px;
	background-color: #dedede;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	overflow: hidden;
}

.nemra-events-featured--split .nemra-events-featured__panel {
	position: absolute;
	right: 12px;
	bottom: 12px;
	width: min(300px, calc(100% - 24px));
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 32px;
	border-radius: 8px;
	background: #fcfdfd;
}

.nemra-events-featured--split .nemra-events-featured__title {
	margin: 0;
	font-family: var(--nemra-font-body, 'Poppins', system-ui, sans-serif);
	font-size: 32px;
	line-height: 1.2;
	letter-spacing: -1px;
	font-weight: 500;
	color: var(--nemra-dark, #17171a);
}

.nemra-events-featured--split .nemra-events-featured__desc {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--nemra-dark, #17171a);
}

.nemra-events-featured__register {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	align-self: flex-start;
	margin-top: 8px;
	text-decoration: none;
	font-size: 14px;
	line-height: 20px;
	color: var(--nemra-dark, #17171a);
	transition: opacity 0.15s ease;
}

.nemra-events-featured__register:hover,
.nemra-events-featured__register:focus-visible {
	opacity: 0.8;
	color: var(--nemra-dark, #17171a);
	outline: 0;
}

.nemra-events-featured__register-circle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 32px;
	background-color: var(--nemra-green, #4c7f39);
	color: var(--nemra-light, #fcfdfd);
}

.nemra-events-featured__register-circle svg {
	width: 16px;
	height: 16px;
}

@media (max-width: 991px) {
	.nemra-events-featured--split {
		flex-direction: column;
		gap: 40px;
		padding: 80px 40px 0;
	}

	.nemra-events-featured__split-header {
		flex-basis: auto;
	}

	.nemra-events-featured--split .nemra-events-featured__heading {
		font-size: var(--nemra-t-h2-size, 36px);
		letter-spacing: var(--nemra-t-h2-ls, -1.5px);
	}

	.nemra-events-featured__photo {
		width: 100%;
		min-height: 480px;
	}
}

@media (max-width: 599px) {
	.nemra-events-featured--split {
		padding: 60px 24px 0;
	}

	.nemra-events-featured__photo {
		min-height: 0;
		padding-top: 280px;
	}

	.nemra-events-featured--split .nemra-events-featured__panel {
		position: static;
		width: 100%;
		padding: 24px;
	}

}

/* Mobile mode type — kept at the END of the file so these outrank the base
 * rules above at equal specificity. Agents mobile comp 797:22014: card title
 * is Heading/H4 (28 in the mobile mode), body is Body/Small (10), and the
 * register/CTA buttons are UI/Button-1 (12). */
@media (max-width: 991px) {
	.nemra-events-featured__title,
	.nemra-events-featured--split .nemra-events-featured__title {
		font-size: var(--nemra-t-h4-size, 28px);
		letter-spacing: var(--nemra-t-h4-ls, -1px);
	}

	.nemra-events-featured__desc,
	.nemra-events-featured--split .nemra-events-featured__desc {
		font-size: var(--nemra-t-b3-size, 10px);
		line-height: 1.5;
	}

	/* Only the split layout's register link takes the mobile button size —
	 * the band card's CTAs stay 14 (events mobile comp 797:23269 resolves
	 * Button-1 at its desktop 14, like the rest of that frame's type). */
	.nemra-events-featured__register {
		font-size: var(--nemra-t-btn-size, 12px);
	}
}

/* Mobile mode type - appended at the END of the file so it outranks the
 * rules above at equal specificity (same pattern as events-featured).
 * Band + split section heading is H2 in the mobile comps too - events hero
 * 797:23273 and agents events 797:22011 both measure 2x43 = 36/-1.5 (the
 * old band hardcode kept 32 with the wrong tracking). */
@media (max-width: 991px) {
	.nemra-events-featured .nemra-events-featured__heading {
		font-size: var(--nemra-t-h2-size, 48px);
		line-height: var(--nemra-t-h2-lh, 1.2);
		letter-spacing: var(--nemra-t-h2-ls, -1.5px);
	}

}
