/**
 * Variant CSS: before-after--single-stacked-labeled
 * Layer 2 — Path B before-after role (count-1 expansion 2026-06-10).
 * One dramatic transformation stacked vertically: a large "before" frame ABOVE the
 * "after" frame, each carrying its own corner label band, with a result card (index +
 * title) sitting beneath the pair like a job caption. Distinct from
 * vertical-stacked-reveal (a centred seam pill "Nasza praca" between the two shots) and
 * side-by-side (columns): here there is no centre seam — each shot owns its own corner
 * and the summary sits below. Bands sit on the photos so their colours are fixed
 * (correct text-on-photo pattern); the result row uses bg tokens. Images are literal
 * client uploads.
 */

body.aibt-universal .universal-before-after--single-stacked-labeled {
	background: var(--background);
	color: var(--text-primary);
	padding-block: calc(clamp(3rem, 7vw, 5rem) * var(--density, 1));
}

/* Intro — centred block, A8-safe (horizontal-auto margins kept). */
body.aibt-universal .universal-before-after--single-stacked-labeled .universal-before-after__intro {
	margin-bottom: clamp(1.8rem, 4vw, 2.8rem);
	text-align: center;
}

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

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

body.aibt-universal .universal-before-after--single-stacked-labeled .universal-before-after__headline em {
	color: var(--accent);
	font-style: italic;
}

/* Stack — single column, before over after, framed as one object (no centre seam). */
body.aibt-universal .universal-before-after--single-stacked-labeled .universal-before-after__stack {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm) !important;
}

/* Each shot frame — relative anchor for its corner band. */
body.aibt-universal .universal-before-after--single-stacked-labeled .universal-before-after__shot {
	position: relative;
	overflow: hidden;
	border-radius: var(--decor-radius);
	box-shadow: 0 22px 50px -34px color-mix(in srgb, var(--text-primary) 50%, transparent);
}

body.aibt-universal .universal-before-after--single-stacked-labeled .universal-before-after__img {
	margin: 0 !important;
	display: block;
}

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

/* Slightly desaturate the "before" so the "after" pops by contrast. */
body.aibt-universal .universal-before-after--single-stacked-labeled .universal-before-after__shot--before .universal-before-after__img img {
	filter: var(--photo-filter, grayscale(0.18) contrast(0.96));
}

/* Gentle zoom on hover per shot — tactile "real result" cue. */
body.aibt-universal .universal-before-after--single-stacked-labeled .universal-before-after__shot:hover .universal-before-after__img img {
	transform: scale(1.03);
}

/* Corner label band — a full-height strip on the leading edge of each shot. */
body.aibt-universal .universal-before-after--single-stacked-labeled .universal-before-after__band {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	margin: 0 !important;
	padding: 0 0.7em !important;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	font-weight: 700 !important;
	letter-spacing: var(--tracking-wider) !important;
	text-transform: uppercase !important;
	box-shadow: 2px 0 12px rgba(0, 0, 0, 0.26);
}

body.aibt-universal .universal-before-after--single-stacked-labeled .universal-before-after__band--before {
	background: var(--background-dark, #141414);
	color: var(--text-on-dark, #fff) !important;
}

body.aibt-universal .universal-before-after--single-stacked-labeled .universal-before-after__band--after {
	background: var(--cta-bg-primary);
	color: var(--cta-text-primary) !important;
}

/* Result card below the pair — index chip + title, left-aligned row. */
body.aibt-universal .universal-before-after--single-stacked-labeled .universal-before-after__result {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center;
	gap: var(--space-md) !important;
	margin-top: clamp(1.4rem, 3vw, 2.2rem);
	padding: var(--space-md) var(--space-lg);
	background: var(--background-card);
	border-radius: var(--decor-radius);
	border: 1px solid color-mix(in srgb, var(--text-primary) 10%, transparent);
}

body.aibt-universal .universal-before-after--single-stacked-labeled .universal-before-after__num {
	flex: 0 0 auto;
	margin: 0 !important;
	width: 2.6em;
	height: 2.6em;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--decor-radius-pill);
	background: var(--accent);
	color: var(--cta-text-primary) !important;
	font-family: var(--font-display) !important;
	font-size: var(--text-base) !important;
	font-weight: 700 !important;
}

body.aibt-universal .universal-before-after--single-stacked-labeled h3.universal-before-after__result-title,
body.aibt-universal .universal-before-after--single-stacked-labeled .universal-before-after__result-title {
	margin: 0 !important;
	font-family: var(--font-display) !important;
	font-size: var(--text-xl) !important;
	line-height: var(--leading-snug) !important;
	color: var(--text-primary) !important;
	overflow-wrap: normal;
}

/* Mobile — bands shrink, result row keeps its horizontal rhythm. */
@media (max-width: 600px) {
	body.aibt-universal .universal-before-after--single-stacked-labeled .universal-before-after__result {
		padding: var(--space-md);
		gap: var(--space-sm) !important;
	}
}

/* Cap wide uppercase tracking on small screens (A5 — wide tracking hurts small text). */
@media (max-width: 640px) {
	body.aibt-universal .universal-before-after--single-stacked-labeled .universal-before-after__kicker,
	body.aibt-universal .universal-before-after--single-stacked-labeled .universal-before-after__band {
		letter-spacing: 0 !important;
	}
}

/* Honour reduced-motion — kill the hover zoom. */
@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-before-after--single-stacked-labeled .universal-before-after__img img,
	body.aibt-universal .universal-before-after--single-stacked-labeled .universal-before-after__shot:hover .universal-before-after__img img {
		transition: none;
		transform: none;
	}
}

/* A8/A9 left-shift fix: centered intro children were max-width-capped by WP constrained
   layout but pinned left by horizontal margin:0. Force margin-inline:auto. Section class
   doubled -> specificity (0,4,1) beats element-tag-qualified rules; harmless on already-
   centered elements (auto margins compute to 0). Only left/right are overridden. */
body.aibt-universal .universal-before-after--single-stacked-labeled.universal-before-after--single-stacked-labeled .universal-before-after__kicker,
body.aibt-universal .universal-before-after--single-stacked-labeled.universal-before-after--single-stacked-labeled .universal-before-after__headline { margin-inline: auto !important; }
