/**
 * Variant CSS: before-after--trio-stacked-wide-rows
 * Layer 2 — Path B before-after role (2026-06-10).
 * Exactly THREE full-width rows stacked top to bottom. Each row = a wide before|after
 * split (two photos on a centre seam, each with a corner tag) BESIDE a filled side
 * rail carrying a giant outline ordinal over the project title. The rail ALTERNATES
 * side per row (left, right, left) for an editorial zig-zag.
 * Distinct from trio-register-rows (a uniform narrow meta column always on the left,
 * flat) and trio-pair-cards-row (three equal cards in a row): here three wide bands
 * dominate with the photo pair, and the alternating filled rail with its oversized
 * numeral leads the eye down the page.
 */

body.aibt-universal .universal-before-after--trio-stacked-wide-rows {
	background: var(--background-alt);
	color: var(--text-primary);
}

/* Intro — centred block, A8-safe. */
body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__intro {
	margin-bottom: var(--space-xl);
	text-align: center;
}

body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__intro > * {
	margin-inline: auto !important;
}

body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__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-before-after--trio-stacked-wide-rows h2.universal-before-after__headline,
body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__headline {
	font-family: var(--font-display) !important;
	color: var(--text-primary) !important;
	margin: 0 !important;
}

/* Rows — vertical stack with comfortable rhythm between bands. */
body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__rows {
	display: flex;
	flex-direction: column;
	gap: var(--space-lg) !important;
}

/* Row — rail + wide pair on one baseline; clipped to a single rounded band. */
body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__row {
	gap: 0 !important;
	align-items: stretch !important;
	border-radius: var(--decor-radius);
	overflow: hidden;
	border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}

/* Zig-zag — even rows flip so the rail moves to the right. */
body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__row:nth-child(even) {
	flex-direction: row-reverse;
}

/* Side rail — filled card panel carrying the big numeral + title. */
body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__rail {
	position: relative;
	flex: 0 0 30%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: var(--space-2xs) !important;
	padding: var(--space-lg) !important;
	background: var(--background-card, #fff);
}

/* Giant outline ordinal — transparent fill, accent stroke; a graphic anchor. */
body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__ord {
	font-family: var(--font-display) !important;
	font-size: clamp(3.5rem, 7vw, 5.5rem) !important;
	font-weight: 800 !important;
	line-height: 0.9 !important;
	letter-spacing: -0.02em !important;
	margin: 0 0 var(--space-2xs) 0 !important;
	color: transparent !important;
	-webkit-text-stroke: 2px var(--accent);
	text-stroke: 2px var(--accent);
}

/* Small decorative rail label above the title. */
body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__rail-label {
	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(--text-secondary) !important;
	margin: 0 !important;
}

body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__row-title {
	font-family: var(--font-display) !important;
	font-size: var(--text-xl) !important;
	font-weight: 600 !important;
	line-height: 1.15 !important;
	color: var(--text-primary) !important;
	margin: 0 !important;
	min-width: 0;
	overflow-wrap: break-word;
}

/* Wide pair — dominant before|after split on a centre seam. */
body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__pair {
	position: relative;
	flex: 1 1 70%;
	min-width: 0;
	gap: 0 !important;
}

/* Centre seam between before and after halves. */
body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__pair::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	transform: translateX(-50%);
	background: var(--on-dark, #fff);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
	z-index: 3;
	pointer-events: none;
}

body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__half {
	position: relative;
	flex: 1 1 50%;
	min-width: 0;
	overflow: hidden;
}

body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__img {
	margin: 0 !important;
	display: block;
	height: 100%;
}

body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: var(--photo-filter, none);
}

/* Corner tags — sit on each half. */
body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__tag {
	position: absolute;
	top: var(--space-xs);
	z-index: 4;
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	font-weight: 700 !important;
	letter-spacing: var(--tracking-wide) !important;
	text-transform: uppercase !important;
	margin: 0 !important;
	padding: 0.35em 0.8em !important;
	border-radius: var(--decor-radius-pill);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(0, 0, 0, 0.22);
}

/* "Przed" — neutral dark chip (text-on-dark), pinned to the left half. */
body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__tag--before {
	left: var(--space-xs);
	background: var(--background-dark, #141414);
	color: var(--text-on-dark, #fff) !important;
}

/* "Po" — accent CTA chip to signal the win, pinned to the right half. */
body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__tag--after {
	right: var(--space-xs);
	background: var(--cta-bg-primary);
	color: var(--cta-text-primary) !important;
}

/* Tablet/phone — ≤781: rail stacks ABOVE the pair, full width, numeral shrinks. */
@media (max-width: 781px) {
	body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__row,
	body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__row:nth-child(even) {
		flex-direction: column !important;
	}
	body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__rail {
		flex-basis: auto !important;
		width: 100% !important;
		padding: var(--space-md) !important;
	}
	body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__pair {
		flex-basis: auto !important;
		width: 100% !important;
	}
}

/* Phone — ≤640: cap wide tracking (A5). */
@media (max-width: 640px) {
	body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__kicker,
	body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__rail-label,
	body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__tag {
		letter-spacing: 0 !important;
	}
}

/* Keyboard affordance — focus-visible ring on each image. */
body.aibt-universal .universal-before-after--trio-stacked-wide-rows .universal-before-after__img img:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* A8/A9 left-shift fix: centered intro children (kicker/headline) are max-width-capped
   by WP constrained layout but carry horizontal margin 0, pinning them left. Force
   margin-inline:auto. The section class is doubled to lift specificity to (0,4,1) so this
   beats element-tag-qualified rules like h2.__headline; harmless on already-centered
   elements (auto margins compute to 0). Only left/right are overridden; top/bottom kept. */
body.aibt-universal .universal-before-after--trio-stacked-wide-rows.universal-before-after--trio-stacked-wide-rows .universal-before-after__kicker,
body.aibt-universal .universal-before-after--trio-stacked-wide-rows.universal-before-after--trio-stacked-wide-rows .universal-before-after__headline { margin-inline: auto !important; }
