/* ─────────────────────────────────────────────────────────────────────────────
   IPR Ghana LMS – Main Stylesheet
   Brand: Deep navy/dark + IPR Blue (#0B9EF0) + multicolor accents
───────────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&display=swap');

/* ─── CSS Variables ──────────────────────────────────────────────────────── */
:root {
  --blue:        #0B9EF0;
  --blue-dark:   #0878BE;
  --blue-glow:   rgba(11,158,240,0.25);
  --navy:        #090E1A;
  --navy-2:      #0D1525;
  --navy-3:      #111D33;
  --card-bg:     #131E35;
  --card-border: rgba(11,158,240,0.15);
  --text:        #E8EDF5;
  --text-muted:  #7E8FA8;
  --text-dim:    #4A5568;
  --green:       #2ED06E;
  --red:         #FF4B55;
  --orange:      #FF8C00;
  --yellow:      #FFD700;
  --magenta:     #E91E8C;
  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   20px;
  --shadow:      0 8px 32px rgba(0,0,0,0.4);
  --shadow-blue: 0 8px 32px rgba(11,158,240,0.2);
  --font-main:   'Sora', sans-serif;
  --font-body:   'DM Sans', sans-serif;
  --transition:  all 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ─── Light Theme Variables ──────────────────────────────────────────────── */
body.light-theme {
  --navy:        #F1F5F9;
  --navy-2:      #FFFFFF;
  --navy-3:      #F8FAFE;
  --card-bg:     #FFFFFF;
  --card-border: #E2E8F0;
  --text:        #1E293B;
  --text-muted:  #475569;
  --text-dim:    #94A3B8;
  --shadow:      0 8px 32px rgba(0,0,0,0.08);
  --shadow-blue: 0 8px 24px rgba(11,158,240,0.12);
}

/* ─── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.2s ease;
}

a { color: var(--blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--text); }
img { max-width: 100%; display: block; }

/* ─── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy-2); }
::-webkit-scrollbar-thumb { background: var(--blue-dark); border-radius: 3px; }

/* ─── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-family: var(--font-main); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container { max-width: 1260px; margin: 0 auto; padding: 0 24px; }

/* ─── Navbar ─────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(9,14,26,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(11,158,240,0.12);
  padding: 0 24px;
}
body.light-theme .navbar {
  background: rgba(255,255,255,0.94);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.nav-inner {
  max-width: 1260px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo img { height: 44px; }
.nav-tagline {
  font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); padding-left: 14px;
  border-left: 1px solid rgba(255,255,255,0.1);
}
body.light-theme .nav-tagline { border-left-color: rgba(0,0,0,0.1); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
  padding: 8px 16px; border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
body.light-theme .nav-links a:hover { background: rgba(0,0,0,0.05); }
.nav-links a.active { color: var(--blue); }

/* ─── Theme Toggle Button ───────────────────────────────────────────────── */
.theme-toggle {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 40px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  margin-left: 8px;
}
body.light-theme .theme-toggle {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.1);
}
.theme-toggle:hover {
  background: var(--blue);
  border-color: var(--blue);
  transform: scale(1.02);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  transition: var(--transition);
}
.theme-toggle:hover svg {
  stroke: white;
}
body.light-theme .theme-toggle svg {
  stroke: #475569;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-family: var(--font-main); font-size: 0.88rem; font-weight: 600;
  cursor: pointer; border: none; transition: var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--blue); color: #fff;
  box-shadow: 0 4px 16px rgba(11,158,240,0.35);
}
.btn-primary:hover {
  background: var(--blue-dark); color: #fff;
  transform: translateY(-1px); box-shadow: 0 6px 20px rgba(11,158,240,0.45);
}
.btn-outline {
  background: transparent; color: var(--blue);
  border: 1.5px solid var(--blue);
}
.btn-outline:hover { background: var(--blue-glow); color: var(--blue); }
.btn-ghost { background: rgba(255,255,255,0.06); color: var(--text); }
body.light-theme .btn-ghost { background: rgba(0,0,0,0.04); color: #2d3748; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius); }
.btn-sm { padding: 7px 16px; font-size: 0.8rem; }

/* ─── Hero Section ───────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: 90px 0 70px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%);
}
body.light-theme .hero {
  background: linear-gradient(135deg, #F8FAFE 0%, #FFFFFF 100%);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 50%, rgba(11,158,240,0.08) 0%, transparent 70%);
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
  position: relative; z-index: 1;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(11,158,240,0.12); border: 1px solid rgba(11,158,240,0.25);
  color: var(--blue); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 20px; margin-bottom: 24px;
}
.hero-eyebrow span { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); animation: pulse 2s infinite; }
.hero h1 { margin-bottom: 20px; }
.hero h1 span { color: var(--blue); }
.hero p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 36px; max-width: 480px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 32px; margin-top: 48px; padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
body.light-theme .hero-stats { border-top-color: rgba(0,0,0,0.08); }
.hero-stat-num {
  font-family: var(--font-main); font-size: 1.8rem; font-weight: 800; color: var(--blue);
}
.hero-stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* ─── Featured Video Preview ─────────────────────────────────────────────── */
.featured-preview {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 16/9;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(11,158,240,0.2);
  cursor: pointer;
}
body.light-theme .featured-preview {
  box-shadow: 0 20px 40px rgba(0,0,0,0.1), 0 0 0 1px rgba(11,158,240,0.3);
}
.featured-preview img { width: 100%; height: 100%; object-fit: cover; }
.preview-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(9,14,26,0.6) 0%, rgba(11,158,240,0.1) 100%);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.featured-preview:hover .preview-overlay { background: rgba(9,14,26,0.75); }
.play-btn-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.play-btn {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(255,255,255,0.15); border: 2px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.featured-preview:hover .play-btn {
  background: var(--blue); border-color: var(--blue);
  transform: scale(1.08); box-shadow: 0 0 30px rgba(11,158,240,0.5);
}
.play-btn svg { width: 26px; height: 26px; fill: #fff; margin-left: 4px; }
.play-label { color: #fff; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em; }
.preview-badge {
  position: absolute; top: 16px; right: 16px;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff; font-size: 0.75rem; font-weight: 600;
  padding: 5px 12px; border-radius: 20px;
}

/* ─── Video Grid Section ─────────────────────────────────────────────────── */
.section { padding: 72px 0; }
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 40px;
}
.section-label {
  display: block; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 8px;
}
.section-title { margin: 0; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.video-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.video-card:hover {
  transform: translateY(-4px);
  border-color: rgba(11,158,240,0.4);
  box-shadow: var(--shadow-blue);
}
.video-card-thumb {
  position: relative; aspect-ratio: 16/9; overflow: hidden;
}
.video-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.video-card:hover .video-card-thumb img { transform: scale(1.04); }
.video-card-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: var(--transition);
}
.video-card:hover .video-card-overlay { opacity: 1; }
.card-play {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--blue); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(11,158,240,0.5);
}
.card-play svg { width: 20px; height: 20px; fill: #fff; margin-left: 3px; }
.duration-badge {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(0,0,0,0.75); color: #fff;
  font-size: 0.72rem; font-weight: 600; padding: 3px 8px; border-radius: 4px;
}
.lock-badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.7); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted); padding: 4px 10px; border-radius: 20px;
  font-size: 0.7rem; font-weight: 600; display: flex; align-items: center; gap: 5px;
}
.video-card-body { padding: 18px 20px 20px; }
.card-category {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 8px;
}
.card-title {
  font-family: var(--font-main); font-size: 1rem; font-weight: 600;
  color: var(--text); margin-bottom: 8px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
body.light-theme .card-meta { border-top-color: rgba(0,0,0,0.06); }
.card-instructor { font-size: 0.8rem; color: var(--text-muted); }
.card-views { font-size: 0.78rem; color: var(--text-dim); }

/* ─── Auth Modal ─────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: var(--transition);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--navy-2); border: 1px solid var(--card-border);
  border-radius: var(--radius-lg); padding: 40px; width: 100%;
  max-width: 460px; position: relative;
  transform: translateY(20px) scale(0.97); transition: var(--transition);
  box-shadow: var(--shadow);
}
body.light-theme .modal { background: white; }
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.06); border: none;
  color: var(--text-muted); width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: rgba(255,0,0,0.1); color: var(--red); }
.modal-logo { display: flex; justify-content: center; margin-bottom: 24px; }
.modal-logo img { height: 50px; }
.modal-title { text-align: center; font-size: 1.4rem; margin-bottom: 6px; }
.modal-subtitle { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 30px; }
.modal-tabs {
  display: flex; gap: 4px; background: rgba(255,255,255,0.04);
  padding: 4px; border-radius: var(--radius-sm); margin-bottom: 24px;
}
.modal-tab {
  flex: 1; padding: 8px 0; text-align: center; border-radius: 6px;
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  color: var(--text-muted); transition: var(--transition); border: none; background: none;
}
.modal-tab.active { background: var(--blue); color: #fff; }

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 7px; }
.form-input {
  width: 100%; padding: 12px 16px; background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.08); border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--font-body); font-size: 0.95rem;
  transition: var(--transition); outline: none;
}
body.light-theme .form-input { background: #F1F5F9; color: #1e293b; border-color: #E2E8F0; }
.form-input:focus { border-color: var(--blue); background: rgba(11,158,240,0.05); box-shadow: 0 0 0 3px var(--blue-glow); }
.form-input::placeholder { color: var(--text-dim); }
select.form-input { cursor: pointer; }
.form-input option { background: var(--navy-2); }
.input-icon-wrap { position: relative; }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-dim); }
.input-icon-wrap .form-input { padding-left: 42px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-error { color: var(--red); font-size: 0.8rem; margin-top: 4px; }
.form-success { color: var(--green); font-size: 0.8rem; margin-top: 4px; }

.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.08);
}
body.light-theme .divider::before,
body.light-theme .divider::after {
  background: rgba(0,0,0,0.08);
}
.divider span { font-size: 0.78rem; color: var(--text-dim); white-space: nowrap; }

/* ─── Alert Banners ──────────────────────────────────────────────────────── */
.alert {
  padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 18px;
  font-size: 0.88rem; font-weight: 500; display: flex; align-items: center; gap: 10px;
}
.alert-info { background: rgba(11,158,240,0.1); border: 1px solid rgba(11,158,240,0.25); color: #7DC8F5; }
.alert-success { background: rgba(46,208,110,0.1); border: 1px solid rgba(46,208,110,0.25); color: #5FE49A; }
.alert-error { background: rgba(255,75,85,0.1); border: 1px solid rgba(255,75,85,0.25); color: #FF7B83; }
.alert-warning { background: rgba(255,140,0,0.1); border: 1px solid rgba(255,140,0,0.25); color: #FFA940; }

/* ─── Watch Page ─────────────────────────────────────────────────────────── */
.watch-layout {
  display: grid; grid-template-columns: 1fr 380px;
  gap: 28px; align-items: flex-start;
  padding-top: 28px;
}
.video-player-wrap {
  background: #000; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16/9; position: relative;
}
.video-player-wrap iframe {
  width: 100%; height: 100%; border: none; display: block;
}
.video-info { padding: 20px 0; }
.video-title-main { font-size: 1.4rem; margin-bottom: 12px; }
.video-meta-row {
  display: flex; align-items: center; gap: 20px;
  padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 16px;
}
.video-meta-item { font-size: 0.83rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.video-description { color: var(--text-muted); font-size: 0.93rem; line-height: 1.7; }

/* ─── Live Comments ──────────────────────────────────────────────────────── */
.comments-panel {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 120px); position: sticky; top: 90px;
}
.comments-header {
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: space-between;
}
.comments-header h3 { font-size: 0.95rem; font-weight: 700; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 8px var(--green); animation: pulse 2s infinite;
}
.live-badge {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--green);
}
.comments-list {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
}
.comment-item { display: flex; gap: 10px; }
.comment-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue), var(--magenta));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; color: #fff; text-transform: uppercase;
}
.comment-bubble { flex: 1; }
.comment-author { font-size: 0.78rem; font-weight: 700; color: var(--text); }
.comment-author span { font-weight: 400; color: var(--text-dim); font-size: 0.72rem; margin-left: 6px; }
.comment-text { font-size: 0.85rem; color: var(--text-muted); margin-top: 3px; word-break: break-word; }
.comment-input-area {
  padding: 14px; border-top: 1px solid rgba(255,255,255,0.07);
}
.comment-input-row { display: flex; gap: 8px; }
.comment-input {
  flex: 1; background: rgba(255,255,255,0.05); border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm); color: var(--text); font-family: var(--font-body);
  font-size: 0.88rem; padding: 10px 14px; outline: none; transition: var(--transition);
  resize: none;
}
.comment-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-glow); }
.comment-send-btn {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  background: var(--blue); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); flex-shrink: 0;
}
.comment-send-btn:hover { background: var(--blue-dark); }
.comment-send-btn svg { width: 18px; height: 18px; fill: #fff; }

/* ─── Login / Auth Pages ─────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%);
}
.auth-card {
  background: var(--navy-2); border: 1px solid var(--card-border);
  border-radius: var(--radius-lg); padding: 44px 40px; width: 100%; max-width: 480px;
  box-shadow: var(--shadow);
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo img { height: 55px; margin: 0 auto; }
.auth-logo p { font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); margin-top: 10px; }
.auth-heading { text-align: center; margin-bottom: 28px; }
.auth-heading h2 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-heading p { color: var(--text-muted); font-size: 0.9rem; }

/* ─── Paystack Section ───────────────────────────────────────────────────── */
.price-card {
  background: linear-gradient(135deg, rgba(11,158,240,0.1), rgba(11,158,240,0.04));
  border: 1px solid rgba(11,158,240,0.3); border-radius: var(--radius);
  padding: 24px; margin-bottom: 24px; text-align: center;
}
.price-amount { font-family: var(--font-main); font-size: 2.4rem; font-weight: 800; color: var(--blue); }
.price-period { color: var(--text-muted); font-size: 0.88rem; }
.price-features { list-style: none; text-align: left; margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.price-features li { font-size: 0.88rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.price-features li::before { content: '✓'; color: var(--green); font-weight: 700; }

/* ─── Footer ─────────────────────────────────────────────────────────────── */
footer {
  background: var(--navy-2); border-top: 1px solid rgba(255,255,255,0.06);
  padding: 40px 0 24px;
}
body.light-theme footer { border-top-color: rgba(0,0,0,0.06); }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
}
.footer-copy { font-size: 0.82rem; color: var(--text-dim); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 0.82rem; color: var(--text-dim); }
.footer-links a:hover { color: var(--blue); }

/* ─── Utilities ──────────────────────────────────────────────────────────── */
.text-blue { color: var(--blue); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ─── Animations ─────────────────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s ease both; }
.comment-item { animation: slideIn 0.3s ease both; }

/* ─── Loader ─────────────────────────────────────────────────────────────── */
.loader {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid rgba(11,158,240,0.15);
  border-top-color: var(--blue);
  animation: spin 0.7s linear infinite; margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .watch-layout { grid-template-columns: 1fr; }
  .comments-panel { max-height: 480px; position: static; }
}
@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .featured-preview { order: -1; }
  .nav-links .btn-outline { display: none; }
  .auth-card { padding: 32px 24px; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
}
@media (max-width: 480px) {
  .video-grid { grid-template-columns: 1fr; }
  .nav-tagline { display: none; }
}

/* Add to your existing style.css - Enhanced Mobile Responsiveness */

/* Mobile-First Responsive Improvements */
@media (max-width: 1024px) {
  .watch-layout { 
    grid-template-columns: 1fr; 
  }
  .comments-panel { 
    max-height: 480px; 
    position: static; 
  }
  .page-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    position: static;
    margin-bottom: 24px;
  }
  .hero-grid {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  /* Container padding */
  .container {
    padding: 0 16px;
  }
  
  /* Navbar responsive */
  .nav-inner {
    height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .nav-logo {
    flex: 1;
  }
  
  .nav-logo img {
    height: 36px;
  }
  
  .nav-tagline {
    display: none;
  }
  
  .nav-links {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .nav-links a {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .nav-links .btn-sm {
    padding: 5px 12px;
    font-size: 0.75rem;
  }
  
  /* Hero section */
  .hero {
    padding: 50px 0 40px;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .hero h1 {
    font-size: 1.8rem;
    margin-bottom: 16px;
  }
  
  .hero p {
    font-size: 0.95rem;
    margin-bottom: 24px;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .hero-stats {
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 32px;
    padding-top: 24px;
  }
  
  .hero-stat-num {
    font-size: 1.4rem;
  }
  
  /* Featured video */
  .featured-preview {
    aspect-ratio: 16/9;
  }
  
  .play-btn {
    width: 56px;
    height: 56px;
  }
  
  .play-btn svg {
    width: 20px;
    height: 20px;
  }
  
  /* Sections */
  .section {
    padding: 50px 0;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 28px;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  /* Video grid */
  .video-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  /* About section */
  #about > .container > div {
    grid-template-columns: 1fr !important;
    gap: 32px;
  }
  
  /* Auth modal */
  .modal {
    margin: 20px;
    padding: 28px 20px;
    max-width: calc(100% - 40px);
  }
  
  .modal-title {
    font-size: 1.2rem;
  }
  
  .modal-tabs {
    margin-bottom: 20px;
  }
  
  /* Forms */
  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .form-input {
    padding: 10px 14px;
    font-size: 0.9rem;
  }
  
  /* Guest checkout */
  .auth-page > div {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }
  
  .auth-card {
    padding: 28px 20px;
  }
  
  .price-card {
    padding: 20px;
  }
  
  /* Watch page */
  .watch-layout {
    gap: 20px;
  }
  
  .video-title-main {
    font-size: 1.1rem;
  }
  
  .video-meta-row {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .video-meta-item {
    font-size: 0.75rem;
  }
  
  /* Comments panel */
  .comments-panel {
    max-height: 500px;
  }
  
  .comments-header {
    padding: 12px 16px;
  }
  
  .comments-header h3 {
    font-size: 0.85rem;
  }
  
  .comment-item {
    gap: 8px;
  }
  
  .comment-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }
  
  .comment-author {
    font-size: 0.72rem;
  }
  
  .comment-text {
    font-size: 0.8rem;
  }
  
  .comment-input-row {
    flex-direction: column;
  }
  
  .comment-send-btn {
    width: 100%;
    height: 40px;
  }
  
  /* Related videos */
  .related-thumb {
    width: 100px;
    height: 60px;
  }
  
  .related-title {
    font-size: 0.78rem;
  }
  
  /* Footer */
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  /* Extra small devices */
  .container {
    padding: 0 12px;
  }
  
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .hero-eyebrow {
    font-size: 0.7rem;
    padding: 4px 10px;
  }
  
  .btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
  
  .btn-lg {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .video-card-body {
    padding: 14px 16px;
  }
  
  .card-title {
    font-size: 0.9rem;
  }
  
  .card-category {
    font-size: 0.65rem;
  }
  
  .card-instructor,
  .card-views {
    font-size: 0.7rem;
  }
  
  .comments-list {
    padding: 12px;
  }
  
  .comment-input-area {
    padding: 12px;
  }
  
  .price-amount {
    font-size: 1.8rem;
  }
  
  .price-features li {
    font-size: 0.8rem;
  }
}

/* Landscape mode for mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    padding: 30px 0;
  }
  
  .comments-panel {
    max-height: 400px;
  }
  
  .video-player-wrap {
    aspect-ratio: 16/9;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  .video-card:hover {
    transform: none;
  }
  
  .video-card-overlay {
    opacity: 1;
    background: rgba(0,0,0,0.2);
  }
  
  button, 
  .btn,
  .video-card,
  .cat-link,
  .nav-links a {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  
  button:active,
  .btn:active {
    transform: scale(0.98);
  }
}

/* Improve scrolling on mobile */
html {
  -webkit-overflow-scrolling: touch;
}

/* Better touch targets */
.nav-links a,
.btn,
.cat-link,
.comment-send-btn,
.modal-close {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Mobile input improvements */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important; /* Prevents zoom on focus in iOS */
  }
  
  .comment-input {
    font-size: 16px;
  }
  
  /* Improve tap targets */
  .btn, 
  .video-card,
  .cat-link,
  .comment-send-btn,
  .modal-close {
    cursor: pointer;
    touch-action: manipulation;
  }
}
/* ════════════════════════════════════════════════════════════════════
   IPR Ghana LMS – Responsive & Polish Additions
   Append this block to the end of your existing style.css
   ════════════════════════════════════════════════════════════════════ */

/* ── Global box-sizing fix ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Container responsive padding ────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(12px, 4vw, 40px);
}

/* ── Navbar ─────────────────────────────────────────────────────────── */
.navbar { position: sticky; top: 0; z-index: 100; }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 12px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}
.nav-tagline { font-size: 0.72rem; opacity: .65; }

/* Collapse tagline on small screens */
@media (max-width: 480px) {
  .nav-tagline { display: none; }
  .nav-links .hide-xs { display: none; }
  .nav-links { gap: 8px; }
}

/* ── Auth / Checkout page ────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px clamp(12px, 4vw, 40px);
}
.auth-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg, 16px);
  padding: clamp(20px, 4vw, 36px);
}

/* ── Form inputs ────────────────────────────────────────────────────── */
.form-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9rem;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--card-border);
  background: var(--input-bg, rgba(255,255,255,.04));
  color: var(--text);
  transition: border-color .2s;
}
.form-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,158,240,.15); }
.form-group { margin-bottom: 16px; }
.form-label { font-size: 0.83rem; font-weight: 600; margin-bottom: 6px; display: block; color: var(--text); }

.input-icon-wrap { position: relative; }
.input-icon-wrap .form-input { padding-left: 36px; }
.input-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); opacity: .45; pointer-events: none; }

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-sm, 8px); font-weight: 600;
  font-size: 0.88rem; cursor: pointer; border: none; text-decoration: none;
  transition: var(--transition, opacity .15s, transform .15s);
  white-space: nowrap; line-height: 1;
}
.btn:active { transform: scale(.97); }
.btn-primary  { background: var(--blue);  color: #fff; }
.btn-primary:hover  { filter: brightness(1.1); }
.btn-outline  { background: transparent; color: var(--blue); border: 1px solid var(--blue); }
.btn-outline:hover  { background: rgba(11,158,240,.08); }
.btn-ghost    { background: transparent; color: var(--text-muted); border: 1px solid var(--card-border); }
.btn-ghost:hover    { background: rgba(255,255,255,.05); color: var(--text); }
.btn-lg  { padding: 13px 24px; font-size: 0.95rem; }
.btn-sm  { padding: 6px 12px;  font-size: 0.78rem; }
.w-full  { width: 100%; }

/* ── Video grid responsive ──────────────────────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
@media (max-width: 640px)  { .video-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 380px)  { .video-grid { grid-template-columns: 1fr; } }

/* ── Video card ──────────────────────────────────────────────────────── */
.video-card { border-radius: var(--radius); overflow: hidden; transition: var(--transition); }
.video-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,.3); }
.video-card-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.video-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-card-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.video-card:hover .video-card-overlay { opacity: 1; }
.card-play {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(11,158,240,.9); display: flex; align-items: center; justify-content: center;
}
.card-play svg { width: 20px; fill: #fff; }
.duration-badge {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,.75); color: #fff; font-size: 0.7rem; font-weight: 700;
  padding: 2px 7px; border-radius: 4px;
}
.video-card-body { padding: 12px; background: var(--card-bg); border: 1px solid var(--card-border); border-top: none; }
.card-category { font-size: 0.7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--blue); font-weight: 700; margin-bottom: 5px; }
.card-title    { font-size: 0.9rem; font-weight: 700; line-height: 1.35; margin-bottom: 8px; color: var(--text); }
.card-meta     { display: flex; justify-content: space-between; font-size: 0.73rem; color: var(--text-dim); flex-wrap: wrap; gap: 4px; }

/* ── Footer ─────────────────────────────────────────────────────────── */
footer { margin-top: 60px; border-top: 1px solid var(--card-border); padding: 24px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-copy  { font-size: 0.8rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font-size: 0.8rem; color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ── Alerts ─────────────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 0.85rem; display: flex; align-items: flex-start; gap: 8px; }
.alert-error { background: rgba(255,75,85,.1); border: 1px solid rgba(255,75,85,.25); color: var(--red, #ff4b55); }
.alert-info  { background: rgba(11,158,240,.08); border: 1px solid rgba(11,158,240,.2);  color: var(--blue); }

/* ── Section header ─────────────────────────────────────────────────── */
.section-header { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.section-label  { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); display: block; margin-bottom: 3px; }

/* ── Price card ──────────────────────────────────────────────────────── */
.price-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 20px; }
.price-amount { font-size: 2rem; font-weight: 800; color: var(--blue); }
.price-period { color: var(--text-muted); font-size: 0.85rem; }
.price-features { list-style: none; padding: 0; margin: 0; }
.price-features li { padding: 5px 0; font-size: 0.85rem; color: var(--text-muted); }
.price-features li::before { content: '✓ '; color: var(--green); font-weight: 700; }

/* ── Theme toggle button ────────────────────────────────────────────── */
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.05); border: 1px solid var(--card-border); cursor: pointer;
  color: var(--text-muted); transition: var(--transition); flex-shrink: 0;
}
.theme-toggle:hover { background: rgba(255,255,255,.1); color: var(--text); }
.theme-toggle svg   { width: 16px; height: 16px; }

/* ── Light theme overrides ───────────────────────────────────────────── */
body.light-theme {
  --text:        #0d1117;
  --text-muted:  #57606a;
  --text-dim:    #8b949e;
  --card-bg:     #ffffff;
  --card-border: #d0d7de;
  --navy-2:      #f6f8fa;
  --input-bg:    #ffffff;
  background:    #f6f8fa;
}
body.light-theme .navbar     { background: #ffffff; border-bottom: 1px solid #d0d7de; }
body.light-theme .theme-toggle { background: rgba(0,0,0,.04); }
body.light-theme .video-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); }

/* ── Utility ─────────────────────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.mt-4         { margin-top: 16px; }
.fade-up      { animation: fadeUp .4s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ── Watch page video container ─────────────────────────────────────── */
.video-embed-wrap {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
}
.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Comments ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .watch-layout { flex-direction: column !important; }
  .watch-sidebar { width: 100% !important; max-height: 340px; overflow-y: auto; }
}