/* ============================================
   Advanced Animation Styles
   Futuristic & Professional Animations
   ============================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Fade In Animations with Stagger */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-up-delay {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.fade-in-up-delay-2 {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.fade-in-up-delay-3 {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

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

/* Scroll-based Animations with 3D Effect */
[data-animate="fade-in"] {
    opacity: 0;
    transform: translateY(50px) rotateX(10deg);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    perspective: 1000px;
}

[data-animate="fade-in"].animated {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
}

/* Slide In from Sides */
[data-animate="slide-left"] {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.8s ease-out;
}

[data-animate="slide-left"].animated {
    opacity: 1;
    transform: translateX(0);
}

[data-animate="slide-right"] {
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.8s ease-out;
}

[data-animate="slide-right"].animated {
    opacity: 1;
    transform: translateX(0);
}

/* Scale Animation */
[data-animate="scale"] {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease-out;
}

[data-animate="scale"].animated {
    opacity: 1;
    transform: scale(1);
}

/* Rotate Animation */
[data-animate="rotate"] {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
    transition: all 0.8s ease-out;
}

[data-animate="rotate"].animated {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Contact Form Animation */
.contact-form-container {
    animation: slideDown 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* Pulse Animation with Glow */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(102, 126, 234, 0.8);
    }
}

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px) rotate(-2deg); }
    20%, 40%, 60%, 80% { transform: translateX(10px) rotate(2deg); }
}

.shake {
    animation: shake 0.5s;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 20s linear infinite;
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* Rotate Animation for Backgrounds */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Loading Spinner with Gradient */
.btn-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

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

/* Particle Effect Background */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: particleFloat 15s infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px) scale(1);
        opacity: 0;
    }
}

/* Glow Effect */
.glow {
    position: relative;
}

.glow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    background: inherit;
    filter: blur(20px);
    opacity: 0.5;
    z-index: -1;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Hover Lift Effect */
.hover-lift {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hover-lift:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

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

.text-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transform: translateX(-100%);
    animation: textReveal 2s infinite;
}

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

/* Morphing Background */
.morph-bg {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    filter: blur(80px);
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0%, 100% {
        border-radius: 50%;
        transform: scale(1) rotate(0deg);
    }
    33% {
        border-radius: 40% 60% 50% 50%;
        transform: scale(1.2) rotate(120deg);
    }
    66% {
        border-radius: 60% 40% 50% 50%;
        transform: scale(0.8) rotate(240deg);
    }
}

/* Smooth Transitions with Better Easing */
* {
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Performance optimizations */
[data-animate],
.service-card,
.team-card,
.testimonial-card,
.feature-card {
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Prevent elements from moving too far on scroll */
section:not(.hero) {
    position: relative;
}

section.revealed {
    opacity: 1 !important;
}

/* Ensure cards stay in place - only transform on hover */
.service-card,
.team-card,
.testimonial-card,
.feature-card,
.stat-card {
    position: relative;
}

/* Reset any scroll-based transforms */
.service-card,
.team-card,
.testimonial-card {
    transform: translateY(0) !important;
}

/* Only allow hover transforms */
.service-card:hover {
    transform: translateY(-10px) scale(1.02) !important;
}

.team-card:hover {
    transform: translateY(-10px) scale(1.05) !important;
}

.testimonial-card:hover {
    transform: translateY(-10px) scale(1.02) !important;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02) !important;
}

/* GPU acceleration */
.btn,
.whatsapp-float,
.back-to-top {
    will-change: transform;
    transform: translateZ(0);
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    z-index: 10000;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* Neon Glow Effect */
.neon-glow {
    text-shadow: 
        0 0 5px currentColor,
        0 0 10px currentColor,
        0 0 15px currentColor,
        0 0 20px currentColor;
    animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% {
        text-shadow: 
            0 0 5px currentColor,
            0 0 10px currentColor,
            0 0 15px currentColor,
            0 0 20px currentColor;
    }
    50% {
        text-shadow: 
            0 0 10px currentColor,
            0 0 20px currentColor,
            0 0 30px currentColor,
            0 0 40px currentColor;
    }
}

/* 3D Card Flip */
.card-3d {
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card-3d:hover {
    transform: rotateY(5deg) rotateX(5deg);
}

/* Magnetic Effect */
.magnetic {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.magnetic:hover {
    transform: scale(1.1);
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}
