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

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

:root {
  --primary: #FF5421;
  --primary-dark: #E2431A;
  --primary-light: #FFEDE6;
  --ink: #1E1B2E;
  --ink-soft: #5C5A6E;
  --border: #ECEAF3;
  --bg: #F7F7FB;
  --white: #FFFFFF;
  --shadow-sm: 0 2px 10px rgba(30, 27, 46, 0.06);
  --shadow-md: 0 10px 30px rgba(30, 27, 46, 0.08);
  --shadow-lg: 0 20px 45px rgba(255, 84, 33, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --font-head: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --container-max: 1440px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

img { max-width: 100%; display: block; }

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

h1, h2, h3, h4 { font-family: var(--font-head); margin: 0 0 14px; color: var(--ink); }

p { line-height: 1.75; color: var(--ink-soft); margin: 0 0 16px; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo img { height: 38px; width: auto; }

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-back:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 18px 32px 0;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
}

.breadcrumb a { color: var(--primary); font-weight: 600; }
.breadcrumb .sep { margin: 0 6px; color: #C9C7D6; }

/* ---------- Layout ---------- */
.page-shell {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 22px 32px 64px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

/* ---------- Left sidebar ---------- */
.sidebar-left {
  position: sticky;
  top: 90px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

.sidebar-left h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.topic-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

.topic-nav li a {
  display: block;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  transition: all 0.2s ease;
  line-height: 1.4;
}

.topic-nav li a:hover { background: var(--primary-light); color: var(--primary-dark); }

.topic-nav li a.active {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
}

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

.content-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px 44px;
  border-top: 4px solid var(--primary);
}

.content-card h1 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 18px;
}

.content-card h2 {
  font-size: 20px;
  font-weight: 600;
  margin-top: 30px;
}

.content-card ul { margin: 0 0 16px; padding-left: 20px; color: var(--ink-soft); }
.content-card li { margin-bottom: 8px; line-height: 1.7; }

/* CTA box at bottom of article */
.cta-box {
  margin-top: 36px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-md);
  padding: 30px 32px;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cta-box h3 { color: var(--white); margin: 0 0 6px; font-size: 19px; }
.cta-box p { color: rgba(255,255,255,0.9); margin: 0; font-size: 14px; }

.cta-box .btn-cta {
  background: var(--white);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-box .btn-cta:hover { transform: scale(1.05); box-shadow: 0 8px 20px rgba(0,0,0,0.18); }

/* Prev / Next nav */
.pagination-nav {
  margin-top: 26px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.pagination-nav a {
  flex: 1;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.pagination-nav a:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.pagination-nav .label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 4px; }
.pagination-nav .title { font-size: 14px; font-weight: 600; color: var(--ink); }
.pagination-nav .next { text-align: right; }
.pagination-nav .disabled { opacity: 0.4; pointer-events: none; }

/* ---------- Right sidebar ---------- */
.sidebar-right {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.batch-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 22px;
  border: 1px solid var(--border);
  animation: floatCard 4.5s ease-in-out infinite;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.batch-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.batch-card h3 { font-size: 17px; margin-bottom: 4px; }
.batch-card .course-name { font-weight: 700; color: var(--primary); font-size: 15px; margin-bottom: 14px; }

.batch-meta { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.batch-meta li { font-size: 13px; color: var(--ink-soft); display: flex; justify-content: space-between; }
.batch-meta li span:last-child { color: var(--ink); font-weight: 600; }

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.countdown .unit {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 10px 4px;
  text-align: center;
}

.countdown .num { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--primary); display: block; }
.countdown .lbl { font-size: 10px; text-transform: uppercase; color: var(--ink-soft); letter-spacing: 0.04em; }

.perks { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.perks li { font-size: 13px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.perks li::before { content: "✓"; color: var(--primary); font-weight: 700; }

.seats-badge {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 7px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.btn-landing {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  padding: 14px;
  border: none;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-landing:hover { transform: scale(1.03); box-shadow: 0 14px 34px rgba(255, 84, 33, 0.28); }

.help-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px;
  border: 1px solid var(--border);
}

.help-card h4 { font-size: 14px; margin-bottom: 12px; }

.help-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  transition: background 0.2s ease;
}

.help-row:hover { background: var(--primary-light); }
.help-row:last-child { margin-bottom: 0; }
.help-row .icon { font-size: 16px; }

/* ---------- Footer ---------- */
footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
}

.footer-inner a { color: var(--primary); font-weight: 600; }

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

@media (max-width: 860px) {
  .page-shell { grid-template-columns: 1fr; }
  .sidebar-left {
    position: static;
    max-height: none;
  }
  .content-card { padding: 28px 24px; }
}

@media (max-width: 520px) {
  .topbar-inner { padding: 12px 16px; }
  .breadcrumb { padding: 14px 16px 0; }
  .page-shell { padding: 16px 16px 40px; gap: 18px; }
  .content-card { padding: 22px 18px; }
  .content-card h1 { font-size: 24px; }
  .cta-box { flex-direction: column; align-items: flex-start; }
  .cta-box .btn-cta { width: 100%; text-align: center; }
  .pagination-nav { flex-direction: column; }
  .sidebar-right { flex-direction: column; }
  .footer-inner { flex-direction: column; text-align: center; }
}
