/* ============================================================
   SalesPlug Academy — Global Stylesheet
   academy.salesplug.com.ng
   ============================================================ */

/* ── Google Font ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

:root {
  --brand:        #E8390E;
  --brand-dark:   #C42D07;
  --brand-light:  #FFF1EE;
  --brand-mid:    #FF6B45;
  --accent:       #1A1A2E;
  --accent-2:     #16213E;
  --gold:         #F5A623;
  --green:        #27AE60;
  --red:          #E74C3C;

  --bg:           #F7F8FA;
  --surface:      #FFFFFF;
  --border:       #E8ECF0;
  --border-2:     #D1D5DB;
  --text:         #1A1A2E;
  --text-2:       #4B5563;
  --text-3:       #9CA3AF;

  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --radius-xl:    24px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.07);
  --shadow:       0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.12);

  --font:         'Inter', system-ui, sans-serif;
  --nav-h:        66px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button, input, select, textarea { font-family: inherit; }

/* ── Typography ── */
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.35rem, 3vw, 1.875rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p  { line-height: 1.7; }

/* ── Layout ── */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 1.25rem; }
.page-wrap { padding-top: var(--nav-h); min-height: 100vh; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.flex    { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; } .mt-6 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-2); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* ── Navbar ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex; align-items: center;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img { height: 36px; }
.nav-logo span { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.nav-logo span em { color: var(--brand); font-style: normal; }
.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links a {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  transition: background .15s, color .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--brand); background: var(--brand-light); }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.nav-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.85rem; cursor: pointer;
}
.hamburger { display: none; cursor: pointer; }
.mobile-menu {
  display: none;
  position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--surface); z-index: 999;
  padding: 1.5rem; flex-direction: column; gap: 0.5rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--text);
  font-weight: 500;
  display: block;
}
.mobile-menu a:hover { background: var(--bg); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .18s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary   { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-outline   { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-light); color: var(--brand-dark); }
.btn-dark      { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-dark:hover { background: #0f1220; color: #fff; }
.btn-ghost     { background: transparent; color: var(--text-2); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-success   { background: var(--green); color: #fff; border-color: var(--green); }
.btn-sm        { padding: 0.45rem 1rem; font-size: 0.82rem; border-radius: var(--radius-sm); }
.btn-lg        { padding: 0.85rem 2rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-block     { width: 100%; }
.btn-icon      { padding: 0.6rem; border-radius: var(--radius-sm); }

/* ── Forms ── */
.form-group { margin-bottom: 1.1rem; }
.form-label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text); }
.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232,57,14,.12); }
.form-control::placeholder { color: var(--text-3); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.8rem; color: var(--text-3); margin-top: 0.3rem; }
.form-error { font-size: 0.8rem; color: var(--red); margin-top: 0.3rem; }
.input-group { position: relative; }
.input-icon { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 1rem; }
.input-group .form-control { padding-left: 2.5rem; }
.input-group-right .form-control { padding-right: 2.5rem; }
.input-group .input-icon-right { left: auto; right: 0.85rem; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-body { padding: 1.5rem; }
.card-sm .card-body { padding: 1.1rem; }
.card-hover { transition: box-shadow .2s, transform .2s; cursor: pointer; }
.card-hover:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

/* ── Course Card ── */
.course-card { display: flex; flex-direction: column; }
.course-card .thumbnail {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg);
}
.course-card .thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.course-card:hover .thumbnail img { transform: scale(1.04); }
.course-card .card-body { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.course-card .course-meta { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.course-card .course-title { font-size: 0.975rem; font-weight: 600; line-height: 1.35; }
.course-card .course-title a { color: var(--text); }
.course-card .course-title a:hover { color: var(--brand); }
.course-card .course-footer { margin-top: auto; padding-top: 0.75rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.course-card .price { font-size: 1.05rem; font-weight: 700; color: var(--brand); }
.course-card .price.free { color: var(--green); }

/* ── Badges & Tags ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-brand   { background: var(--brand-light); color: var(--brand-dark); }
.badge-green   { background: #ECFDF5; color: #065F46; }
.badge-gold    { background: #FEF3C7; color: #92400E; }
.badge-gray    { background: #F3F4F6; color: #374151; }
.badge-red     { background: #FEE2E2; color: #991B1B; }

.tag {
  display: inline-flex; align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  background: var(--bg);
  color: var(--text-2);
  border: 1px solid var(--border);
}

/* ── Progress Bar ── */
.progress-wrap { background: #E5E7EB; border-radius: 100px; overflow: hidden; }
.progress-bar {
  height: 8px;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--brand), var(--brand-mid));
  transition: width .4s ease;
}
.progress-sm .progress-bar { height: 5px; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-3); margin-bottom: 4px; }

/* ── Star Rating ── */
.stars { display: flex; gap: 2px; }
.stars i { color: #D1D5DB; font-size: 0.9rem; }
.stars i.filled { color: var(--gold); }
.rating-score { font-size: 0.88rem; font-weight: 700; color: var(--gold); }

/* ── Alerts ── */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  display: flex; align-items: flex-start; gap: 0.6rem;
  margin-bottom: 1rem;
}
.alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-error   { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-info    { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.alert-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }

/* ── Section Headers ── */
.section-header { margin-bottom: 2.5rem; }
.section-label {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--brand);
  margin-bottom: 0.5rem; display: block;
}
.section-title { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; }
.section-sub   { color: var(--text-2); font-size: 1.05rem; margin-top: 0.5rem; }

/* ── Hero ── */
.hero {
  background: var(--accent);
  color: #fff;
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(232,57,14,.2) 0%, transparent 60%);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; }
.hero h1 span { color: var(--brand-mid); }
.hero p { color: rgba(255,255,255,.75); font-size: 1.1rem; max-width: 540px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  padding: 5px 14px; border-radius: 100px;
  font-size: 0.8rem; font-weight: 500; color: rgba(255,255,255,.85);
  margin-bottom: 1.25rem;
}
.hero-stats { display: flex; align-items: center; gap: 2rem; margin-top: 2.5rem; flex-wrap: wrap; }
.hero-stat strong { display: block; font-size: 1.5rem; font-weight: 700; }
.hero-stat span { font-size: 0.82rem; color: rgba(255,255,255,.6); }

/* ── Dashboard Sidebar ── */
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - var(--nav-h)); }
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow-y: auto;
}
.sidebar-section { margin-bottom: 1.5rem; }
.sidebar-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-3); padding: 0 0.75rem; margin-bottom: 0.5rem; display: block; }
.sidebar-link {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-2);
  transition: all .15s;
}
.sidebar-link i { font-size: 1.05rem; }
.sidebar-link:hover, .sidebar-link.active { color: var(--brand); background: var(--brand-light); }
.main-content { padding: 2rem; }

/* ── Lesson Player Layout ── */
.player-layout { display: grid; grid-template-columns: 1fr 340px; min-height: calc(100vh - var(--nav-h)); }
.player-main { overflow-y: auto; }
.player-sidebar { border-left: 1px solid var(--border); overflow-y: auto; background: var(--surface); height: calc(100vh - var(--nav-h)); position: sticky; top: var(--nav-h); }
.video-wrap { background: #000; aspect-ratio: 16/9; width: 100%; }
.video-wrap iframe { width: 100%; height: 100%; border: none; }
.player-content { padding: 1.5rem 2rem; }

.curriculum-section { border-bottom: 1px solid var(--border); }
.curriculum-section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-weight: 600; font-size: 0.9rem;
  background: var(--bg);
}
.curriculum-section-header:hover { background: #EEEEF2; }
.lesson-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background .15s;
  border-bottom: 1px solid var(--border);
}
.lesson-item:hover { background: var(--brand-light); }
.lesson-item.active { background: var(--brand-light); color: var(--brand); font-weight: 600; border-left: 3px solid var(--brand); }
.lesson-item.completed .lesson-check { color: var(--green); }
.lesson-check { flex-shrink: 0; font-size: 1rem; }
.lesson-duration { margin-left: auto; color: var(--text-3); font-size: 0.78rem; }

/* ── Certificate ── */
.certificate-wrap {
  background: #fff;
  border: 2px solid var(--brand);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  max-width: 780px; margin: 0 auto;
}
.certificate-wrap::before {
  content: '';
  position: absolute; inset: 8px;
  border: 1px solid rgba(232,57,14,.2);
  border-radius: var(--radius-lg);
  pointer-events: none;
}
.cert-logo { height: 48px; margin: 0 auto 1.5rem; }
.cert-title { font-size: 0.9rem; letter-spacing: 3px; text-transform: uppercase; color: var(--text-3); }
.cert-name { font-size: 2.4rem; font-weight: 700; color: var(--brand); margin: 0.75rem 0 0.5rem; }
.cert-course { font-size: 1.15rem; font-weight: 600; color: var(--text); }
.cert-footer { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 2.5rem; }
.cert-sign { text-align: center; }
.cert-sign .line { border-top: 1.5px solid var(--text); width: 160px; margin: 0 auto 0.25rem; }
.cert-number { font-size: 0.75rem; color: var(--text-3); }

/* ── Modals ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 2000;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 2rem; width: 100%; max-width: 480px;
  position: relative; box-shadow: var(--shadow-lg);
  animation: modal-in .2s ease;
}
@keyframes modal-in { from { opacity: 0; transform: scale(.96) translateY(10px); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; top: 1rem; right: 1rem; }

/* ── Footer ── */
.footer {
  background: var(--accent);
  color: rgba(255,255,255,.7);
  padding: 3.5rem 0 1.5rem;
  margin-top: 5rem;
}
.footer h4 { color: #fff; margin-bottom: 1rem; }
.footer a { color: rgba(255,255,255,.6); font-size: 0.88rem; display: block; margin-bottom: 0.5rem; }
.footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 2.5rem; padding-top: 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.82rem;
}

/* ── Tables ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 0.75rem 1rem;
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-3); background: var(--bg);
  border-bottom: 1px solid var(--border);
  text-align: left;
}
tbody td { padding: 0.85rem 1rem; font-size: 0.9rem; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }

/* ── Tabs ── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1.75rem; }
.tab-btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem; font-weight: 600;
  color: var(--text-2); cursor: pointer;
  border: none; background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all .15s;
}
.tab-btn.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-btn:hover  { color: var(--text); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-state i { font-size: 3rem; color: var(--text-3); margin-bottom: 1rem; }
.empty-state h3 { margin-bottom: 0.5rem; }
.empty-state p  { color: var(--text-2); margin-bottom: 1.5rem; }

/* ── Loader ── */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .player-layout { grid-template-columns: 1fr; }
  .player-sidebar { display: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 3rem 0 2rem; }
  .hero-stats { gap: 1.25rem; }
  .main-content { padding: 1.25rem; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .certificate-wrap { padding: 1.5rem; }
  .cert-name { font-size: 1.6rem; }
}
