/* ========================================
   Animations & Dynamic Effects
   ======================================== */

/* Fade in 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 fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scale animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Gradient animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Shimmer effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Bounce animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Slide in from bottom */
@keyframes slideInBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Rotate animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Glow effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 107, 53, 0.8);
    }
}

/* Apply animations */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-bounce {
    animation: bounce 1s ease-in-out;
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Fallback: Make content visible if JavaScript fails or is slow */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Ensure testimonials are always visible after 2 seconds (fallback) */
.testimonials .scroll-reveal,
.testimonials .scroll-reveal-stagger {
    animation: forceReveal 0.6s ease-out 2s forwards;
}

@keyframes forceReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animations for lists */
.scroll-reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.scroll-reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.1s; }
.scroll-reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.2s; }
.scroll-reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.3s; }
.scroll-reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.4s; }
.scroll-reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.5s; }
.scroll-reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.6s; }

.scroll-reveal-stagger.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

/* Hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 25px rgba(255, 107, 53, 0.6);
}

/* Loading animations */
.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 107, 53, 0.1);
    border-top-color: #ff6b35;
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Progress bar animation */
@keyframes progressFill {
    from {
        width: 0%;
    }
}

.progress-bar {
    animation: progressFill 1.5s ease-out;
}

/* Counter animation - handled by JS */
.counter {
    font-size: 3rem;
    font-weight: bold;
    color: #ff6b35;
}
