/* Animations and Transitions */

/* Fade In Up Animation - Enhanced */

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

/* Pulse animation for interactive elements */

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(26, 168, 90, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(26, 168, 90, 0);
    }
}

/* Shimmer effect */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Staggered animation delays - now part of CSS */

.card {
    animation-delay: var(--animation-delay, 0s);
}

/* Smooth scroll reveal animation */

.card.reveal {
    animation: fadeInUp 0.6s ease forwards;
}

/* Header scroll animation */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Icon hover animation */

.icon {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover .icon {
    transform: scale(1.1) rotate(5deg);
}

/* Link hover effects */

a {
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary-dark);
    transition: width var(--transition-base);
}

a:hover::after {
    width: 100%;
}

/* Focus visible styles */

*:focus-visible {
    outline: 2px solid var(--color-primary-dark);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Reduce motion for accessibility */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Loading state animation */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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