/* ================================================
   Team Profiles Widget
   ================================================ */

.tpw-wrapper {
	width: 100%;
}

/* ---- Grid ---- */
.tpw-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

/* ---- Card ---- */
.tpw-card {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tpw-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Image */
.tpw-card-image {
	width: 100%;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: #e2e8f0;
}

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

.tpw-card-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e2e8f0, #cbd5e0);
}

/* Info */
.tpw-card-info {
	padding: 16px 4px 0;
}

.tpw-card-name {
	color: #003B46;
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 2px;
	line-height: 1.3;
}

.tpw-card-accreditations {
	color: #718096;
	font-size: 13px;
	font-weight: 400;
	margin: 0 0 4px;
	line-height: 1.4;
}

.tpw-card-role {
	color: #4a5568;
	font-size: 13px;
	font-weight: 400;
	margin: 0;
	line-height: 1.4;
}

/* ---- Hidden modal data ---- */
.tpw-modal-data {
	display: none;
}

/* ---- Overlay ---- */
.tpw-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tpw-overlay--open {
	opacity: 1;
	visibility: visible;
}

/* ---- Modal ---- */
.tpw-modal {
	position: relative;
	background: #fff;
	border-radius: 12px;
	max-width: 860px;
	width: 100%;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	padding: 40px;
	transform: translateY(12px) scale(0.98);
	transition: transform 0.3s ease;
}

.tpw-overlay--open .tpw-modal {
	transform: translateY(0) scale(1);
}

/* Close button */
.tpw-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	color: #003B46;
	cursor: pointer;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background 0.2s ease;
	z-index: 2;
}

.tpw-modal-close:hover {
	background: rgba(0, 0, 0, 0.06);
}

/* Modal inner layout */
.tpw-modal-inner {
	display: flex;
	gap: 32px;
	align-items: flex-start;
}

/* Modal photo */
.tpw-modal-photo {
	width: 35%;
	flex-shrink: 0;
}

.tpw-modal-photo img {
	width: 100%;
	border-radius: 8px;
	display: block;
	object-fit: cover;
}

/* Modal details */
.tpw-modal-details {
	flex: 1;
	min-width: 0;
}

.tpw-modal-name {
	color: #003B46;
	font-size: 22px;
	font-weight: 600;
	margin: 0 0 4px;
	line-height: 1.3;
}

.tpw-modal-accreditations {
	color: #718096;
	font-size: 14px;
	font-weight: 400;
	margin: 0 0 6px;
	line-height: 1.4;
}

.tpw-modal-role {
	color: #003B46;
	font-size: 15px;
	font-weight: 500;
	margin: 0 0 16px;
	line-height: 1.4;
}

.tpw-modal-bio {
	color: #4a5568;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.7;
}

.tpw-modal-bio p {
	margin: 0 0 12px;
}

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

/* ---- Responsive ---- */
@media (max-width: 1024px) {
	.tpw-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.tpw-grid {
		grid-template-columns: 1fr;
		max-width: 360px;
		margin-left: auto;
		margin-right: auto;
	}

	.tpw-modal {
		padding: 24px;
	}

	.tpw-modal-inner {
		flex-direction: column;
		gap: 20px;
	}

	.tpw-modal-photo {
		width: 100%;
		max-height: 280px;
		overflow: hidden;
		border-radius: 8px;
	}
}

/* ---- Body lock ---- */
body.tpw-modal-open {
	overflow: hidden;
}
