/* ============================================================
   Shree Sowjanya Educational Trust — LMS Stylesheet
   Palette derived from brand site:
   --navy   : primary dark (header/footer/backgrounds)
   --gold   : brand mustard (top utility bar, dividers)
   --orange : primary CTA / accent
   --teal   : secondary accent (labels, links, icons)
   ============================================================ */

:root {
  --navy: #0f1e3d;
  --navy-2: #14294f;
  --navy-soft: #1c3564;
  --gold: #a9791f;
  --orange: #f5941f;
  --orange-dark: #d97a0a;
  --teal: #17a6b4;
  --ink: #16294f;
  --gray-600: #5b6478;
  --gray-300: #d7dbe4;
  --offwhite: #f6f7fb;
  --white: #ffffff;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-soft: 0 10px 30px rgba(15, 30, 61, 0.08);
  --shadow-card: 0 6px 18px rgba(15, 30, 61, 0.10);
  --font-head: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--offwhite);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .display-font {
  font-family: var(--font-head);
  color: var(--navy);
  letter-spacing: -0.01em;
}

a { text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------- Top utility bar ---------------- */
.topbar {
  background: linear-gradient(90deg, var(--gold), #c99a3a);
  color: #fff;
  font-size: 0.85rem;
  padding: 8px 0;
}
.topbar a { color: #fff; opacity: .9; }
.topbar a:hover { opacity: 1; }

/* ---------------- Main nav ---------------- */
.main-nav {
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.main-nav .navbar-brand small {
  display: block;
  font-size: .7rem;
  color: var(--gray-600);
  letter-spacing: .12em;
}
.main-nav .nav-link {
  color: var(--navy);
  font-weight: 600;
  font-size: .95rem;
  padding: .5rem 1rem !important;
  position: relative;
}
.main-nav .nav-link.active { color: var(--orange-dark); }
.main-nav .nav-link.active::after {
  content: "";
  position: absolute;
  left: 1rem; right: 1rem; bottom: 2px;
  height: 3px;
  border-radius: 3px;
  background: var(--orange);
}
.btn-brand {
  background: var(--orange);
  border: none;
  color: #fff;
  font-weight: 700;
  padding: .7rem 1.6rem;
  border-radius: var(--radius-sm);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-brand:hover {
  background: var(--orange-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(245,148,31,.35);
}
.btn-outline-brand {
  border: 2px solid var(--navy);
  color: var(--navy);
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: .65rem 1.5rem;
  transition: all .15s ease;
}
.btn-outline-brand:hover {
  background: var(--navy);
  color: #fff;
}

/* ---------------- Hero ---------------- */
.hero {
  background:
    radial-gradient(1200px 500px at 85% 20%, rgba(23,166,180,.25), transparent 60%),
    linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 55%, var(--navy-soft) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero .eyebrow {
  color: var(--orange);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .8rem;
}
.hero .underline-swash {
  width: 130px; height: 10px; margin: .35rem 0 1rem;
  display: block;
}
.hero-stat {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  backdrop-filter: blur(3px);
}
.hero-stat .num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--orange);
  line-height: 1;
}
.hero-stat .lbl { font-size: .78rem; color: #cfd7ea; margin-top: .25rem; }

/* ---------------- Section labels ---------------- */
.section-eyebrow {
  color: var(--teal);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .78rem;
}

/* ---------------- Course cards ---------------- */
.course-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  height: 100%;
  border: 1px solid rgba(15,30,61,.05);
  transition: transform .22s ease, box-shadow .22s ease;
}
.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(15,30,61,.16);
}
.course-card .cc-top {
  height: 130px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.6rem;
}
.course-card .cc-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  padding: .25rem .6rem;
  border-radius: 20px;
  letter-spacing: .06em;
}
.course-card .cc-body { padding: 1.25rem 1.4rem 1.5rem; }
.course-card h3 {
  font-size: 1.12rem;
  margin-bottom: .35rem;
}
.course-card .cc-meta {
  display: flex;
  gap: 1rem;
  font-size: .8rem;
  color: var(--gray-600);
  margin: .75rem 0 1rem;
  flex-wrap: wrap;
}
.course-card .cc-meta span { display: flex; align-items: center; gap: .35rem; }
.course-card .cc-desc { font-size: .88rem; color: var(--gray-600); min-height: 60px; }
.course-card .cc-progress-track {
  height: 6px;
  background: var(--gray-300);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: .35rem;
}
.course-card .cc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--orange));
  width: 0%;
  transition: width 1s ease;
}
.course-card .cc-progress-label {
  font-size: .72rem;
  color: var(--gray-600);
  display: flex;
  justify-content: space-between;
}
.btn-view-course {
  width: 100%;
  margin-top: 1rem;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: .65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: background .15s ease, transform .15s ease;
}
.btn-view-course:hover {
  background: var(--orange);
  color: #fff;
  transform: translateX(2px);
}

/* Track colors per course */
.track-gda { background: linear-gradient(135deg, #1c8a8f, #0f6167); }
.track-broadband { background: linear-gradient(135deg, #1f5fa8, #123a6c); }
.track-electronics { background: linear-gradient(135deg, #a9791f, #7a5613); }
.track-agri { background: linear-gradient(135deg, #3f7d3a, #245224); }

/* ---------------- Filter chips ---------------- */
.chip-filter {
  border: 2px solid var(--gray-300);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: .85rem;
  padding: .45rem 1.1rem;
  border-radius: 30px;
  transition: all .15s ease;
}
.chip-filter:hover { border-color: var(--teal); color: var(--teal); }
.chip-filter.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ---------------- Roadmap / signature stepper ---------------- */
.roadmap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  position: relative;
}
.roadmap-step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 2;
}
.roadmap-step .dot {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .6rem;
  font-size: 1.3rem;
  color: var(--gray-600);
  transition: all .25s ease;
}
.roadmap-step.done .dot {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}
.roadmap-step.current .dot {
  border-color: var(--orange);
  color: var(--orange);
  box-shadow: 0 0 0 6px rgba(245,148,31,.15);
}
.roadmap-step .rl {
  font-weight: 700;
  font-size: .82rem;
  color: var(--navy);
}
.roadmap-step .rs { font-size: .72rem; color: var(--gray-600); }
.roadmap-line {
  position: absolute;
  top: 27px; left: 8%; right: 8%;
  height: 3px;
  background: var(--gray-300);
  z-index: 1;
}
.roadmap-line-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--orange));
  width: 0%;
  transition: width 1.2s ease;
}

/* ---------------- Course detail hero ---------------- */
.course-hero {
  background: linear-gradient(120deg, var(--navy), var(--navy-2));
  color: #fff;
  padding: 3rem 0 6rem;
  position: relative;
}
.course-hero .crumb { font-size: .82rem; color: #a9b6d6; }
.course-hero .crumb a { color: var(--teal); }
.course-hero-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  margin-top: -4.5rem;
  position: relative;
  z-index: 5;
}

/* ---------------- Tabs ---------------- */
.lms-tabs {
  border: none;
  gap: .4rem;
  flex-wrap: wrap;
}
.lms-tabs .nav-link {
  border: none;
  border-radius: 30px;
  font-weight: 700;
  color: var(--gray-600);
  padding: .6rem 1.25rem;
  background: var(--offwhite);
}
.lms-tabs .nav-link.active {
  background: var(--navy);
  color: #fff;
}
.lms-tabs .nav-link .badge-count {
  background: rgba(255,255,255,.2);
  border-radius: 20px;
  padding: .05rem .5rem;
  font-size: .7rem;
  margin-left: .35rem;
}

/* ---------------- Module accordion ---------------- */
.module-item {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid rgba(15,30,61,.05);
}
.module-head {
  width: 100%;
  border: none;
  background: #fff;
  padding: 1.1rem 1.3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  text-align: left;
}
.module-head .mnum {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--offwhite);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  transition: background .2s ease, color .2s ease;
}
.module-item.open .mnum { background: var(--teal); color: #fff; }
.module-head .mtitle { font-weight: 700; color: var(--navy); flex: 1; }
.module-head .msub { font-size: .78rem; color: var(--gray-600); }
.module-head .chev { transition: transform .25s ease; color: var(--gray-600); }
.module-item.open .chev { transform: rotate(180deg); color: var(--teal); }
.module-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.module-item.open .module-body { max-height: 900px; }
.lesson-row {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .7rem 1.3rem .7rem 4.3rem;
  border-top: 1px solid var(--offwhite);
  font-size: .92rem;
}
.lesson-row:hover { background: var(--offwhite); }
.lesson-row .lcheck {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  cursor: pointer;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem;
  color: transparent;
  transition: all .15s ease;
}
.lesson-row .lcheck.checked {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.lesson-row .ltype {
  font-size: .72rem;
  color: var(--gray-600);
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .3rem;
}

/* ---------------- Progress ring ---------------- */
.progress-ring-wrap { position: relative; width: 130px; height: 130px; margin: 0 auto; }
.progress-ring-wrap svg { transform: rotate(-90deg); }
.progress-ring-bg { fill: none; stroke: var(--gray-300); stroke-width: 10; }
.progress-ring-fill { fill: none; stroke: var(--orange); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.progress-ring-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.progress-ring-label .pct { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; color: var(--navy); }
.progress-ring-label .txt { font-size: .68rem; color: var(--gray-600); }

/* ---------------- Task cards ---------------- */
.task-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.3rem;
  border-left: 5px solid var(--gray-300);
  transition: border-color .2s ease, transform .2s ease;
  height: 100%;
}
.task-card.tc-done { border-left-color: var(--teal); }
.task-card.tc-pending { border-left-color: var(--orange); }
.task-card:hover { transform: translateY(-4px); }
.task-card .tc-top { display: flex; justify-content: space-between; align-items: start; gap: .5rem; }
.task-card .tc-tag {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem .55rem;
  border-radius: 20px;
  background: var(--offwhite);
  color: var(--gray-600);
}
.task-card.tc-done .tc-tag { background: rgba(23,166,180,.12); color: var(--teal); }
.task-card.tc-pending .tc-tag { background: rgba(245,148,31,.12); color: var(--orange-dark); }
.task-card h4 { font-size: 1rem; margin: .6rem 0 .4rem; }
.task-card p { font-size: .85rem; color: var(--gray-600); }
.task-card .tc-btn {
  border: 2px solid var(--navy);
  background: transparent;
  color: var(--navy);
  font-weight: 700;
  font-size: .82rem;
  border-radius: var(--radius-sm);
  padding: .45rem 1rem;
  width: 100%;
  margin-top: .8rem;
}
.task-card.tc-done .tc-btn { border-color: var(--teal); color: var(--teal); }
.task-card .tc-btn:hover { background: var(--navy); color: #fff; }
.task-card.tc-done .tc-btn:hover { background: var(--teal); color: #fff; }

/* ---------------- Assessment / quiz ---------------- */
.quiz-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.8rem;
}
.quiz-progress-track {
  height: 8px;
  background: var(--gray-300);
  border-radius: 6px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--orange));
  transition: width .4s ease;
}
.quiz-q { display: none; }
.quiz-q.active { display: block; animation: fadein .35s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: translateY(0);} }
.quiz-option {
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  margin-bottom: .7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .8rem;
  transition: all .15s ease;
}
.quiz-option:hover { border-color: var(--teal); background: #f2fbfc; }
.quiz-option.selected { border-color: var(--teal); background: rgba(23,166,180,.08); }
.quiz-option.correct { border-color: #2e9e4a; background: rgba(46,158,74,.1); }
.quiz-option.incorrect { border-color: #d64545; background: rgba(214,69,69,.1); }
.quiz-option .opt-letter {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--offwhite);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: .8rem;
  color: var(--navy);
  flex-shrink: 0;
}
.quiz-nav-btn {
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  padding: .6rem 1.5rem;
}
.quiz-result-ring { width: 160px; height: 160px; margin: 0 auto; }

/* ---------------- Certificate ---------------- */
.cert-preview {
  border: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 2.2rem;
  text-align: center;
  background:
    radial-gradient(circle at top left, rgba(169,121,31,.08), transparent 50%),
    radial-gradient(circle at bottom right, rgba(23,166,180,.08), transparent 50%),
    #fff;
  position: relative;
}
.cert-preview::before {
  content: "";
  position: absolute; inset: 10px;
  border: 1px dashed rgba(169,121,31,.4);
  border-radius: 8px;
  pointer-events: none;
}

/* ---------------- Sidebar ---------------- */
.side-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.4rem;
}
.side-card h5 {
  font-size: .95rem;
  display: flex; align-items: center; gap: .5rem;
}
.instructor-mini {
  display: flex; align-items: center; gap: .8rem;
}
.instructor-mini .av {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--navy);
  color: #cfd7ea;
  padding: 3rem 0 1.5rem;
}
.site-footer h6 { color: #fff; font-weight: 700; margin-bottom: 1rem; }
.site-footer a { color: #cfd7ea; }
.site-footer a:hover { color: var(--orange); }
.site-footer hr { border-color: rgba(255,255,255,.1); }

/* ---------------- Misc ---------------- */
.floating-wa {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  z-index: 999;
}
.toast-brand {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--navy);
  color: #fff;
  padding: .9rem 1.6rem;
  border-radius: 30px;
  box-shadow: var(--shadow-soft);
  font-weight: 600;
  z-index: 1000;
  transition: transform .35s ease;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.toast-brand.show { transform: translateX(-50%) translateY(0); }
.toast-brand .ti { color: var(--orange); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
