.sb-staff-grid {
	background-color: var(--sb-color-bg-soft);
	padding: 80px 0;
}

.sb-staff-grid__heading {
	font-family: var(--sb-font-family);
	font-style: normal;
	font-weight: var(--sb-font-weight-heading);
	font-size: var(--sb-font-size-h2-display);
	line-height: var(--sb-line-height-heading);
	color: var(--sb-color-body);
	text-align: center;
	margin: 0 0 20px !important;
}

.sb-staff-grid__heading p {
	margin: 0 !important;
}

.sb-staff-grid__heading strong,
.sb-staff-grid__heading b {
	font-weight: var(--sb-font-weight-heading-bold);
	color: var(--sb-color-purple-deep);
}

.sb-staff-grid__intro {
	max-width: 720px;
	margin: 0 auto 48px;
	font-family: var(--sb-font-family);
	font-style: normal;
	font-weight: 300;
	font-size: 22px;
	line-height: 32px;
	color: var(--sb-color-body);
	text-align: center;
}

.sb-staff-grid__intro p {
	margin: 0 !important;
}

.sb-staff-grid__swiper {
	position: relative;
	overflow: hidden !important;
}

/* Swiper's own bundle CSS gives .swiper-pagination position:absolute +
   width:100%, which — even once overridden to position:static so it takes
   part in the .sb-staff-grid__nav flex row — still keeps its full-width
   hypothetical size and shoves the prev/next arrows apart instead of
   sitting snug against them. Pinned back to an auto-width flex item here. */
.sb-staff-grid__dots {
	position: static !important;
	width: auto !important;
	flex: 0 0 auto;
	display: flex;
	justify-content: center;
	gap: 8px;
}

.sb-staff-grid__dots .swiper-pagination-bullet {
	background-color: var(--sb-color-border-strong);
	opacity: 1;
}

.sb-staff-grid__dots .swiper-pagination-bullet-active {
	background-color: var(--sb-color-lavender);
}

/* Prev/next arrows sit either side of the dots row, not on the card edges. */
.sb-staff-grid__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-top: 32px;
}

/* Swiper's own bundle CSS gives .swiper-button-prev/-next absolute
   positioning + a margin-top offset by default (for the "sit on the card
   edges" pattern used elsewhere) — overridden back to a plain inline flex
   item here since these arrows sit in the static nav row beside the dots,
   not pinned to the slider edges. */
/* !important throughout — GeneratePress's own generic `button { padding:
   10px 20px; ... }` base style loads after this block's own stylesheet (see
   global.css's note on block-inline-vs-theme-CSS load order) and otherwise
   wins the padding/box-sizing tie, stretching this out of a circle. */
.sb-staff-grid__arrow {
	position: static !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	box-sizing: border-box !important;
	flex: 0 0 auto;
	/* grid + place-items, not flex — a true center-on-both-axes that can't
	   drift from an inline SVG's own baseline/whitespace quirks the way
	   flex+align/justify sometimes does. */
	display: grid !important;
	place-items: center !important;
	width: 40px !important;
	height: 40px !important;
	min-width: 40px !important;
	max-width: 40px !important;
	min-height: 40px !important;
	max-height: 40px !important;
	aspect-ratio: 1 / 1;
	line-height: 1 !important;
	font-size: 0 !important;
	border-radius: 999px !important;
	border: none !important;
	background-color: var(--sb-color-lavender) !important;
	color: var(--sb-color-white) !important;
	cursor: pointer;
	transition: background-color 200ms ease;
}

.sb-staff-grid__arrow:hover {
	background-color: var(--sb-color-lavender-alt) !important;
	color: var(--sb-color-white) !important;
}

/* Plain :focus too, not just :focus-visible — GeneratePress's own parent
   theme button style darkens background on `button:focus` (fires on a mouse
   click in Chrome, not just keyboard nav), and loads after this stylesheet
   so it otherwise wins that background-color without !important here. */
.sb-staff-grid__arrow:focus,
.sb-staff-grid__arrow:focus-visible {
	background-color: var(--sb-color-lavender) !important;
	color: var(--sb-color-white) !important;
}

/* Suppress Swiper's own default ::before/::after icon glyph — we render our own SVG chevron inside the button instead. */
.sb-staff-grid__arrow::after,
.sb-staff-grid__arrow::before {
	content: none !important;
	display: none !important;
}

.sb-staff-grid__arrow svg {
	display: block !important;
	width: 18px !important;
	height: 18px !important;
	margin: 0 !important;
	padding: 0 !important;
	flex-shrink: 0;
	stroke: currentColor;
	grid-area: 1 / 1;
}

.sb-staff-grid__arrow svg path {
	stroke: currentColor;
}


/* Swiper's own watchOverflow adds these lock classes to the exact nav/dots
   elements passed in as nextEl/prevEl/el whenever the real card count
   already fits the active breakpoint's slidesPerView — i.e. the row is a
   plain static grid, not a slider, and nav/dots have nothing to do. The
   !important guards against this stylesheet's own display rules above
   winning a same-specificity, load-order tie against Swiper's lock CSS. */
.sb-staff-grid__arrow.swiper-button-lock,
.sb-staff-grid__dots.swiper-pagination-lock {
	display: none !important;
}

.sb-staff-grid__nav:has(.swiper-button-lock):has(.swiper-pagination-lock) {
	display: none;
}

/* Card — same hover-reveal choreography as .sb-team-grid__card, on purpose:
   both blocks show a person (photo, name, role), so they should read as the
   same design system across the site. */
.sb-staff-grid__card {
	position: relative;
	display: block;
	border-radius: var(--sb-radius-card);
	overflow: hidden;
	box-shadow: var(--sb-shadow-card);
}

.sb-staff-grid__card-inner {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	background-color: var(--sb-color-bg-soft-alt);
}

.sb-staff-grid__photo,
.sb-staff-grid__placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 500ms ease;
}

.sb-staff-grid__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--sb-color-placeholder);
	font-family: var(--sb-font-family);
	font-size: 14px;
}

.sb-staff-grid__card:hover .sb-staff-grid__photo {
	transform: scale(1.06);
}

.sb-staff-grid__peek {
	position: relative;
	z-index: 1;
	padding: 20px 20px 36px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	text-align: left;
}

/* Cards with no hover content (no bio/links) render the peek on its own,
   pinned straight to the photo — needs its own gradient + absolute
   positioning since it isn't nested inside .sb-staff-grid__hover here. */
.sb-staff-grid__peek--static {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(to top, rgb(0 0 0 / 72%) 0%, rgb(0 0 0 / 0%) 100%);
}

.sb-staff-grid__name {
	font-family: var(--sb-font-family);
	font-style: normal;
	font-weight: 600;
	font-size: 22px;
	line-height: 1.2;
	color: var(--sb-color-white);
}

.sb-staff-grid__role {
	font-family: var(--sb-font-family);
	font-style: normal;
	font-weight: 400;
	font-size: 16px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: rgb(255 255 255 / 85%);
}

/* Hover reveal panel — sits pinned to the card's bottom edge and is only as
   tall as its own content (name/role + bio + actions), NOT the full card —
   the photo above it always stays partly visible. At rest, a translateY
   offset tucks all but the "peek" (name/role) out of view below the card's
   bottom edge; hover/focus/tap slides the whole panel up into view. Same
   mechanic as .sb-team-grid__hover's peek, but content-sized instead of a
   full-card overlay. */
.sb-staff-grid__hover {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	max-height: 92%;
	overflow-y: auto;
	background-color: transparent;
	color: var(--sb-color-white);
	text-align: left;
	transform: translateY(calc(100% - var(--sb-sg-peek-h, 90px)));
	transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1), background-color 450ms ease;
}

.sb-staff-grid__hover::-webkit-scrollbar {
	width: 5px;
}

.sb-staff-grid__hover::-webkit-scrollbar-thumb {
	background-color: rgb(255 255 255 / 45%);
	border-radius: var(--sb-radius-sm);
}

.sb-staff-grid__card--has-hover:hover .sb-staff-grid__hover,
.sb-staff-grid__card--has-hover:focus-within .sb-staff-grid__hover,
.sb-staff-grid__card--has-hover.is-active .sb-staff-grid__hover {
	background-color: var(--sb-color-lavender);
	transform: translateY(0);
}

.sb-staff-grid__hover-body {
	padding: 0 20px 20px;
	margin-top: -20px;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 300ms ease, transform 300ms ease;
}

.sb-staff-grid__card--has-hover:hover .sb-staff-grid__hover-body,
.sb-staff-grid__card--has-hover:focus-within .sb-staff-grid__hover-body,
.sb-staff-grid__card--has-hover.is-active .sb-staff-grid__hover-body {
	opacity: 1;
	transform: translateY(0);
	transition-delay: 150ms;
}

.sb-staff-grid__hover-bio {
	font-family: var(--sb-font-family);
	font-style: normal;
	font-weight: 300;
	font-size: 15px;
	line-height: 1.5;
	color: rgb(255 255 255 / 92%);
	margin: 0 0 14px;
}

.sb-staff-grid__hover-bio p {
	margin: 0 0 10px !important;
}

.sb-staff-grid__hover-bio p:last-child {
	margin-bottom: 0 !important;
}

.sb-staff-grid__hover-actions {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.sb-staff-grid__hover-actions a {
	font-family: var(--sb-font-family);
	font-style: normal;
	font-weight: 600;
	font-size: 14px;
	text-decoration: underline;
	text-underline-offset: 4px;
	transition: color 200ms ease;
}

/* Both links — white at rest, switch to the same dark gray used for
   headings on hover. */
.sb-staff-grid__hover-book,
.sb-staff-grid__hover-profile {
	color: var(--sb-color-white) !important;
}

.sb-staff-grid__hover-book:hover,
.sb-staff-grid__hover-profile:hover {
	color: var(--sb-color-body) !important;
}

@media (max-width: 960px) {
	.sb-staff-grid {
		padding-top: 20px;
		padding-bottom: 20px;
	}

	.sb-staff-grid__heading {
		font-size: clamp(32px, 8vw, 40px);
		line-height: 1.15;
	}

	.sb-staff-grid__intro {
		font-size: clamp(18px, 4vw, 22px);
		line-height: 1.5;
	}

	.sb-staff-grid__name,
	.sb-staff-grid__hover-name {
		font-size: clamp(18px, 4vw, 22px);
	}
}

@media (min-width: 641px) and (max-width: 960px) {
	.sb-staff-grid {
		/* No left/right padding here — .sb-container already applies
		   --sb-container-gutter (100px) on its own; adding another 100px on
		   the section too was stacking into a 200px inset each side. */
		padding-top: 40px;
		padding-bottom: 40px;
	}
}
