/* =========================================================
   Uncodemy — Jira Course Content Pages
   Shared stylesheet
   ========================================================= */

:root {
  --primary: #FF5421;
  --primary-dark: #E5451A;
  --primary-light: #FFE9E0;
  --ink: #1F2430;
  --muted: #6B7280;
  --line: #EDEDF2;
  --card-bg: #FFFFFF;
  --bg: #F7F7FA;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(31, 36, 48, 0.06);
  --shadow-md: 0 8px 24px rgba(31, 36, 48, 0.08);
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { 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 both;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  margin: 0 0 12px;
  line-height: 1.25;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top bar ---------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1440px;
  margin: 0 auto;
}
.logo img { height: 36px; }
.back-to-course {
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.back-to-course:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  max-width: 1440px;
  margin: 18px auto 0;
  padding: 0 24px;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb .sep { margin: 0 6px; color: #C9CCD4; }
.breadcrumb .current { color: var(--primary); font-weight: 600; }

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

/* ---------- Sidebar (left) ---------- */
.sidebar-left {
  position: sticky;
  top: 90px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.sidebar-left h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 14px;
  padding: 0 6px;
}
.sidebar-left ul { list-style: none; margin: 0; padding: 0; }
.sidebar-left li { margin-bottom: 4px; }
.sidebar-left a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease;
}
.sidebar-left a:hover { background: var(--primary-light); color: var(--primary-dark); }
.sidebar-left a.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

/* ---------- Main content ---------- */
.content {
  min-width: 0;
}
.content-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 36px 40px;
}
.content-card h1 {
  font-size: 30px;
  color: var(--ink);
}
.content-card .kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.content-card p { color: #3A3F4B; line-height: 1.75; margin: 0 0 16px; }
.content-card h2 {
  font-size: 20px;
  margin-top: 28px;
  color: var(--ink);
}
.content-card ul.styled-list { margin: 0 0 16px; padding-left: 20px; color: #3A3F4B; line-height: 1.8; }
.content-card ul.styled-list li::marker { color: var(--primary); }

/* Prev / Next nav */
.pagination-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}
.pagination-nav a {
  flex: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 14px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.pagination-nav a:hover { border-color: var(--primary); transform: translateY(-2px); }
.pagination-nav .label { display: block; font-size: 11px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; letter-spacing: 0.05em; }
.pagination-nav .next { text-align: right; }
.pagination-nav .disabled { opacity: 0.4; pointer-events: none; }

/* CTA box */
.cta-box {
  margin-top: 28px;
  background: linear-gradient(135deg, var(--primary), #FF7A50);
  border-radius: var(--radius);
  padding: 28px 32px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}
.cta-box h3 { margin: 0 0 6px; font-size: 20px; }
.cta-box p { margin: 0; color: rgba(255,255,255,0.9); font-size: 14px; }
.cta-box .cta-btn {
  background: #fff;
  color: var(--primary-dark);
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.2s ease;
}
.cta-box .cta-btn:hover { transform: translateY(-2px) scale(1.03); }

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

.batch-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.batch-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary-light);
  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: 16px;
  margin-bottom: 4px;
}
.batch-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}
.batch-meta strong { color: var(--ink); }

.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-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
  display: block;
}
.countdown .lbl {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.feature-list { list-style: none; margin: 0 0 4px; padding: 0; font-size: 13px; color: #3A3F4B; }
.feature-list li { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.feature-list li::before {
  content: "✓";
  color: var(--primary);
  font-weight: 700;
}

.limited-badge {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.full-cta-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, background 0.2s ease;
}
.full-cta-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px) scale(1.02);
}

.help-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
}
.help-card h4 { font-size: 15px; margin-bottom: 10px; }
.help-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.help-row:first-of-type { border-top: none; }
.help-row a { color: var(--ink); font-weight: 500; }
.help-row a:hover { color: var(--primary); }

/* ---------- Footer ---------- */
footer {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
footer a { color: var(--primary); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .layout { grid-template-columns: 240px 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: 820px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar-left {
    position: static;
    max-height: none;
    order: 2;
  }
  .content { order: 1; }
  .sidebar-right { order: 3; position: static; flex-direction: column; }
  .content-card { padding: 26px 22px; }
}

@media (max-width: 520px) {
  .topbar-inner { padding: 12px 16px; }
  .logo img { height: 28px; }
  .back-to-course { padding: 8px 14px; font-size: 13px; }
  .content-card h1 { font-size: 24px; }
  .cta-box { flex-direction: column; align-items: flex-start; }
  .pagination-nav { flex-direction: column; }
  .countdown { grid-template-columns: repeat(4, 1fr); }
}

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

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--primary-dark);
  outline-offset: 2px;
}
