/* ---------- Grid ---------- */
/* Flex rather than CSS grid so an incomplete last row spreads out like the original page. */
.ptg-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-evenly;
	row-gap: 40px;
}
.ptg-grid > .ptg-member { flex: 0 0 28.8%; max-width: 28.8%; }
@media ( max-width: 900px ) {
	.ptg-grid > .ptg-member { flex-basis: 46%; max-width: 46%; }
}
@media ( max-width: 560px ) {
	.ptg-grid > .ptg-member { flex-basis: 100%; max-width: 100%; }
}

/* ---------- Card ---------- */
.ptg-member { margin: 0; }
/* Neutralise theme / Elementor kit global button styles. */
.ptg-grid button.ptg-card,
.ptg-grid button.ptg-card:hover,
.ptg-grid button.ptg-card:focus,
.ptg-drawer button.ptg-drawer__close,
.ptg-drawer button.ptg-drawer__close:hover {
	border: 0 !important;
	box-shadow: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	min-height: 0 !important;
}
.ptg-grid button.ptg-card,
.ptg-grid button.ptg-card:hover,
.ptg-grid button.ptg-card:focus {
	padding: 0 !important;
	background: none !important;
	border-radius: 0 !important;
	text-align: left !important;
	color: inherit !important;
}
.ptg-card {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	text-align: left;
	cursor: pointer;
	color: inherit;
}
.ptg-card__media {
	display: block;
	aspect-ratio: 389 / 500;
	overflow: hidden;
	background: #eef1f4;
}
.ptg-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.ptg-card:hover .ptg-card__media img { transform: scale( 1.03 ); }
.ptg-card__caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	padding: 3rem 1rem 1rem;
	background: linear-gradient( to top, rgba( 0, 0, 0, 0.7 ), rgba( 0, 0, 0, 0 ) );
	color: #fff;
}
.ptg-card__caption { text-align: left; }
.ptg-card .ptg-name { font-size: 22px; font-weight: 600; line-height: 1.3; color: #fff; }
.ptg-card .ptg-role { font-size: 18px; font-weight: 300; line-height: 1.4; color: #fff; }
.ptg-card:focus-visible { outline: 3px solid #0a6ebd; outline-offset: 3px; }

/* ---------- Slide-in pop-up (matches the original Elementor pop-up) ---------- */
.ptg-lock { overflow: hidden; }
.ptg-drawer { position: fixed; inset: 0; z-index: 100000; }
.ptg-drawer[hidden] { display: none; }
.ptg-drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.8 );
	opacity: 0;
	transition: opacity 0.35s ease;
}
.ptg-drawer.is-open .ptg-drawer__overlay { opacity: 1; }
.ptg-drawer__panel {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	max-height: 90vh;
	background: #fff;
	transform: translate( 100%, -50% );
	transition: transform 0.5s cubic-bezier( 0.2, 0.7, 0.2, 1 );
	overflow: hidden;
}
.ptg-drawer.is-open .ptg-drawer__panel { transform: translate( 0, -50% ); }
.ptg-drawer button.ptg-drawer__close {
	position: absolute;
	top: 18px;
	right: 18px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: #111 !important;
	font-size: 26px !important;
	font-weight: 300 !important;
	line-height: 1 !important;
	cursor: pointer;
	transition: opacity 0.2s ease;
}
.ptg-drawer button.ptg-drawer__close:hover { opacity: 0.6; background: transparent !important; }
.ptg-drawer button.ptg-drawer__close:focus-visible { outline: 2px solid #0765a7; outline-offset: 2px; }
.ptg-drawer__content {
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-height: min( 500px, 90vh );
	max-height: 90vh;
}
.ptg-panel__text {
	overflow-y: auto;
	max-height: 90vh;
	padding: 30px;
}
.ptg-drawer .ptg-panel__name {
	margin: 0 0 12px;
	color: #0765a7;
	font-size: 40px;
	font-weight: 400;
	line-height: 1.2;
}
.ptg-drawer .ptg-panel__role { margin: 0 0 30px; color: #000; font-size: 24px; line-height: 1.5; }
.ptg-drawer .ptg-bio p,
.ptg-drawer .ptg-bio li { color: #000; font-size: 24px; line-height: 36px; }
.ptg-drawer .ptg-bio p { margin: 0 0 14px; }
.ptg-drawer .ptg-bio p:last-child { margin-bottom: 0; }
.ptg-bio h2,
.ptg-bio h3,
.ptg-bio h4 { margin: 0 0 0.75rem; }
.ptg-panel__photo { position: relative; min-height: 300px; }
.ptg-panel__photo img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}
@media ( max-width: 1024px ) {
	.ptg-drawer .ptg-bio p,
	.ptg-drawer .ptg-bio li,
	.ptg-drawer .ptg-panel__role { font-size: 19px; line-height: 1.55; }
	.ptg-drawer .ptg-panel__name { font-size: 32px; }
}
@media ( max-width: 767px ) {
	.ptg-drawer__panel { left: 12px; right: 12px; }
	.ptg-drawer.is-open .ptg-drawer__panel { transform: translate( 0, -50% ); }
	.ptg-drawer__content { display: block; overflow-y: auto; max-height: 90vh; min-height: 0; }
	.ptg-panel__photo { height: 38vh; }
	.ptg-panel__text { max-height: none; overflow: visible; padding: 24px 20px; }
	.ptg-drawer .ptg-panel__name { font-size: 28px; }
	.ptg-drawer .ptg-bio p,
	.ptg-drawer .ptg-bio li,
	.ptg-drawer .ptg-panel__role { font-size: 17px; }
	.ptg-drawer button.ptg-drawer__close { background: rgba( 255, 255, 255, 0.85 ) !important; border-radius: 50% !important; }
}
