/* ========================================
   MedTech Solutions - Animation Styles
   ======================================== */

/* ========================================
   Scroll Animations
   ======================================== */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-fade-left {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.animate-fade-right {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fade-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.animate-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Animation Delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ========================================
   Hover Effects
   ======================================== */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.hover-glow {
    transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow);
}

/* ========================================
   Pulse Animations
   ======================================== */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* ========================================
   Floating Animation
   ======================================== */
@keyframes float-slow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.float-slow {
    animation: float-slow 6s ease-in-out infinite;
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(1deg);
    }
    75% {
        transform: translateY(10px) rotate(-1deg);
    }
}

/* ========================================
   Glow Effects
   ======================================== */
@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(37, 99, 235, 0.6);
    }
}

.glow-pulse {
    animation: glow-pulse 3s ease-in-out infinite;
}

/* ========================================
   Data Flow Animation
   ======================================== */
@keyframes data-flow {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.data-flow {
    stroke-dasharray: 10 5;
    animation: data-flow 2s linear infinite;
}

/* ========================================
   Typing Effect
   ======================================== */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--accent-blue);
    }
}

.typing-effect {
    overflow: hidden;
    border-right: 2px solid var(--accent-blue);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

/* ========================================
   Particle Background
   ======================================== */
@keyframes particle-float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-20px) translateX(10px);
    }
    50% {
        transform: translateY(0) translateX(20px);
    }
    75% {
        transform: translateY(20px) translateX(10px);
    }
}

/* ========================================
   Counter Animation
   ======================================== */
.counter {
    display: inline-block;
}

/* ========================================
   Progress Bar Animation
   ======================================== */
@keyframes progress-fill {
    from {
        width: 0;
    }
}

.progress-animated .bar-fill {
    animation: progress-fill 1.5s ease-out forwards;
}

/* ========================================
   Ripple Effect
   ======================================== */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

.ripple:active::after {
    animation: ripple 0.6s ease-out;
}

/* ========================================
   Gradient Animation
   ======================================== */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animated {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* ========================================
   Card Reveal Animation
   ======================================== */
@keyframes card-reveal {
    0% {
        opacity: 0;
        transform: translateY(50px) rotateX(-10deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.card-reveal {
    animation: card-reveal 0.6s ease-out forwards;
}

/* ========================================
   Shine Effect
   ======================================== */
@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shine 3s ease-in-out infinite;
}

/* ========================================
   Stagger Animation Helper
   ======================================== */
.stagger-item:nth-child(1) { transition-delay: 0.1s; }
.stagger-item:nth-child(2) { transition-delay: 0.2s; }
.stagger-item:nth-child(3) { transition-delay: 0.3s; }
.stagger-item:nth-child(4) { transition-delay: 0.4s; }
.stagger-item:nth-child(5) { transition-delay: 0.5s; }
.stagger-item:nth-child(6) { transition-delay: 0.6s; }
.stagger-item:nth-child(7) { transition-delay: 0.7s; }
.stagger-item:nth-child(8) { transition-delay: 0.8s; }

/* ========================================
   Map Pin Animation
   ======================================== */
@keyframes pin-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

.map-pin {
    animation: pin-pulse 2s ease-in-out infinite;
}

/* ========================================
   Smooth Scroll Indicator
   ======================================== */
@keyframes scroll-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.scroll-bounce {
    animation: scroll-bounce 2s ease infinite;
}

/* ========================================
   3D Card Tilt Effect (CSS only)
   ======================================== */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.tilt-card:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

/* ========================================
   Blur In Animation
   ======================================== */
@keyframes blur-in {
    0% {
        filter: blur(10px);
        opacity: 0;
    }
    100% {
        filter: blur(0);
        opacity: 1;
    }
}

.blur-in {
    animation: blur-in 0.6s ease-out forwards;
}

/* ========================================
   Network Node Animation
   ======================================== */
@keyframes node-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(56, 189, 248, 0);
    }
}

.network-node {
    animation: node-pulse 2s ease-in-out infinite;
}

/* ========================================
   Line Draw Animation
   ======================================== */
@keyframes line-draw {
    to {
        stroke-dashoffset: 0;
    }
}

.line-draw {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: line-draw 2s ease forwards;
}

/* ========================================
   Morph Animation
   ======================================== */
@keyframes morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    50% {
        border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%;
    }
    75% {
        border-radius: 60% 40% 60% 30% / 70% 30% 50% 60%;
    }
}

.morph-shape {
    animation: morph 8s ease-in-out infinite;
}
