/**
 * Team Members — front-end styles.
 *
 * Every selector is scoped under `.team-directory` and every themeable
 * value is exposed as a CSS custom property with a sensible default, so
 * the plugin's look is self-contained and independent of the active theme.
 * Defaults are tuned to match this site's brand (blue accent, rounded
 * cards, Nunito type) without hard-depending on any theme file.
 *
 * Scroll-reveal animation ("basic animation") is provided by the `wow` +
 * `fadeInUp` classes on each card — these are handled by the WOW.js /
 * animate.css libraries already loaded site-wide, the same mechanism the
 * theme's own card grids (team, causes, testimonials) use. No extra JS
 * ships with this plugin.
 */
.team-directory {
	--team-accent: #0e649c;
	--team-heading-color: #283734;
	--team-text-color: #55605d;
	--team-card-bg: #ffffff;
	--team-card-radius: 14px;
	--team-tag-bg: #eaf3fa;
	--team-tag-color: #0e649c;
	--team-font: "Nunito", sans-serif;
	--team-filter-bg: #ffffff;
	--team-filter-color: #1c1c1c;
	--team-filter-hover-bg: #f3f0ea;
	--team-filter-active-bg: #12172a;
	--team-filter-active-color: #ffffff;
	--team-badge-bg: rgba( 255, 255, 255, 0.95 );
	--team-badge-color: #12172a;
	--team-role-color: rgba( 255, 255, 255, 0.85 );
	--team-tag-alt-bg: #fdece1;
	--team-tag-alt-color: #c1652f;
	--team-meta-label-color: #6b7a90;
	--team-meta-value-color: #12172a;
	--team-sidebar-bg: #fbfbfd;
	--team-sidebar-border: #e7ebf0;
	--team-muted-color: #6b7a90;

	font-family: var( --team-font );
	color: var( --team-text-color );
	margin: 0 0 2em;
	padding-top: 100px;
}

/* Wider than the theme's usual 1230px content container: the sidebar +
   4-across team grid needs the extra room so each card stays legible
   rather than cramming columns into the standard width. */
.team-directory__container {
	width: 100%;
	max-width: 1600px;
	margin: 0 auto;
	padding: 0 15px;
	box-sizing: border-box;
}

.team-directory__layout {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 36px;
	align-items: start;
}

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

/* ------------------------------------------------------------------ */
/* Sidebar filters                                                     */
/* ------------------------------------------------------------------ */

.team-directory__sidebar {
	background: var( --team-sidebar-bg );
	border: 1px solid var( --team-sidebar-border );
	border-radius: 16px;
	padding: 28px 24px;
	position: sticky;
	top: 24px;
}

@media ( max-width: 900px ) {
	.team-directory__sidebar {
		position: static;
	}
}

.team-directory__sidebar-title {
	font-size: 20px;
	font-weight: 800;
	color: var( --team-heading-color );
	margin: 0 0 24px;
}

.team-directory__filter-group {
	margin-bottom: 24px;
}

.team-directory__filter-group:last-of-type {
	margin-bottom: 20px;
}

.team-directory__filter-label {
	display: block;
	font-size: 14px;
	font-weight: 700;
	color: var( --team-heading-color );
	margin-bottom: 10px;
}

.team-directory__filter-group-title {
	font-size: 14px;
	font-weight: 800;
	color: var( --team-heading-color );
	margin: 0 0 16px;
}

.team-directory__search {
	position: relative;
}

.team-directory__search-input {
	width: 100%;
	font-family: var( --team-font );
	font-size: 14px;
	color: var( --team-text-color );
	background: #ffffff;
	border: 1px solid var( --team-sidebar-border );
	border-radius: 10px;
	padding: 11px 40px 11px 14px;
	box-sizing: border-box;
	appearance: none;
}

.team-directory__search-input:focus {
	outline: 2px solid var( --team-accent );
	outline-offset: 1px;
}

.team-directory__search-icon {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY( -50% );
	width: 14px;
	height: 14px;
	fill: var( --team-muted-color );
	pointer-events: none;
}

.team-directory__divider {
	border: none;
	border-top: 1px solid var( --team-sidebar-border );
	margin: 4px 0 20px;
}

.team-directory__checkbox {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 14px;
	color: var( --team-text-color );
	padding: 6px 0;
	cursor: pointer;
}

.team-directory__checkbox input {
	width: 16px;
	height: 16px;
	accent-color: var( --team-accent );
	cursor: pointer;
	flex-shrink: 0;
}

.team-directory__checkbox-label {
	flex: 1;
}

.team-directory__checkbox-count {
	color: var( --team-muted-color );
	font-weight: 600;
	font-size: 13px;
}

.team-directory__select-wrap {
	position: relative;
}

.team-directory__select {
	width: 100%;
	font-family: var( --team-font );
	font-size: 14px;
	color: var( --team-text-color );
	background: #ffffff;
	border: 1px solid var( --team-sidebar-border );
	border-radius: 10px;
	padding: 11px 36px 11px 14px;
	box-sizing: border-box;
	appearance: none;
	cursor: pointer;
}

.team-directory__select:focus {
	outline: 2px solid var( --team-accent );
	outline-offset: 1px;
}

.team-directory__select-icon {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY( -50% );
	width: 11px;
	height: 11px;
	fill: var( --team-muted-color );
	pointer-events: none;
}

.team-directory__clear {
	appearance: none;
	width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #ffffff;
	border: 1px solid var( --team-sidebar-border );
	border-radius: 999px;
	color: var( --team-heading-color );
	font-family: var( --team-font );
	font-size: 14px;
	font-weight: 700;
	padding: 12px 20px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.team-directory__clear:hover {
	background: var( --team-tag-bg );
}

.team-directory__clear svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
}

/* ------------------------------------------------------------------ */
/* Content: header + card grid + pagination                           */
/* ------------------------------------------------------------------ */

.team-directory__content-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 28px;
}

.team-directory__content-title {
	font-size: 20px;
	font-weight: 800;
	color: var( --team-accent );
	white-space: nowrap;
	margin: 0;
}

.team-directory__content-rule {
	flex: 1;
	height: 1px;
	background: var( --team-sidebar-border );
}

.team-directory__content-count {
	font-size: 14px;
	color: var( --team-muted-color );
	white-space: nowrap;
}

.team-directory__empty {
	font-size: 15px;
	color: var( --team-muted-color );
	padding: 40px 0;
	text-align: center;
}

.team-directory__group {
	margin-bottom: 48px;
}

.team-directory__group:last-child {
	margin-bottom: 0;
}

.team-directory__group-title {
	position: relative;
	display: inline-block;
	font-size: 22px;
	font-weight: 800;
	color: var( --team-heading-color );
	margin: 0 0 28px;
	padding-bottom: 12px;
}

.team-directory__group-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 48px;
	height: 3px;
	background: var( --team-accent );
	border-radius: 3px;
}

.team-directory__grid {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 28px;
}

@media ( max-width: 1200px ) {
	.team-directory__grid {
		grid-template-columns: repeat( 3, 1fr );
	}
}

@media ( max-width: 860px ) {
	.team-directory__grid {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media ( max-width: 560px ) {
	.team-directory__grid {
		grid-template-columns: 1fr;
	}
}

.team-directory__card {
	display: block;
	background: var( --team-card-bg );
	border: 1px solid var( --team-sidebar-border );
	border-radius: var( --team-card-radius );
	box-shadow: none;
	overflow: hidden;
	color: inherit;
	text-decoration: none;
	transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.team-directory__card:hover,
.team-directory__card:focus {
	color: inherit;
	text-decoration: none;
}

.team-directory__card:hover {
	transform: translateY( -4px );
	border-color: var( --team-accent );
	box-shadow: 0 10px 24px rgba( 0, 0, 0, 0.08 );
}

.team-directory__photo-wrap {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1 / 1;
}

.team-directory__photo {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.team-directory__card:hover .team-directory__photo {
	transform: scale( 1.08 );
}

.team-directory__photo--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: var( --team-tag-bg );
	color: var( --team-accent );
	font-size: 48px;
	font-weight: 800;
}

.team-directory__body {
	padding: 16px 18px 20px;
}

.team-directory__badge {
	display: inline-block;
	background: var( --team-tag-bg );
	color: var( --team-accent );
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.02em;
	padding: 5px 12px;
	border-radius: 999px;
	margin: 0 0 10px;
}

.team-directory__name {
	font-size: 17px;
	font-weight: 800;
	color: var( --team-heading-color );
	margin: 0 0 2px;
	line-height: 1.3;
}

.team-directory__role {
	font-size: 13px;
	font-weight: 600;
	color: var( --team-text-color );
	margin: 0 0 2px;
	line-height: 1.4;
}

.team-directory__org {
	font-size: 13px;
	color: var( --team-text-color );
	margin: 0 0 6px;
	line-height: 1.4;
}

.team-directory__location {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var( --team-muted-color );
	margin: 0 0 14px;
	line-height: 1.4;
}

.team-directory__location svg {
	width: 11px;
	height: 11px;
	fill: currentColor;
	flex-shrink: 0;
}

.team-directory__expertise-label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: var( --team-heading-color );
	margin-bottom: 4px;
}

.team-directory__expertise-value {
	font-size: 13px;
	color: var( --team-text-color );
	line-height: 1.5;
}

.team-directory__pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 40px;
}

.team-directory__page-btn {
	appearance: none;
	min-width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 10px;
	border: 1px solid var( --team-sidebar-border );
	border-radius: 8px;
	background: #ffffff;
	color: var( --team-text-color );
	font-family: var( --team-font );
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.team-directory__pagination .team-directory__page-btn {
	box-shadow: none;
}

.team-directory__page-btn:hover {
	background: var( --team-tag-bg );
}

.team-directory__page-btn.is-active {
	background: var( --team-accent );
	border-color: var( --team-accent );
	color: #ffffff;
}

.team-directory__page-btn.is-ellipsis {
	border: none;
	background: none;
	cursor: default;
	color: var( --team-muted-color );
}

.team-directory__page-btn.is-ellipsis:hover {
	background: none;
}

.team-directory__page-next {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.team-directory__page-next svg {
	width: 10px;
	height: 10px;
	fill: currentColor;
}

/* Respect reduced-motion preferences: skip the entrance animation, cards
   are simply visible immediately (WOW.js/animate.css already honour this
   site-wide, this is a defensive fallback). */
@media ( prefers-reduced-motion: reduce ) {
	.team-directory__card.wow {
		animation: none !important;
		opacity: 1 !important;
	}
}

/* ------------------------------------------------------------------ */
/* Single Team Member detail page                                     */
/* ------------------------------------------------------------------ */

.team-single {
	--team-accent: #0e649c;
	--team-heading-color: #283734;
	--team-text-color: #55605d;
	--team-tag-bg: #eaf3fa;
	--team-tag-color: #0e649c;
	--team-btn-bg: #fbd45a;
	--team-btn-color: #283734;
	--team-font: "Nunito", sans-serif;

	font-family: var( --team-font );
	color: var( --team-text-color );
	padding: 60px 0 80px;
}

.team-single__container {
	width: 100%;
	max-width: 1230px;
	margin: 0 auto;
	padding: 0 15px;
	box-sizing: border-box;
}

.team-single__back {
	display: inline-block;
	margin-bottom: 32px;
	color: var( --team-accent );
	font-weight: 700;
	text-decoration: none;
}

.team-single__back:hover {
	text-decoration: underline;
}

.team-single__grid {
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: 48px;
	align-items: start;
}

@media ( max-width: 780px ) {
	.team-single__grid {
		grid-template-columns: 1fr;
	}
}

.team-single__photo-wrap {
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 12px 32px rgba( 0, 0, 0, 0.1 );
}

.team-single__photo {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.team-single__photo--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	background: var( --team-tag-bg );
	color: var( --team-accent );
	font-size: 72px;
	font-weight: 800;
}

.team-single__tags {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 20px 0 0;
	padding: 0;
}

.team-single__tag {
	background: var( --team-tag-bg );
	color: var( --team-tag-color );
	font-size: 12px;
	font-weight: 700;
	padding: 10px 14px;
	line-height: 1.2;
	border-radius: 30px;
}

.team-single__name {
	font-size: 34px;
	font-weight: 800;
	color: var( --team-heading-color );
	margin: 0 0 10px;
	line-height: 1.2;
}

.team-single__role {
	font-size: 17px;
	font-weight: 700;
	color: var( --team-accent );
	margin: 0 0 14px;
}

.team-single__specialisation {
	margin: 0 0 20px;
}

.team-single__meta {
	list-style: none;
	margin: 0 0 28px;
	padding: 20px 0;
	border-top: 1px solid rgba( 0, 0, 0, 0.08 );
	border-bottom: 1px solid rgba( 0, 0, 0, 0.08 );
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.team-single__meta-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 15px;
}

.team-single__meta-icon {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
}

.team-single__meta-icon svg {
	width: 100%;
	height: 100%;
	fill: var( --team-accent );
}

.team-single__bio {
	font-size: 15px;
	line-height: 1.8;
	margin-bottom: 28px;
}

.team-single__bio p:last-child {
	margin-bottom: 0;
}

.team-single__contact {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.team-single__contact-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var( --team-btn-color );
	text-decoration: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-single__contact-btn:hover {
	color: var( --team-btn-color );
	transform: translateY( -3px );
	box-shadow: 0 10px 20px rgba( 14, 100, 156, 0.2 );
}

.team-single__contact-icon {
	width: 18px;
	height: 18px;
	display: inline-flex;
}

.team-single__contact-icon svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
}

@media ( prefers-reduced-motion: reduce ) {
	.team-single .wow {
		animation: none !important;
		opacity: 1 !important;
	}
}
