/* RSOC Hero Carousel
 *
 * Default mode fills its positioned parent (the theme drops it inside the
 * .rs-hero section, before the hero content, so the text paints above it).
 * --standalone mode is a self-contained banner for the shortcode.
 */

.rsoc-hero-carousel {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}

.rsoc-hero-carousel--standalone {
	position: relative;
	inset: auto;
	aspect-ratio: 21 / 9;
	border-radius: 6px;
	/* Contain the negative z-index slides inside the banner. */
	isolation: isolate;
}

/* The slides sit at negative z-index so the hero text and buttons, which are
 * static in-flow siblings of the carousel, paint above them. The carousel
 * root itself stays transparent and must NOT create a stacking context
 * (no z-index/opacity/transform here), or the slides would be trapped in
 * front of the hero content. */
.rsoc-hero-carousel__slide {
	position: absolute;
	inset: 0;
	z-index: -2;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	opacity: 0;
	transition: opacity 900ms ease;
}

.rsoc-hero-carousel__slide.is-active {
	opacity: 1;
}

/* Scrim so hero text stays legible over any photo. */
.rsoc-hero-carousel__slide::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		100deg,
		rgba(10, 12, 16, 0.78) 15%,
		rgba(10, 12, 16, 0.45) 60%,
		rgba(10, 12, 16, 0.6) 100%
	);
}

.rsoc-hero-carousel--standalone .rsoc-hero-carousel__slide::after {
	background: linear-gradient(to top, rgba(10, 12, 16, 0.45), transparent 45%);
}

/* Controls: bottom-right, clickable even though the slide layer is not. */
.rsoc-hero-carousel__controls {
	position: absolute;
	right: 1rem;
	bottom: 1rem;
	z-index: 5;
	display: flex;
	align-items: center;
	gap: 0.55rem;
	pointer-events: auto;
}

.rsoc-hero-carousel__arrow {
	background: rgba(10, 12, 16, 0.55);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 4px;
	font-size: 1.25rem;
	line-height: 1;
	padding: 0.15em 0.5em 0.28em;
	cursor: pointer;
	transition: background 120ms ease, border-color 120ms ease;
}

.rsoc-hero-carousel__arrow:hover {
	background: rgba(10, 12, 16, 0.85);
	border-color: #fff;
}

.rsoc-hero-carousel__dots {
	display: flex;
	gap: 0.45rem;
}

.rsoc-hero-carousel__dot {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.8);
	background: transparent;
	padding: 0;
	cursor: pointer;
	transition: background 120ms ease, transform 120ms ease;
}

.rsoc-hero-carousel__dot:hover {
	transform: scale(1.25);
}

.rsoc-hero-carousel__dot.is-active {
	background: #fff;
}

.rsoc-hero-carousel__arrow:focus-visible,
.rsoc-hero-carousel__dot:focus-visible {
	outline: 3px solid #7fa8d9;
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.rsoc-hero-carousel__slide {
		transition: none;
	}
}
