/**
 * Variant CSS: before-after--duo-stacked-rows
 * Layer 2 — Path B before-after role (2026-06-10).
 * Exactly TWO full-width rows stacked vertically. Each row = a fixed-width LEFT
 * RAIL (big number + case title + a "Metamorfoza" eyebrow) and a wide
 * before|after split pair filling the rest of the row, every half carrying a
 * corner tag ("Przed" / "Po").
 * Distinct from stacked-register-pair (number + title inline at the START of the
 * row, then the pair) and twin-vertical-columns (two narrow columns side by
 * side): here the descriptor lives in a dedicated side-rail panel and the split
 * runs wide across the row.
 */

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

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

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

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

/* Rows — the two stacked rows, separated by vertical gap. */
body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__rows {
	display: flex;
	flex-direction: column;
	gap: var(--space-lg);
}

/* Row — rail | wide pair. Bordered card so each row reads as one unit. */
body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__row {
	gap: var(--space-lg) !important;
	padding: var(--space-md);
	background: var(--background, #fff);
	border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
	border-radius: var(--decor-radius);
}

/* Rail — fixed-width descriptor column. Pinned basis + overflow-wrap:normal so a
   long Polish title is NOT broken mid-word by the base.css overflow floor
   (KNOWN TRAP). */
body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__rail {
	flex: 0 0 27% !important;
	min-width: 0;
	gap: var(--space-xs) !important;
	overflow-wrap: normal;
	word-break: normal;
}

body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__num {
	font-family: var(--font-display) !important;
	font-size: var(--text-3xl) !important;
	font-weight: 700 !important;
	line-height: 0.9 !important;
	letter-spacing: -0.03em !important;
	color: var(--accent) !important;
	margin: 0 !important;
}

body.aibt-universal .universal-before-after--duo-stacked-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.18 !important;
	color: var(--text-primary) !important;
	margin: var(--space-xs) 0 0 0 !important;
	overflow-wrap: normal;
}

/* Rail eyebrow — small uppercase label under the title. */
body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__rail-tag {
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	font-weight: 600 !important;
	letter-spacing: var(--tracking-wide) !important;
	text-transform: uppercase !important;
	color: var(--text-secondary) !important;
	margin: var(--space-sm) 0 0 0 !important;
}

/* Pair — before | after shots filling the rest of the row, equal width. */
body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__pair {
	flex: 1 1 0;
	min-width: 0;
	gap: var(--space-sm) !important;
}

body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__shot {
	position: relative;
	flex: 1 1 50%;
	min-width: 0;
	overflow: hidden;
	border-radius: var(--decor-radius);
}

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

body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__img img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	filter: var(--photo-filter, none);
	transition: transform var(--duration-slow, 900ms) var(--ease-elegant, ease);
}

/* Gentle paired zoom on the row's photos on hover — tactile result cue. */
body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__row:hover .universal-before-after__img img {
	transform: scale(1.03);
}

/* Corner tags — sit on each shot.
   Fixed rgba drop-shadow lifts the chip off any photo (theme-independent,
   correct text-on-photo pattern) so light chips stay crisp on bright shots. */
body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__tag {
	position: absolute;
	top: var(--space-xs);
	left: var(--space-xs);
	z-index: 2;
	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). */
body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__tag--before {
	background: var(--background-dark, #141414);
	color: var(--text-on-dark, #fff) !important;
}

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

/* Tablet/phone — stack the rail above the wide pair so the split has full width.
   The WP flex row does not auto-wrap, so force it here. */
@media (max-width: 781px) {
	body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__row {
		flex-wrap: wrap !important;
	}
	body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__rail {
		flex: 1 1 100% !important;
		width: 100% !important;
		flex-direction: row !important;
		align-items: baseline !important;
		flex-wrap: wrap !important;
	}
	body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__rail-tag {
		margin-top: 0 !important;
		margin-left: auto !important;
	}
	body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__pair {
		flex: 1 1 100% !important;
		width: 100% !important;
	}
}

/* Phone — cap uppercase tracking on small screens (A5). */
@media (max-width: 640px) {
	body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__kicker,
	body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__rail-tag,
	body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__tag {
		letter-spacing: 0 !important;
	}
}

/* Keyboard affordance — row focus-within ring + image focus-visible. */
body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__row:focus-within {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

body.aibt-universal .universal-before-after--duo-stacked-rows .universal-before-after__img img:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* A8/A9 left-shift fix (2026-06-10): centered intro children (kicker/headline) were
   max-width-capped by WP constrained layout but had horizontal margin 0, pinning them
   to the left. Force margin-inline:auto. Section class doubled -> specificity (0,4,1)
   beats element-tag-qualified rules like h2.__headline; harmless on already-centered
   elements (auto margins compute to 0). Only left/right are overridden. */
body.aibt-universal .universal-before-after--duo-stacked-rows.universal-before-after--duo-stacked-rows .universal-before-after__kicker,
body.aibt-universal .universal-before-after--duo-stacked-rows.universal-before-after--duo-stacked-rows .universal-before-after__headline { margin-inline: auto !important; }
