/* ========================================
   Global Fade-In Animations for All Sections
   ======================================== */

/* Prevent Flash of Unstyled Content */
body {
    opacity: 0;
    animation: bodyFadeIn 0.5s ease-in-out forwards;
    animation-delay: 0.1s;
}

@keyframes bodyFadeIn {
    to {
        opacity: 1;
    }
}

/* Base Animation Classes */
.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-in-out;
}

.fade-in-down {
    animation: fadeInDown 0.8s ease-in-out;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-in-out;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-in-out;
}

/* Keyframe Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes fadeInDown {
    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);
    }
}

/* Section Animations */
section,
.section,
.section-padding,
.about-section,
.service-section,
.help-section,
.cta-section,
.project-section,
.blog-section,
.testimonial-section,
.team-section,
.pricing-section,
.faq-section,
.contact-section {
    animation: fadeInUp 0.8s ease-in-out;
}

/* Stagger Delays for Multiple Items */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* Card Animations */
.single-service-item,
.single-project-item,
.single-blog-item,
.team-member-item,
.pricing-card,
.faq-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease-in-out forwards;
}

/* Stagger Animation for Cards */
.single-service-item:nth-child(1),
.single-project-item:nth-child(1),
.single-blog-item:nth-child(1) {
    animation-delay: 0.1s;
}

.single-service-item:nth-child(2),
.single-project-item:nth-child(2),
.single-blog-item:nth-child(2) {
    animation-delay: 0.2s;
}

.single-service-item:nth-child(3),
.single-project-item:nth-child(3),
.single-blog-item:nth-child(3) {
    animation-delay: 0.3s;
}

.single-service-item:nth-child(4),
.single-project-item:nth-child(4),
.single-blog-item:nth-child(4) {
    animation-delay: 0.4s;
}

.single-service-item:nth-child(5),
.single-project-item:nth-child(5),
.single-blog-item:nth-child(5) {
    animation-delay: 0.5s;
}

.single-service-item:nth-child(6),
.single-project-item:nth-child(6),
.single-blog-item:nth-child(6) {
    animation-delay: 0.6s;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
