/* ===================================
   E-Care 2.0 — Premium Animations
   Dynamic & Luxurious Motion System
   =================================== */

/* ===================================
   1. Entrance Animations
   =================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-24px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ===================================
   2. Glow & Pulse
   =================================== */

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(14,165,233,0.4); }
    50% { box-shadow: 0 0 0 12px rgba(14,165,233,0); }
}
@keyframes pulseGlowGreen {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
    50% { box-shadow: 0 0 0 12px rgba(34,197,94,0); }
}
@keyframes pulseGlowRed {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
    50% { box-shadow: 0 0 0 12px rgba(239,68,68,0); }
}
@keyframes pulseGlowGold {
    0%, 100% { box-shadow: 0 0 0 0 rgba(251,191,36,0.4); }
    50% { box-shadow: 0 0 0 12px rgba(251,191,36,0); }
}
@keyframes glowBorder {
    0%, 100% { border-color: rgba(56,189,248,0.15); }
    50% { border-color: rgba(56,189,248,0.4); }
}
@keyframes breathe {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}
@keyframes ripple {
    0% { transform: scale(0); opacity: 0.4; }
    100% { transform: scale(4); opacity: 0; }
}

/* ===================================
   3. Floating & Motion
   =================================== */

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes floatSlow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(0.5deg); }
    75% { transform: translateY(3px) rotate(-0.5deg); }
}
@keyframes rotate360 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

/* ===================================
   4. Shimmer & Loading
   =================================== */

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes skeleton {
    0% { background-position: -100% 0; }
    100% { background-position: 100% 0; }
}
@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* ===================================
   5. Data Flow / Pipeline
   =================================== */

@keyframes flowRight {
    0% { transform: translateX(-8px); opacity: 0.3; }
    50% { opacity: 1; }
    100% { transform: translateX(8px); opacity: 0.3; }
}
@keyframes flowDot {
    0% { left: 0%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}
@keyframes progressFill {
    from { width: 0%; }
    to { width: var(--progress-target, 100%); }
}
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pipelineStep {
    0% { background: rgba(14,165,233,0.08); border-color: rgba(56,189,248,0.15); }
    50% { background: rgba(14,165,233,0.15); border-color: rgba(56,189,248,0.4); }
    100% { background: rgba(14,165,233,0.08); border-color: rgba(56,189,248,0.15); }
}

/* ===================================
   6. Notification & Alert
   =================================== */

@keyframes alertSlide {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes alertPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.3; }
}
@keyframes sosFlash {
    0%, 100% { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); }
    50% { background: rgba(239,68,68,0.25); border-color: rgba(239,68,68,0.6); }
}

/* ===================================
   7. Utility Animation Classes
   =================================== */

.animate-fadeIn { animation: fadeIn 0.5s ease-out; }
.animate-fadeInUp { animation: fadeInUp 0.5s ease-out; }
.animate-fadeInDown { animation: fadeInDown 0.5s ease-out; }
.animate-fadeInLeft { animation: fadeInLeft 0.5s ease-out; }
.animate-fadeInRight { animation: fadeInRight 0.5s ease-out; }
.animate-scaleIn { animation: scaleIn 0.4s ease-out; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-pulse { animation: pulseGlow 2s ease-in-out infinite; }
.animate-pulse-green { animation: pulseGlowGreen 2s ease-in-out infinite; }
.animate-pulse-red { animation: pulseGlowRed 1.5s ease-in-out infinite; }
.animate-pulse-gold { animation: pulseGlowGold 2s ease-in-out infinite; }
.animate-glow { animation: glowBorder 2s ease-in-out infinite; }
.animate-breathe { animation: breathe 3s ease-in-out infinite; }
.animate-shimmer {
    background: linear-gradient(90deg, transparent 0%, rgba(56,189,248,0.06) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}
.animate-spin { animation: spin 1s linear infinite; }
.animate-bounce { animation: bounce 1.5s ease-in-out infinite; }
.animate-blink { animation: blink 1.5s ease-in-out infinite; }
.animate-sos { animation: sosFlash 1s ease-in-out infinite; }
.animate-flow { animation: flowRight 1.5s ease-in-out infinite; }

/* Stagger Delay Utilities */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }
.delay-800 { animation-delay: 800ms; }
.delay-1000 { animation-delay: 1000ms; }

/* Animation Fill Mode */
.anim-fill-both { animation-fill-mode: both; }
.anim-fill-forwards { animation-fill-mode: forwards; }

/* ===================================
   8. Scroll-Triggered Animations
   =================================== */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* ===================================
   9. Hover Transitions
   =================================== */

.hover-lift { transition: all 0.3s ease; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.3), 0 0 20px rgba(14,165,233,0.15); }

.hover-glow { transition: all 0.3s ease; }
.hover-glow:hover { box-shadow: 0 0 20px rgba(14,165,233,0.25), 0 0 40px rgba(14,165,233,0.1); border-color: rgba(56,189,248,0.3); }

.hover-scale { transition: transform 0.2s ease; }
.hover-scale:hover { transform: scale(1.03); }

/* ===================================
   10. Page Transition
   =================================== */

.page-enter {
    animation: fadeInUp 0.4s ease-out;
}

/* ===================================
   11. Gradient Animations
   =================================== */

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.animate-gradient {
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
}

/* ===================================
   12. Number Counter
   =================================== */

@keyframes countFade {
    0% { opacity: 0; transform: translateY(8px) scale(0.8); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.counter-animate {
    animation: countFade 0.4s ease-out forwards;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
