/* ============================================================================
   Hero Slideshow block
   - Outer hairline frame (1.35px #3C411E) at the page gutter, per Figma.
   - Desktop aspect ratio 1819/766 (matches design's hero rect).
   - Mobile aspect ratio 377/454 (matches design's mobile hero rect).
   - Slides absolutely stack inside the frame; crossfade via opacity 1.2s.
   ============================================================================ */

.jl-hero-slideshow {
	/* Sits inside .site-main, which already provides the page-gutter + 1600px cap.
	   Just fill the parent. */
	width: 100%;
	margin: 0;
}

.jl-hero-slideshow__frame {
	position: relative;
	width: 100%;
	aspect-ratio: 1819 / 766;
	overflow: hidden;
	background: var(--wp--preset--color--muted-surface);
}

.jl-hero-slideshow__slide {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	transition: opacity 1.2s ease-in-out;
	will-change: opacity;
}

.jl-hero-slideshow__slide.is-active {
	opacity: 1;
}

.jl-hero-slideshow__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

/* Whole-slideshow click target → Projects landing page. Covers the frame and
   sits above the slides so a click anywhere navigates. */
.jl-hero-slideshow__link {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: block;
}

/* Editor preview placeholder when no images chosen yet */
.jl-hero-slideshow__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.25em;
	color: var(--wp--preset--color--muted, #6b6b6b);
	font-family: var(--wp--preset--font-family--sans);
	text-align: center;
	padding: 1em;
}
.jl-hero-slideshow__placeholder p { margin: 0; }

/* Mobile: portrait-ish aspect ratio matching the Figma mobile frame */
@media (max-width: 768px) {
	.jl-hero-slideshow__frame {
		aspect-ratio: 377 / 454;
	}
}

/* Respect users who don't want motion — keep the first slide static */
@media (prefers-reduced-motion: reduce) {
	.jl-hero-slideshow__slide {
		transition: none;
	}
}
