/* ============================================================
   Carrusel Animado para Elementor
   ============================================================ */

.cae-carousel {
	position: relative;
	width: 100%;
}

.cae-swiper {
	width: 100%;
	overflow: hidden;
	position: relative;
}

/* ============================================================
   Degradado en los bordes (fade lateral)
   Evita que los items se vean cortados al entrar/salir.
   ============================================================ */

/* Overlay de color con blur sobre sí mismo: al difuminar el propio
   degradado se elimina cualquier línea/banda dura. Se extiende hacia
   afuera (proporcional al blur) para que el borde siga sólido tras el
   desenfoque; el overflow:hidden del .cae-swiper recorta el sobrante. */
.cae-edge {
	position: absolute;
	top: 0;
	bottom: 0;
	width: calc( var(--cae-edge-width, 120px) + var(--cae-edge-blur, 10px) * 3 );
	z-index: 3;
	pointer-events: none;
	filter: blur( var(--cae-edge-blur, 10px) );
}

.cae-edge-left {
	left: calc( var(--cae-edge-blur, 10px) * -3 );
	background: linear-gradient( to right, var(--cae-edge-color, #ffffff) 0%, transparent 100% );
}

.cae-edge-right {
	right: calc( var(--cae-edge-blur, 10px) * -3 );
	background: linear-gradient( to left, var(--cae-edge-color, #ffffff) 0%, transparent 100% );
}

/* Para que los slides tengan la misma altura */
.cae-swiper .swiper-wrapper {
	align-items: stretch;
}

.cae-swiper .swiper-slide {
	height: auto;
	display: flex;
}

.cae-item {
	display: flex;
	flex-direction: column;
	width: 100%;
	text-decoration: none;
	color: inherit;
}

.cae-item-image {
	width: 100%;
	overflow: hidden;
	line-height: 0;
}

.cae-item-image img {
	width: 100%;
	height: 240px;
	object-fit: cover;
	display: block;
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Zoom suave de imagen al pasar el cursor */
.cae-hover-zoom-yes .cae-item:hover .cae-item-image img {
	transform: scale(1.06);
}

.cae-item-content {
	flex: 1 1 auto;
}

.cae-item-content.cae-has-index {
	display: flex;
	align-items: flex-start;
	flex-wrap: nowrap;
}

.cae-item-index {
	flex-shrink: 0;
	line-height: inherit;
}

.cae-item-title {
	margin: 16px 0 8px;
}

.cae-item-text {
	margin: 0;
}

/* ============================================================
   Animaciones de entrada (entrance)
   El estado inicial lo aplica el JS añadiendo .cae-animate.
   Cuando entra en pantalla se añade .cae-in-view.
   ============================================================ */

.cae-animate {
	opacity: 0;
	will-change: opacity, transform;
	transition-property: opacity, transform;
	transition-timing-function: var(--cae-easing, cubic-bezier(0.22, 1, 0.36, 1));
	transition-duration: var(--cae-duration, 700ms);
	transition-delay: var(--cae-delay, 0ms);
}

.cae-animate.cae-in-view {
	opacity: 1;
	transform: none;
}

/* Tipos de animación: estado inicial */
.cae-anim-fade.cae-animate         { transform: none; }
.cae-anim-fade-up.cae-animate      { transform: translateY(40px); }
.cae-anim-fade-down.cae-animate    { transform: translateY(-40px); }
.cae-anim-fade-left.cae-animate    { transform: translateX(40px); }
.cae-anim-fade-right.cae-animate   { transform: translateX(-40px); }
.cae-anim-zoom-in.cae-animate      { transform: scale(0.85); }
.cae-anim-zoom-out.cae-animate     { transform: scale(1.12); }

/* ============================================================
   Modo continuo (cinta transportadora): timing lineal
   ============================================================ */

.cae-carousel.cae-mode-continuous .swiper-wrapper {
	transition-timing-function: linear !important;
}

/* ============================================================
   Flechas de navegación
   ============================================================ */

.cae-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
	transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
	padding: 0;
}

.cae-arrow:hover {
	transform: translateY(-50%) scale(1.08);
}

/* Flechas solo en móvil: ocultas por defecto, visibles bajo 768px */
.cae-arrows-mobileonly-yes .cae-arrow {
	display: none;
}

@media (max-width: 767px) {
	.cae-arrows-mobileonly-yes .cae-arrow {
		display: flex;
	}
}

.cae-arrow-prev {
	left: 8px;
}

.cae-arrow-next {
	right: 8px;
}

.cae-arrow.swiper-button-disabled {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

/* ============================================================
   Paginación
   ============================================================ */

.cae-pagination {
	position: relative;
	margin-top: 20px;
	text-align: center;
}

.cae-pagination .swiper-pagination-bullet {
	transition: transform 0.3s ease, background-color 0.3s ease;
}

.cae-pagination .swiper-pagination-bullet-active {
	transform: scale(1.3);
}

/* ============================================================
   Accesibilidad: respeta "reducir movimiento"
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
	.cae-animate {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
	.cae-item-image img {
		transition: none !important;
	}
}
