/* Team Members Grid – frontend */
.tmg-grid {
	--tmg-gap: 44px;
	--tmg-text: #1a1d21;
	--tmg-muted: #5d6670;
	--tmg-body: #4a5a6a;
	--tmg-accent: #0a4a8f;
	--tmg-accent-bg: #e9f1f9;

	display: grid;
	grid-template-columns: repeat(var(--tmg-cols, 3), minmax(0, 1fr));
	gap: var(--tmg-gap);
	font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
	box-sizing: border-box;
}

.tmg-grid *,
.tmg-grid *::before,
.tmg-grid *::after {
	box-sizing: border-box;
}

.tmg-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 6px;
	padding: 12px 12px 30px;
	box-shadow: 0 6px 24px rgba(16, 24, 40, .06);
	transition: transform .25s ease, box-shadow .25s ease;
}

.tmg-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 34px rgba(16, 24, 40, .10);
}

.tmg-card-media {
	aspect-ratio: 1 / 1;
	border-radius: 4px;
	overflow: hidden;
	background: #f1f4f7;
}

.tmg-card-media img,
.tmg-card-img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
	object-position: center top;
	transition: transform .5s ease;
}

.tmg-card:hover .tmg-card-img {
	transform: scale(1.04);
}

.tmg-card-noimg {
	display: block;
	width: 100%;
	height: 100%;
}

.tmg-card-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 26px 14px 0;
}

.tmg-grid .tmg-card-name {
	margin: 0 0 8px;
	padding: 0;
	font-family: inherit;
	font-size: 19px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	color: var(--tmg-text);
}

.tmg-grid .tmg-card-title {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--tmg-muted);
}

.tmg-card-contact {
	margin-bottom: 22px;
}

.tmg-grid .tmg-card-contact p {
	margin: 0 0 4px;
	font-size: 16px;
	line-height: 1.6;
	color: var(--tmg-body);
}

.tmg-card-contact span {
	color: var(--tmg-text);
	font-weight: 500;
}

.tmg-grid .tmg-card-contact a {
	color: var(--tmg-body);
	text-decoration: none;
	word-break: break-word;
	transition: color .2s;
}

.tmg-grid .tmg-card-contact a:hover {
	color: var(--tmg-accent);
}

.tmg-grid .tmg-card-btn {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 24px;
	border-radius: 999px;
	background: var(--tmg-accent-bg);
	color: var(--tmg-accent);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background .2s, color .2s;
}

.tmg-grid .tmg-card-btn:hover,
.tmg-grid .tmg-card-btn:focus {
	background: var(--tmg-accent);
	color: #fff;
}

@media (max-width: 991px) {
	.tmg-grid {
		--tmg-gap: 28px;
		grid-template-columns: repeat(var(--tmg-cols-tab, 2), minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.tmg-grid {
		grid-template-columns: 1fr;
	}
}
