/* ==========================================================================
   SummitCare Medical Center - Keyframe & Motion Stylesheet (animations.css)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. KEYFRAME ANIMATIONS
   -------------------------------------------------------------------------- */

/* Heartbeat / Pulse for Page Loader */
@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.15);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.15);
    }
    70% {
        transform: scale(1);
    }
}

/* Floating Animation for Hero Glass Cards */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes floatReverse {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(12px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Floating Background Blur Shapes */
@keyframes morphShape {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: rotate(0deg);
    }
    50% {
        border-radius: 60% 40% 30% 70% / 50% 60% 40% 60%;
        transform: rotate(180deg);
    }
    100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: rotate(360deg);
    }
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Right */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Ripple Animation for CTA Buttons */
@keyframes ripple {
    0% {
        width: 0px;
        height: 0px;
        opacity: 0.5;
    }
    100% {
        width: 500px;
        height: 500px;
        opacity: 0;
    }
}

/* Accent Glow Effect */
@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(30, 136, 229, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(30, 136, 229, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(30, 136, 229, 0);
    }
}

/* --------------------------------------------------------------------------
   2. ANIMATION UTILITY CLASSES
   -------------------------------------------------------------------------- */

/* Applied via JS / Classes */
.float-anim {
    animation: float 5s ease-in-out infinite;
}

.float-anim-reverse {
    animation: floatReverse 6s ease-in-out infinite;
}

.hero-bg-shapes .shape {
    animation: morphShape 20s linear infinite;
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-in-right {
    animation: fadeInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --------------------------------------------------------------------------
   3. SCROLL REVEAL UTILITIES
   -------------------------------------------------------------------------- */

/* Elements using JavaScript ScrollObserver */
.scroll-reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Delays for Grid Layouts */
.scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.15s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.25s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.35s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.45s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.55s; }

/* --------------------------------------------------------------------------
   4. RIPPLE EFFECT & INTERACTIVE MOTION
   -------------------------------------------------------------------------- */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-span {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    pointer-events: none;
    border-radius: 50%;
    animation: ripple 0.6s linear infinite;
}

/* Pulse Glow Button Effect */
.btn-pulse {
    animation: pulseGlow 2s infinite;
}