/**
 * Variant CSS: before-after--stacked-register-pair
 * Layer 2 — Path B before-after role (2026-06-10).
 * Exactly TWO full-width register rows stacked one above the other. Each row =
 * a big numbered index + a title on a non-shrinking rail, then a HORIZONTAL
 * before|after pair taking the bulk of the width, every shot carrying a corner
 * tag. A short accent rule under the title reads like a ruled ledger entry.
 * Distinct from duo-split-cards (two cards side by side with an in-card split)
 * and register-rows-quad (four rows): here exactly two transformations span the
 * full width, one over the other, the number leading the eye like a ledger.
 */

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

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

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

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

/* Rows wrapper — generous rhythm between the two register entries. */
body.aibt-universal .universal-before-after--stacked-register-pair .universal-before-after__rows {
	display: flex;
	flex-direction: column;
	gap: var(--space-2xl) !important;
}

/* Row — number/title rail on the left, before|after pair on the right.
   Ruled separator above the second entry. */
body.aibt-universal .universal-before-after--stacked-register-pair .universal-before-after__row {
	gap: var(--space-xl) !important;
	padding-top: var(--space-2xl);
	border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
}

/* First row has no top rule (the header already separates it). */
body.aibt-universal .universal-before-after--stacked-register-pair .universal-before-after__row:first-child {
	padding-top: 0;
	border-top: 0;
}

/* Big index — the lead-in glyph of each register row. */
body.aibt-universal .universal-before-after--stacked-register-pair .universal-before-after__index {
	flex: 0 0 auto;
	align-self: flex-start;
	font-family: var(--font-display) !important;
	font-size: var(--text-4xl) !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	letter-spacing: -0.02em !important;
	color: var(--accent) !important;
	margin: 0 !important;
}

/* Title — beside the index on a fixed, non-shrinking basis: the greedy image
   pair (flex-grow) would otherwise starve the title column, collapsing it until
   long Polish words ("Odświeżona", "Pielęgnacja") broke mid-word against the
   base.css overflow-wrap floor. 0-shrink + 24% holds the longest common service
   word on one line at every desktop width. A short accent underline rules it. */
body.aibt-universal .universal-before-after--stacked-register-pair .universal-before-after__row-title {
	flex: 0 0 24%;
	min-width: 0;
	overflow-wrap: normal;
	font-family: var(--font-display) !important;
	font-size: var(--text-2xl) !important;
	font-weight: 600 !important;
	line-height: 1.18 !important;
	color: var(--text-primary) !important;
	margin: 0 !important;
	padding-bottom: var(--space-xs);
	border-bottom: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
}

/* Pair — before | after shots, equal width, small gap; takes the rest. */
body.aibt-universal .universal-before-after--stacked-register-pair .universal-before-after__pair {
	flex: 1 1 auto;
	gap: var(--space-sm) !important;
}

body.aibt-universal .universal-before-after--stacked-register-pair .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--stacked-register-pair .universal-before-after__img {
	margin: 0 !important;
	display: block;
}

body.aibt-universal .universal-before-after--stacked-register-pair .universal-before-after__img img {
	display: block;
	width: 100%;
	height: auto;
	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
   (reduced-motion is handled globally by the skeleton). */
body.aibt-universal .universal-before-after--stacked-register-pair .universal-before-after__row:hover .universal-before-after__img img {
	transform: scale(1.04);
}

/* 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--stacked-register-pair .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--stacked-register-pair .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--stacked-register-pair .universal-before-after__tag--after {
	background: var(--cta-bg-primary);
	color: var(--cta-text-primary) !important;
}

/* Tablet — number + title stack onto one full-width header line above the pair. */
@media (max-width: 959px) {
	body.aibt-universal .universal-before-after--stacked-register-pair .universal-before-after__row {
		flex-wrap: wrap !important;
		gap: var(--space-md) !important;
		align-items: baseline;
	}
	body.aibt-universal .universal-before-after--stacked-register-pair .universal-before-after__index {
		align-self: baseline;
	}
	body.aibt-universal .universal-before-after--stacked-register-pair .universal-before-after__row-title {
		flex: 1 1 auto;
		border-bottom: 0;
		padding-bottom: 0;
	}
	body.aibt-universal .universal-before-after--stacked-register-pair .universal-before-after__pair {
		flex-basis: 100% !important;
		width: 100% !important;
	}
}

/* Phone — stack the before/after shots vertically so each stays large. */
@media (max-width: 640px) {
	body.aibt-universal .universal-before-after--stacked-register-pair .universal-before-after__pair {
		flex-wrap: wrap !important;
	}
	body.aibt-universal .universal-before-after--stacked-register-pair .universal-before-after__shot {
		flex-basis: 100% !important;
		width: 100% !important;
	}
	/* Cap uppercase tracking on small screens (A5 — wide tracking hurts small text). */
	body.aibt-universal .universal-before-after--stacked-register-pair .universal-before-after__kicker,
	body.aibt-universal .universal-before-after--stacked-register-pair .universal-before-after__tag {
		letter-spacing: 0 !important;
	}
}

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

body.aibt-universal .universal-before-after--stacked-register-pair .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--stacked-register-pair.universal-before-after--stacked-register-pair .universal-before-after__kicker,
body.aibt-universal .universal-before-after--stacked-register-pair.universal-before-after--stacked-register-pair .universal-before-after__headline { margin-inline: auto !important; }
