/* =========================================================
   Efectos: animaciones al hacer scroll + parallax
   Sin dependencias. Compatible con el marcado existente:
   <div class="wow animate__animated animate__fadeInUp">
   Opt-in extra:  data-reveal="up|down|left|right|fade"
                  data-parallax  (fondo fijo, escritorio)
                  data-parallax-speed="0.2" (img/bloque con JS)
   ========================================================= */

/* ---------- Keyframes ---------- */
@keyframes efFadeIn      { from { opacity: 0 } to { opacity: 1 } }
@keyframes efFadeInUp    { from { opacity: 0; transform: translate3d(0, 40px, 0) }  to { opacity: 1; transform: none } }
@keyframes efFadeInDown  { from { opacity: 0; transform: translate3d(0, -40px, 0) } to { opacity: 1; transform: none } }
@keyframes efFadeInLeft  { from { opacity: 0; transform: translate3d(-50px, 0, 0) } to { opacity: 1; transform: none } }
@keyframes efFadeInRight { from { opacity: 0; transform: translate3d(50px, 0, 0) }  to { opacity: 1; transform: none } }
@keyframes efKenBurns    { from { transform: scale(1) } to { transform: scale(1.08) } }

/* ---------- Estado inicial (solo con JS activo) ---------- */
.ef-js .wow,
.ef-js [data-reveal],
.ef-js .ef-reveal {
	opacity: 0;
	will-change: opacity, transform;
}

/* ---------- Estado visible: elige animación según clase ---------- */
.ef-js .ef-in {
	animation-duration: .8s;
	animation-timing-function: cubic-bezier(.22, .61, .36, 1);
	animation-fill-mode: both;
	animation-name: efFadeInUp;           /* por defecto */
}
.ef-js .ef-in.animate__fadeIn,
.ef-js .ef-in[data-reveal="fade"]       { animation-name: efFadeIn; }
.ef-js .ef-in.animate__fadeInUp,
.ef-js .ef-in[data-reveal="up"]         { animation-name: efFadeInUp; }
.ef-js .ef-in.animate__fadeInDown,
.ef-js .ef-in[data-reveal="down"]       { animation-name: efFadeInDown; }
.ef-js .ef-in.animate__fadeInLeft,
.ef-js .ef-in[data-reveal="left"]       { animation-name: efFadeInLeft; }
.ef-js .ef-in.animate__fadeInRight,
.ef-js .ef-in[data-reveal="right"]      { animation-name: efFadeInRight; }

/* retrasos compatibles con animate.css */
.ef-js .ef-in.animate__delay-1s { animation-delay: 1s; }
.ef-js .ef-in.animate__delay-2s { animation-delay: 2s; }
.ef-js .ef-in.animate__delay-3s { animation-delay: 3s; }

/* ---------- Parallax de fondos ---------- */
/* background-attachment:fixed da un parallax real y sin JS.
   Se limita a escritorio: iOS/móvil no lo soportan bien. */
@media (min-width: 992px) and (hover: hover) and (prefers-reduced-motion: no-preference) {
	.banner-seccion,
	[data-parallax] {
		background-attachment: fixed !important;
		background-position: center center !important;
		background-size: cover !important;
	}
}

/* Elementos con parallax por JS (img o bloques) */
[data-parallax-speed] { will-change: transform; }

/* ---------- Hero: zoom suave en el slide activo ---------- */
@media (prefers-reduced-motion: no-preference) {
	.carousel-item.active > img,
	.carousel-item.active > a > img {
		animation: efKenBurns 9s ease-out both;
	}
	.carousel-inner { overflow: hidden; }
}

/* ---------- Microinteracciones ---------- */
@media (prefers-reduced-motion: no-preference) {
	.card { transition: transform .3s ease, box-shadow .3s ease; }
	.card:hover { transform: translateY(-4px); box-shadow: 0 .75rem 1.5rem rgba(0, 0, 0, .12); }
}

/* ---------- Accesibilidad: sin movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
	.ef-js .wow,
	.ef-js [data-reveal],
	.ef-js .ef-reveal { opacity: 1 !important; animation: none !important; transform: none !important; }
}
