/**
 * Variant CSS: before-after--compact-quartet-columns
 * Layer 2 — Path B before-after role (2026-06-10).
 * Exactly FOUR slim, borderless columns side by side. Each column = a tall
 * VERTICAL before-over-after stack (the two portrait frames joined by a thin
 * accent seam), a corner tag on each frame, and a small numbered caption row
 * (index + title) beneath. Reads like a dense contact-sheet strip.
 * Distinct from three-case-grid (3 bordered cards with a large heading on top)
 * and quad-grid-cards (2x2 grid of horizontal split frames): here four narrow
 * columns form a compact band of transformations.
 */

body.aibt-universal .universal-before-after--compact-quartet-columns {
	background: var(--background-alt);
	color: var(--text-primary);
}

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

body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__intro > * {
	margin-inline: auto !important;
}

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

/* Quartet — four equal slim columns; stretch so caption rows line up. */
body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__quartet {
	align-items: stretch;
}

body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__col {
	display: flex;
	flex-direction: column;
}

/* Stack — before frame above after frame, joined on a thin accent seam.
   gap:0 + overflow:hidden so the two portraits read as one continuous tile. */
body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__stack {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0 !important;
	border-radius: var(--decor-radius);
	overflow: hidden;
}

/* Horizontal accent seam splitting before (top) from after (bottom). */
body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__stack::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 2px;
	transform: translateY(-50%);
	background: var(--accent);
	z-index: 2;
}

body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__shot {
	position: relative;
	overflow: hidden;
}

body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__img {
	margin: 0 !important;
	display: block;
}

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

/* Gentle paired zoom on the column's photos on hover — tactile result cue. */
body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__col:hover .universal-before-after__img img {
	transform: scale(1.05);
}

/* Corner tags — sit on each frame.
   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--compact-quartet-columns .universal-before-after__tag {
	position: absolute;
	top: var(--space-xs);
	left: var(--space-xs);
	z-index: 3;
	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.3em 0.7em !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--compact-quartet-columns .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--compact-quartet-columns .universal-before-after__tag--after {
	background: var(--cta-bg-primary);
	color: var(--cta-text-primary) !important;
}

/* Caption row — small numbered index + title under each column. */
body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__cap {
	gap: var(--space-xs) !important;
	margin-top: var(--space-sm);
}

body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__num {
	flex: 0 0 auto;
	font-family: var(--font-display) !important;
	font-size: var(--text-xs) !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	letter-spacing: 0 !important;
	color: var(--accent) !important;
	margin: 0 !important;
}

body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__col-title {
	flex: 1 1 auto;
	min-width: 0;
	font-family: var(--font-display) !important;
	font-size: var(--text-base) !important;
	font-weight: 600 !important;
	line-height: 1.25 !important;
	color: var(--text-primary) !important;
	margin: 0 !important;
}

/* Tablet — drop four columns to a 2x2 (each column still a vertical stack). */
@media (max-width: 959px) {
	body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__quartet {
		flex-wrap: wrap !important;
	}
	body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__col {
		flex-basis: calc(50% - var(--space-sm)) !important;
		width: calc(50% - var(--space-sm)) !important;
	}
}

/* Phone — one column per row; make the stack read as before|after side by side
   so each portrait stays large rather than very tall. Cap tracking (A5). */
@media (max-width: 640px) {
	body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__col {
		flex-basis: 100% !important;
		width: 100% !important;
	}
	body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__stack {
		flex-direction: row !important;
	}
	/* Re-orient the seam to a vertical centre line for the side-by-side phone layout. */
	body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__stack::before {
		left: 50%;
		right: auto;
		top: 0;
		bottom: 0;
		height: auto;
		width: 2px;
		transform: translateX(-50%);
	}
	body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__shot {
		flex: 1 1 50%;
		min-width: 0;
	}
	body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__kicker,
	body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__tag {
		letter-spacing: 0 !important;
	}
}

/* Keyboard affordance — column focus-within outline + image focus-visible. */
body.aibt-universal .universal-before-after--compact-quartet-columns .universal-before-after__col:focus-within {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

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