/* =============================================================================
 * Staff Biographies page
 * Design copied from the prototype (chief-staff-biographies.html).
 * ============================================================================= */

.sccfd-staff {
	max-width: 1240px;
	margin: 0 auto;
	padding: 48px 32px 64px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}


/* Hidden by the search or a filter. Needed because the spotlight uses display: grid. */
.sccfd-staff [hidden] {
	display: none !important;
}


/* ----- Search box ----- */

.sccfd-staff__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin-bottom: 20px;
	padding: 18px 22px;
	border: 1px solid #e1e5ea;
	border-radius: 8px;
	background: #f7f8fa;
}

.sccfd-staff__search {
	position: relative;
	flex: 1;
	min-width: 220px;
}

.sccfd-staff__search svg {
	position: absolute;
	top: 50%;
	left: 14px;
	width: 18px;
	height: 18px;
	color: #5b6472;
	transform: translateY(-50%);
	pointer-events: none;
}

.sccfd-staff__search input {
	box-sizing: border-box;
	width: 100%;
	padding: 11px 14px 11px 42px;
	border: 1.5px solid #e1e5ea;
	border-radius: 6px;
	background: #fff;
	color: #16191f;
	font-family: inherit;
	font-size: 14.5px;
}

.sccfd-staff__search input:focus {
	border-color: #063a78;
	outline: none;
	box-shadow: 0 0 0 3px rgba(6, 58, 120, 0.12);
}

.sccfd-staff__total {
	color: #5b6472;
	font-size: 13.5px;
	font-weight: 600;
	white-space: nowrap;
}


/* ----- Filter buttons ----- */

.sccfd-staff__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 36px;
}

.sccfd-staff__filter {
	padding: 8px 16px;
	border: 1.5px solid #e1e5ea;
	border-radius: 999px;
	background: #fff;
	color: #5b6472;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
}

.sccfd-staff__filter:hover {
	border-color: #063a78;
	color: #063a78;
}

/* The chosen filter. */
.sccfd-staff__filter[aria-pressed="true"] {
	border-color: #063a78;
	background: #063a78;
	color: #fff;
}

.sccfd-staff__filter:focus-visible {
	outline: 3px solid #f1d11a;
	outline-offset: 2px;
}


/* ----- "No leaders match your search" ----- */

.sccfd-staff__no-results {
	padding: 60px 20px;
	color: #5b6472;
	font-size: 15px;
	text-align: center;
}


/* ----- Photo / initials (used in cards, spotlight and pop-up) ----- */

.sccfd-staff__photo img,
.sccfd-staff__spotlight-photo img,
.sccfd-bio__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 15%;
}

/* No photo yet: white initials on a red square, like the prototype. */
.sccfd-staff__photo,
.sccfd-staff__spotlight-photo,
.sccfd-bio__photo {
	container-type: inline-size; /* Lets the initials size themselves to the frame. */
}

.sccfd-staff__initials {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: #b32b25;
	color: #fff;
	font-family: Arial, sans-serif;
	font-size: 37cqi; /* 37% of the frame width, same size as the prototype. */
	font-weight: 700;
	line-height: 1;
}

/* Every second square is navy blue. */
.sccfd-staff__initials.is-blue {
	background: #063a78;
}


/* ----- Fire Chief spotlight ----- */

.sccfd-staff__spotlight {
	position: relative;
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 36px;
	align-items: center;
	margin-bottom: 48px;
	padding: 36px;
	overflow: hidden;
	border-radius: 10px;
	background: linear-gradient(120deg, #063a78, #052a58);
	color: #fff;
}

/* Soft gold glow in the top right corner. */
.sccfd-staff__spotlight::before {
	content: "";
	position: absolute;
	top: -100px;
	right: -60px;
	width: 280px;
	height: 280px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(241, 209, 26, 0.18), transparent 70%);
}

.sccfd-staff__spotlight-photo {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border: 3px solid rgba(255, 255, 255, 0.25);
	border-radius: 10px;
}

.sccfd-staff__spotlight-info {
	position: relative;
}

.sccfd-staff__badge {
	display: inline-block;
	margin-bottom: 14px;
	padding: 5px 12px;
	border-radius: 999px;
	background: #f1d11a;
	color: #3a2e00;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.sccfd-staff__spotlight h2 {
	margin: 0 0 6px;
	color: #fff;
	font-size: 30px;
	font-weight: 800;
	line-height: 1.2;
}

.sccfd-staff__spotlight p {
	max-width: 70ch;
	margin: 0 0 20px;
	color: #dce6f2;
	font-size: 15px;
	line-height: 1.7;
}

.sccfd-staff__spotlight .sccfd-staff__spotlight-since {
	margin-bottom: 18px;
	color: #c9d6e8;
	font-size: 15.5px;
	font-weight: 600;
}

.sccfd-staff__spotlight-button {
	padding: 14px 24px;
	border: 0;
	border-radius: 4px;
	background: #fff;
	color: #063a78;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}

.sccfd-staff__spotlight-button:hover {
	background: #f7f8fa;
}


/* ----- Group title: "EXECUTIVE LEADERSHIP ───────── 2 leaders" ----- */

.sccfd-staff__group {
	margin-bottom: 48px;
}

.sccfd-staff__group-title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
}

.sccfd-staff__group-title h2 {
	margin: 0;
	color: #063a78;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.sccfd-staff__line {
	flex: 1;
	height: 1px;
	background: #e1e5ea;
}

.sccfd-staff__count {
	color: #5b6472;
	font-size: 12.5px;
	font-weight: 600;
}


/* ----- Cards ----- */

.sccfd-staff__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.sccfd-staff__card {
	position: relative;
	overflow: hidden;
	border: 1px solid #e1e5ea;
	border-radius: 8px;
	background: #fff;
	transition: box-shadow 0.15s, transform 0.15s;
}

.sccfd-staff__card:hover {
	box-shadow: 0 10px 26px rgba(6, 58, 120, 0.14);
	transform: translateY(-3px);
}

.sccfd-staff__photo {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f7f8fa;
}

.sccfd-staff__card-body {
	padding: 16px 18px 18px;
}

.sccfd-staff__card h3 {
	margin: 0 0 4px;
	color: #16191f;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.3;
}

.sccfd-staff__job {
	margin: 0 0 10px;
	color: #b32b25;
	font-size: 13px;
	font-weight: 600;
}

/* Teaser: 2 lines, then "…". */
.sccfd-staff__teaser {
	display: -webkit-box;
	margin: 0 0 12px;
	overflow: hidden;
	color: #5b6472;
	font-size: 13px;
	line-height: 1.5;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.sccfd-staff__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.sccfd-staff__since {
	padding: 4px 10px;
	border-radius: 999px;
	background: #f7f8fa;
	color: #063a78;
	font-size: 11.5px;
	font-weight: 700;
}

.sccfd-staff__open {
	padding: 0;
	border: 0;
	background: none;
	color: #b32b25;
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
}

/* The button stretches over the whole card, so the card is one big click area. */
.sccfd-staff__open::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* Gold outline on the whole card for keyboard users. */
.sccfd-staff__card:has(.sccfd-staff__open:focus-visible) {
	outline: 3px solid #f1d11a;
	outline-offset: 2px;
}

.sccfd-staff__open:focus-visible {
	outline: none;
}

.sccfd-staff__spotlight-button:focus-visible,
.sccfd-bio__close:focus-visible {
	outline: 3px solid #f1d11a;
	outline-offset: 2px;
}


/* ----- Bio pop-up ----- */

.sccfd-bio {
	width: calc(100% - 48px);
	max-width: 760px;
	max-height: calc(100vh - 80px);
	padding: 0;
	overflow-y: auto;
	border: 0;
	border-radius: 10px;
	background: #fff;
	color: #16191f;
}

.sccfd-bio::backdrop {
	background: rgba(16, 19, 31, 0.78);
}

/* Stop the page behind from scrolling while a pop-up is open. */
html:has(.sccfd-bio[open]) {
	overflow: hidden;
}

.sccfd-bio__close {
	position: absolute;
	top: 20px;
	right: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: rgba(16, 19, 31, 0.5);
	color: #fff;
	cursor: pointer;
}

.sccfd-bio__close:hover {
	background: rgba(16, 19, 31, 0.75);
}

.sccfd-bio__close svg {
	width: 18px;
	height: 18px;
}

.sccfd-bio__head {
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 26px;
	align-items: center;
	padding: 32px;
	background: #f7f8fa;
}

.sccfd-bio__photo {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 8px;
}

.sccfd-bio__head h2 {
	margin: 0 0 6px;
	color: #063a78;
	font-size: 24px;
	font-weight: 800;
	line-height: 1.25;
}

.sccfd-bio__job {
	margin: 0;
	color: #b32b25;
	font-size: 14.5px;
	font-weight: 700;
}

.sccfd-bio__text {
	padding: 32px;
}

.sccfd-bio__text p {
	margin: 0 0 16px;
	font-size: 15px;
	line-height: 1.75;
}

.sccfd-bio__text p:last-child {
	margin-bottom: 0;
}


/* ----- Smaller screens ----- */

@media (max-width: 900px) {
	.sccfd-staff__spotlight {
		grid-template-columns: 1fr;
	}

	.sccfd-staff__spotlight-photo {
		max-width: 220px;
	}

	.sccfd-staff__grid {
		grid-template-columns: 1fr 1fr;
	}

	.sccfd-bio__head {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.sccfd-bio__photo {
		width: 160px;
		margin: 0 auto;
	}
}

@media (max-width: 600px) {
	.sccfd-staff {
		padding: 32px 20px 48px;
	}

	.sccfd-staff__spotlight {
		padding: 24px;
	}

	.sccfd-staff__grid {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sccfd-staff__card,
	.sccfd-staff__card:hover {
		transform: none;
		transition: none;
	}
}
