/* ══════════════════════════════════════════════════════════
   TRANSITIONS — Smooth page & view transitions
   ══════════════════════════════════════════════════════════ */

/* Page content fade-in (already defined in base.css via cascadeFade, 
   but adding a lighter alternative for sub-views) */
.view-enter {
  animation: viewFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered children animation — apply to containers */
.stagger-children > * {
  opacity: 0;
  animation: viewFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.stagger-children > *:nth-child(1) { animation-delay: 0.03s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.06s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.09s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.12s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.18s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.21s; }

/* Smooth stat card entrance */
.stats-grid .stat-card {
  opacity: 0;
  animation: statSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.stats-grid .stat-card:nth-child(1) { animation-delay: 0.05s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.1s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 0.15s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 0.2s; }

@keyframes statSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Chart card entrance */
.charts-row .chart-card {
  opacity: 0;
  animation: chartFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
}
.charts-row .chart-card:nth-child(2) {
  animation-delay: 0.35s;
}

@keyframes chartFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Table row entrance */
.data-table tbody tr {
  animation: rowSlideIn 0.3s ease both;
}
.data-table tbody tr:nth-child(1) { animation-delay: 0.02s; }
.data-table tbody tr:nth-child(2) { animation-delay: 0.04s; }
.data-table tbody tr:nth-child(3) { animation-delay: 0.06s; }
.data-table tbody tr:nth-child(4) { animation-delay: 0.08s; }
.data-table tbody tr:nth-child(5) { animation-delay: 0.10s; }
.data-table tbody tr:nth-child(6) { animation-delay: 0.12s; }
.data-table tbody tr:nth-child(7) { animation-delay: 0.14s; }
.data-table tbody tr:nth-child(8) { animation-delay: 0.16s; }
.data-table tbody tr:nth-child(9) { animation-delay: 0.18s; }
.data-table tbody tr:nth-child(10) { animation-delay: 0.20s; }
.data-table tbody tr:nth-child(11) { animation-delay: 0.22s; }
.data-table tbody tr:nth-child(12) { animation-delay: 0.24s; }

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

/* Nav item hover micro-interaction */
.nav-item {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-item:hover .material-symbols-outlined {
  transform: scale(1.15);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Notification card entrance */
.notif-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.notif-card:hover {
  transform: translateX(4px);
}

/* ── Alumno Dashboard Animations ── */
.animate-float {
  animation: floatIcon 3s ease-in-out infinite;
}
.animate-pulse-glow {
  animation: pulseGlow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.animate-spin-slow {
  animation: spinSlow 8s linear infinite;
}

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

@keyframes pulseGlow {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 2px currentColor); }
  50% { opacity: 0.6; filter: drop-shadow(0 0 10px currentColor); }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
