/* CoF Staff Listing — front end + editor.
 * Refined (default): soft shadow, icon on a tinted disc, lift on hover. Classic matches the ACF
 * "Staff Listing" (bordered card, icon/photo left, name + accent rule + gray details right; stacked
 * and centered below 1200px). The accent color is decorative (border + rule),
 * so any color works; all text stays dark: name #1d1d1d (16:1), details #6e6e6e (5.1:1). */

.wp-block-cof-staff-listing {
	--cof-staff-color: #90b6d2;
	--cof-staff-focus: var(--cityBlue1, #0063a7);
	position: relative; /* containing block for the stretched link, outside the card's overflow clip */
	margin-bottom: 2.5rem;
}
.wp-block-cof-staff-listing *,
.wp-block-cof-staff-listing *::before,
.wp-block-cof-staff-listing *::after {
	box-sizing: border-box;
}

.wp-block-cof-staff-listing .cof-staff__card {
	display: flex;
	min-height: 250px;
	overflow: hidden;
	border: 2px solid var(--cof-staff-color);
	border-radius: 1rem;
	background-color: #fff;
	font-size: 2rem;
	font-weight: 600;
	letter-spacing: 1px;
}

/* A card alone in a column stretches to the row's height, so cards side by side always match
   (the theme's vertically centered columns otherwise size each card to its own text). */
.wp-block-column:has(> .wp-block-cof-staff-listing:only-child) {
	display: flex;
	flex-direction: column;
	align-self: stretch;
}
.wp-block-column > .wp-block-cof-staff-listing:only-child {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
}
.wp-block-column > .wp-block-cof-staff-listing:only-child > .cof-staff__card {
	flex: 1 1 auto;
}

/* Media (left) */
.wp-block-cof-staff-listing .cof-staff__media {
	display: flex;
	width: 65%;
	margin: 0;
	padding: 0;
}
.wp-block-cof-staff-listing .cof-staff__img {
	display: flex;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	transition: transform 0.25s ease-in-out;
}
/* Photos fill the media area instead of sizing it, so every card in a row is the same height
   whatever shape the uploaded photo is (a taller photo used to make its card taller). */
.wp-block-cof-staff-listing.is-photo .cof-staff__media {
	position: relative;
	overflow: hidden;
}
.wp-block-cof-staff-listing.is-photo .cof-staff__img {
	position: absolute;
	inset: 0;
	object-position: center 25%; /* keep faces in frame when cropped */
}
.wp-block-cof-staff-listing.is-icon .cof-staff__img {
	width: 75%;
	margin-left: auto;
	margin-right: auto;
	object-fit: contain;
}
.wp-block-cof-staff-listing.has-link:hover .cof-staff__img,
.wp-block-cof-staff-listing.has-link:focus-within .cof-staff__img {
	transform: scale(1.05);
}

/* Text (right) */
.wp-block-cof-staff-listing .cof-staff__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	width: 100%;
	padding: 1.5rem;
}
.wp-block-cof-staff-listing .cof-staff__body > * {
	display: block;
	margin: 0;
	padding: 0;
	font-family: inherit;
	line-height: inherit;
}
.wp-block-cof-staff-listing .cof-staff__name {
	color: var(--dark1, #1d1d1d);
	font-size: 1.15rem;
	font-weight: inherit;
	letter-spacing: inherit;
}
.wp-block-cof-staff-listing .cof-staff__name::after {
	content: "";
	display: flex;
	width: 25px;
	height: 2px;
	margin: 6px 0 16px; /* was 10px 0 */
	background-color: var(--cof-staff-color);
}
.wp-block-cof-staff-listing .cof-staff__name a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: inherit;
	text-decoration: none;
	transition: text-decoration-color 0.25s ease;
}
/* Hover cue without changing the text color (the accent is often too light to read as text) */
.wp-block-cof-staff-listing.has-link:hover .cof-staff__name a,
.wp-block-cof-staff-listing .cof-staff__name a:focus-visible {
	text-decoration: underline;
	text-decoration-color: var(--cof-staff-color);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.25em;
}
/* The name's link covers the whole card, so the icon/photo is clickable too */
.wp-block-cof-staff-listing .cof-staff__name a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: 1rem;
}
.wp-block-cof-staff-listing .cof-staff__name a:focus {
	outline: none;
}
.wp-block-cof-staff-listing .cof-staff__name a:focus-visible::after {
	outline: 3px solid var(--cof-staff-focus); /* 6.3:1 on white */
	outline-offset: 3px;
}

.wp-block-cof-staff-listing .cof-staff__title,
.wp-block-cof-staff-listing .cof-staff__details {
	color: var(--gray1, #6e6e6e);
	font-family: "proxima-nova", "Proxima Nova", sans-serif;
	font-size: 0.9rem;
	font-weight: inherit;
	letter-spacing: inherit;
}
/* Links inside the details sit above the stretched card link */
.wp-block-cof-staff-listing .cof-staff__details a {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	color: var(--cityBlue1, #0063a7);
	text-decoration: underline;
}
.wp-block-cof-staff-listing .cof-staff__details a:focus-visible {
	outline: 2px solid var(--cof-staff-focus);
	outline-offset: 2px;
}

/* cof-accessible-pdf: one PDF button, in the card's top-right corner, above the stretched link */
.wp-block-cof-staff-listing .cof-staff__name .cof-apdf-wrapper {
	position: static;
	display: inline;
}
.wp-block-cof-staff-listing .cof-staff__name .cof-apdf-btn {
	position: absolute;
	top: 8px;
	right: 8px;
	left: auto;
	z-index: 2;
	width: 28px;
	height: 28px;
	margin-left: 0;
	transform: none;
}

/* Stacked and centered below 1200px, like the ACF card */
@media (max-width: 1199px) {
	.wp-block-cof-staff-listing .cof-staff__card {
		flex-direction: column;
		align-items: center;
		min-height: 300px;
	}
	.wp-block-cof-staff-listing .cof-staff__media {
		width: 100%;
	}
	.wp-block-cof-staff-listing .cof-staff__img {
		min-height: 325px;
	}
	.wp-block-cof-staff-listing.is-photo .cof-staff__media {
		height: 325px;
	}
	.wp-block-cof-staff-listing.is-icon .cof-staff__img {
		width: 50%;
		min-height: auto;
		padding: 1rem;
	}
	.wp-block-cof-staff-listing .cof-staff__body {
		align-items: center;
		justify-content: flex-start;
		min-height: 140px;
		text-align: center;
	}
	.wp-block-cof-staff-listing .cof-staff__name::after {
		margin-left: auto;
		margin-right: auto;
	}
}
@media (max-width: 799px) {
	.wp-block-cof-staff-listing .cof-staff__name a {
		justify-content: center;
		width: 100%;
	}
	.wp-block-cof-staff-listing .cof-staff__title,
	.wp-block-cof-staff-listing .cof-staff__details {
		padding-bottom: 1rem;
	}
}

/* -----------------------------------------------------------------------------------------------
 * Refined (default): soft shadow instead of the colored border, icon on a tinted disc, lift on hover.
 * --------------------------------------------------------------------------------------------- */
.wp-block-cof-staff-listing.is-style-refined .cof-staff__card {
	border: 1px solid #e3e8ed;
	border-radius: 18px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.06);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.wp-block-cof-staff-listing.is-style-refined .cof-staff__name a::after {
	border-radius: 18px;
}
.wp-block-cof-staff-listing.is-style-refined.has-link:hover .cof-staff__card,
.wp-block-cof-staff-listing.is-style-refined.has-link:focus-within .cof-staff__card {
	transform: translateY(-3px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 16px 32px rgba(0, 0, 0, 0.12);
}
.wp-block-cof-staff-listing.is-style-refined.is-icon .cof-staff__media {
	align-items: center;
	justify-content: center;
	padding: 1.25rem 0 1.25rem 1.25rem;
}
.wp-block-cof-staff-listing.is-style-refined.is-icon .cof-staff__img {
	width: 100%;
	max-width: 150px;
	height: auto;
	aspect-ratio: 1;
	padding: 1.4rem;
	border-radius: 50%;
	background-color: color-mix(in srgb, var(--cof-staff-color) 18%, #fff);
}
.wp-block-cof-staff-listing.is-style-refined.has-link:hover .cof-staff__img,
.wp-block-cof-staff-listing.is-style-refined.has-link:focus-within .cof-staff__img {
	transform: none;
}
.wp-block-cof-staff-listing.is-style-refined .cof-staff__name {
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: 0.5px;
}
.wp-block-cof-staff-listing.is-style-refined .cof-staff__name::after {
	width: 32px;
	height: 3px;
	border-radius: 3px;
}
@media (max-width: 1199px) {
	.wp-block-cof-staff-listing.is-style-refined.is-icon .cof-staff__media {
		padding: 1.5rem 0 0;
	}
	.wp-block-cof-staff-listing.is-style-refined.is-icon .cof-staff__img {
		width: 50%;
		min-height: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-cof-staff-listing .cof-staff__img,
	.wp-block-cof-staff-listing.is-style-refined .cof-staff__card {
		transition: none;
	}
	.wp-block-cof-staff-listing.has-link:hover .cof-staff__img,
	.wp-block-cof-staff-listing.has-link:focus-within .cof-staff__img,
	.wp-block-cof-staff-listing.is-style-refined.has-link:hover .cof-staff__card,
	.wp-block-cof-staff-listing.is-style-refined.has-link:focus-within .cof-staff__card {
		transform: none;
	}
}

@media (forced-colors: active) {
	.wp-block-cof-staff-listing .cof-staff__card {
		border: 2px solid CanvasText;
	}
	.wp-block-cof-staff-listing .cof-staff__name::after {
		background-color: CanvasText;
	}
	.wp-block-cof-staff-listing .cof-staff__name a:focus-visible::after {
		outline-color: Highlight;
	}
}
