/**
 * Team — archive (templates/archive-team.html) + single view
 * (templates/single-team.html). .team-card mirrors the About page's
 * .about-leader-card visual recipe (full-bleed photo, gradient name
 * overlay) but is its own component since about.css only loads on
 * the About page — same "duplicate the recipe, don't cross-import"
 * convention used throughout this theme.
 */

.team-grid-section {
	padding: clamp(48px, 6vw, 80px) 8.75vw clamp(88px, 10vw, 150px);
	background: var(--wp--preset--color--base);
}
.team-grid-section__inner {
	max-width: 1320px;
	margin: 0 auto;
}
.team-grid-section__empty {
	color: var(--wp--preset--color--muted);
	font-size: 1rem;
	text-align: center;
}
.team-section + .team-section {
	margin-top: clamp(48px, 6vw, 72px);
}
.team-section__label {
	position: relative;
	margin: 0 0 28px;
	padding-bottom: 14px;
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.4rem, 2.2vw, 1.75rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	text-transform: uppercase;
}
.team-section__label::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 48px;
	height: 3px;
	border-radius: 2px;
	background: var(--wp--preset--color--secondary);
}
.team-grid-section__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 28px;
}

.team-card {
	position: relative;
	isolation: isolate;
}
.team-card__link {
	display: block;
	position: relative;
	isolation: isolate;
	overflow: hidden;
	aspect-ratio: 3 / 4;
	border-radius: 24px;
	box-shadow: 0 16px 32px rgba(40, 40, 40, 0.12);
	text-decoration: none;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.team-card__link:hover {
	transform: translateY(-6px);
	box-shadow: 0 24px 48px rgba(40, 40, 40, 0.2);
}
.team-card__photo {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.team-card__link:hover .team-card__photo {
	transform: scale(1.05);
}
.team-card__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, transparent 45%, rgba(20, 20, 20, 0.88));
}
.team-card__info {
	position: absolute;
	z-index: 2;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 24px 22px;
	color: var(--wp--preset--color--base);
}
.team-card__info h3 {
	margin: 0 0 4px;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.15rem;
	font-weight: 800;
}
.team-card__role {
	margin: 0;
	color: var(--wp--preset--color--secondary);
	font-size: 0.85rem;
	font-weight: 700;
}
.team-card__excerpt {
	margin: 14px 4px 0;
	color: var(--wp--preset--color--muted);
	font-size: 0.9rem;
	line-height: 1.55;
}
/* One or more platforms (LinkedIn, X, Facebook, Instagram — whichever
   the admin filled in on that member's post) as a row of small badges
   instead of a single fixed LinkedIn icon. */
.team-card__social {
	position: absolute;
	z-index: 3;
	top: 16px;
	right: 16px;
	display: flex;
	gap: 8px;
}
.team-card__social-icon {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: var(--wp--preset--color--primary);
	box-shadow: 0 6px 14px rgba(40, 40, 40, 0.25);
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.team-card__social-icon:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	transform: translateY(-2px);
}

/* ===== Single team member ===== */
.team-single {
	padding: clamp(48px, 6vw, 80px) 8.75vw clamp(88px, 10vw, 150px);
}
.team-single__grid.wp-block-columns {
	max-width: 1100px;
	margin: 0 auto;
	gap: clamp(32px, 5vw, 64px);
	align-items: start;
}
.team-single__media {
	flex: 0 0 340px !important;
}
.team-single__photo {
	margin: 0;
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 24px 48px rgba(40, 40, 40, 0.16);
}
.team-single__photo img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}
.team-single__content {
	flex: 1 1 0% !important;
	padding-top: 8px;
}
.team-single__name.wp-block-post-title {
	margin: 4px 0 8px;
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.9rem, 3.6vw, 2.75rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.1;
	text-transform: uppercase;
}
.team-single__role {
	margin: 0 0 24px;
	color: var(--wp--preset--color--primary);
	font-size: 1.05rem;
	font-weight: 700;
}
.team-single__bio.wp-block-post-content p {
	margin: 0 0 18px;
	color: var(--wp--preset--color--muted);
	font-size: clamp(1rem, 0.95rem + 0.2vw, 1.1rem);
	line-height: 1.75;
}
.team-single__actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 20px;
	margin-top: 28px;
}
.team-single__social {
	display: flex;
	gap: 10px;
}
.team-single__social-icon {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--primary);
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.team-single__social-icon:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	transform: translateY(-2px);
}
.team-single__back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--wp--preset--color--contrast);
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
}
.team-single__back:hover {
	color: var(--wp--preset--color--primary);
}

@media (max-width: 900px) {
	.team-grid-section__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.team-single__grid.wp-block-columns {
		flex-wrap: wrap;
	}
	.team-single__media {
		flex: 1 1 100% !important;
		max-width: 320px;
	}
	.team-single__content {
		flex: 1 1 100% !important;
	}
}
@media (max-width: 700px) {
	.team-grid-section__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 480px) {
	.team-grid-section__grid {
		grid-template-columns: 1fr;
	}
}
