/**
 * Team Member Card (template-parts/cards/loop-team.php)
 *
 * Single source of truth for .team-grid-card, loaded site-wide from ThemeDefaults.
 * Used on the Our Team archive and "Meet Our Other Guides" on team profiles.
 * Grid layout (.team-cards-grid) stays with each parent block.
 * Tokens: DESIGN.md (Deep Alpine Teal #0F5F73, Glacier Border #DBEBEE, Slate #2E3336).
 */

.team-grid-card {
	box-sizing: border-box;
	height: 100%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid #E2E8F0;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 2px 6px rgba(11, 41, 56, 0.04);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.team-grid-card:hover {
	transform: translateY(-4px);
	border-color: #DBEBEE;
	box-shadow: 0 14px 28px -8px rgba(11, 41, 56, 0.14);
}

/* --- Photo: shorter landscape-ish crop, faces kept in frame --- */
.team-grid-card__media-link {
	display: block;
	text-decoration: none;
}

.team-grid-card__media {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3.4;
	overflow: hidden;
	background: #EBF5F7;
}

.team-grid-card__img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	object-position: center 22%;
	transition: transform 0.45s ease;
}

.team-grid-card:hover .team-grid-card__img {
	transform: scale(1.04);
}

.team-grid-card__avatar-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #0B252C, #0F5F73);
	color: #ffffff;
	font-size: 3.25rem;
	font-weight: 700;
}

/* --- Content --- */
.team-grid-card__content {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 1.25rem 1.35rem 1.3rem;
}

.team-grid-card__meta-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.4rem 0.6rem;
	margin-bottom: 0.75rem;
}

.team-grid-card__category {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	background: #EBF5F7;
	border: 1px solid #DBEBEE;
	color: #0F5F73;
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.team-grid-card__verified-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	color: #4F8A3A;
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	white-space: nowrap;
}

.team-grid-card__name {
	margin: 0 0 0.25rem;
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.team-grid-card__name a {
	color: #0B252C;
	text-decoration: none;
	transition: color 0.2s ease;
}

.team-grid-card__name a:hover {
	color: #0F5F73;
}

.team-grid-card__designation {
	margin: 0 0 0.75rem;
	color: #0F5F73;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.4;
}

/* Exactly 3 lines, ellipsis on the last one (no flex-grow: it breaks the clamp) */
.team-grid-card__bio {
	margin: 0 0 1.1rem;
	color: #475569;
	font-size: 0.88rem;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Footer pinned to the bottom so all cards line up */
.team-grid-card__footer {
	margin-top: auto;
	padding-top: 0.9rem;
	border-top: 1px solid #F1F5F9;
}

.team-grid-card__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: #0F5F73;
	font-size: 0.85rem;
	font-weight: 700;
	text-decoration: none;
	transition: gap 0.2s ease, color 0.2s ease;
}

.team-grid-card__link:hover {
	color: #0E4A58;
	gap: 0.6rem;
}

.team-grid-card a:focus-visible {
	outline: 2px solid #38BDF8;
	outline-offset: 2px;
	border-radius: 6px;
}

/* --- Phones: full-width card, a touch shorter photo --- */
@media (max-width: 640px) {
	.team-grid-card__media {
		aspect-ratio: 4 / 3;
	}

	.team-grid-card__content {
		padding: 1.1rem 1.15rem 1.2rem;
	}

	.team-grid-card__name {
		font-size: 1.12rem;
	}
}
