@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&display=swap');

.team-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.5rem;
	margin: 2rem 0;
}

.team-card {
	flex: 1 1 calc(100% / var(--team-columns, 3));
	max-width: 360px;
	box-sizing: border-box;
}

@media (max-width: 900px) {
	.team-card {
		flex-basis: calc(100% / 2);
	}
}

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

.team-card-trigger {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font: inherit;
	color: inherit;
	text-align: center;
}

.team-card-photo-wrap {
	position: relative;
	display: block;
	width: 100%;
	overflow: hidden;
	border-radius: 8px;
	aspect-ratio: 3 / 4;
	margin-bottom: 0.75rem;
}

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

.team-card-trigger:hover .team-card-photo,
.team-card-trigger:focus-visible .team-card-photo {
	transform: scale(1.08);
}

.team-card-photo-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0);
	transition: background 0.3s ease;
}

.team-card-trigger:hover .team-card-photo-overlay,
.team-card-trigger:focus-visible .team-card-photo-overlay {
	background: rgba(0, 0, 0, 0.25);
}

.team-card-photo-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 42px;
	height: 42px;
	transform: translate(-50%, -50%) scale(0.7);
	opacity: 0;
	color: #fff;
	filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
}

.team-card-trigger:hover .team-card-photo-icon,
.team-card-trigger:focus-visible .team-card-photo-icon {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

.team-card-name {
	font-family: 'Montserrat', sans-serif;
	margin: 0.75rem 0 0;
}

.team-card-title {
	margin: 0.15rem 0 0;
}

.team-card-view-bio {
	display: block;
	font-style: italic;
	font-size: 0.85rem;
	color: #888;
	margin-top: 0.35rem;
}

.team-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.team-modal[hidden] {
	display: none;
}

.team-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
}

.team-modal-dialog {
	position: relative;
	background: #fff;
	border-radius: 10px;
	max-width: 500px;
	width: 90%;
	max-height: 85vh;
	overflow-y: auto;
	padding: 2rem;
	text-align: center;
}

.team-modal-close {
	position: absolute;
	top: 0.75rem;
	right: 1rem;
	background: none;
	border: none;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	color: #333;
}

.team-modal-photo {
	width: 140px;
	height: 140px;
	object-fit: cover;
	border-radius: 50%;
	margin: 0 auto 1rem;
}

.team-modal-name {
	font-family: 'Montserrat', sans-serif;
	margin: 0 0 1rem;
}

.team-modal-bio {
	text-align: left;
}

body.team-modal-open {
	overflow: hidden;
}
