.ehs-slider {
	--ehs-h: var(--ehs-h-d, 500px);
	position: relative;
	/* 100vw capped at 100% = "fill the parent", but it still works inside a flex
	   row (e.g. an Elementor container), where plain width:100% collapses to 0. */
	width: 100vw;
	max-width: 100%;
	height: var(--ehs-h);
	overflow: hidden;
	background: #111;
}
@media (max-width: 768px) {
	.ehs-slider { --ehs-h: var(--ehs-h-m, 380px); }
}

/* Elementor shortcode widgets shrink to their content; make ours full width. */
.elementor-widget:has(.ehs-slider) { width: 100%; }

/* Slides outside their schedule (and an empty slider) stay out of the page. */
.ehs-slider[hidden],
.ehs-slider [hidden] { display: none !important; }

.ehs-track { position: relative; height: 100%; }
.ehs-slide {
	display: block;
	position: relative;
	height: 100%;
	color: #fff;
	text-decoration: none;
}
.ehs-slide picture,
.ehs-slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Fade transition */
.ehs-mode-fade .ehs-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .6s ease, visibility 0s linear .6s;
}
.ehs-mode-fade .ehs-slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity .6s ease;
}

/* Slide transition */
.ehs-mode-slide .ehs-track {
	display: flex;
	transition: transform .6s ease;
}
.ehs-mode-slide .ehs-slide { flex: 0 0 100%; }

/* Caption */
.ehs-caption {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 56px max(24px, 6vw) 56px;
	background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,0));
}
.ehs-heading { margin: 0 0 8px; font-size: clamp(1.6rem, 4vw, 3rem); line-height: 1.15; color: #fff; }
.ehs-sub { margin: 0 0 16px; font-size: clamp(1rem, 2vw, 1.25rem); max-width: 40em; color: #fff; }
.ehs-btn {
	display: inline-block;
	padding: 12px 28px;
	background: #fff;
	color: #111;
	font-weight: 600;
	text-decoration: none;
	border-radius: 4px;
}
.ehs-btn:hover, .ehs-btn:focus-visible { background: #e8e8e8; }

/* Arrows */
.ehs-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 48px; height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0,0,0,.45);
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: background .2s;
}
.ehs-arrow:hover, .ehs-arrow:focus-visible { background: rgba(0,0,0,.75); }
.ehs-prev { left: 16px; }
.ehs-next { right: 16px; }
@media (max-width: 768px) {
	.ehs-arrow { width: 40px; height: 40px; }
	.ehs-prev { left: 8px; }
	.ehs-next { right: 8px; }
}

/* Dots */
.ehs-dots {
	position: absolute;
	left: 0; right: 0; bottom: 16px;
	z-index: 2;
	display: flex;
	justify-content: center;
	gap: 8px;
}
.ehs-dot {
	width: 12px; height: 12px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
}
.ehs-dot.is-active { background: #fff; }

@media (prefers-reduced-motion: reduce) {
	.ehs-mode-fade .ehs-slide, .ehs-mode-slide .ehs-track { transition: none; }
}
