/* =============================================================
   UTP Leadership Grid
   utp-leadership-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: 40%;
}

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

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

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

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

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

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

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

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

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

/* Descendant selector (not just .utp-leader-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-leader-card__image-wrap .utp-leader-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
}

.utp-leader-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-leader-card__glass {
	/* Tune the gloss effect from these four variables only. */
	--glass-blur: 22px; /* how frosted the glass gets at full strength */
	--glass-start: 40%; /* where the fade begins (0% = top of image) */
	--glass-end: 72%; /* 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 Read More link below */
.utp-leader-card:hover .utp-leader-card__glass,
.utp-leader-card:focus-within .utp-leader-card__glass {
	--glass-start: 24%;
	--glass-end: 60%;
}

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

.utp-leader-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-leader-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-leader-card__name {
	margin: 14px 0 0;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
	color: #262421;
}

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

/* ── Read More — hidden until the card is hovered ──────────────
   Matches the "Read More" links in the home page's "What's moving"
   section: underlined label + arrow, fading to 70% on hover. */

.utp-leader-card__more-wrap {
	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-leader-card:hover .utp-leader-card__more-wrap,
.utp-leader-card:focus-within .utp-leader-card__more-wrap {
	max-height: 48px;
	margin-top: 14px;
	opacity: 1;
}

/* Elementor's Read More controls override these defaults per-instance. */
.utp-leader-card__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: "Open Sans", sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	color: #c88a12;
	text-decoration: none;
	transition: color 0.3s ease;
}

.utp-leader-card__more:hover {
	color: rgba(200, 138, 18, 0.7);
}

.utp-leader-card__more-text {
	text-decoration: underline;
}

.utp-leader-card__more-icon {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
}

/* =============================================================
   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) {
	.ulg__grid {
		justify-items: center;
	}

	.utp-leader-card {
		max-width: 320px;
		width: 100%;
	}
}

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

	.utp-leader-card__more-wrap {
		max-height: 48px;
		margin-top: 14px;
		opacity: 1;
	}
}
