.cew-slider {
	--cew-speed: 0.9s;
	--cew-delay: 0.45s;
	--cew-interval: 6000ms;
	--cew-overlay-color: #000;
	--cew-overlay-alpha: 0.6;
	position: relative;
	height: 520px;
	overflow: hidden;
	background: #111;
	touch-action: pan-y;
}

.cew-slider *,
.cew-slider *::before,
.cew-slider *::after {
	box-sizing: border-box;
}

/* ===== Diapositivas (fundido cruzado) ===== */
.cew-slider .cew-slide {
	position: absolute;
	inset: 0;
	visibility: hidden;
	opacity: 0;
}

.cew-slider .cew-slide.is-active {
	z-index: 2;
	visibility: visible;
	opacity: 1;
	transition: opacity var(--cew-speed) ease;
}

/* La saliente se queda visible mientras la nueva aparece encima (sin "parpadeo" oscuro) */
.cew-slider .cew-slide.is-leaving {
	z-index: 1;
	visibility: visible;
	opacity: 1;
}

/* ===== Foto ===== */
.cew-slide__media {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background: #111;
}

.cew-slider .cew-slide__img {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
	object-position: var(--cew-pos, center center);
	border-radius: 0;
}

/* Foto completa: se ve entera y el sobrante se rellena con la misma foto desenfocada */
.cew-slider--fit-contain .cew-slide__img {
	object-fit: contain;
}

.cew-slider .cew-slide__bg {
	position: absolute;
	top: -6%;
	left: -6%;
	display: block;
	width: 112%;
	max-width: none;
	height: 112%;
	object-fit: cover;
	filter: blur(28px) brightness(0.7);
}

/* Zoom lento mientras la diapositiva está activa */
@keyframes cew-zoom {
	from {
		transform: scale(1);
	}

	to {
		transform: scale(1.08);
	}
}

.cew-slider--zoom .cew-slide.is-active .cew-slide__img,
.cew-slider--zoom .cew-slide.is-leaving .cew-slide__img {
	animation: cew-zoom calc(var(--cew-interval) + var(--cew-speed)) ease-out forwards;
}

/* ===== Degradado para que el texto siempre se lea ===== */
.cew-slide__overlay {
	position: absolute;
	inset: 0;
	opacity: var(--cew-overlay-alpha);
	background: linear-gradient(to top, var(--cew-overlay-color) 0%, transparent 70%);
	pointer-events: none;
}

.cew-slider--v-top .cew-slide__overlay {
	background: linear-gradient(to bottom, var(--cew-overlay-color) 0%, transparent 70%);
}

.cew-slider--v-center .cew-slide__overlay {
	opacity: calc(var(--cew-overlay-alpha) * 0.7);
	background: var(--cew-overlay-color);
}

/* ===== Texto ===== */
.cew-slide__content {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	justify-content: flex-start;
	padding: 40px 80px 76px;
	pointer-events: none;
}

.cew-slider--v-top .cew-slide__content {
	align-items: flex-start;
}

.cew-slider--v-center .cew-slide__content {
	align-items: center;
}

.cew-slider--h-center .cew-slide__content {
	justify-content: center;
	text-align: center;
}

.cew-slider--h-right .cew-slide__content {
	justify-content: flex-end;
	text-align: right;
}

.cew-slide__text {
	max-width: 760px;
	pointer-events: auto;
}

.cew-slider .cew-slide__title {
	margin: 0;
	color: #fff;
	font-size: clamp(24px, 3.2vw, 44px);
	font-weight: 700;
	line-height: 1.2;
	text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

/* El fondo opcional del título se resalta línea por línea */
.cew-slider .cew-slide__title span {
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

.cew-slider .cew-slide__subtitle {
	margin: 14px 0 0;
	color: #fff;
	font-size: clamp(15px, 1.5vw, 19px);
	line-height: 1.55;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.cew-slider .cew-slide__btn {
	display: inline-block;
	margin-top: 24px;
	padding: 12px 28px;
	border: 1px solid #006633;
	border-radius: 999px;
	background-color: #006633;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.cew-slider .cew-slide__btn:hover,
.cew-slider .cew-slide__btn:focus-visible {
	border-color: #fff;
	background-color: #fff;
	color: #006633;
}

/* ===== Animación de entrada del texto (después de la foto) ===== */
@keyframes cew-rise {
	from {
		opacity: 0;
		transform: translateY(28px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes cew-fade {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

.cew-slider--anim-rise .cew-slide.is-active .cew-slide__title {
	animation: cew-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--cew-delay) both;
}

.cew-slider--anim-rise .cew-slide.is-active .cew-slide__subtitle {
	animation: cew-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--cew-delay) + 0.15s) both;
}

.cew-slider--anim-rise .cew-slide.is-active .cew-slide__btn {
	animation: cew-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--cew-delay) + 0.3s) both;
}

.cew-slider--anim-fade .cew-slide.is-active .cew-slide__title {
	animation: cew-fade 0.8s ease var(--cew-delay) both;
}

.cew-slider--anim-fade .cew-slide.is-active .cew-slide__subtitle {
	animation: cew-fade 0.8s ease calc(var(--cew-delay) + 0.15s) both;
}

.cew-slider--anim-fade .cew-slide.is-active .cew-slide__btn {
	animation: cew-fade 0.8s ease calc(var(--cew-delay) + 0.3s) both;
}

/* ===== Flechas ===== */
.cew-slider .cew-slider__arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	display: grid;
	width: 48px;
	height: 48px;
	padding: 0;
	place-items: center;
	border: 1.5px solid #fff;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.25);
	color: #fff;
	cursor: pointer;
	transform: translateY(-50%);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	transition: background-color 0.25s ease, color 0.25s ease;
}

.cew-slider__arrow--prev {
	left: 20px;
}

.cew-slider__arrow--next {
	right: 20px;
}

.cew-slider .cew-slider__arrow:hover,
.cew-slider .cew-slider__arrow:focus-visible {
	background-color: #fff;
	color: #006633;
}

.cew-slider__arrow svg {
	width: 45%;
	height: 45%;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
}

/* ===== Puntos ===== */
.cew-slider__dots {
	position: absolute;
	right: 0;
	bottom: 22px;
	left: 0;
	z-index: 5;
	display: flex;
	justify-content: center;
	gap: 8px;
	pointer-events: none;
}

.cew-slider .cew-slider__dot {
	position: relative;
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background-color: rgba(255, 255, 255, 0.5);
	cursor: pointer;
	pointer-events: auto;
	transition: width 0.3s ease, background-color 0.3s ease;
}

/* Zona de toque más grande sin agrandar el punto */
.cew-slider__dot::after {
	content: "";
	position: absolute;
	inset: -10px -4px;
}

.cew-slider .cew-slider__dot.is-active {
	width: 28px;
	background-color: #fff;
}

.cew-slider .cew-slider__dot:focus-visible,
.cew-slider .cew-slider__arrow:focus-visible,
.cew-slider .cew-slide__btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

/* ===== Barra de progreso (también marca el tiempo de cada diapositiva) ===== */
.cew-slider__progress {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 5;
	height: 3px;
	background: rgba(255, 255, 255, 0.2);
	opacity: 0;
}

.cew-slider--progress .cew-slider__progress {
	opacity: 1;
}

.cew-slider__progress span {
	display: block;
	width: 0;
	height: 100%;
	background: #fff;
}

@keyframes cew-progress {
	from {
		width: 0;
	}

	to {
		width: 100%;
	}
}

.cew-slider.is-playing .cew-slider__progress span {
	animation: cew-progress var(--cew-interval) linear forwards;
}

/* Pausa: detiene la barra y el zoom */
.cew-slider.is-paused .cew-slider__progress span,
.cew-slider.is-paused .cew-slide__img {
	animation-play-state: paused !important;
}

.cew-slider__empty {
	margin: 0;
	padding: 24px;
	color: #777;
	text-align: center;
}

/* ===== Celular ===== */
@media (max-width: 767px) {
	.cew-slider--no-arrows-mobile .cew-slider__arrow {
		display: none;
	}

	.cew-slider__arrow--prev {
		left: 10px;
	}

	.cew-slider__arrow--next {
		right: 10px;
	}

	.cew-slider__dots {
		bottom: 16px;
	}
}

/* ===== Menos movimiento ===== */
@media (prefers-reduced-motion: reduce) {
	.cew-slider .cew-slide,
	.cew-slider .cew-slide * {
		animation: none !important;
		transition-duration: 0.01s !important;
	}
}