.mekom-hero-slider {
	position: relative;
	width: 100vw;
	margin-left: calc( 50% - 50vw );
	overflow: hidden;
	background: #f4f4f4;
	aspect-ratio: 21 / 9;
}

@media ( max-width: 1023px ) {
	.mekom-hero-slider {
		aspect-ratio: 16 / 10;
	}
}

@media ( max-width: 599px ) {
	.mekom-hero-slider {
		aspect-ratio: 4 / 5;
	}
}

.mekom-hero-slider__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 1s ease;
}

/*
 * .is-active is the ONLY thing that controls visibility - a first-child
 * fallback here would pin that slide at opacity:1 permanently regardless of
 * JS state, breaking the fade transition whenever the carousel returns to
 * it. The "flash of blank on load" problem is solved instead by an inline
 * script in save.js that assigns .is-active synchronously, before paint.
 */
.mekom-hero-slider__slide.is-active {
	z-index: 1;
	opacity: 1;
}

.mekom-hero-slider__slide a,
.mekom-hero-slider__img {
	display: block;
	width: 100%;
	height: 100%;
}

.mekom-hero-slider__img {
	object-fit: cover;
}

/* Soft gradient so light-colored photos don't wash out the dots. */
.mekom-hero-slider::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 25%;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient( 180deg, rgba( 0, 0, 0, 0 ) 0%, rgba( 0, 0, 0, 0.35 ) 100% );
}

.mekom-hero-slider__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 20px;
	z-index: 2;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
}

.mekom-hero-slider__dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba( 255, 255, 255, 0.5 );
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.3 );
	cursor: pointer;
	transition: background-color 0.25s ease, width 0.25s ease, border-radius 0.25s ease;
}

.mekom-hero-slider__dot:hover,
.mekom-hero-slider__dot:focus-visible {
	background: rgba( 255, 255, 255, 0.8 );
}

.mekom-hero-slider__dot.is-active {
	width: 26px;
	border-radius: 5px;
	background: #fff;
}

@media ( max-width: 599px ) {
	.mekom-hero-slider__dots {
		bottom: 12px;
		gap: 8px;
	}

	.mekom-hero-slider__dot {
		width: 8px;
		height: 8px;
	}

	.mekom-hero-slider__dot.is-active {
		width: 20px;
	}
}

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