/* =============================================================
   UTP Alumni Grid
   utp-alumni-grid.css
   ============================================================= */

/* Registering these lets the browser smoothly animate them on hover
   (used by the gloss slide-up below). Without @property support
   (older Safari/Firefox) the hover state still applies — it just
   snaps instead of transitioning. */
@property --glass-start {
	syntax: "<percentage>";
	inherits: true;
	initial-value: 50%;
}

@property --glass-end {
	syntax: "<percentage>";
	inherits: true;
	initial-value: 82%;
}

/* ── Grid ─────────────────────────────────────────────────── */

.uag__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	column-gap: 32px;
	row-gap: 48px;
}

.uag__no-results {
	text-align: center;
	color: #999999;
}

/* ── Card ─────────────────────────────────────────────────── */

.utp-team-card {
	position: relative;
	box-sizing: border-box;
}

.utp-team-card * {
	box-sizing: border-box;
}

/* ── Image — spans the full card; content overlaps its bottom ─ */

.utp-team-card__image-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 2 / 3;
	overflow: hidden;
	background-color: #ffffff;
}

/* Descendant selector (not just .utp-team-card__image) so this reliably beats
   Elementor's own base reset — .elementor img { height: auto; max-width: 100%; }
   — which otherwise wins on specificity and collapses the image to its natural
   aspect ratio instead of filling the card. */
.utp-team-card__image-wrap .utp-team-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
}

.utp-team-card__image--placeholder {
	background-color: #e5e1d8;
}

/* =============================================================
   GLOSS / FROSTED-GLASS OVERLAY — "Apple gloss" effect
   One element: a tinted, blurred backdrop faded in with a mask.
   Because the mask cross-fades sharp → frosted-white over the
   same band, it reads as a progressive blur without stacking
   multiple backdrop-filter layers (which Chromium can mishandle
   when combined with masks + overflow: hidden).
   ============================================================= */

.utp-team-card__glass {
	/* Tune the gloss effect from these four variables only. */
	--glass-blur: 22px; /* how frosted the glass gets at full strength */
	--glass-start: 50%; /* where the fade begins (0% = top of image) */
	--glass-end: 82%; /* where the fade reaches full strength */
	--glass-tint: 255, 255, 255; /* gloss color, as an r, g, b triplet */

	position: absolute;
	inset: 0;
	pointer-events: none;
	background-color: rgba(var(--glass-tint), 0.65);
	backdrop-filter: blur(var(--glass-blur));
	-webkit-backdrop-filter: blur(var(--glass-blur));
	-webkit-mask-image: linear-gradient(to bottom, transparent var(--glass-start), #000 var(--glass-end));
	mask-image: linear-gradient(to bottom, transparent var(--glass-start), #000 var(--glass-end));
	transition:
		--glass-start 0.35s ease,
		--glass-end 0.35s ease;
}

/* Hover / keyboard focus — the gloss slides up to make room for the socials row below */
.utp-team-card:hover .utp-team-card__glass,
.utp-team-card:focus-within .utp-team-card__glass {
	--glass-start: 32%;
	--glass-end: 68%;
}

/* ── Content — overlaps the bottom of the image ──────────────── */

.utp-team-card__content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 0 30px 30px 30px;
}

/* Elementor's Badge/Name/Position controls override these defaults per-instance. */

.utp-team-card__badge {
	display: inline-block;
	background-color: #c88a12;
	color: #ffffff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.02em;
	padding: 8px 16px;
	border-radius: 999px;
	white-space: nowrap;
}

.utp-team-card__name {
	margin: 14px 0 0;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
	color: #262421;
}

.utp-team-card__title {
	margin: 6px 0 0;
	font-size: 14px;
	line-height: 1.4;
	color: #6b6660;
}

/* ── Socials — hidden until the card is hovered ──────────────── */

.utp-team-card__socials {
	display: flex;
	gap: 16px;
	max-height: 0;
	margin-top: 0;
	opacity: 0;
	overflow: hidden;
	transition:
		max-height 0.35s ease,
		margin-top 0.35s ease,
		opacity 0.25s ease;
}

.utp-team-card:hover .utp-team-card__socials,
.utp-team-card:focus-within .utp-team-card__socials {
	max-height: 48px;
	margin-top: 14px;
	opacity: 1;
}

.utp-team-card__social-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	border-radius: 5px;
	background-color: #ffffff;
	color: #c88a12;
	transition:
		background-color 0.2s ease,
		color 0.2s ease;
}

.utp-team-card__social-btn:hover {
	background-color: #c88a12;
	color: #ffffff;
}

/* =============================================================
   RESPONSIVE
   Grid columns/gaps are controlled by Elementor's own responsive
   controls (see the widget's Grid style section) at Elementor's
   breakpoints. This media query just keeps a lone card centered
   on very small phones.
   ============================================================= */

@media (max-width: 480px) {
	.uag__grid {
		justify-items: center;
	}

	.utp-team-card {
		/*max-width: 320px;*/
		width: 100%;
	}
}

/* Touch screens (≤768px) can't hover, so the "hover" reveal — gloss slid up,
   socials visible — is just always on instead of gated behind :hover/:focus-within. */
@media (max-width: 768px) {
	.utp-team-card__glass {
		--glass-start: 32%;
		--glass-end: 68%;
	}

	.utp-team-card__socials {
		max-height: 48px;
		margin-top: 14px;
		opacity: 1;
	}
}
