/**
 * Animasi scroll — kompatibel WOW.js + class fadeIn* (tanpa animate.css terpisah)
 */

/* State awal elemen .wow */
.wow {
    visibility: hidden;
}

.wow.animated {
    visibility: visible !important;
    animation-duration: var(--wow-duration, 0.85s);
    animation-delay: var(--wow-delay, 0s);
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Durasi dari data-wow-duration */
.wow[data-wow-duration="0.6s"].animated { --wow-duration: 0.6s; }
.wow[data-wow-duration="0.7s"].animated { --wow-duration: 0.7s; }
.wow[data-wow-duration="0.8s"].animated { --wow-duration: 0.8s; }
.wow[data-wow-duration="0.9s"].animated { --wow-duration: 0.9s; }
.wow[data-wow-duration="1s"].animated { --wow-duration: 1s; }

.fadeInUp.animated {
    animation-name: rpFadeInUp;
}

.fadeInDown.animated {
    animation-name: rpFadeInDown;
}

.fadeInLeft.animated {
    animation-name: rpFadeInLeft;
}

.fadeInRight.animated {
    animation-name: rpFadeInRight;
}

.fadeIn.animated {
    animation-name: rpFadeIn;
}

@keyframes rpFadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 48px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes rpFadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes rpFadeInLeft {
    from {
        opacity: 0;
        transform: translate3d(-48px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes rpFadeInRight {
    from {
        opacity: 0;
        transform: translate3d(48px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes rpFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 767px) {
    @keyframes rpFadeInUp {
        from {
            opacity: 0;
            transform: translate3d(0, 32px, 0);
        }
        to {
            opacity: 1;
            transform: translate3d(0, 0, 0);
        }
    }

    .wow.animated {
        --wow-duration: 0.65s;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wow {
        visibility: visible !important;
        animation: none !important;
    }
}

/* Preloader */
.preloader {
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.rp-page-ready .preloader {
    display: none;
}
