/**
 * Variant CSS: gallery--podium-center-rise
 *
 * Three frames arranged like a podium — the center frame is taller and dominant,
 * the two side frames shorter and aligned to the bottom (hover zoom). Unlike the
 * even trio row or the left-led triptych: hierarchy here is symmetric and points
 * at the central shot. Built as a 3-column grid; side tiles bottom-align (align-
 * self:end) while the taller-aspect center tile rises above them. Text stays --ink
 * (polarity aware); kicker + the em take --accent; tiles use --decor-radius and
 * images carry --photo-filter. Image src are swapped by the photo system.
 * Dedicated to exactly three photos. Part of the `gallery` role.
 */

body.aibt-universal .universal-gallery--podium-center-rise {
	padding-block: calc(clamp(3rem, 7vw, 5.5rem) * var(--density, 1));
	background: var(--background);
	color: var(--text-primary);
}

/* Intro. */
body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__intro {
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__kicker {
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	font-weight: 600 !important;
	letter-spacing: var(--tracking-widest) !important;
	text-transform: uppercase !important;
	color: var(--accent) !important;
	margin: 0 0 var(--space-sm) 0 !important;
}

body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__headline {
	font-family: var(--font-display) !important;
	color: var(--ink) !important;
	margin: 0 !important;
}

body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__headline em {
	color: var(--accent) !important;
	font-style: italic;
}

/* Layout: three columns; the center column is a touch wider. Side tiles bottom-
   align so the taller-aspect center tile rises above them like a podium step.
   Each tile carries its own aspect-ratio, so heights are intrinsic — no squish. */
body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__podium {
	display: grid;
	grid-template-columns: 1fr 1.25fr 1fr;
	align-items: end;
	gap: clamp(0.7rem, 1.6vw, 1.1rem);
}

body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__item {
	margin: 0 !important;
	overflow: hidden;
	border-radius: var(--decor-radius, 14px);
	width: 100%;
}

body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: var(--photo-filter, none);
	transition: transform var(--duration-slow, 500ms) var(--ease-default, ease);
}

body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__item:hover img,
body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__item:focus-within img {
	transform: scale(1.04);
}

/* Center tile leads: bottom-aligned base, but its taller aspect-ratio makes it
   reach higher than the side frames. */
body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__item--center {
	align-self: end;
}

/* Keyboard focus parity with hover (image becomes focusable when a client links it). */
body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__item a:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 3px;
	border-radius: var(--decor-radius, 14px);
}

/* Robustness: the count-fit trims to the client's upload count. The podium only
   reads as a podium with all three present. With two tiles left, align-items:end
   on a 3-col template leaves a gap where the missing column was — fall back to two
   even, top-aligned columns so the remaining pair stays balanced. Degrades safely
   where :has() is unsupported (grid keeps the podium template). */
body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__podium:not(:has(.universal-gallery__item:nth-child(3))) {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: stretch;
}

/* Tablet: keep the podium; just trim the gap. */
@media (min-width: 641px) and (max-width: 959px) {
	body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__podium {
		gap: clamp(0.6rem, 1.8vw, 0.9rem);
	}
}

/* Mobile: a podium of three tall frames gets too narrow — stack into one column,
   center leads first. Each tile keeps its aspect-ratio so nothing squishes. */
@media (max-width: 640px) {
	body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__podium {
		grid-template-columns: 1fr;
		align-items: stretch;
		gap: clamp(0.6rem, 3vw, 1rem);
	}
	body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__item--center {
		order: -1; /* lead the stack with the dominant shot */
	}
	body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__item--side {
		aspect-ratio: 4 / 3;
	}
	body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__kicker {
		letter-spacing: var(--tracking-wide) !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__item img {
		transition: none;
	}
	body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__item:hover img,
	body.aibt-universal .universal-gallery--podium-center-rise .universal-gallery__item:focus-within img {
		transform: none;
	}
}
