/**
 * Variant CSS: offer--horizontal-scroll-cards
 * Layer 2 - Path B universal offer variant (authored 2026-06-06).
 *
 * Concept: a full-bleed, horizontally scroll-snapping row of service cards for
 * businesses with MANY services. The intro (kicker + headline + deck) plus a
 * "Przesuń →" affordance live in the constrained header; below it the .__track
 * breaks out to the viewport edges and scrolls sideways with mandatory snap.
 * Each card is a fixed-width panel: a large index numeral, service title, a
 * one-line description and a price. A custom thin scrollbar + edge fade hint at
 * the overflow. No dark band (text on --background).
 *
 * Differentiator vs sibling offer variants:
 *   - grid-compact-auto / icon-cards-3col / trio-accent-cards: cards WRAP in a grid.
 *   - tabbed-service-groups: a segmented switcher over one fixed grid.
 *   - alternating-media-rows: full-width zig-zag photo rows.
 *   THIS one: a single horizontal overflow rail with scroll-snap — the only
 *   variant where the catalogue extends past the viewport and the user scrolls.
 *
 * Full-bleed technique: the section stays layout:constrained so the header keeps
 * its measure; the track escapes via 100vw + margin-inline calc(50% - 50vw), then
 * re-pads its inline edges by the page gutter so card 1 lines up with the header.
 * services.area_N_* tokens (meta_1=index, title, desc, price) per CLAUDE.md.
 */

/* == Section shell == */
body.aibt-universal .universal-offer--horizontal-scroll-cards {
	background: var(--background);
	color: var(--text-primary);
	border-bottom: 1px solid var(--divider-primary);
	overflow: hidden; /* belt-and-braces: clip any sub-pixel bleed from the rail */
}

/* == Header: text on the left, scroll affordance on the right == */
body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__head {
	gap: clamp(1.5rem, 4vw, 3rem) !important;
	margin-bottom: clamp(1.75rem, 4vh, 2.75rem);
}

body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__head-text {
	margin: 0 !important; /* left-aligned header block; not centred (no auto needed) */
}

/* Kicker: uppercase tracked accent. */
body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__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-md) 0 !important;
}

body.aibt-universal .universal-offer--horizontal-scroll-cards h2.universal-offer__headline,
body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__headline {
	font-family: var(--font-display) !important;
	color: var(--text-primary) !important;
	margin: 0 0 var(--space-sm) 0 !important;
}

body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__headline em {
	color: var(--italic-color, var(--accent));
	font-weight: var(--italic-weight, 600);
	font-style: italic;
}

body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__deck {
	font-family: var(--font-body) !important;
	font-size: var(--text-base) !important;
	line-height: var(--leading-relaxed) !important;
	color: var(--text-secondary) !important;
	margin: 0 !important;
	max-width: 52ch;
}

/* Scroll hint: a muted "Przesuń →" cluster sitting at the bottom-right of the head. */
body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__hint {
	gap: 0.6rem !important;
	color: var(--text-secondary) !important;
	flex-shrink: 0;
}

body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__hint-label {
	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: 0 !important;
	white-space: nowrap;
}

body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__hint-arrow {
	display: inline-flex;
	color: var(--accent);
}

body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__hint-arrow svg {
	display: block;
	animation: aibt-hsc-nudge 1.8s var(--ease-default, ease-in-out) infinite;
}

@keyframes aibt-hsc-nudge {
	0%, 100% { transform: translateX(0); }
	50%      { transform: translateX(5px); }
}

/* == Horizontal rail == */
/* Break full-bleed out of the constrained section, then re-pad to the page gutter
   so the first/last cards align with the header's content edge. */
body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__track {
	width: 100vw !important;
	max-width: 100vw !important;
	margin-inline: calc(50% - 50vw) !important;
	padding-inline: max(1.25rem, calc(50vw - 590px)) !important; /* 590 = contentSize/2 */
	gap: clamp(1rem, 2vw, 1.5rem) !important;
	align-items: stretch !important;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scroll-padding-left: max(1.25rem, calc(50vw - 590px));
	/* Thin themed scrollbar (Firefox). */
	scrollbar-width: thin;
	scrollbar-color: var(--accent) transparent;
	/* Subtle right-edge fade telegraphs "there is more". */
	-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 4rem), transparent 100%);
	        mask-image: linear-gradient(to right, #000 calc(100% - 4rem), transparent 100%);
}

/* WebKit scrollbar styling. */
body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__track::-webkit-scrollbar {
	height: 6px;
}
body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__track::-webkit-scrollbar-track {
	background: color-mix(in srgb, var(--ink) 8%, transparent);
	border-radius: var(--decor-radius-pill, 999px);
}
body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__track::-webkit-scrollbar-thumb {
	background: var(--accent);
	border-radius: var(--decor-radius-pill, 999px);
}

/* == Card == */
body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__card {
	flex: 0 0 auto !important;
	width: clamp(15rem, 78vw, 19rem);
	scroll-snap-align: start;
	display: flex !important;
	flex-direction: column;
	padding: clamp(1.5rem, 2.5vw, 2rem) !important;
	background: var(--background-card, var(--background)) !important;
	border: 1px solid var(--divider-primary);
	border-radius: var(--decor-radius, 0px);
	transition:
		border-color var(--duration-fast) var(--ease-default),
		transform var(--duration-fast) var(--ease-default);
}

body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__card:hover {
	border-color: var(--accent);
	transform: translateY(-4px);
}

/* Index numeral: oversized quiet accent marker. */
body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__card-index {
	font-family: var(--font-display) !important;
	font-size: var(--text-lg) !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em !important;
	line-height: 1 !important;
	color: var(--accent) !important;
	margin: 0 0 var(--space-md) 0 !important;
}

body.aibt-universal .universal-offer--horizontal-scroll-cards h3.universal-offer__card-title,
body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__card-title {
	font-family: var(--font-display) !important;
	font-size: var(--text-lg) !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	letter-spacing: -0.01em !important;
	color: var(--text-primary) !important;
	margin: 0 0 var(--space-xs) 0 !important;
}

body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__card-desc {
	font-family: var(--font-body) !important;
	font-size: var(--text-sm) !important;
	line-height: var(--leading-relaxed) !important;
	color: var(--text-secondary) !important;
	margin: 0 0 var(--space-md) 0 !important;
	flex-grow: 1; /* push the price to the card foot, keep card heights even */
}

/* Price: a hairline-topped foot row in accent. */
body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__card-price {
	font-family: var(--font-body) !important;
	font-size: var(--text-base) !important;
	font-weight: 600 !important;
	letter-spacing: 0.01em !important;
	color: var(--accent) !important;
	margin: 0 !important;
	padding-top: var(--space-sm) !important;
	border-top: 1px solid var(--divider-primary);
}

/* == Responsive == */
@media (max-width: 781px) {
	/* Header stacks; keep the hint visible below the text. */
	body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__head {
		flex-direction: column !important;
		align-items: flex-start !important;
		gap: 1rem !important;
	}
	/* Narrow the gutter re-pad so the rail edge sits near the screen edge. */
	body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__track {
		padding-inline: max(1rem, calc(50vw - 590px)) !important;
		scroll-padding-left: max(1rem, calc(50vw - 590px));
	}
}

@media (max-width: 640px) {
	/* Cap uppercase tracking: wide letter-spacing reads as gaps at narrow widths (A5). */
	body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__kicker,
	body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__hint-label {
		letter-spacing: 0 !important;
	}
	/* Card peeks the next one at ~82% so the swipe affordance reads on phones. */
	body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__card {
		width: 82vw;
	}
}

/* == Motion respect == */
@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__hint-arrow svg {
		animation: none;
	}
	body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__card {
		transition: none;
	}
	body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__card:hover {
		transform: none;
	}
	/* Honour users who disable smooth/animated scrolling: drop snap enforcement. */
	body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__track {
		scroll-snap-type: none;
	}
}

/* == Editor: the editor canvas is itself constrained/narrow; let the rail behave
   as a normal scroll container rather than fighting the iframe width. == */
.editor-styles-wrapper .universal-offer--horizontal-scroll-cards .universal-offer__track {
	width: 100% !important;
	max-width: 100% !important;
	margin-inline: 0 !important;
	padding-inline: 0 !important;
	-webkit-mask-image: none;
	        mask-image: none;
}

/* Interactive focus rings for keyboard users (cards are not links here, but the
   rail itself is focusable when it scrolls — give it a visible ring). */
body.aibt-universal .universal-offer--horizontal-scroll-cards .universal-offer__track:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
