/**
 * Variant CSS: gallery--trio-framed-passe-row
 *
 * Three frames (3:4) in one even row, each in a generous passe-partout — a wide
 * card-colour mat around the photo, like a matted print on a gallery wall (hover
 * zoom). Unlike even-trio-row / stagger: the photos do NOT touch the tile edge —
 * a passe-partout border of --background-card surrounds each, giving a museum,
 * finished rhythm. Unlike triptych / podium: zero hierarchy, three equal matted
 * works. The mat is the figure's padding + card bg (no extra DOM); the photo sits
 * inset with a hairline --divider-primary edge. Text stays --ink (polarity aware);
 * kicker + the em take --accent; 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--trio-framed-passe-row {
	padding-block: calc(clamp(3rem, 7vw, 5.5rem) * var(--density, 1));
	background: var(--background);
	color: var(--text-primary);
}

/* Intro. */
body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__intro {
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

body.aibt-universal .universal-gallery--trio-framed-passe-row .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--trio-framed-passe-row .universal-gallery__headline {
	font-family: var(--font-display) !important;
	color: var(--ink) !important;
	margin: 0 !important;
}

body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__headline em {
	color: var(--accent) !important;
	font-style: italic;
}

/* Layout: three equal columns. */
body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1rem, 2.4vw, 1.8rem);
}

/* The passe-partout: the figure is a matted card; its padding IS the mat width,
   the card bg is the mat colour, and a soft shadow lifts each frame off the wall. */
body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__item {
	margin: 0 !important;
	background: var(--background-card);
	padding: clamp(0.85rem, 1.8vw, 1.4rem);
	border-radius: var(--radius-sm, 6px);
	border: 1px solid var(--divider-primary);
	box-shadow: 0 10px 28px -18px rgba(0, 0, 0, 0.35);
	transition: box-shadow var(--duration-base, 300ms) var(--ease-default, ease),
		transform var(--duration-base, 300ms) var(--ease-default, ease);
}

body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__item:hover,
body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__item:focus-within {
	box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.45);
	transform: translateY(-3px);
}

/* The photo sits inside the mat with a hairline edge, holding its 3:4 crop. */
body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__item img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border: 1px solid var(--divider-primary);
	filter: var(--photo-filter, none);
	transition: transform var(--duration-slow, 500ms) var(--ease-default, ease);
}

body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__item:hover img,
body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__item:focus-within img {
	transform: scale(1.03);
}

/* Keyboard focus parity with hover (image becomes focusable when a client links it). */
body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__item a:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 4px;
	border-radius: var(--radius-sm, 6px);
}

/* Tablet: keep three matted frames but tighten the mat + gap a touch. */
@media (min-width: 641px) and (max-width: 959px) {
	body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__row {
		gap: clamp(0.8rem, 2vw, 1.2rem);
	}
	body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__item {
		padding: clamp(0.7rem, 1.6vw, 1rem);
	}
}

/* Mobile: three matted frames side by side waste space on the mats — stack into a
   single column so each framed print reads at full size. */
@media (max-width: 640px) {
	body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__row {
		grid-template-columns: 1fr;
		gap: clamp(1rem, 4vw, 1.4rem);
	}
	body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__item img {
		aspect-ratio: 4 / 3;
	}
	body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__kicker {
		letter-spacing: var(--tracking-wide) !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__item,
	body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__item img {
		transition: none;
	}
	body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__item:hover,
	body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__item:focus-within {
		transform: none;
	}
	body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__item:hover img,
	body.aibt-universal .universal-gallery--trio-framed-passe-row .universal-gallery__item:focus-within img {
		transform: none;
	}
}
