/* ==========================================================
   Uncodemy Course Page — Fresh Build
   Primary: #FF5421 | Headings: Poppins | Body: Inter
   ========================================================== */

:root {
  --primary: #FF5421;
  --primary-dark: #E8451A;
  --primary-light: #FFF1EC;
  --ink: #1E2130;
  --muted: #6B7280;
  --line: #ECEEF1;
  --bg: #F7F7F9;
  --white: #FFFFFF;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px rgba(30, 33, 48, 0.06);
  --shadow-lg: 0 12px 32px rgba(30, 33, 48, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  animation: pageFadeIn 0.5s ease;
}

h1, h2, h3, h4 {
  font-family: 'Poppins', sans-serif;
  color: var(--ink);
  line-height: 1.3;
}

a { text-decoration: none; color: inherit; }

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

/* ---------- Topbar ---------- */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo img { height: 36px; display: block; }
.back-to-course-btn {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  padding: 9px 18px;
  border-radius: 999px;
  transition: all .2s ease;
}
.back-to-course-btn:hover { background: var(--primary); color: var(--white); }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  max-width: 1500px;
  margin: 0 auto;
  padding: 16px 28px 0;
  font-size: 13.5px;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 8px; }
.breadcrumb .current { color: var(--primary); font-weight: 600; }

/* ---------- Page layout ---------- */
.page-container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 20px 20px 60px;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

/* ---------- Left sidebar ---------- */
.left-sidebar {
  position: sticky;
  top: 84px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 16px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
}
.left-sidebar h4 {
  margin: 0 8px 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.mobile-sidebar-toggle {
  display: none;
  width: 100%;
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.topic-links { display: flex; flex-direction: column; gap: 4px; }
.topic-link {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
  transition: all .15s ease;
}
.topic-link:hover { background: var(--primary-light); color: var(--primary); }
.topic-link.active {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(255, 84, 33, .28);
}

/* ---------- Main content ---------- */
.main-content { min-width: 0; }
.content-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 40px;
}
.content-card h1 { font-size: 30px; margin: 0 0 6px; }
.content-card .subtitle { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.content-card h2 { font-size: 21px; margin: 28px 0 12px; }
.content-card p { font-size: 15.5px; line-height: 1.75; color: #3A3D4A; }
.content-card ul, .content-card ol { font-size: 15.5px; line-height: 1.75; color: #3A3D4A; padding-left: 22px; }
.content-card li { margin-bottom: 6px; }
.content-card code {
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 14px;
}
.content-card pre {
  background: #1E2130;
  color: #E8EAF0;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
}
.content-card pre code { background: none; color: inherit; padding: 0; }
.highlight-box {
  margin-top: 24px;
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  color: #4A3225;
}

/* ---------- Prev/Next ---------- */
.prev-next-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}
.prev-link, .next-link {
  flex: 1;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 14px 18px;
  transition: all .18s ease;
}
.next-link { text-align: right; }
.prev-link:hover, .next-link:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.prev-next-nav .label { display: block; font-size: 12px; color: var(--primary); font-weight: 600; margin-bottom: 4px; }
.prev-next-nav .title { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.prev-next-nav > span:empty { flex: 1; }

/* ---------- CTA box ---------- */
.cta-box {
  margin-top: 20px;
  background: linear-gradient(135deg, var(--primary), #FF7A50);
  border-radius: var(--radius);
  padding: 28px 32px;
  color: var(--white);
  text-align: center;
}
.cta-box h3 { color: var(--white); margin: 0 0 6px; font-size: 20px; }
.cta-box p { color: rgba(255,255,255,.9); margin: 0 0 18px; }
.cta-btn {
  display: inline-block;
  background: var(--white);
  color: var(--primary);
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 999px;
  transition: transform .18s ease;
}
.cta-btn:hover { transform: scale(1.04); }

/* ---------- Right sidebar ---------- */
.right-sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 104px);
}
.batch-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
}
.badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  animation: floaty 2.6s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.batch-card h4 { margin: 14px 0 2px; font-size: 19px; }
.course-name { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.batch-meta { font-size: 13.5px; color: #4A4D58; margin-bottom: 4px; }

.countdown-wrap { margin: 16px 0 6px; }
.countdown-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.countdown-timer { display: flex; gap: 8px; }
.countdown-timer .unit {
  flex: 1;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  text-align: center;
  padding: 8px 0;
}
.countdown-timer .num { font-family: 'Poppins', sans-serif; font-weight: 700; color: var(--primary); font-size: 18px; }
.countdown-timer .lbl { font-size: 10px; color: var(--muted); text-transform: uppercase; }

.feature-list { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 8px; }
.feature-list li {
  font-size: 13.5px;
  color: #3A3D4A;
  padding-left: 22px;
  position: relative;
}
.feature-list li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--primary); font-weight: 700;
}

.limited-seats {
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary-dark);
  background: #FFE9DE;
  border-radius: 999px;
  padding: 6px 10px;
  margin-bottom: 12px;
}

.landing-cta-btn {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  border: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  padding: 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255,84,33,.3);
  transition: all .2s ease;
}
.landing-cta-btn:hover { background: var(--primary-dark); transform: scale(1.02); }

.help-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.help-card h4 { margin: 0 0 12px; font-size: 15px; }
.help-row { font-size: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.help-row a { color: var(--ink); font-weight: 500; }
.help-row a:hover { color: var(--primary); }

/* ---------- Footer ---------- */
footer {
  background: var(--white);
  border-top: 1px solid var(--line);
  margin-top: 30px;
}
.footer-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13.5px;
  color: var(--muted);
}
.footer-inner a { color: var(--primary); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .page-container { grid-template-columns: 240px minmax(0, 1fr); }
  .right-sidebar { grid-column: 1 / -1; position: static; max-height: none; flex-direction: row; flex-wrap: wrap; }
  .right-sidebar .batch-card, .right-sidebar .help-card { flex: 1; min-width: 260px; }
}

@media (max-width: 860px) {
  .page-container { grid-template-columns: 1fr; padding: 14px 14px 40px; }
  .left-sidebar {
    position: static;
    max-height: none;
  }
  .topic-links { display: none; }
  .topic-links.open { display: flex; }
  .mobile-sidebar-toggle { display: block; }
  .content-card { padding: 24px 20px; }
  .right-sidebar { flex-direction: column; }
  .prev-next-nav { flex-direction: column; }
  .next-link { text-align: left; }
}
