*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f0f4f8;
  color: #1a202c;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
header {
  background-color: #1e3a5f;
  color: #fff;
  padding: 2rem 1.5rem;
  text-align: center;
}
header .module-tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: #a8c4e0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
header h1 { font-size: 2rem; }
header p  { margin-top: 0.4rem; font-size: 1rem; color: #a8c4e0; }

/* ── Breadcrumb ── */
.breadcrumb {
  max-width: 1000px;
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
  font-size: 0.9rem;
  color: #4a5568;
}
.breadcrumb a { color: #1e3a5f; text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 0.4rem; }

/* ── Layout ── */
.page-body {
  flex: 1;
  max-width: 1000px;
  width: 100%;
  margin: 2rem auto 3rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
}

/* ── Sidebar ── */
.sidebar {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  position: sticky;
  top: 1.5rem;
}
.sidebar h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #718096;
  margin-bottom: 0.75rem;
}
.sidebar a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.88rem;
  color: #2d3748;
  transition: background 0.15s;
}
.sidebar a:hover { background: #ebf4ff; color: #1e3a5f; }
.sidebar a.active { background: #1e3a5f; color: #fff; font-weight: 600; }
.sidebar .num {
  background: #e2e8f0;
  color: #4a5568;
  font-size: 0.75rem;
  font-weight: 700;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar a.active .num { background: rgba(255,255,255,0.25); color: #fff; }

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

.section-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #718096;
  margin-bottom: 1.25rem;
}

/* ── Lesson card ── */
.lesson {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  margin-bottom: 2rem;
  overflow: hidden;
}

.lesson-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.lesson-num {
  background: #1e3a5f;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lesson-header h2 { font-size: 1.1rem; color: #1e3a5f; }

/* ── Video embed ── */
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
}
.video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ── Lesson body ── */
.lesson-body { padding: 1.25rem 1.5rem; }

.lesson-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.yt-link, .pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.yt-link {
  background: #fff1f1;
  color: #c53030;
  border: 1px solid #fed7d7;
}
.yt-link:hover { background: #c53030; color: #fff; }

.pdf-link {
  background: #ebf4ff;
  color: #1e3a5f;
  border: 1px solid #bee3f8;
}
.pdf-link:hover { background: #1e3a5f; color: #fff; }

.yt-link svg, .pdf-link svg { flex-shrink: 0; }

.lesson-body h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #718096;
  margin-bottom: 0.6rem;
}
.lesson-body ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.lesson-body ul li {
  font-size: 0.92rem;
  color: #2d3748;
  line-height: 1.55;
  padding-left: 1.1rem;
  position: relative;
}
.lesson-body ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: #1e3a5f;
  font-weight: 700;
}

/* ── Module nav ── */
.module-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}
.module-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  background: #fff;
  border: 2px solid #1e3a5f;
  border-radius: 8px;
  color: #1e3a5f;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.module-nav a:hover { background: #1e3a5f; color: #fff; }
.module-nav .spacer { flex: 1; }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: #718096;
  border-top: 1px solid #e2e8f0;
}

/* ── Responsive ── */
@media (max-width: 680px) {
  .page-body { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
