/* ==========================================================================
   Simply Team — [simply_team] shortcode styles
   Tokens: --client-accent, --client-heading, --client-font-display,
           --client-font-primary, --client-section-dark-bg/text
   ========================================================================== */

:root {
	--st-accent:       var( --client-accent,           #2563eb );
	--st-heading:      var( --client-heading,          #1a1a1a );
	--st-font-display: var( --client-font-display,     sans-serif );
	--st-font-primary: var( --client-font-primary,     sans-serif );
	--st-panel-bg:     var( --client-section-dark-bg,  #1a1a1a );
	--st-panel-text:   var( --client-section-dark-text,#f0f0f0 );
	--st-radius:       var( --client-radius, 0px );
	--st-gap:          24px;
}


/* Department filter
--------------------------------------------- */

/* --st-filter-color adapts to whichever section the shortcode sits in */
.st-filters { --st-filter-color: var( --client-heading, #1a1a1a ); }
.is-dark    .st-filters { --st-filter-color: var( --client-section-dark-heading,   #ffffff ); }
.is-light   .st-filters { --st-filter-color: var( --client-section-light-heading,  #1a1a1a ); }
.is-brand-1 .st-filters { --st-filter-color: var( --client-section-brand1-heading, #ffffff ); }
.is-brand-2 .st-filters { --st-filter-color: var( --client-section-brand2-heading, #ffffff ); }

.st-filters {
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
	margin-bottom: 32px;
}

.st-filter-btn {
	background: none !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: var( --st-filter-color ) !important;
	font-family: var( --client-font-display, sans-serif );
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	padding: 0 !important;
	opacity: 1;
	transition: opacity 0.2s ease, text-decoration-color 0.2s ease;
}

.st-filter-btn:hover,
.st-filter-btn:focus {
	background: none !important;
	background-color: transparent !important;
	box-shadow: none !important;
	opacity: 0.75;
	text-decoration: underline !important;
	color: var( --st-filter-color ) !important;
	transform: none !important;
}

.st-filter-btn.is-active,
.st-filter-btn.is-active:hover {
	background: none !important;
	background-color: transparent !important;
	box-shadow: none !important;
	text-decoration: underline !important;
	color: var( --st-filter-color ) !important;
	transform: none !important;
}


/* Grid
--------------------------------------------- */

.st-team {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var( --st-gap );
}

.st-card {
	flex: 0 0 calc( ( 100% - ( var( --st-columns, 3 ) - 1 ) * var( --st-gap, 24px ) ) / var( --st-columns, 3 ) );
	min-width: 0;
}

@media ( max-width: 960px ) {
	.st-card { flex: 0 0 calc( ( 100% - var( --st-gap, 24px ) ) / 2 ); }
}

@media ( max-width: 600px ) {
	.st-card { flex: 0 0 100%; }
}


/* Card
--------------------------------------------- */

.st-card {
	position: relative;
}

.st-card__inner {
	width: 100%; /* fill the .st-card grid cell */
	text-align: left;
	display: flex;
	flex-direction: column;
	/* base visual (bg, radius, shadow, overflow) inherited from .ss-card */
}


/* Headshot
--------------------------------------------- */

.st-card__photo {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f0f0f0;
}

.st-card__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
}

.st-card__photo-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient( 135deg, #e0e0e0, #c8c8c8 );
}


/* Card body
--------------------------------------------- */

/* Default: dark body — contrasts against a light/white section.
   Override ss-card's white background. */
.st-card__body {
	padding: 16px 20px 20px; /* override ss-card-body bottom */
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
	background: var( --client-section-dark-bg, #1a1a1a );
}

/* 3-class specificity (0,3,0) beats simply-starter's ss-card h3 reset (0,2,1) */
.st-card__inner .st-card__body .st-card__name {
	font-family: var( --st-font-display );
	font-weight: 700;
	color: #ffffff !important;
	margin: 0;
	line-height: 1.2;
}

.st-card__inner .st-card__body .st-card__role {
	color: var( --client-section-dark-heading, rgba( 255, 255, 255, 0.5 ) );
	margin: 2px 0 0;
}

.st-card__contact {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 6px;
}

.st-card__phone,
.st-card__email {
	color: var( --client-section-dark-text, rgba( 255, 255, 255, 0.65 ) );
	font-family: var( --st-font-primary );
}

.st-card__more {
	display: inline-block;
	margin-top: 6px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var( --client-section-dark-text, rgba( 255, 255, 255, 0.75 ) );
	background: rgba( 255, 255, 255, 0.12 );
	border: 1px solid rgba( 255, 255, 255, 0.25 );
	border-radius: var( --client-radius, 100px );
	padding: 10px 28px;
	cursor: pointer;
	align-self: flex-start;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.st-card__more:hover,
.st-card__more:focus-visible {
	background: rgba( 255, 255, 255, 0.22 );
	border-color: rgba( 255, 255, 255, 0.45 );
	outline: none;
}



/* Popup modal
--------------------------------------------- */

.st-panel {
	position: fixed;
	inset: 0;
	margin: auto;
	width: min( 600px, 92vw );
	height: fit-content;
	max-height: calc( 100vh - 40px );
	background: var( --st-panel-bg );
	color: var( --st-panel-text );
	box-shadow: 0 24px 64px rgba( 0, 0, 0, 0.45 );
	border: 5px solid #fff;
	border-radius: var( --client-radius, 8px );
	transform: translateY( 10px );
	opacity: 0;
	pointer-events: none;
	transition: transform 0.3s cubic-bezier( 0.4, 0, 0.2, 1 ), opacity 0.3s ease;
	overflow-y: auto;
	z-index: 100002;
	padding: 0;
	box-sizing: border-box;
}

.st-panel.is-open {
	transform: translateY( 0 );
	opacity: 1;
	pointer-events: auto;
}


/* Panel header
--------------------------------------------- */

.st-panel__header {
	display: grid;
	grid-template-columns: 90px 1fr auto;
	gap: 16px;
	align-items: start;
	padding: 28px 24px 24px;
	border-bottom: 1px solid rgba( 255, 255, 255, 0.1 );
}

.st-panel__photo {
	width: 90px;
	height: 90px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
}

.st-panel__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
}

.st-panel__intro {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding-top: 4px;
}

.st-panel__name {
	font-family: var( --st-font-display );
	font-weight: 700;
	color: #ffffff !important;
	margin: 0;
	line-height: 1.2;
}

.st-panel__role {
	font-size: 0.7em;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba( 255, 255, 255, 0.5 );
	margin: 0;
}

.st-panel__phone,
.st-panel__email {
	color: rgba( 255, 255, 255, 0.65 );
	text-decoration: none;
}

.st-panel__phone:hover,
.st-panel__email:hover {
	color: #fff;
}


/* Close button
--------------------------------------------- */

.st-panel__close {
	background: none;
	border: none;
	color: rgba( 255, 255, 255, 0.5 );
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: color 0.15s ease, background 0.15s ease;
	flex-shrink: 0;
}

.st-panel__close:hover,
.st-panel__close:focus-visible {
	color: #fff;
	background: rgba( 255, 255, 255, 0.1 );
	outline: none;
}


/* Panel bio
--------------------------------------------- */

.st-panel__bio {
	padding: 28px 24px 48px;
	font-family: var( --st-font-primary );
	line-height: 1.7;
	color: rgba( 255, 255, 255, 0.82 );
}

.st-panel__bio p {
	margin: 0 0 1em;
}

.st-panel__bio p:last-child {
	margin-bottom: 0;
}


/* Overlay
--------------------------------------------- */

.st-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, 0.72 );
	z-index: 100001;
	cursor: pointer;
}

.st-overlay.is-visible {
	display: block;
}

body.st-panel-open {
	overflow: hidden;
}
