/* ═══════════════════════════════════════════════════
   ANIMATIONS — Oxford English Boarding School
   ═══════════════════════════════════════════════════ */

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

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

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(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 pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}

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

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

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

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

@keyframes borderPulse {
  0%, 100% { border-color: var(--accent); }
  50%       { border-color: var(--accent-light); }
}

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

/* ─── Animation Classes ─────────────────────────── */
.anim-fade-up    { animation: fadeInUp   .7s ease both; }
.anim-fade-down  { animation: fadeInDown .7s ease both; }
.anim-fade       { animation: fadeIn     .6s ease both; }
.anim-scale      { animation: scaleIn    .5s ease both; }
.anim-slide-left { animation: slideInLeft .6s ease both; }
.anim-slide-right{ animation: slideInRight .6s ease both; }
.anim-float      { animation: float 4s ease-in-out infinite; }
.anim-pulse      { animation: pulse 2s ease infinite; }

/* Delays */
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }
.delay-5 { animation-delay: .5s; }
.delay-6 { animation-delay: .6s; }
.delay-7 { animation-delay: .7s; }
.delay-8 { animation-delay: .8s; }

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

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

.reveal-left {
  opacity: 0;
  transform: translateX(-36px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal-right {
  opacity: 0;
  transform: translateX(36px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal-left.revealed,
.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

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

/* ─── Loading Spinner ───────────────────────────── */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.spinner-sm {
  width: 20px; height: 20px;
  border-width: 2px;
}

/* ─── Gold Medal Shine ──────────────────────────── */
.gold-shine {
  position: relative;
  overflow: hidden;
}

.gold-shine::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  animation: goldShine 2.5s ease-in-out infinite;
}

/* ─── Hover Lift ────────────────────────────────── */
.hover-lift {
  transition: transform .25s ease, box-shadow .25s ease;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ─── Counter Animation ─────────────────────────── */
.counter-value {
  display: inline-block;
  animation: countUp .5s ease both;
}

/* ─── Hero Image Parallax ───────────────────────── */
.parallax-bg {
  will-change: transform;
  background-attachment: fixed;
}

/* ─── Progress Bar ──────────────────────────────── */
.progress-bar-container {
  background: var(--surface);
  border-radius: 100px;
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-bar-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
  width: 0;
}

/* ─── Notification Toast ────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 300px;
  max-width: 400px;
  animation: slideInRight .35s ease both;
  font-size: 0.875rem;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.info    { border-left: 4px solid var(--info); }

.toast-icon { font-size: 1.2rem; flex-shrink: 0; }
.toast-msg  { color: var(--text); font-weight: 500; }
