/* Animations */

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Animation classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-slide-left {
    animation: slideInLeft 0.6s ease forwards;
}

.animate-slide-right {
    animation: slideInRight 0.6s ease forwards;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Scroll animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

/* Stagger animations */
.stagger-animation > * {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-animation.visible > *:nth-child(1) {
    animation: fadeIn 0.6s ease 0.1s forwards;
}

.stagger-animation.visible > *:nth-child(2) {
    animation: fadeIn 0.6s ease 0.2s forwards;
}

.stagger-animation.visible > *:nth-child(3) {
    animation: fadeIn 0.6s ease 0.3s forwards;
}

.stagger-animation.visible > *:nth-child(4) {
    animation: fadeIn 0.6s ease 0.4s forwards;
}

.stagger-animation.visible > *:nth-child(5) {
    animation: fadeIn 0.6s ease 0.5s forwards;
}

/* Hover animations */
.hover-lift {
    transition: transform var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-grow {
    transition: transform var(--transition-base);
}

.hover-grow:hover {
    transform: scale(1.05);
}

/* Loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}

/* 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;
    }
}
