/*
 * NEMRA Blocks — Leadership Grid widget.
 * 4-col grid of leader cards: rounded photo placeholder with a small
 * arrow icon inline next to the caption (Name + Job title). Used on
 * About Us "Leadership and Board" block.
 */

.nemra-leadership-grid {
	display: flex;
	flex-direction: column;
	gap: 50px;
	width: 100%;
	max-width: 1340px;
	margin: 0 auto;
	font-family: var(--nemra-font-body, 'Poppins', system-ui, sans-serif);
	color: var(--nemra-text, #3f3f3f);
	box-sizing: border-box;
}

.nemra-leadership-grid *,
.nemra-leadership-grid *::before,
.nemra-leadership-grid *::after { box-sizing: border-box; }

.nemra-leadership-grid__heading {
	margin: 0;
	font-size: 48px;
	font-weight: 400;
	line-height: 1.1;
	color: var(--nemra-text, #3f3f3f);
}

.nemra-leadership-grid__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat( 4, minmax( 0, 1fr ) );
	gap: 20px 25px;
}

.nemra-leadership-grid--cols-3 .nemra-leadership-grid__grid {
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
}

.nemra-leadership-grid__item { display: flex; }

.nemra-leadership-grid__card {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 100%;
	color: var(--nemra-muted, #6b6b6b);
	text-decoration: none;
	transition: transform 150ms ease;
}

a.nemra-leadership-grid__card:hover,
a.nemra-leadership-grid__card:focus-visible {
	transform: translateY( -2px );
	text-decoration: none;
	outline: 0;
}

.nemra-leadership-grid__photo {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	background-color: #eaeaea;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	border-radius: 10px;
	overflow: hidden;
}

.nemra-leadership-grid__caption {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 0;
}

.nemra-leadership-grid__text {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-width: 0;
}

.nemra-leadership-grid__name {
	margin: 0;
	font-size: 25px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--nemra-muted, #6b6b6b);
}

.nemra-leadership-grid__title {
	margin: 0;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--nemra-muted, #6b6b6b);
}

.nemra-leadership-grid__arrow {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	margin-top: 8px;
	color: var(--nemra-muted, #6b6b6b);
}

.nemra-leadership-grid__arrow svg {
	width: 100%;
	height: 100%;
	display: block;
}

@media ( max-width: 991px ) {
	.nemra-leadership-grid__grid,
	.nemra-leadership-grid--cols-3 .nemra-leadership-grid__grid {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}
	.nemra-leadership-grid__heading { font-size: 38px; }
}

@media ( max-width: 599px ) {
	.nemra-leadership-grid { gap: 32px; }
	.nemra-leadership-grid__heading { font-size: 30px; }
	.nemra-leadership-grid__name { font-size: 20px; }
	.nemra-leadership-grid__title { font-size: 16px; }
}

/* ------------------------------------------------------------------ *
 * V2 — Advisory Council variant (circular headshots, centered copy).
 * Scoped to .nemra-leadership-grid--council so the classic About Us
 * look is untouched.
 * ------------------------------------------------------------------ */
.nemra-leadership-grid--council {
	--nemra-blue: #2173B3;
	--nemra-blue-dark: #042A48;
	--nemra-green: #4c7f39;
	--nemra-eversand: #E6E8DD;
	--nemra-dark: #17171A;
	--nemra-light: #FCFDFD;

	gap: 64px;
	max-width: 1312px;
	color: var( --nemra-dark, #17171A );
}

.nemra-leadership-grid--council .nemra-leadership-grid__header {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 100%;
}

.nemra-leadership-grid--council .nemra-leadership-grid__eyebrow {
	display: flex;
	align-items: center;
	gap: 16px;
	width: 100%;
	padding-top: 24px;
	border-top: 1px solid rgba( 23, 23, 26, 0.16 );
}

.nemra-leadership-grid--council .nemra-leadership-grid__eyebrow-dot {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: var( --nemra-green, #4C7F39 );
}

.nemra-leadership-grid--council .nemra-leadership-grid__eyebrow-text {
	font-family: var( --nemra-font-body, 'Poppins', system-ui, sans-serif );
	font-size: 10px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: rgba( 23, 23, 26, 0.64 );
}

.nemra-leadership-grid--council .nemra-leadership-grid__heading {
	margin: 0;
	max-width: 680px;
	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;
	text-wrap: balance;
	color: var( --nemra-dark, #17171A );
}

.nemra-leadership-grid--council .nemra-leadership-grid__grid {
	display: grid;
	grid-template-columns: repeat( 5, minmax( 0, 1fr ) );
	gap: 64px 24px;
}

.nemra-leadership-grid--council .nemra-leadership-grid__item { justify-content: center; }

.nemra-leadership-grid--council .nemra-leadership-grid__card {
	gap: 16px;
	align-items: center;
	color: inherit;
}

.nemra-leadership-grid--council .nemra-leadership-grid__photo {
	width: 100%;
	max-width: 225px;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	background-color: rgba( 23, 23, 26, 0.08 );
	/* Several source headshots have a baked-in grey ring + dark corners
	 * (Figma circle exports) — zoom past them so the face fills the circle. */
	background-size: 132%;
	background-position: center;
	background-repeat: no-repeat;
}

.nemra-leadership-grid--council .nemra-leadership-grid__caption {
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 100%;
	text-align: center;
}

.nemra-leadership-grid--council .nemra-leadership-grid__name {
	font-family: var( --nemra-font-body, 'Poppins', system-ui, sans-serif );
	/* Comparing the ink width of the same string ("David Bennet") in the comp
	 * against this render put the comp at ~11.6px to our 14px — the whole
	 * caption block sat one step high on the scale, not just the role line the
	 * feedback called out. 12px also reconciles the name→role baseline gap
	 * (comp 18.7px). */
	font-size: 12px;
	font-weight: 700;
	line-height: 1.5;
	color: rgba( 23, 23, 26, 0.88 );
}

.nemra-leadership-grid--council .nemra-leadership-grid__role {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
	font-family: var( --nemra-font-body, 'Poppins', system-ui, sans-serif );
	/* Comp 6:7199 sets the role/company block one step below the name on the
	 * type scale. Measured off the comp by baseline centroid (threshold-proof,
	 * unlike ink height): title→company baseline spacing is 14.1px there vs
	 * 18.2px here at 12px/1.5 — i.e. 10px on a 14px line box. */
	font-size: 10px;
	font-weight: 400;
	line-height: 1.4;
}

/* The base .nemra-leadership-grid__title rule pins 18px, which outranks the
   12px inherited from __role and blew the council roles up to headline size
   against the comp's small grey caption. */
.nemra-leadership-grid--council .nemra-leadership-grid__title {
	color: var( --nemra-dark, #17171A );
	font-size: inherit;
	line-height: inherit;
	font-weight: inherit;
}
.nemra-leadership-grid--council .nemra-leadership-grid__company { color: rgba( 23, 23, 26, 0.64 ); }

@media ( max-width: 1199px ) {
	.nemra-leadership-grid--council .nemra-leadership-grid__grid {
		grid-template-columns: repeat( 4, minmax( 0, 1fr ) );
	}
}

@media ( max-width: 991px ) {
	.nemra-leadership-grid--council { gap: 48px; }
	.nemra-leadership-grid--council .nemra-leadership-grid__grid {
		grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
		gap: 40px 24px;
	}
	.nemra-leadership-grid--council .nemra-leadership-grid__heading { font-size: var(--nemra-t-h2-size, 36px); }
	/* Mobile comp 797:21486 instances the roster card UNSCALED, so its bound
	   Body Medium Bold resolves to a true 14 — unlike the desktop comp, whose
	   scaled instance is why the base rule measures 12. Mobile only. */
	.nemra-leadership-grid--council .nemra-leadership-grid__name { font-size: var(--nemra-t-b2b-size, 14px); }
}

@media ( max-width: 599px ) {
	.nemra-leadership-grid--council .nemra-leadership-grid__grid {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}
	.nemra-leadership-grid--council .nemra-leadership-grid__title,
	.nemra-leadership-grid--council .nemra-leadership-grid__company { font-size: 10px; }
}

/* -----------------------------------------------------------------
 * Council slider layout (V2 comp 571:21292): one scrollable row of
 * circular headshots with pagination dots to the right of the header.
 * The row intentionally bleeds off the right edge to invite scrolling.
 * --------------------------------------------------------------- */
.nemra-leadership-grid--slider .nemra-leadership-grid__header {
	flex-direction: row;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
}

/* In the slider layout the eyebrow lives inside __header-copy, so its
   `width: 100%` divider only spanned the left column. The comp rules the
   full section width above the eyebrow — hoist the hairline to the header. */
.nemra-leadership-grid--council.nemra-leadership-grid--slider .nemra-leadership-grid__header {
	padding-top: 24px;
	border-top: 1px solid rgba( 23, 23, 26, 0.16 );
}

.nemra-leadership-grid--council.nemra-leadership-grid--slider .nemra-leadership-grid__eyebrow {
	padding-top: 0;
	border-top: 0;
}

.nemra-leadership-grid__header-copy {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.nemra-leadership-grid__dots {
	display: flex;
	align-items: center;
	/* No gap, because the buttons below are exactly 24px and now sit flush.
	   24×24 targets do not require spacing between them under WCAG 2.5.8. */
	gap: 0;
	padding-bottom: 12px;
}

/* The button is a 24×24 touch target (WCAG 2.5.8); the visible dot is a
   ::before so the hit area can be bigger than the 6px visual.
   The negative margins that used to sit here cancelled that out — with an
   8px gap they pulled adjacent buttons into a 2px overlap, so axe still
   failed target-size and the real hit area was ~14px. Flush 24px buttons
   cost 2px of rhythm per gap (22px centre-to-centre becomes 24px) and are
   the whole point of the oversized button. */
.nemra-leadership-grid__dot {
	position: relative;
	width: 24px;
	height: 24px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	transition: width 0.2s ease;
}

.nemra-leadership-grid__dot::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 6px;
	height: 6px;
	border-radius: 3px;
	background: rgba(23, 23, 26, 0.24);
	transition: width 0.2s ease, background-color 0.2s ease;
}

/* Inactive dots had no hover affordance at all — the only hover rule in this
 * widget targeted the member card. Darken toward the active blue on pointer
 * and keyboard focus so the pagination reads as clickable. */
.nemra-leadership-grid__dot:hover::before,
.nemra-leadership-grid__dot:focus-visible::before {
	background: rgba(33, 115, 179, 0.56);
}

.nemra-leadership-grid__dot:focus-visible {
	outline: 2px solid var(--nemra-blue, #2173B3);
	outline-offset: 2px;
	border-radius: 12px;
}

.nemra-leadership-grid__dot.is-active {
	width: 34px;
}

.nemra-leadership-grid__dot.is-active::before {
	width: 24px;
	background: var(--nemra-blue, #2173B3);
}

.nemra-leadership-grid--slider .nemra-leadership-grid__grid {
	display: flex;
	gap: 24px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 8px;
	scrollbar-width: none;
	-ms-overflow-style: none;
	/* The row bleeds to the viewport's right edge at every size — the comp
	 * has no right gutter on the council carousel. 100vw includes the
	 * scrollbar on classic-scrollbar browsers, so pull back 16px and let
	 * html{overflow-x:clip} absorb the remainder. */
	margin-right: calc((100vw - 100%) / -2 + 16px);
	padding-right: 24px;
}

.nemra-leadership-grid--slider .nemra-leadership-grid__grid::-webkit-scrollbar {
	display: none;
}

/* Designer round 2026-07: smaller council photos in the single-line row. */
.nemra-leadership-grid--slider .nemra-leadership-grid__item {
	flex: 0 0 180px;
	scroll-snap-align: start;
}

@media ( max-width: 991px ) {
	.nemra-leadership-grid--slider .nemra-leadership-grid__header {
		flex-direction: column;
		align-items: flex-start;
	}
	.nemra-leadership-grid--slider .nemra-leadership-grid__item {
		flex: 0 0 150px;
	}
}

/* Slider row: draggable. The 48px keeps the section seam the spacing
 * round was tuned against (its round-2 closing hairline was cut in the
 * 2026-08 feedback round). */
.nemra-leadership-grid--slider .nemra-leadership-grid__grid {
	cursor: grab;
	padding-bottom: 48px;
	user-select: none;
	-webkit-user-select: none;
}

.nemra-leadership-grid--slider .nemra-leadership-grid__grid.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	scroll-behavior: auto;
}

/* Mobile comp: pagination dots sit BELOW the roster, centered — flatten the
   header with display:contents so the dots can be reordered after the row. */
@media (max-width: 599px) {
	.nemra-leadership-grid--slider {
		display: flex;
		flex-direction: column;
	}

	.nemra-leadership-grid--slider .nemra-leadership-grid__header {
		display: contents;
	}

	.nemra-leadership-grid--slider .nemra-leadership-grid__header-copy { order: 1; }

	/* Mobile comp 797:21486: heading ~24px above the roster, dots ~42px
	   below the tallest card. The 48px council gap is a desktop value, and
	   with the header flattened it would also pad the roster→dots seam. */
	.nemra-leadership-grid--council.nemra-leadership-grid--slider { gap: 24px; }

	/* display:contents discards the header's box, and the section's top
	   hairline lives on it — repaint the rule on the eyebrow instead. */
	.nemra-leadership-grid--council.nemra-leadership-grid--slider .nemra-leadership-grid__eyebrow {
		padding-top: 24px;
		border-top: 1px solid rgba( 23, 23, 26, 0.16 );
	}

	/* The desktop 48px would push the dots off the comp's 42px seam. */
	.nemra-leadership-grid--slider .nemra-leadership-grid__grid {
		order: 2;
		padding-bottom: 8px;
	}

	.nemra-leadership-grid--slider .nemra-leadership-grid__dots {
		order: 3;
		align-self: center;
		margin-top: 0;
		padding-bottom: 0;
	}
}
