/* Team Member Popup — front-end styles
   All colors come from CSS variables set inline by PHP from the admin settings. */

.tmp-wrapper {
	--tmp-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
	box-sizing: border-box;
	font-family: 'Raleway', sans-serif;
}

.tmp-card-name,
.tmp-modal-data-name {
	font-family: 'Lexend', sans-serif;
}

.tmp-wrapper *,
.tmp-wrapper *::before,
.tmp-wrapper *::after {
	box-sizing: border-box;
}

/* ---------- Grid ---------- */

.tmp-grid {
	display: grid;
	grid-template-columns: repeat(var(--tmp-columns), 1fr);
	gap: 32px 28px;
	margin: 0 auto;
	padding: 20px 0;
}

@media (max-width: 900px) {
	.tmp-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px 18px;
	}
}

@media (max-width: 560px) {
	.tmp-grid {
		grid-template-columns: 1fr;
		gap: 22px;
	}

	.tmp-card-photo {
		height: 320px;
	}
}

/* ---------- Card ---------- */

.tmp-card {
	background: var(--tmp-card-bg);
	border-radius: var(--tmp-radius);
	padding: 18px 18px 22px;
	box-shadow: var(--tmp-shadow);
	display: flex;
	flex-direction: column;
}

.tmp-card-photo {
	width: 100%;
	height: 450px;
	overflow: hidden;
	border-radius: calc(var(--tmp-radius) - 4px);
	background: #eee;
	margin-bottom: 14px;
}

.tmp-card-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tmp-card-name {
	margin: 0 0 2px;
	font-size: 1.15rem;
	line-height: 1.3;
	color: var(--tmp-accent);
	font-weight: 700;
}

.tmp-card-title {
	margin: 0 0 6px;
	font-size: 0.82rem;
	color: var(--tmp-role-color);
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	opacity: 0.85;
}

.tmp-card-role {
	margin: 0 0 8px;
	font-size: 0.92rem;
	color: var(--tmp-role-color);
	font-weight: 600;
}

.tmp-card-short {
	margin: 0 0 14px;
	font-size: 0.88rem;
	color: #666;
	line-height: 1.5;
	flex-grow: 1;
}

.tmp-more-btn {
	align-self: flex-start;
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: transparent;
	color: var(--tmp-btn-bg);
	border: none;
	border-bottom: 2px solid var(--tmp-btn-bg);
	font-size: 0.9rem;
	font-weight: 700;
	padding: 2px 2px 4px;
	cursor: pointer;
	transition: gap 0.2s ease, opacity 0.2s ease;
}

.tmp-more-btn:hover {
	gap: 8px;
	opacity: 0.8;
}

.tmp-more-btn .tmp-arrow {
	font-size: 1.1em;
	line-height: 1;
	transition: transform 0.2s ease;
}

.tmp-more-btn:hover .tmp-arrow {
	transform: translateX(2px);
}

/* ---------- Modal overlay ---------- */

.tmp-modal-overlay {
	position: fixed;
	inset: 0;
	background: var(--tmp-overlay);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	z-index: 100000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.tmp-modal-overlay.tmp-active {
	opacity: 1;
	visibility: visible;
}

.tmp-modal {
	background: var(--tmp-modal-bg);
	border-radius: var(--tmp-radius);
	max-width: 720px;
	width: 100%;
	max-height: 88vh;
	overflow-y: auto;
	position: relative;
	padding: 40px 44px 44px;
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
	transform: translateY(24px) scale(0.97);
	opacity: 0;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.tmp-modal-overlay.tmp-active .tmp-modal {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.tmp-modal-close {
	position: absolute;
	top: 16px;
	right: 18px;
	background: rgba(0, 0, 0, 0.06);
	border: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	font-size: 1.4rem;
	line-height: 1;
	color: #333;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.2s ease;
}

.tmp-modal-close:hover {
	background: rgba(0, 0, 0, 0.12);
	transform: rotate(90deg);
}

/* ---------- Modal content (mirrors data pulled from hidden card data) ---------- */

.tmp-modal-inner {
	display: flex;
	gap: 28px;
	align-items: flex-start;
}

.tmp-modal-inner .tmp-modal-data-photo {
	flex: 0 0 160px;
	width: 160px;
	height: 160px;
	border-radius: 50%;
	overflow: hidden;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.tmp-modal-inner .tmp-modal-data-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tmp-modal-inner .tmp-modal-text {
	flex: 1;
	min-width: 0;
}

.tmp-modal-data-name {
	font-size: 1.7rem;
	font-weight: 700;
	color: var(--tmp-accent);
	margin: 0 0 2px;
}

.tmp-modal-data-title {
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--tmp-role-color);
	letter-spacing: 0.02em;
	text-transform: uppercase;
	opacity: 0.85;
	margin: 0 0 8px;
}

.tmp-modal-data-role {
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--tmp-role-color);
	margin: 0 0 18px;
}

.tmp-modal-data-bio {
	font-size: 0.98rem;
	line-height: 1.7;
	color: #333;
}

.tmp-modal-data-bio p {
	margin: 0 0 14px;
}

.tmp-modal-data-bio p:last-child {
	margin-bottom: 0;
}

/* Stack photo above text on narrower modals / small screens */
@media (max-width: 620px) {
	.tmp-modal {
		padding: 32px 22px 30px;
		max-height: 92vh;
	}

	.tmp-modal-inner {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.tmp-modal-inner .tmp-modal-data-photo {
		flex: 0 0 130px;
		width: 130px;
		height: 130px;
	}

	.tmp-modal-data-bio {
		text-align: left;
	}
}

body.tmp-noscroll {
	overflow: hidden;
}
