/* ═══════════════════════════════════════════════════════════════
   SHIVANGI SCIENCE CLASSES — Animations & Keyframes
   animations.css
   ═══════════════════════════════════════════════════════════════ */

/* ─── KEYFRAMES ─────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

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

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.05); opacity: 0.85; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

@keyframes shimmer {
  from { background-position: -400px 0; }
  to   { background-position: 400px 0; }
}

@keyframes countUp {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes borderGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(29,78,216,0.08); }
  50%       { box-shadow: 0 0 20px rgba(29,78,216,0.15); }
}

@keyframes particleFloat {
  0%   { transform: translateY(0) translateX(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-800px) translateX(100px) rotate(360deg); opacity: 0; }
}

@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

@keyframes typewriter {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes blinkCursor {
  50% { border-color: transparent; }
}

/* ─── PAGE TRANSITION ───────────────────────────────────────────── */
.page-enter {
  animation: fadeInUp 0.4s cubic-bezier(0.4,0,0.2,1) both;
}

/* ─── STAGGERED LIST ANIMATION ──────────────────────────────────── */
.stagger-list > * { animation: fadeInUp 0.5s ease both; }
.stagger-list > *:nth-child(1)  { animation-delay: 0.05s; }
.stagger-list > *:nth-child(2)  { animation-delay: 0.1s;  }
.stagger-list > *:nth-child(3)  { animation-delay: 0.15s; }
.stagger-list > *:nth-child(4)  { animation-delay: 0.2s;  }
.stagger-list > *:nth-child(5)  { animation-delay: 0.25s; }
.stagger-list > *:nth-child(6)  { animation-delay: 0.3s;  }
.stagger-list > *:nth-child(7)  { animation-delay: 0.35s; }
.stagger-list > *:nth-child(8)  { animation-delay: 0.4s;  }
.stagger-list > *:nth-child(9)  { animation-delay: 0.45s; }
.stagger-list > *:nth-child(10) { animation-delay: 0.5s;  }
.stagger-list > *:nth-child(n+11) { animation-delay: 0.55s; }

/* ─── SKELETON LOADING ──────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-card2) 25%,
    var(--bg-card)  50%,
    var(--bg-card2) 75%
  );
  background-size: 400px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-line { height: 14px; margin-bottom: 10px; }
.skeleton-line.w-full  { width: 100%; }
.skeleton-line.w-3-4   { width: 75%; }
.skeleton-line.w-1-2   { width: 50%; }
.skeleton-line.w-1-3   { width: 33%; }

/* ─── HOVER LIFT ─────────────────────────────────────────────────── */
.hover-lift {
  transition: transform var(--transition), box-shadow var(--transition);
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* ─── GLOW CARD ─────────────────────────────────────────────────── */
.glow-card {
  animation: borderGlow 3s ease-in-out infinite;
}

/* ─── FLOATING ELEMENT ──────────────────────────────────────────── */
.float-anim { animation: float 4s ease-in-out infinite; }
.float-anim-slow { animation: float 6s ease-in-out infinite; }
.float-anim-fast { animation: float 2.5s ease-in-out infinite; }

/* ─── PULSE ANIMATION ───────────────────────────────────────────── */
.pulse-anim { animation: pulse 2.5s ease-in-out infinite; }

/* ─── GRADIENT TEXT ANIMATION ───────────────────────────────────── */
.grad-text-anim {
  background: linear-gradient(135deg, #1D4ED8, #0F766E, #1D4ED8);
  background-size: 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 5s ease infinite;
}

/* ─── RIPPLE BUTTON EFFECT ──────────────────────────────────────── */
.btn-ripple {
  position: relative;
  overflow: hidden;
}
.btn-ripple::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  width: 10px;
  height: 10px;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

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