/*
 * Homepage Slider widget styles (sc_homepage_slider).
 *
 * Mirrors the visual model of the Ticket Page hero slider
 * (assets/css/sc-ticket-hero.css, lines 50-187): slides crossfade via
 * opacity, controls live just outside the slide frame, and the wrapper is
 * centered and capped at --sc-slider-max-width. Defaults to a slightly
 * wider max-width than the hero (1100px vs 800px) so the homepage
 * billboard reads larger than a per-event hero image.
 *
 * Sizing matches the hero too: the image fills the slider's width and
 * keeps its natural height (height: auto, no crop). The active slide is
 * the only one in normal flow (position: relative), so it dictates the
 * frame height; inactive slides are absolutely overlaid and faded out.
 *
 * Scoped under .sc-homepage-slider-widget so palette tokens from
 * sc-ticket-shared.css cascade in without leaking to sibling widgets.
 */

.sc-homepage-slider-widget {
	display: block;
	background: var(--bg);
}

.sc-homepage-slider-widget.is-empty {
	padding: 40px 24px;
	text-align: center;
}

.sc-homepage-slider-empty {
	color: var(--muted);
	margin: 0;
}

/* ----- Slider frame ----- */
.sc-homepage-slider {
	position: relative;
	width: 100%;
	max-width: var(--sc-slider-max-width, 1100px);
	margin: 0 auto;
	outline: none;
}

.sc-homepage-slider:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 4px;
	border-radius: 4px;
}

.sc-homepage-slides {
	position: relative;
	list-style: none;
	margin: 0;
	padding: 0;
	min-height: 1px;
}

/* Inactive slides are absolutely overlaid and faded out; the active slide
 * stays in normal flow (position: relative) so its natural-height image
 * dictates the frame height — same model as the hero slider. */
.sc-homepage-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity var(--sc-slider-transition, 500ms) ease;
	pointer-events: none;
}

.sc-homepage-slide.is-active {
	position: relative;
	opacity: 1;
	pointer-events: auto;
}

.sc-homepage-slide-link {
	position: relative;
	display: block;
	text-decoration: none;
	color: inherit;
	background: var(--bg-alt);
	overflow: hidden;
	border-radius: 4px;
}

/* The image fits the slider width and keeps its natural height — no crop. */
.sc-homepage-slide-image {
	width: 100%;
	height: auto;
	display: block;
}

/* No image: keep a 16:9 box so the slide frame doesn't collapse. */
.sc-homepage-slide-image-fallback {
	aspect-ratio: 16 / 9;
	background:
		radial-gradient(ellipse at top, rgba(200, 168, 75, 0.18), transparent 70%),
		linear-gradient(180deg, var(--bg-alt), var(--bg));
}

/* ----- Overlay ----- */
.sc-homepage-slide-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 12px;
	padding: 32px clamp(24px, 5vw, 64px);
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.7) 100%);
	color: var(--text);
}

.sc-homepage-slide-meta {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 5px;
	text-transform: uppercase;
	color: var(--accent);
}

.sc-homepage-slide-title {
	font-family: 'Barlow Condensed', sans-serif;
	font-weight: 900;
	font-size: clamp(28px, 4.5vw, 52px);
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 1px;
	line-height: 1.05;
	color: #ffffff;
	text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.sc-homepage-slide-subtitle {
	margin: 0;
	font-size: clamp(15px, 1.6vw, 18px);
	color: var(--text);
	max-width: 720px;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.sc-homepage-slide-cta {
	display: inline-block;
	align-self: flex-start;
	margin-top: 8px;
	background: var(--primary);
	color: #ffffff;
	font-family: 'Barlow Condensed', sans-serif;
	font-weight: 800;
	letter-spacing: 2px;
	text-transform: uppercase;
	font-size: 14px;
	padding: 12px 28px;
	border-radius: 4px;
	cursor: pointer;
	transition: background 120ms ease;
}

.sc-homepage-slide-link:hover .sc-homepage-slide-cta,
.sc-homepage-slide-link:focus-visible .sc-homepage-slide-cta {
	background: var(--primary-hv);
}

/* ----- Arrows ----- */
.sc-homepage-slider-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--border, rgba(255, 255, 255, 0.2));
	background: rgba(0, 0, 0, 0.45);
	color: #ffffff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background 0.2s, border-color 0.2s, transform 0.2s;
	z-index: 2;
}

.sc-homepage-slider-arrow:hover,
.sc-homepage-slider-arrow:focus-visible {
	background: rgba(0, 0, 0, 0.75);
	border-color: var(--accent);
	outline: none;
}

.sc-homepage-slider-arrow.prev { left: -8px; }
.sc-homepage-slider-arrow.next { right: -8px; }

/* ----- Dots ----- */
.sc-homepage-slider-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 12px;
}

.sc-homepage-slider-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	border: 0;
	background: rgba(255, 255, 255, 0.35);
	cursor: pointer;
	padding: 0;
	transition: background 0.2s, transform 0.2s;
}

.sc-homepage-slider-dot.is-active,
.sc-homepage-slider-dot:hover {
	background: var(--accent);
	transform: scale(1.15);
}

.sc-homepage-slider-dot:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.sc-homepage-slider.is-single .sc-homepage-slider-arrow,
.sc-homepage-slider.is-single .sc-homepage-slider-dots {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.sc-homepage-slide,
	.sc-homepage-slider-arrow,
	.sc-homepage-slider-dot {
		transition: none;
	}
}

@media (max-width: 767px) {
	.sc-homepage-slide-overlay {
		padding: 20px 18px;
		gap: 8px;
	}

	.sc-homepage-slider-arrow {
		width: 36px;
		height: 36px;
		font-size: 22px;
	}

	.sc-homepage-slider-arrow.prev { left: 4px; }
	.sc-homepage-slider-arrow.next { right: 4px; }
}
