/* [MARIO] v1.0.0 | 2026-10-24 | Client: Tritent Legal | Team grid + popup */

.ttm-grid {
	--ttm-name: #1c2040;
	--ttm-muted: #9ea4c4;
	--ttm-accent: #9a8530;
	--ttm-text: #2f3352;
	display: grid;
	grid-template-columns: repeat(var(--ttm-cols, 4), minmax(0, 1fr));
	gap: 24px;
}

/* ---------- Card ---------- */
.ttm-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 10px;
	padding: 10px 10px 30px;
	box-shadow: 0 10px 35px rgba(20, 24, 60, 0.07);
	text-align: center;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ttm-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 40px rgba(20, 24, 60, 0.12);
}

.ttm-card__media {
	aspect-ratio: 297 / 279;
	border-radius: 6px;
	overflow: hidden;
	background: #eef0f6;
}

.ttm-card__media img,
.ttm-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

.ttm-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	font-size: 48px;
	font-weight: 700;
	color: var(--ttm-muted);
}

.ttm-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	padding: 0 12px;
}

.ttm-card .ttm-card__name {
	margin: 36px 0 6px;
	font-size: 22px;
	line-height: 1.3;
	font-weight: 700;
	color: var(--ttm-name);
}

.ttm-card .ttm-card__designation {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	color: var(--ttm-muted);
}

.ttm-card__divider {
	display: block;
	width: 60px;
	margin: auto auto 0;
	padding-top: 22px;
	border-bottom: 1px dotted #555a73;
}

/* Reset theme button styles so Avada's global button rules don't leak in. */
.ttm-card .ttm-card__more {
	margin-top: 18px;
	padding: 4px 0;
	min-height: 0;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ttm-accent);
	cursor: pointer;
}

.ttm-card .ttm-card__more:hover,
.ttm-card .ttm-card__more:focus-visible {
	background: none;
	color: var(--ttm-name);
	text-decoration: underline;
	text-underline-offset: 4px;
}

@media (max-width: 1024px) {
	.ttm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

/* ---------- Popup ---------- */
html.ttm-modal-open { overflow: hidden; }

.ttm-modal {
	--ttm-name: #1c2040;
	--ttm-accent: #9a8530;
	--ttm-text: #2f3352;
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

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

.ttm-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(12, 14, 34, 0.6);
}

.ttm-modal__box {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 760px;
	max-height: 88vh;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
	outline: none;
	overflow: hidden;
	animation: ttm-in 0.25s ease;
}

@keyframes ttm-in {
	from { opacity: 0; transform: translateY(16px); }
	to   { opacity: 1; transform: none; }
}

.ttm-modal .ttm-modal__close {
	position: absolute;
	top: 20px;
	right: 26px;
	z-index: 2;
	padding: 0;
	min-height: 0;
	background: none;
	border: 0;
	box-shadow: none;
	font-size: 32px;
	line-height: 1;
	color: #000;
	cursor: pointer;
}

.ttm-modal__body {
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 48px 40px 40px;
	scrollbar-width: thin;
	scrollbar-color: #3b3e68 #f1f1f5;
}

.ttm-modal__body::-webkit-scrollbar { width: 10px; }
.ttm-modal__body::-webkit-scrollbar-track { background: #f1f1f5; }
.ttm-modal__body::-webkit-scrollbar-thumb { background: #3b3e68; border-radius: 10px; }

.ttm-modal .ttm-modal__name {
	margin: 0 40px 16px 0;
	font-size: 42px;
	line-height: 1.15;
	font-weight: 700;
	color: var(--ttm-name);
}

.ttm-modal .ttm-modal__designation {
	margin: 0 0 24px;
	font-size: 17px;
	line-height: 1.8;
	font-weight: 500;
	color: var(--ttm-accent);
}

.ttm-modal__photo img {
	display: block;
	width: 100px;
	height: auto;
	margin: 0 0 12px;
}

.ttm-modal__content {
	font-size: 16px;
	line-height: 1.9;
	color: var(--ttm-text);
}

.ttm-modal__content > :last-child { margin-bottom: 0; }

@media (max-width: 600px) {
	.ttm-modal { padding: 12px; }
	.ttm-modal__body { padding: 44px 22px 28px; }
	.ttm-modal .ttm-modal__name { font-size: 28px; }
	.ttm-modal .ttm-modal__close { top: 14px; right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.ttm-card, .ttm-modal__box { transition: none; animation: none; }
}
