/* ============================================
   ANIMATIONS & MICRO-INTERACTIONS
   ============================================ */

/* 1. Fade In Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-up.delay-1 { animation-delay: 0.1s; }
.animate-fade-up.delay-2 { animation-delay: 0.2s; }
.animate-fade-up.delay-3 { animation-delay: 0.3s; }
.animate-fade-up.delay-4 { animation-delay: 0.4s; }
.animate-fade-up.delay-5 { animation-delay: 0.5s; }

/* 2. Pulse Animation for CTA */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

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

.btn-pulse:hover {
    animation: none;
    transform: scale(1.05);
}

/* 3. Float Animation for Icons */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float-icon {
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.float-icon.delay-1 { animation-delay: 0.5s; }
.float-icon.delay-2 { animation-delay: 1s; }
.float-icon.delay-3 { animation-delay: 1.5s; }

/* 4. Glow Effect */
@keyframes glow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.glow-text {
    animation: glow 2s ease-in-out infinite;
}

/* 5. Slide In from Left/Right */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

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

/* 6. Scale on Hover */
.hover-scale {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* 7. Shimmer Effect for Cards */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.3) 50%,
        rgba(255,255,255,0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* 8. Typing Effect */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

.typing-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-left: 2px solid #5956E9;
    animation: typing 2s steps(30) forwards, blink 0.8s step-end infinite;
    max-width: 0;
}

.typing-text.done {
    max-width: 100%;
    border-left: none;
}

/* 9. Bounce on Hover */
.hover-bounce {
    transition: transform 0.3s ease;
}

.hover-bounce:hover {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* 10. Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #5956E9, #25D366);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 11. Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #5956E9, #25D366);
    z-index: 99999;
    width: 0%;
    transition: width 0.1s;
}

/* 12. Service Card Hover Effect */
.service-card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card-hover:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(89, 86, 233, 0.15);
}

/* 13. Number Counter Pulse */
@keyframes countPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.count-pulse {
    animation: countPulse 0.3s ease;
}

/* 14. Glassmorphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 15. Smooth Section Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

/* 16. Animated Border */
@keyframes borderGlow {
    0%, 100% { border-color: #5956E9; }
    50% { border-color: #25D366; }
}

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

/* 17. Loading Spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(89, 86, 233, 0.1);
    border-top-color: #5956E9;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* 18. Ripple Effect on Buttons */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), 
        rgba(255, 255, 255, 0.3) 0%, 
        transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-ripple:hover::after {
    opacity: 1;
}

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

@media (max-width: 768px) {
    .typing-text {
        white-space: normal;
        border-left: none;
        animation: none;
        max-width: 100%;
    }
}
