/**
 * SAL Hero Slideshow — frontend styles.
 * BEM-ish naming under .sal-hero-slideshow so this never leaks into
 * or gets clobbered by theme/Elementor global styles.
 */

.sal-hero-slideshow {
	position: relative;
	width: 100%;
	overflow: hidden;
	isolation: isolate; /* keeps z-index stacking self-contained */
}

.sal-hero-slideshow-fullwidth-yes {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* ---------- Slide stack ---------- */

.sal-hero-slideshow__track {
	position: absolute;
	inset: 0;
}

.sal-hero-slideshow__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.8s ease, visibility 0.8s ease;
	z-index: 1;
}

.sal-hero-slideshow__slide--active {
	opacity: 1;
	visibility: visible;
	z-index: 2;
}

/* Slide transition variant */
.sal-hero-slideshow[data-transition="slide"] .sal-hero-slideshow__slide {
	transition: transform 0.8s ease, opacity 0.8s ease, visibility 0.8s ease;
	transform: translateX(100%);
}

.sal-hero-slideshow[data-transition="slide"] .sal-hero-slideshow__slide--active {
	transform: translateX(0);
}

.sal-hero-slideshow[data-transition="slide"] .sal-hero-slideshow__slide--prev {
	transform: translateX(-100%);
}

.sal-hero-slideshow__media {
	position: absolute;
	inset: 0;
}

.sal-hero-slideshow__image,
.sal-hero-slideshow__video {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	object-position: center;
	aspect-ratio: auto; /* overrides the browser's native aspect-ratio from width/height attrs */
}

/* ---------- Arrows ---------- */

.sal-hero-slideshow__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 15;
	width: 48px;
	height: 48px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(4px);
	transition: background-color 0.2s ease;
}

.sal-hero-slideshow__arrow:hover {
	background: rgba(255, 255, 255, 0.3);
}

.sal-hero-slideshow__arrow--prev {
	left: 20px;
}

.sal-hero-slideshow__arrow--next {
	right: 20px;
}

/* ---------- Dots ---------- */

.sal-hero-slideshow__dots {
	position: absolute;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 15;
	display: flex;
	gap: 10px;
}

.sal-hero-slideshow__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.4);
	cursor: pointer;
	padding: 0;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.sal-hero-slideshow__dot--active {
	background: #fff;
	transform: scale(1.2);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.sal-hero-slideshow__slide {
		transition: opacity 0.01ms linear !important;
		transform: none !important;
	}
}

/* ---------- Responsive ---------- */

@media (max-width: 767px) {
	.sal-hero-slideshow__arrow {
		width: 38px;
		height: 38px;
		font-size: 22px;
	}
}
