/* ========================================
   SWASTHA SEWA - Animations & Keyframes
   ======================================== */

/* Loader Progress */
@keyframes loaderProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}

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

/* Fade In */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Card Pop */
@keyframes cardPop {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Neon Glow Pulse */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(209, 254, 23, 0.3),
                0 0 20px rgba(209, 254, 23, 0.2);
  }
  50% {
    box-shadow: 0 0 25px rgba(209, 254, 23, 0.6),
                0 0 40px rgba(209, 254, 23, 0.4);
  }
}

/* Shimmer for Skeleton Loading */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Orb Float (Hero Background) */
@keyframes orb-float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -40px) scale(1.05);
  }
  50% {
    transform: translate(-20px, 30px) scale(0.95);
  }
  75% {
    transform: translate(40px, 20px) scale(1.02);
  }
}

/* Scanline Effect (optional tech aesthetic) */
@keyframes scanline {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

/* Counter Animation (used in JS) */
@keyframes counterUp {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Modal Slide Up */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(60px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Neon Blink */
@keyframes neonBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger Animation for Cards */
.disease-card {
  animation: cardPop 0.4s ease both;
}

.disease-grid .disease-card:nth-child(1) { animation-delay: 0.05s; }
.disease-grid .disease-card:nth-child(2) { animation-delay: 0.1s; }
.disease-grid .disease-card:nth-child(3) { animation-delay: 0.15s; }
.disease-grid .disease-card:nth-child(4) { animation-delay: 0.2s; }
.disease-grid .disease-card:nth-child(5) { animation-delay: 0.25s; }
.disease-grid .disease-card:nth-child(6) { animation-delay: 0.3s; }
.disease-grid .disease-card:nth-child(7) { animation-delay: 0.35s; }
.disease-grid .disease-card:nth-child(8) { animation-delay: 0.4s; }
.disease-grid .disease-card:nth-child(9) { animation-delay: 0.45s; }
.disease-grid .disease-card:nth-child(10) { animation-delay: 0.5s; }
.disease-grid .disease-card:nth-child(11) { animation-delay: 0.55s; }
.disease-grid .disease-card:nth-child(12) { animation-delay: 0.6s; }

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--card-bg) 25%,
    var(--card-hover) 50%,
    var(--card-bg) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 20px;
  width: 70%;
  margin-bottom: 12px;
}

.skeleton-badge {
  height: 18px;
  width: 60px;
  display: inline-block;
  margin-right: 6px;
}

/* Button Press Effect */
.btn:active,
.category-btn:active,
.alpha-btn:active {
  transform: scale(0.98);
}

/* Search Bar Focus Glow */
.search-bar:focus-within {
  animation: glowPulse 2s infinite;
}

/* Modal Entrance Enhancement */
.modal {
  animation: slideUp 0.35s cubic-bezier(0.23, 1.0, 0.32, 1);
}

/* Toast Exit */
.toast.exiting {
  animation: fadeInUp 0.2s reverse forwards;
}