/* ============================================================
   SMART CHAMPS PRE SCHOOLS — ANIMATIONS & SCROLL EFFECTS
   ============================================================ */

/* ─── KEYFRAME ANIMATIONS ─────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-14px); }
}

@keyframes float-rotate {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-10px) rotate(5deg); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

@keyframes scroll-anim {
  0%   { transform: translateX(-50%) translateY(0); opacity: 1; }
  100% { transform: translateX(-50%) translateY(16px); opacity: 0; }
}

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

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

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

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

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

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes bounce-in {
  0%   { transform: scale(0.3); opacity: 0; }
  50%  { transform: scale(1.05); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes confetti-fall {
  0%   { transform: translateY(-100px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

@keyframes ripple {
  0%   { transform: scale(0); opacity: 1; }
  100% { transform: scale(4); opacity: 0; }
}

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

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

@keyframes waving {
  0%, 100% { transform: rotate(0deg); }
  20%       { transform: rotate(15deg); }
  40%       { transform: rotate(-5deg); }
  60%       { transform: rotate(10deg); }
  80%       { transform: rotate(-5deg); }
}

/* ─── ANIMATED GRADIENT TEXT ──────────────────────────────── */
.gradient-text {
  background: linear-gradient(
    90deg,
    #FF6B35 0%,
    #FFE66D 25%,
    #4ECDC4 50%,
    #FF6B35 75%,
    #FFE66D 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ─── SCROLL-IN ELEMENTS ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.reveal-up     { transform: translateY(50px); }
.reveal.reveal-left   { transform: translateX(-50px); }
.reveal.reveal-right  { transform: translateX(50px); }
.reveal.reveal-scale  { transform: scale(0.85); }

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

/* Stagger children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: 0.47s; }
.reveal-stagger.visible > *:nth-child(8) { transition-delay: 0.54s; }

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

/* ─── HERO ENTRANCE ANIMATIONS ────────────────────────────── */
.hero-left .hero-badge {
  animation: fadeInUp 0.7s ease 0.2s both;
}

.hero-left .hero-h1 {
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-left .hero-tagline {
  animation: fadeInUp 0.7s ease 0.6s both;
}

.hero-left .hero-btns {
  animation: fadeInUp 0.7s ease 0.75s both;
}

.hero-left .hero-stats {
  animation: fadeInUp 0.7s ease 0.9s both;
}

.hero-right .hero-img-wrapper {
  animation: fadeInRight 1s ease 0.5s both;
}

.hero-float-badge-1 {
  animation: float 3s ease-in-out 0s infinite, fadeInUp 0.7s ease 1.1s both !important;
}

.hero-float-badge-2 {
  animation: float 3s ease-in-out 1.5s infinite, fadeInUp 0.7s ease 1.3s both !important;
}

/* ─── LOADER ──────────────────────────────────────────────── */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo {
  font-family: 'Baloo 2', cursive;
  font-size: 2rem;
  font-weight: 800;
  color: white;
  animation: bounce-in 0.8s ease both;
}

.loader-logo span { color: #FF6B35; }

.loader-bar {
  width: 200px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #FF6B35, #FFE66D, #4ECDC4);
  border-radius: 2px;
  animation: loading-bar 1.2s ease forwards;
}

@keyframes loading-bar {
  from { width: 0%; }
  to   { width: 100%; }
}

/* ─── TILT CARDS ──────────────────────────────────────────── */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1200px;
}

.tilt-card .tilt-inner {
  transform: translateZ(20px);
  transform-style: preserve-3d;
}

/* ─── RIPPLE BUTTON EFFECT ────────────────────────────────── */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple .ripple-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  width: 100px;
  height: 100px;
  margin-left: -50px;
  margin-top: -50px;
  animation: ripple 0.6s linear;
  pointer-events: none;
}

/* ─── FLOATING DECORATIVE EMOJIS ──────────────────────────── */
.floating-emoji {
  position: absolute;
  pointer-events: none;
  animation: float-rotate 4s ease-in-out infinite;
  user-select: none;
  font-size: 2rem;
  opacity: 0.15;
  z-index: 0;
}

/* ─── ANIMATED COUNTER ────────────────────────────────────── */
.counter-num {
  display: inline-block;
  transition: all 0.1s ease;
}

/* ─── ACTIVE NAV INDICATOR ────────────────────────────────── */
.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 60%;
}

/* ─── PROGRESS BAR (page scroll) ─────────────────────────── */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
  z-index: 1001;
  width: 0%;
  transition: width 0.1s linear;
}

/* ─── SMOOTH HOVER GLOW ───────────────────────────────────── */
.glow-hover {
  transition: box-shadow 0.3s ease;
}

.glow-hover:hover {
  box-shadow: 0 0 25px rgba(255,107,53,0.3), 0 8px 30px rgba(0,0,0,0.12);
}

/* ─── SECTION WAVE DIVIDERS ───────────────────────────────── */
.wave-top {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
}

.wave-top svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 60px;
}

.wave-bottom {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-bottom svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 60px;
}

/* ─── CARD SHINE EFFECT ───────────────────────────────────── */
.shine-card {
  position: relative;
  overflow: hidden;
}

.shine-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  z-index: 2;
  display: block;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.15) 100%
  );
  transform: skewX(-25deg);
  transition: 0.7s;
}

.shine-card:hover::before {
  left: 125%;
}

/* ─── TOAST NOTIFICATION ──────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 100px;
  right: 28px;
  background: var(--bg-dark);
  color: white;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 9998;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(200%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show { transform: translateX(0); }
.toast .toast-icon { font-size: 1.4rem; }

/* ─── MEDIA QUERIES ANIMATION DISABLE ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
