/* Team Grid block — front end styles */

.team-grid {
	display: grid;
	gap: 2rem;
	grid-template-columns: repeat(var(--team-cols, 3), 1fr);
}

.team-grid.columns-1 { --team-cols: 1; }
.team-grid.columns-2 { --team-cols: 2; }
.team-grid.columns-3 { --team-cols: 3; }
.team-grid.columns-4 { --team-cols: 4; }

@media (max-width: 480px) {
	.team-grid { --team-cols: 1 !important; }
}

@media (min-width: 481px) and (max-width: 782px) {
	.team-grid { --team-cols: 2 !important; }
}

/* Card — override all theme link styles */
.team-card,
.team-card:link,
.team-card:visited,
.team-card:hover,
.team-card:active,
.team-card:focus {
	display: flex;
	flex-direction: column;
	text-decoration: none !important;
	color: inherit !important;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-card:hover {
	transform: translateY(-4px) !important;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12) !important;
}

.team-card:focus-visible {
	outline: 3px solid #0073aa;
	outline-offset: 2px;
}

/* Kill any theme underlines or borders on child elements */
.team-card *,
.team-card *::before,
.team-card *::after {
	text-decoration: none !important;
	border-bottom: none !important;
	box-shadow: none !important;
}

/* Photo — flush to top, no gap below */
.team-card__photo {
	overflow: hidden;
	flex-shrink: 0;
	line-height: 0; /* removes the small gap browsers add under inline images */
}

.team-card__photo img,
.team-card__photo .wp-post-image {
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	object-position: top center;
	display: block !important;
	transition: transform 0.3s ease;
	border: none !important;
	border-radius: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

.team-card:hover .team-card__photo img,
.team-card:hover .team-card__photo .wp-post-image {
	transform: scale(1.04);
}

/* Info */
.team-card__info {
	padding: 0.75rem 1rem 1rem;
	background: #fff;
}

.team-card__name {
	font-size: 1rem !important;
	font-weight: 600 !important;
	margin: 0 0 0.25rem !important;
	line-height: 1.3 !important;
	color: inherit !important;
	text-decoration: none !important;
	border: none !important;
}

.team-card__role {
	font-size: 0.825rem !important;
	color: #666 !important;
	margin: 0 !important;
	line-height: 1.4 !important;
	text-decoration: none !important;
	font-family: Montserrat-Regular,Arial,sans-serif !important;
	white-space: normal !important;
}

.team-card__info p,
.team-card__info pre,
.team-card__info p.team-card__role {
	font-size: 0.825rem !important;
	font-family: Montserrat-Regular,Arial,sans-serif !important;
	white-space: normal !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: visible !important;
	background: none !important;
}

/* Empty state */
.team-grid__empty {
	grid-column: 1 / -1;
	text-align: center;
	color: #999;
	padding: 2rem 0;
}