/* ========================================
   Animation Definitions
   ======================================== */

/* Fade Up Animation */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide In from Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In from Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   Animation Classes
   ======================================== */

/* Elements with data-animate attribute start hidden */
[data-animate] {
    opacity: 0;
}

/* Fade Up - Default animation */
[data-animate="fade-up"].animated {
    animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Fade In */
[data-animate="fade-in"].animated {
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Slide In Left */
[data-animate="slide-left"].animated {
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Slide In Right */
[data-animate="slide-right"].animated {
    animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Scale In */
[data-animate="scale-in"].animated {
    animation: scaleIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ========================================
   Animation Delays
   ======================================== */

/* Delays are now handled in JavaScript for better control */
/* This ensures smooth staggered animations */

/* ========================================
   Hover Effects
   ======================================== */

/* Glow on Hover */
.glow-on-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-on-hover:hover {
    filter: drop-shadow(0 0 20px rgba(79, 70, 229, 0.6));
}

/* Float on Hover */
.float-on-hover {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.float-on-hover:hover {
    transform: translateY(-5px);
}

/* Pulse Animation */
@keyframes pulse-subtle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.pulse-subtle {
    animation: pulse-subtle 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ========================================
   Loading States
   ======================================== */

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* ========================================
   Utility Classes
   ======================================== */

/* Smooth transitions for all interactive elements */
.smooth-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    [data-animate] {
        opacity: 1 !important;
    }
}
