/* =========================================================
   Uncodemy Course Content Pages — Stylesheet
   Primary: #FF5421 | Headings: Poppins | Body: Inter
   ========================================================= */

:root {
  --primary: #FF5421;
  --primary-dark: #E8451A;
  --primary-light: #FFF1EC;
  --primary-soft: #FFE3D8;
  --text-dark: #1F2430;
  --text-body: #4B5163;
  --text-muted: #8A8F9C;
  --bg-page: #FAFAFA;
  --white: #FFFFFF;
  --border-soft: #EFEFF2;
  --shadow-sm: 0 2px 8px rgba(31, 36, 48, 0.06);
  --shadow-md: 0 8px 24px rgba(31, 36, 48, 0.08);
  --shadow-lg: 0 16px 40px rgba(255, 84, 33, 0.14);
  --radius-md: 14px;
  --radius-lg: 20px;
  --max-width: 1360px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text-body);
  background: var(--bg-page);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
  margin: 0 0 0.6em 0;
  line-height: 1.3;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { padding-left: 1.2em; }

/* ---------- Fade in on load ---------- */
.fade-in {
  animation: fadeIn 0.6s ease both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Top Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo img {
  height: 38px;
  width: auto;
}
.back-to-course-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--primary-soft);
  transition: all 0.25s ease;
  white-space: nowrap;
}
.back-to-course-btn:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px 0 24px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.breadcrumb-bar a { color: var(--primary); font-weight: 600; }
.breadcrumb-bar span.sep { margin: 0 6px; color: #C9CCD3; }

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

/* ---------- Left Sidebar ---------- */
.left-sidebar {
  position: sticky;
  top: 84px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  max-height: calc(100vh - 190px);
  overflow-y: auto;
}
.sidebar-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 4px 10px 12px 10px;
}
.topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.topic-list li a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  color: var(--text-body);
  font-weight: 500;
  transition: all 0.2s ease;
}
.topic-list li a:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.topic-list li a.active {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ---------- Main Content ---------- */
.main-content { min-width: 0; }

.content-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 34px 38px;
  border-top: 4px solid var(--primary);
}
.content-card h1 {
  font-size: 1.9rem;
}
.content-card h2 {
  font-size: 1.3rem;
  margin-top: 1.4em;
}
.content-card p { margin: 0 0 1em 0; }
.content-card ul { margin: 0 0 1.2em 0; }
.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: 0.9em;
}
.content-card pre {
  background: #1F2430;
  color: #F4F4F5;
  padding: 16px 18px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.88rem;
  margin: 0 0 1.2em 0;
}
.content-card pre code { background: none; color: inherit; padding: 0; }

.highlight-note {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 1.4em 0;
  font-size: 0.94rem;
  color: var(--text-dark);
}

/* ---------- Prev / Next ---------- */
.prev-next-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
}
.nav-btn {
  flex: 1;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 14px 18px;
  font-size: 0.88rem;
  transition: all 0.2s ease;
  border: 1px solid var(--border-soft);
}
.nav-btn:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.nav-btn .nav-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.nav-btn .nav-topic {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}
.nav-btn.next { text-align: right; }
.nav-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ---------- CTA Box (bottom of content) ---------- */
.course-cta-box {
  margin-top: 28px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 30px 34px;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}
.course-cta-box h3 { color: var(--white); margin-bottom: 6px; }
.course-cta-box p { color: rgba(255,255,255,0.9); margin: 0; }
.cta-btn-white {
  background: var(--white);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 13px 26px;
  border-radius: 999px;
  white-space: nowrap;
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}
.cta-btn-white:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 10px 24px rgba(0,0,0,0.18); }

/* ---------- Right Sidebar ---------- */
.right-sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 190px);
  overflow-y: auto;
}

.batch-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.batch-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  animation: floatY 3s ease-in-out infinite;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.batch-card h4 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.batch-meta {
  font-size: 0.86rem;
  color: var(--text-body);
  margin: 10px 0;
}
.batch-meta div { margin-bottom: 6px; }
.batch-meta b { color: var(--text-dark); }

.countdown-wrap {
  background: var(--primary-light);
  border-radius: 12px;
  padding: 14px;
  margin: 14px 0;
  text-align: center;
}
.countdown-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-dark);
  font-weight: 700;
  margin-bottom: 8px;
}
.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.countdown-unit {
  background: var(--white);
  border-radius: 8px;
  padding: 8px 6px;
  min-width: 44px;
  box-shadow: var(--shadow-sm);
}
.countdown-unit .num {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  display: block;
}
.countdown-unit .lbl {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.batch-features {
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.batch-features li {
  font-size: 0.86rem;
  color: var(--text-body);
  display: flex;
  align-items: center;
  gap: 8px;
}
.batch-features li::before {
  content: "✓";
  color: var(--primary);
  font-weight: 700;
}

.limited-seats-badge {
  display: block;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 8px;
  padding: 6px;
  margin-bottom: 10px;
}

.cta-full-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}
.cta-full-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-lg);
  background: var(--primary-dark);
}

.help-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px 22px;
}
.help-card h4 {
  font-size: 0.98rem;
  margin-bottom: 12px;
}
.help-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  padding: 10px 0;
  border-top: 1px solid var(--border-soft);
}
.help-row:first-of-type { border-top: none; padding-top: 0; }
.help-row a { color: var(--primary-dark); font-weight: 600; }
.help-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}
.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25D366;
  color: var(--white);
  font-weight: 600;
  font-size: 0.84rem;
  padding: 9px 14px;
  border-radius: 999px;
  margin-top: 10px;
  width: 100%;
  justify-content: center;
  transition: all 0.2s ease;
}
.whatsapp-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--border-soft);
  padding: 26px 24px;
  text-align: center;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.site-footer a { color: var(--primary); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .page-container {
    grid-template-columns: 230px 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 1 280px;
  }
}

@media (max-width: 860px) {
  .page-container {
    grid-template-columns: 1fr;
  }
  .left-sidebar {
    position: static;
    max-height: none;
    order: 2;
  }
  .main-content { order: 1; }
  .right-sidebar { order: 3; }
  .content-card { padding: 26px 22px; }
}

@media (max-width: 560px) {
  .header-inner { flex-wrap: wrap; }
  .content-card h1 { font-size: 1.5rem; }
  .course-cta-box { flex-direction: column; text-align: center; }
  .prev-next-nav { flex-direction: column; }
  .right-sidebar { flex-direction: column; }
  .right-sidebar .batch-card, .right-sidebar .help-card { flex: 1 1 100%; }
  .countdown-unit { min-width: 38px; padding: 6px 4px; }
}

/* ---------- Sidebar Category Headings ---------- */
.topic-list li.topic-category {
  margin-top: 14px;
  padding: 4px 10px 2px 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-dark);
}
.topic-list li.topic-category:first-child {
  margin-top: 0;
}
