/* ============================================
   Animations & Transitions
   ============================================ */

/* Fade In Animation */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
}

.fade-in-delay {
    opacity: 0;
    animation: fadeIn 1s ease-in-out 0.3s forwards;
}

.fade-in-delay-2 {
    opacity: 0;
    animation: fadeIn 1s ease-in-out 0.6s forwards;
}

.fade-in-delay-3 {
    opacity: 0;
    animation: fadeIn 1s ease-in-out 0.9s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade on Scroll - Initially Hidden */
.fade-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth Transitions */
* {
    transition-property: background-color, border-color, color, opacity, transform;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}

/* Staggered Animation for Grid Items */
.clients-grid .fade-on-scroll:nth-child(1) {
    transition-delay: 0.1s;
}

.clients-grid .fade-on-scroll:nth-child(2) {
    transition-delay: 0.2s;
}

.clients-grid .fade-on-scroll:nth-child(3) {
    transition-delay: 0.3s;
}

.clients-grid .fade-on-scroll:nth-child(4) {
    transition-delay: 0.4s;
}

.quick-links .fade-on-scroll:nth-child(1) {
    transition-delay: 0.1s;
}

.quick-links .fade-on-scroll:nth-child(2) {
    transition-delay: 0.2s;
}

.quick-links .fade-on-scroll:nth-child(3) {
    transition-delay: 0.3s;
}

/* Prevent Animation on Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .fade-on-scroll {
        opacity: 1;
        transform: none;
    }

    .fade-in,
    .fade-in-delay,
    .fade-in-delay-2,
    .fade-in-delay-3 {
        opacity: 1;
        animation: none;
    }
}
