/* ============================================================
   MADRASA MADINATUL ILM — animations.css
   Keyframes, scroll reveal, transitions
   ============================================================ */

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

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

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

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

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

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

/* ── Hero Animations ── */
.hero-bismillah   { animation: fadeInDown 0.8s ease both; }
.hero-logo        { animation: scaleIn 0.8s ease 0.2s both; }
.hero-name-arabic { animation: fadeInUp 0.8s ease 0.4s both; }
.hero-name-urdu   { animation: fadeInUp 0.8s ease 0.55s both; }
.hero-name-en     { animation: fadeInUp 0.8s ease 0.65s both; }
.hero-location    { animation: fadeInUp 0.8s ease 0.75s both; }
.hero-tagline     { animation: fadeInUp 0.8s ease 0.85s both; }
.hero-btns        { animation: fadeInUp 0.8s ease 0.95s both; }
.hero-scroll      { animation: fadeIn 1s ease 1.4s both; }

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

.reveal.from-left  { transform: translateX(-28px); }
.reveal.from-right { transform: translateX(28px); }
.reveal.scale-up   { transform: scale(0.94); }

.reveal.visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* Stagger delays for children */
.reveal-stagger > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.4s; }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ── Stat Counter Animation ── */
.stat-number {
  transition: color 0.3s ease;
}

/* ── Card Hover Pulse ── */
/* Replaced with inset box-shadow in style.css (.course-card:hover)
   to avoid being clipped by overflow:hidden on the card */

/* ── Prayer Card Active Pulse ── */
.prayer-card.active-prayer {
  animation: activePulse 2s ease infinite;
}

@keyframes activePulse {
  0%, 100% { box-shadow: 0 0 20px rgba(46,139,71,0.4); }
  50%       { box-shadow: 0 0 32px rgba(46,139,71,0.7); }
}

/* ── WhatsApp Float Pulse ── */
.wa-float::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  animation: pulse-ring 1.8s ease infinite;
}

/* ── Page Transition ── */
.page-fade-in {
  animation: fadeIn 0.4s ease both;
}

/* ── Loading Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/* ── Ayah fade on change ── */
.ayah-fade {
  animation: fadeIn 0.8s ease both;
}

/* ── Image float ── */
.img-float {
  animation: floatY 4s ease-in-out infinite;
}
