/* ===== Scroll-Triggered Animations ===== */

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Base animation classes */
.animate-on-scroll {
    opacity: 0;
    visibility: hidden;
}

html.js-enabled .animate-on-scroll {
    visibility: visible;
}

.animate-on-scroll.animated {
    animation-duration: 0.6s;
    animation-fill-mode: both;
    animation-timing-function: ease-out;
}

/* Animation types */
.animate-fade-up.animated {
    animation-name: fadeInUp;
}

.animate-fade-left.animated {
    animation-name: fadeInLeft;
}

.animate-fade-right.animated {
    animation-name: fadeInRight;
}

.animate-fade-in.animated {
    animation-name: fadeIn;
}

.animate-scale-in.animated {
    animation-name: scaleIn;
}

/* Staggered delays for grid items */
.animate-stagger .animate-on-scroll:nth-child(1) { animation-delay: 0s; }
.animate-stagger .animate-on-scroll:nth-child(2) { animation-delay: 0.1s; }
.animate-stagger .animate-on-scroll:nth-child(3) { animation-delay: 0.2s; }
.animate-stagger .animate-on-scroll:nth-child(4) { animation-delay: 0.3s; }
.animate-stagger .animate-on-scroll:nth-child(5) { animation-delay: 0.4s; }
.animate-stagger .animate-on-scroll:nth-child(6) { animation-delay: 0.5s; }
.animate-stagger .animate-on-scroll:nth-child(7) { animation-delay: 0.6s; }

/* Section headers animate */
.section-header.animate-on-scroll.animated {
    animation-name: fadeInUp;
}

/* Custom delay utilities */
.delay-100 { animation-delay: 0.1s !important; }
.delay-200 { animation-delay: 0.2s !important; }
.delay-300 { animation-delay: 0.3s !important; }
.delay-400 { animation-delay: 0.4s !important; }
.delay-500 { animation-delay: 0.5s !important; }
