/* ═══════════════════════════════════════════════════════════
   JuniorDoctor.net — Courses Page
   style.css  |  Matches Clinical Clerking Assistant UI exactly
   ═══════════════════════════════════════════════════════════ */

/* ── Design tokens ── */
:root {
  --brand:        #2a3ec9;
  --brand-dark:   #1e30b4;
  --brand-light:  #eef2ff;
  --brand-50:     #eef2ff;
  --radius-card:  0.875rem;
  --shadow-card:  0 2px 8px 0 rgba(30,48,180,.07), 0 1px 3px rgba(0,0,0,.06);
  --shadow-hover: 0 10px 36px 0 rgba(30,48,180,.14), 0 2px 8px rgba(0,0,0,.07);
  --transition:   .22s cubic-bezier(.4,0,.2,1);
}

/* ── Base ── */
* { box-sizing: border-box; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════
   NAVBAR
══════════════════════════════════ */
#navbar .navbar-inner {
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: background var(--transition), box-shadow var(--transition);
}

#navbar.scrolled .navbar-inner {
  background: rgba(255,255,255,0.95);
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: #111827; background: #f3f4f6; }
.nav-link--active { color: var(--brand); }
.nav-link--active:hover { background: var(--brand-50); }

.mobile-nav-link {
  display: block;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.mobile-nav-link:hover { background: #f3f4f6; color: #111827; }
.mobile-nav-link--active { color: var(--brand); }


/* ══════════════════════════════════
   BUTTONS
══════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: 0 1px 4px rgba(42,62,201,.25);
  white-space: nowrap;
}
.btn-primary:hover {
  background: var(--brand-dark);
  box-shadow: 0 4px 12px rgba(42,62,201,.35);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: transparent;
  color: #374151;
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-ghost:hover { background: #f9fafb; border-color: #d1d5db; color: #111827; }

/* Hero buttons */
.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.625rem;
  background: #fff;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
}
.btn-hero-primary:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  transform: translateY(-2px);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.625rem;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.25);
  cursor: pointer;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
}
.btn-hero-secondary:hover {
  background: rgba(255,255,255,.20);
  border-color: rgba(255,255,255,.40);
  transform: translateY(-2px);
}

/* Card CTA button */
.btn-card {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.125rem;
  border-radius: 0.5rem;
  background: #f3f4f6;
  color: #374151;
  font-weight: 600;
  font-size: 0.8125rem;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-card:hover { background: var(--brand-50); color: var(--brand); border-color: #c7d2fe; }

.btn-card--primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(42,62,201,.25);
}
.btn-card--primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(42,62,201,.35);
}

/* Filter pills */
.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: #fff;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-pill:hover { border-color: #a5b4fc; color: var(--brand); background: var(--brand-50); }
.filter-pill--active { background: var(--brand); color: #fff; border-color: var(--brand); }
.filter-pill--active:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }


/* ══════════════════════════════════
   HERO SECTION
══════════════════════════════════ */
.hero-section {
  background: #162280;
  min-height: 480px;
  position: relative;
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 50%, rgba(99,120,255,.45) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 90% 20%, rgba(42,62,201,.6) 0%, transparent 60%),
    linear-gradient(135deg, #162280 0%, #1a2a99 50%, #0d1660 100%);
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,.6) 20%, rgba(0,0,0,.6) 80%, transparent);
}

.hero-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(60px);
  pointer-events: none;
  animation: orbFloat 8s ease-in-out infinite;
}
.hero-orb--1 {
  width: 400px; height: 400px;
  background: rgba(99,120,255,.18);
  top: -100px; right: 10%;
  animation-delay: 0s;
}
.hero-orb--2 {
  width: 300px; height: 300px;
  background: rgba(30,48,180,.25);
  bottom: -50px; left: 5%;
  animation-delay: -4s;
}

@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-24px) scale(1.04); }
}


/* ══════════════════════════════════
   STAT STRIP
══════════════════════════════════ */
.stat-cell {
  padding: 1.5rem 1.25rem;
  text-align: center;
}
.stat-value {
  font-family: 'DM Serif Display', serif;
  font-size: 1.875rem;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-label {
  font-size: 0.8125rem;
  color: #9ca3af;
  font-weight: 500;
}


/* ══════════════════════════════════
   COURSE CARDS
══════════════════════════════════ */
.course-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.course-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: #c7d2fe;
}

.course-card--featured {
  border-color: var(--brand);
  box-shadow: 0 4px 24px rgba(42,62,201,.14), 0 1px 4px rgba(0,0,0,.06);
}
.course-card--featured:hover {
  box-shadow: 0 12px 40px rgba(42,62,201,.20), 0 2px 8px rgba(0,0,0,.07);
  border-color: var(--brand-dark);
}

/* Top accent strip on featured card */
.course-card--featured::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, #818cf8 100%);
}

.popular-ribbon {
  position: absolute;
  top: 16px;
  right: -28px;
  background: var(--brand);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 36px;
  transform: rotate(45deg);
  pointer-events: none;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge--blue   { background: #dbeafe; color: #1d4ed8; }
.badge--indigo { background: #e0e7ff; color: #4338ca; }
.badge--teal   { background: #ccfbf1; color: #0f766e; }

.card-icon-wrap {
  width: 36px; height: 36px;
  border-radius: 0.5rem;
  background: var(--brand-50);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.divider {
  height: 1px;
  background: #f3f4f6;
}


/* ══════════════════════════════════
   FEATURE BAND
══════════════════════════════════ */
.feature-band {
  background: linear-gradient(180deg, #f9fafb 0%, #fff 100%);
  border-top: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
}

.feature-item {
  padding: 1.5rem;
  border-radius: var(--radius-card);
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
}
.feature-item:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.feature-icon-wrap {
  width: 40px; height: 40px;
  border-radius: 0.625rem;
  background: var(--brand-50);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}


/* ══════════════════════════════════
   TESTIMONIALS
══════════════════════════════════ */
.testimonial-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.testimonial-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}


/* ══════════════════════════════════
   CTA BAND
══════════════════════════════════ */
.cta-band {
  background: #f9fafb;
}
.cta-inner {
  background: linear-gradient(135deg, #1e30b4 0%, #162280 60%, #0d1660 100%);
  border-radius: 1.25rem;
  padding: 3.5rem 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px -10px rgba(30,48,180,.30);
}

.cta-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(50px);
  pointer-events: none;
}
.cta-orb--1 {
  width: 320px; height: 320px;
  background: rgba(99,120,255,.20);
  top: -80px; right: 0;
}
.cta-orb--2 {
  width: 240px; height: 240px;
  background: rgba(30,48,180,.30);
  bottom: -60px; left: 0;
}


/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
.footer-link {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition);
}
.footer-link:hover { color: var(--brand); }


/* ══════════════════════════════════
   ANIMATIONS
══════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn .6s ease both;
}
.animate-fade-in-up {
  animation: fadeInUp .65s cubic-bezier(.22,1,.36,1) both;
}


/* ══════════════════════════════════
   SCROLL-REVEAL (JS adds .revealed)
══════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1);
}
.reveal.revealed {
  opacity: 1;
  transform: none;
}


/* ══════════════════════════════════
   RESPONSIVE TWEAKS
══════════════════════════════════ */
@media (max-width: 640px) {
  .hero-section { min-height: 420px; }
  .cta-inner { padding: 2.5rem 1.5rem; }
  .stat-value { font-size: 1.5rem; }
}
