/**
 * Variant CSS: gallery--featured-plus-thumbs
 * Layer 2 (Path B gallery role, 2026-05-28).
 * One large featured photo + a 2x2 grid of smaller thumbnails.
 */

body.aibt-universal .universal-gallery--featured-plus-thumbs {
	background: var(--background);
	color: var(--text-primary);
}

body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__intro {
	margin-bottom: var(--space-xl);
}

body.aibt-universal .universal-gallery--featured-plus-thumbs .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--featured-plus-thumbs h2.universal-gallery__headline,
body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__headline {
	font-family: var(--font-display) !important;
	color: var(--text-primary) !important;
	margin: 0 !important;
}

body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__layout {
	align-items: stretch;
}

/* Side column stretches to the row height so the thumb grid can fill it. */
body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__thumbs-col {
	display: flex;
}

/* Featured image fills the tall left column. The 2x2 thumb grid (below) sets
   the row height; the featured photo then matches it via height:100% rather
   than forcing its own aspect-ratio, so both columns end flush at the bottom. */
body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__featured {
	margin: 0 !important;
	height: 100%;
	overflow: hidden;
	border-radius: var(--decor-radius);
}

body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__featured img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 420px;
	object-fit: cover;
	filter: var(--photo-filter, none);
	transition: transform var(--duration-medium, 360ms) var(--ease-elegant, ease);
}

body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__featured:hover img {
	transform: scale(1.03);
}

/* Thumbnail grid: 2x2 inside the side column, stretched to full column height. */
body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__thumbs {
	display: grid !important;
	grid-template-columns: repeat(2, 1fr);
	grid-template-rows: repeat(2, 1fr);
	gap: var(--space-sm);
	flex: 1;
	min-height: 420px;
}

body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__thumb {
	margin: 0 !important;
	height: 100%;
	overflow: hidden;
	border-radius: var(--decor-radius);
}

body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: var(--photo-filter, none);
	transition: transform var(--duration-medium, 360ms) var(--ease-elegant, ease);
}

body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__thumb:hover img {
	transform: scale(1.05);
}

@media (max-width: 781px) {
	body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__layout {
		flex-direction: column !important;
	}
	body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__featured-col,
	body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__thumbs-col {
		flex-basis: 100% !important;
		width: 100% !important;
	}
	body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__featured img {
		height: auto;
		min-height: 0;
		aspect-ratio: 4 / 3;
	}
	/* Stacked: thumbs return to natural square cells (no full-height stretch). */
	body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__thumbs {
		grid-template-rows: none;
		min-height: 0;
	}
	body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__thumb img {
		aspect-ratio: 1 / 1;
	}
}

/* Drop wide uppercase tracking on small screens so the short kicker stays tight. */
@media (max-width: 640px) {
	body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__kicker {
		letter-spacing: 0 !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__featured img,
	body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__thumb img {
		transition: none;
	}
	body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__featured:hover img,
	body.aibt-universal .universal-gallery--featured-plus-thumbs .universal-gallery__thumb:hover img {
		transform: none;
	}
}
