/* public/css/animations.css */

html {
    scroll-behavior: smooth;
}
/* Base transition for interactive elements */
a, button, .btn-animate {
    transition: all 0.3s ease-in-out;
}

/* Stagger Delays */
.stagger-1 { transition-delay: 100ms; }
.stagger-2 { transition-delay: 200ms; }
.stagger-3 { transition-delay: 300ms; }
.stagger-4 { transition-delay: 400ms; }
.stagger-5 { transition-delay: 500ms; }
.stagger-6 { transition-delay: 600ms; }

/* Scroll Reveal Base Classes */
.animate-on-scroll,
.animate-fade-left,
.animate-fade-right,
.animate-fade-up,
.animate-scale-in {
    opacity: 0;
}

/* Default animate-on-scroll is just fade */
.animate-on-scroll {
    transition: opacity 0.8s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
}

/* Specific Animations */
.animate-fade-left {
    transform: translateX(-40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-fade-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.animate-fade-right {
    transform: translateX(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-fade-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.animate-fade-up {
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-scale-in {
    transform: scale(0.95);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-scale-in.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Page Load Animation for main content */
.page-load-fade {
    animation: pageLoadFade 0.8s ease-out forwards;
}

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

/* Smooth hover effects for cards */
.card-3d {
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
.card-3d:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1), 0 10px 15px -5px rgba(0, 0, 0, 0.05);
}
.dark .card-3d:hover {
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.4), 0 10px 15px -5px rgba(0, 0, 0, 0.2);
}

/* Accessibility: Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-on-scroll,
    .animate-fade-left,
    .animate-fade-right,
    .animate-fade-up,
    .animate-scale-in {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
