/* Animation Classes */
.reveal-slide {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal-slide.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stat {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease;
}

.reveal-stat.visible {
    opacity: 1;
    transform: scale(1);
}

.reveal-card {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.reveal-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animation delays */
.reveal-slide:nth-child(1) { transition-delay: 0.1s; }
.reveal-slide:nth-child(2) { transition-delay: 0.3s; }
.reveal-slide:nth-child(3) { transition-delay: 0.5s; }

.reveal-card:nth-child(1) { transition-delay: 0.1s; }
.reveal-card:nth-child(2) { transition-delay: 0.2s; }
.reveal-card:nth-child(3) { transition-delay: 0.3s; }
.reveal-card:nth-child(4) { transition-delay: 0.4s; }

/* Keyframe Animations */
@keyframes fadeInUp {
    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);
    }
}

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

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

/* Animation Utility Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

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

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

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

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

/* Loading Animations */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 45, 91, 0.1);
    border-radius: 50%;
    border-top-color: var(--secondary-orange);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Progress Bar Animation */
.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    from {
        background-position: 40px 0;
    }
    to {
        background-position: 0 0;
    }
}

/* Button Hover Animations */
.btn-hover-grow {
    transition: transform 0.3s ease;
}

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

.btn-hover-shake:hover {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Floating Animation */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Bounce Animation */
.bounce-animation {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Staggered Animation for Lists */
.staggered-list li {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.staggered-list li:nth-child(1) { animation-delay: 0.1s; }
.staggered-list li:nth-child(2) { animation-delay: 0.2s; }
.staggered-list li:nth-child(3) { animation-delay: 0.3s; }
.staggered-list li:nth-child(4) { animation-delay: 0.4s; }
.staggered-list li:nth-child(5) { animation-delay: 0.5s; }
.staggered-list li:nth-child(6) { animation-delay: 0.6s; }
.staggered-list li:nth-child(7) { animation-delay: 0.7s; }
.staggered-list li:nth-child(8) { animation-delay: 0.8s; }

/* Text Reveal Animation */
.text-reveal {
    display: inline-block;
    overflow: hidden;
    position: relative;
}

.text-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-blue);
    animation: textReveal 1.5s ease forwards;
}

@keyframes textReveal {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Card Flip Animation */
.card-flip {
    perspective: 1000px;
}

.card-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.card-flip:hover .card-flip-inner {
    transform: rotateY(180deg);
}

.card-flip-front, .card-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
}

.card-flip-back {
    transform: rotateY(180deg);
}

/* Responsive Animation Adjustments */
@media (prefers-reduced-motion: reduce) {
    .reveal-slide,
    .reveal-stat,
    .reveal-card,
    .animate-fade-in-up,
    .animate-fade-in-left,
    .animate-fade-in-right,
    .animate-scale-in,
    .float-animation,
    .bounce-animation,
    .btn-hover-shake:hover,
    .staggered-list li,
    .text-reveal::after,
    .card-flip-inner {
        animation: none !important;
        transition: none !important;
    }
    
    .reveal-slide,
    .reveal-stat,
    .reveal-card,
    .staggered-list li {
        opacity: 1;
        transform: none;
    }
}