/* CSS Animations */

/* Fade In */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide In Left */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 1s ease-in-out forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Right */
.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 1s ease-in-out forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Bottom */
.slide-in-bottom {
    opacity: 0;
    transform: translateY(50px);
    animation: slideInBottom 1s ease-in-out forwards;
}

@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation Delays */
.fade-in:nth-child(1), .slide-in-left:nth-child(1), .slide-in-right:nth-child(1), .slide-in-bottom:nth-child(1) {
    animation-delay: 0.2s;
}

.fade-in:nth-child(2), .slide-in-left:nth-child(2), .slide-in-right:nth-child(2), .slide-in-bottom:nth-child(2) {
    animation-delay: 0.4s;
}

.fade-in:nth-child(3), .slide-in-left:nth-child(3), .slide-in-right:nth-child(3), .slide-in-bottom:nth-child(3) {
    animation-delay: 0.6s;
}

.fade-in:nth-child(4), .slide-in-left:nth-child(4), .slide-in-right:nth-child(4), .slide-in-bottom:nth-child(4) {
    animation-delay: 0.8s;
}

/* Ensure animations only play once when scrolled into view */
@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .slide-in-left,
    .slide-in-right,
    .slide-in-bottom {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
