
/* -------- Biến màu & nền cơ bản -------- */
:root {
  --bg: #f7fdfb;
  --text: #0f172a;
  --muted: #475569;
  --card: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 8px 24px rgba(2, 6, 23, 0.08);
  --primary: #0f766e;       /* darker teal for readable contrast */
  --primary-600: #0b5f59;
  --accent: #22c55e;
  --note-bg: #eafdf5;
  --warn-bg: #fff7ed;
  --warn-border: #f59e0b;
  --tip-bg: #eef6ff;
  --tip-border: #3b82f6;
  --code-bg: #0b1220;
  --code-text: #e5e7eb;
}

body,
.hero-band__text,
.subject-card,
.lesson-content,
.lesson-content :is(h1, h2, h3, h4, p, li, th, td, a, button, span, strong, em) {
  font-family: "Baloo 2", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

/* Reset nhỏ cho tính nhất quán */
* { box-sizing: border-box; }
img { max-width: 100%; height: auto; }

/* Container kế thừa từ site, chỉ tinh chỉnh spacing cho bài học */
.container { width: min(1100px, 92%); margin: 0 auto; }

/* -------- Hero cho trang BÀI HỌC (không ảnh hưởng trang chủ) -------- */
.hero .container h1 {
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: .2px;
}
.hero .container p {
  margin: 6px 0 0;
  color: var(--muted);
}

/* -------- Khối nội dung chính của BÀI HỌC -------- */
.lesson-content {
  background: var(--card);
  color: var(--text);
  max-width: 900px;
  margin: 24px auto 88px;
  padding: 28px 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  line-height: 1.8;
}

/* Tiêu đề cấp 2/3/4 trong bài học */
.lesson-content h2 {
  color: var(--primary-600);
  font-size: 1.6rem;
  margin: 28px 0 12px;
  padding-left: 12px;
  border-left: 5px solid var(--primary);
  line-height: 1.35;
}
.lesson-content h3 {
  font-size: 1.25rem;
  margin: 22px 0 8px;
  color: var(--text);
}
.lesson-content h4 {
  font-size: 1.05rem;
  margin: 16px 0 6px;
  color: var(--text);
}

/* Đoạn văn, danh sách */
.lesson-content p { margin: 12px 0; font-size: 1.05rem; }
.lesson-content ul, .lesson-content ol { margin: 12px 0 18px 22px; }
.lesson-content li { margin: 6px 0; }
.lesson-content li::marker { color: var(--accent); }

/* Liên kết trong nội dung */
.lesson-content a { color: var(--primary-600); text-decoration: none; }
.lesson-content a:hover { text-decoration: underline; }

/* Hộp ghi chú/chú ý/mẹo */
.note, .warning, .tip {
  border-radius: 12px;
  padding: 14px 16px;
  margin: 18px 0;
  border: 1px solid var(--border);
  box-shadow: 0 3px 10px rgba(2,6,23,.05);
}
.note { background: var(--note-bg); border-left: 5px solid var(--primary); color: #155e4d; font-weight: 500; }
.warning { background: var(--warn-bg); border-left: 5px solid var(--warn-border); color: #7c4a03; }
.tip { background: var(--tip-bg); border-left: 5px solid var(--tip-border); color: #0f3f91; }

/* Định nghĩa/thuật ngữ, ví dụ, trích dẫn */
.definition, .example, blockquote {
  background: #f8fafc !important;
  border: 1px dashed var(--border) !important;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 16px 0;
  color: #0f172a !important;
}
blockquote { font-style: italic; color: var(--muted) !important; border-left: 5px solid var(--border) !important; }
.definition :is(p, li, span, strong, em),
.example :is(p, li, span, strong, em),
blockquote :is(p, li, span, strong, em) {
  color: #0f172a !important;
}

.term { font-weight: 700; color: var(--primary-600); }

/* Hình minh hoạ & phụ đề */
.figure { margin: 18px 0; }
.figure img {
  display: block;
  margin: 10px auto;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(2,6,23,.12);
}
.caption {
  text-align: center;
  font-size: 0.95rem;
  color: #666;
  margin-top: 8px;
  font-style: italic;
}

/* Bảng dữ liệu */
.lesson-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 18px;
  font-size: 0.98rem;
}
.lesson-content th, .lesson-content td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  color: #0f172a !important;
}
.lesson-content thead th {
  background: #f1f5f9 !important;
  text-align: left;
  color: #0f172a !important;
}
.lesson-content tbody tr:nth-child(odd) { background: #fafafa !important; }
.lesson-content tbody tr:nth-child(even) { background: #ffffff !important; }
.lesson-content table :is(strong, em, span) { color: #0f172a !important; }

/* Danh sách thẻ bài (nếu trang có card bài học) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 18px 0;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(2,6,23,.12);
}
.card .title { font-weight: 800; margin: 2px 0 8px; }
.card .desc  { color: var(--muted); font-size: .95rem; margin: 0; }
.card .btn {
  margin-top: 12px;
  display: inline-block; text-decoration: none;
  background: var(--primary); color: #fff;
  padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px;
}
.card .btn:hover { background: var(--primary-600); }

/* Code/monospace nhỏ (nếu cần) */
code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 14px 16px;
  border-radius: 12px;
  overflow: auto;
}

/* -------- Responsive -------- */
@media (max-width: 768px) {
  .lesson-content { padding: 18px 16px; margin: 18px auto 72px; }
  .lesson-content h2 { font-size: 1.35rem; }
  .card-grid { grid-template-columns: 1fr; }
}

/* -------- Dark Mode -------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --text: #e5e7eb;
    --muted: #cbd5e1;
    --card: #0f172a;
    --border: #1e293b;
    --shadow: 0 10px 28px rgba(0,0,0,.35);
  }
  .lesson-content tbody tr:nth-child(odd) { background: #fafafa; }
  .definition, .example, blockquote { background: #f8fafc; }
}

/* -------- In ấn (print) -------- */
@media print {
  body { background: #fff; }
  .lesson-content {
    box-shadow: none;
    border: 1px solid #ddd;
    margin: 0;
    max-width: 100%;
  }
  .card-grid, .card, .btn { display: none !important; } /* Ẩn các phần không cần in */
}

/* (Không có bất kỳ CSS nào cho Earth 3D hoặc #earthCanvas ở đây) */

/* ====== ĐỀ BÀI (box nổi bật) ====== */
.de-bai {
  background: var(--note-bg);
  border: 1px solid var(--border);
  border-left: 6px solid var(--primary);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 6px 18px rgba(2,6,23,.06);
  margin: 18px 0 22px;
}
.de-bai__title{
  font-weight: 800;
  letter-spacing: .2px;
  margin: 0 0 6px;
  color: var(--primary-600);
}
.de-bai p{ margin: 6px 0; }

/* ====== TỰ ĐÁNH SỐ I, II, III… CHO H2; 1,2,3… cho H3 ====== */
.lesson-content { counter-reset: sec; }
.lesson-content h2 {
  position: relative;
  padding-left: 54px;          /* chừa chỗ cho nhãn La Mã */
  scroll-margin-top: 90px;
}
.lesson-content h2::before{
  counter-increment: sec;
  content: counter(sec, upper-roman) ".";
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--text);
  background: linear-gradient(180deg, #a7f3d0, #6ee7b7);
  border: 1px solid var(--border);
  width: 34px; height: 34px; line-height: 34px;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(2,6,23,.10);
}

.lesson-content h2 { counter-reset: sub; }
.lesson-content h3{
  position: relative;
  padding-left: 42px;
  margin-top: 18px;
}
.lesson-content h3::before{
  counter-increment: sub;
  content: counter(sub) ".";
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  width: 26px; height: 26px; line-height: 26px;
  text-align: center;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--text);
}

@media (max-width: 768px){
  .lesson-content h2{ padding-left: 48px; }
  .lesson-content h2::before{ left: 10px; }
  .lesson-content h3{ padding-left: 38px; }
  .lesson-content h3::before{ left: 8px; }
}


/* ===== Centered lesson title + optional background pill ===== */
.hero.hero-small .container { text-align: center; }
.hero.hero-small h1 { margin: 0 auto 8px; }

/* Use on the H1: class="lesson-title" (base) + add "lesson-title--pill" to fill background */
.lesson-title {
  display: inline-block;
  font-weight: 800;
  line-height: 1.25;
  border-radius: 16px;
  padding: 8px 16px;
}
.lesson-title--pill {
  background: linear-gradient(180deg, #d1fae5 0%, #a7f3d0 100%); /* soft mint */
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(16,185,129, .25);
}

@media (prefers-color-scheme: dark) {
  .lesson-title--pill {
    background: linear-gradient(180deg, #064e3b 0%, #065f46 100%);
    border-color: #064e3b;
  }
}


/* ==== Override: tăng khoảng cách TRƯỚC FOOTER cho trang bài ==== */
:root { --content-bottom: 140px; }           /* desktop */
@media (max-width: 768px){ :root { --content-bottom: 120px; } }  /* mobile */


/* === Overrides 2025-10-23: UX tweaks per request === */

/* 1) Bỏ nền "Đề bài" */
.de-bai{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.de-bai__title{
  background: transparent !important;
}

/* 2) Thêm khoảng cách giữa menu cố định và phần tiêu đề/nội dung */
#menu-placeholder + .hero{
  margin-top: clamp(64px, 7vw, 96px);
}
/* Nếu không dùng .hero, đẩy nhẹ phần nội dung đầu tiên */
#menu-placeholder + main,
#menu-placeholder + .container{
  margin-top: clamp(40px, 5vw, 72px);
}

/* Khi cuộn tới tiêu đề có anchor, tránh bị che bởi menu cố định */
.lesson-content [id]{
  scroll-margin-top: 96px;
}
@media (max-width: 768px){
  .lesson-content [id]{ scroll-margin-top: 80px; }
}


/* === Modern refresh (minimal / outline) === */

/* Title pill: remove solid mint background & heavy glow */
.lesson-title--pill{
  background: rgba(26,178,147,0.06) !important; /* subtle tint; set to transparent if you want fully outline */
  border: 1px solid rgba(26,178,147,0.22) !important;
  box-shadow: 0 1px 2px rgba(2,6,23,.04), 0 8px 24px rgba(2,6,23,.08) !important;
  -webkit-backdrop-filter: saturate(140%) blur(6px);
  backdrop-filter: saturate(140%) blur(6px);
}

/* Section heading: move to outline badge + no left border */
.lesson-content h2{
  color: var(--text) !important;
  border-left: none !important;
  padding-left: clamp(44px, 6vw, 52px) !important;
  position: relative;
}
h2::before{
  width: 28px !important;
  height: 28px !important;
  line-height: 28px !important;
  font-size: 1rem !important;
  color: var(--primary-600) !important;
  background: transparent !important;
  border: 1px solid rgba(26,178,147,.30) !important;
  box-shadow: 0 0 0 4px rgba(26,178,147,.08) !important;
  border-radius: 8px !important;
  left: 8px !important;
}

/* Lesson card: softer shadow & border */
.lesson-content{
  border: 1px solid var(--border) !important;
  box-shadow: 0 8px 24px rgba(2,6,23,.06) !important;
  border-radius: 18px !important;
}

/* Earth box: remove neon glow; use neutral card look */
.earth-box{
  border: 1px solid var(--border) !important;
  box-shadow: 0 6px 22px rgba(2,6,23,.08) !important;
  border-radius: 18px !important;
}


/* === No background for lesson title pill === */
.lesson-title--pill{
  background: transparent !important;
  background-color: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border: 1px solid rgba(26,178,147,.28) !important; /* giữ viền mảnh */
  box-shadow: 0 1px 2px rgba(2,6,23,.04) !important; /* shadow rất nhẹ */
}


/* === No border for lesson title pill === */
.lesson-title--pill{
  border: none !important;
  box-shadow: none !important;
}


/* === Match H2 title color to badge (I.) === */
.lesson-content h2{
  color: var(--primary-600) !important;
}


/* === Use --primary for H2 & badge numeral === */
.lesson-content h2{
  color: var(--primary) !important;
}
h2::before{
  color: var(--primary) !important;
  border-color: rgba(26,178,147,.30) !important; /* keep outline consistent */
  box-shadow: 0 0 0 4px rgba(26,178,147,.08) !important;
}

.hero {
  background: linear-gradient(180deg, #eafdf5, #ffffff);
  text-align: center;
  padding: 100px 20px 60px;
  animation: fadeIn 1s ease-in-out;
}

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

.subject-list {
  background-color: #f4fffb;
  padding: 60px 20px 12px;
  text-align: center;
}

.subject-list::after {
  display: none;
}

.subject-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.subject-card {
  background: #ffffff;
  border: 1.5px solid #c8f3e5;
  border-radius: 16px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
  width: 260px;
  padding: 24px;
  transition: 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 260px;
}

.subject-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.subject-card h2 {
  color: #0f766e;
  font-size: 22px;
  margin-bottom: 8px;
}

.subject-card p {
  color: #555;
  font-size: 15px;
  margin-bottom: 14px;
}

.subject-card .btn {
  display: inline-block;
  background: #0f766e;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: 0.3s;
  margin-top: auto;
}

.subject-card .btn:hover {
  background: #0b5f59;
}

/* Nội dung bài học */
.lesson-content {
  background: #fff;
  padding: 40px 20px 80px;
  max-width: 900px;
  margin: 0 auto;
}

.lesson-content h2 {
  color: #0f766e;
  margin-top: 30px;
}

.lesson-content p, 
.lesson-content li {
  color: #333;
  line-height: 1.7;
  margin: 10px 0;
}

body.theme-neon .lesson-content,
body.theme-neon .lesson-content p,
body.theme-neon .lesson-content li,
body.theme-neon .lesson-content td,
body.theme-neon .lesson-content th,
body.theme-neon .lesson-content strong,
body.theme-neon .lesson-content em,
body.theme-neon .lesson-content h2,
body.theme-neon .lesson-content h3,
body.theme-neon .lesson-content h4 {
  color: #0f172a !important;
}

body.theme-neon .lesson-content {
  background: #ffffff !important;
  border-color: var(--border) !important;
}

body.theme-neon .definition,
body.theme-neon .example,
body.theme-neon .note,
body.theme-neon .tip,
body.theme-neon .warning,
body.theme-neon .lesson-content tbody tr:nth-child(odd),
body.theme-neon .lesson-content thead th {
  background: #f8fafc !important;
}

body.theme-neon .note {
  background: var(--note-bg) !important;
  color: #155e4d !important;
}

body.theme-neon .tip {
  background: var(--tip-bg) !important;
  color: #0f3f91 !important;
}

body.theme-neon .warning {
  background: var(--warn-bg) !important;
  color: #7c4a03 !important;
}

body.theme-neon .hero-band--mint {
  background:
    radial-gradient(circle at 18% 10%, rgba(45, 212, 191, 0.16), transparent 26%),
    radial-gradient(circle at 84% 0%, rgba(96, 165, 250, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(9, 27, 41, 0.94) 0%, rgba(11, 31, 45, 0.9) 100%) !important;
}
body.theme-neon .hero-band__text h1,
body.theme-neon .hero-band__text p {
  color: #eaf7ff !important;
}
body.theme-neon .hero-band__back {
  border-color: rgba(103, 232, 249, 0.65) !important;
  color: #8df5ea !important;
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.24) !important;
}

body.theme-neon .subject-list {
  background:
    linear-gradient(180deg, rgba(7, 19, 30, 0.2) 0%, rgba(7, 19, 30, 0.12) 100%),
    #eefdf6 !important;
}

body.theme-neon .subject-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,250,252,0.96)) !important;
  border-color: rgba(103, 232, 249, 0.34) !important;
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(103, 232, 249, 0.1) inset !important;
}

body.theme-neon .subject-card:hover {
  box-shadow:
    0 22px 44px rgba(0, 0, 0, 0.26),
    0 0 0 1px rgba(103, 232, 249, 0.18) inset !important;
}

body.theme-neon .subject-card h2,
body.theme-neon .subject-card h3 {
  color: #0f766e !important;
}

body.theme-neon .subject-card p {
  color: #475569 !important;
}

body.theme-neon .subject-card .btn {
  background: linear-gradient(135deg, #0f766e, #0b5f59) !important;
  box-shadow: 0 12px 22px rgba(15, 118, 110, 0.18);
}

/* ===== Neon alignment for /mon pages ===== */
body.theme-neon .hero.hero-small.hero-band {
  background:
    radial-gradient(circle at 18% 10%, rgba(57, 226, 201, 0.16), transparent 26%),
    radial-gradient(circle at 82% 0%, rgba(96, 165, 250, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(8, 25, 38, 0.96) 0%, rgba(7, 20, 31, 0.92) 100%) !important;
  border-bottom: 1px solid rgba(126, 240, 255, 0.12);
}

body.theme-neon .subject-list {
  background:
    radial-gradient(circle at 12% 0%, rgba(103, 232, 249, 0.08), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(45, 212, 191, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(7, 20, 31, 0.9) 0%, rgba(8, 23, 35, 0.96) 100%) !important;
  border-top: 1px solid rgba(126, 240, 255, 0.08);
}

body.theme-neon .subject-grid {
  gap: 32px;
}

body.theme-neon .subject-card {
  background:
    linear-gradient(180deg, rgba(11, 30, 45, 0.96) 0%, rgba(8, 24, 37, 0.98) 100%) !important;
  border: 1px solid rgba(126, 240, 255, 0.2) !important;
  box-shadow:
    0 20px 42px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(108, 242, 223, 0.04) !important;
  backdrop-filter: blur(10px);
}

body.theme-neon .subject-card:hover {
  transform: translateY(-6px);
  border-color: rgba(108, 242, 223, 0.5) !important;
  box-shadow:
    0 26px 52px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 26px rgba(34, 211, 238, 0.1) !important;
}

body.theme-neon .subject-card h2,
body.theme-neon .subject-card h3 {
  color: #8df5ea !important;
}

body.theme-neon .subject-card p,
body.theme-neon .subject-card .subject-subtitle,
body.theme-neon .subject-card .subject-meta,
body.theme-neon .subject-card small {
  color: rgba(223, 240, 250, 0.84) !important;
}

body.theme-neon .subject-card .btn {
  background: linear-gradient(135deg, #3ee3c8, #1fb7dd) !important;
  color: #052733 !important;
  box-shadow:
    0 14px 28px rgba(31, 183, 221, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

body.theme-neon .subject-card .btn:hover {
  background: linear-gradient(135deg, #6cf2df, #65d9ff) !important;
  color: #04202c !important;
}

body.theme-neon .lesson-content {
  background:
    linear-gradient(180deg, rgba(248, 252, 255, 0.98) 0%, rgba(242, 248, 252, 0.98) 100%) !important;
  border-color: rgba(126, 240, 255, 0.14) !important;
  box-shadow:
    0 20px 46px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(103, 232, 249, 0.05) inset !important;
}

body.theme-neon .hero-band__text h1,
body.theme-neon .hero-band__text p,
body.theme-neon .ktpl-hero-line h1,
body.theme-neon .ktpl-hero-line p {
  color: #ecfeff !important;
}

body.theme-neon .hero-band__back,
body.theme-neon .hero-back-btn {
  border-color: rgba(108, 242, 223, 0.66) !important;
  color: #8df5ea !important;
  box-shadow:
    0 16px 34px rgba(15, 118, 110, 0.28),
    0 0 0 1px rgba(126, 240, 255, 0.08) inset !important;
}

/* Responsive */
@media (max-width: 768px) {
  .subject-grid {
    flex-direction: column;
    align-items: center;
  }

  .subject-card {
    width: 90%;
    max-width: 340px;
  }
}

.hero {
  padding: 60px 20px; 
  min-height: 30vh; 
  text-align: center;
}

.hero h1 {
  font-size: 2rem; 
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1rem;
  color: #444;
}

/* Footer placeholder: no fixed-footer spacing needed */
#footer-placeholder { min-height: 0; }

/* Hero bài học */
.lesson-hero {
  text-align: center;
  padding: 36px 0 24px;
}

.lesson-subtitle {
  margin-top: 8px;
  font-size: 1rem;
  color: #444;
}

/* Breadcrumb */
.lesson-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 10px;
}

.lesson-breadcrumb a {
  color: #0f766e;
  text-decoration: none;
}

.lesson-breadcrumb a:hover {
  text-decoration: underline;
}

/* Nhóm nút quay lại */
.lesson-back-group {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* Nút quay lại nhỏ */
.btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #0f766e;
  background: #fff;
  color: #0f766e;
  font-size: 0.85rem;
  text-decoration: none;
  transition: transform 0.15s ease-out,
              box-shadow 0.15s ease-out,
              background-color 0.15s ease-out,
              border-color 0.15s ease-out;
}

.btn-ghost-sm:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 191, 165, 0.25);
  background-color: #e6fffb;
  border-color: #0b5f59;
}
/* ==== Vị trí nút quay lại cho trang bài/chọn bài ==== */

/* Đặt cụm nút trong khối nội dung, sát trên card bài */
.lesson-nav {
  max-width: 960px;
  margin: 0 auto 4px;
  padding: 0 16px;              /* cùng lề với nội dung chính */
}

/* Căn nút về bên trái thay vì giữa */
.lesson-back-group {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;  /* trái */
  gap: 10px;
}

/* Style nút quay lại nhỏ, gọn */
.btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #0f766e;
  background: #ffffff;
  color: #0f766e;
  font-size: 0.85rem;
  text-decoration: none;
  transition: transform 0.15s ease-out,
              box-shadow 0.15s ease-out,
              background-color 0.15s ease-out,
              border-color 0.15s ease-out;
}

.btn-ghost-sm:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 191, 165, 0.25);
  background-color: #e6fffb;
  border-color: #0b5f59;
}
/* ===== HERO CHỌN CHƯƠNG KT&PL ===== */

/* Hero full nền, kéo hết chiều ngang trang */
.hero-chonchuong {
  background: linear-gradient(180deg, #e9fff7 0%, #f7fffb 70%, #f7fbfc 100%);
}

/* Bên trong hero: hàng ngang gồm nút back + text */
.hero-chonchuong-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 16px 28px;
}

/* Cụm text ở giữa vẫn căn giữa theo chiều dọc */
.hero-chonchuong-text {
  text-align: left;
}

.hero-chonchuong-text h1 {
  margin: 0 0 6px;
  font-weight: 800;
  font-size: clamp(26px, 3.3vw, 34px); /* nhỏ hơn chút để ít vỡ dòng */
  line-height: 1.2;
  letter-spacing: 0.2px;
}

.hero-chonchuong-text p {
  margin: 0;
  font-size: 16px;
  color: #3f4a4a;
  opacity: 0.9;
}

/* Nút quay lại hình tròn */
.hero-back-btn {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 3px solid #0f766e;
  background: transparent;
  color: #0f766e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 28px;     /* cho mũi tên to, rõ */
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 191, 165, 0.35);
  transition: transform 0.15s ease-out,
              box-shadow 0.15s ease-out,
              border-color 0.15s ease-out;
}

.hero-back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 191, 165, 0.45);
  border-color: #0b5f59;
}

/* Mobile: text căn giữa cho gọn */
@media (max-width: 600px) {
  .hero-chonchuong-inner {
    flex-direction: row;
    align-items: flex-start;
  }
  .hero-chonchuong-text {
    text-align: left;
  }
}

/* Bên trong vẫn giới hạn nội dung ở 960px cho gọn */
.hero-chonchuong-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 16px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}


/* ===== HERO FULL-WIDTH CHO /mon ===== */

/* Dải hero phủ full ngang màn hình */
.hero.hero-small.hero-band {
  width: 100%;
  max-width: 100%;
  margin: 0;
  border-radius: 0;
  padding: 40px 0 32px;
}

/* Nền mint nhẹ cho hero */
.hero-band--mint {
  background: #e9fff7;
}

/* Container bên trong hero */
.hero-band__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

/* Khối chữ */
.hero-band__text {
  text-align: center;
}

.hero-band__text h1 {
  margin: 0 0 6px;
  font-weight: 800;
  font-size: clamp(26px, 3.3vw, 34px);
  line-height: 1.2;
  letter-spacing: 0.2px;
}

.hero-band__text p {
  margin: 0;
  font-size: 16px;
  color: #3f4a4a;
  opacity: 0.9;
}

/* Nếu có nút quay lại đặt trong hero-band__inner (các trang con) */
.hero-band__back {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 3px solid #0f766e;
  background: transparent;
  color: #0f766e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 28px;      /* mũi tên to rõ */
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 191, 165, 0.35);
  transition: transform 0.15s ease-out,
              box-shadow 0.15s ease-out,
              border-color 0.15s ease-out;
}

.hero-band__back:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 191, 165, 0.45);
  border-color: #0b5f59;
}
/* Căn lại hero: chữ ở giữa rộng hơn, nút back không chiếm chỗ */
.hero-band__inner {
  position: relative;
  justify-content: center;      /* chữ luôn ở giữa */
  gap: 0;                       /* không cần gap vì back sẽ absolute */
}

/* Nút quay lại nằm “nổi” bên trái, không làm hẹp khối chữ */
.hero-band__back {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

/* Khối chữ hero – cho rộng hơn, đẹp hơn */
.hero-band__text {
  text-align: center;
  max-width: 640px;            /* đủ rộng để ít bị xuống dòng */
}

/* Tiêu đề */
.hero-band__text h1 {
  margin: 0 0 6px;
  font-weight: 800;
  font-size: clamp(24px, 3vw, 32px);  /* nhỏ lại 1 chút */
  line-height: 1.25;
}

/* Dòng mô tả */
.hero-band__text p {
  margin: 0;
  font-size: 15px;
  color: #3f4a4a;
  opacity: 0.9;
}

.ktpl-hero-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ktpl-hero-line h1,
.ktpl-hero-line p {
  margin: 0;
  white-space: nowrap;
}

.ktpl-hero-line p {
  font-size: 1rem;
  color: #3f4a4a;
  opacity: 0.92;
}

/* Mobile: chừa chỗ cho nút back */
@media (max-width: 600px) {
  .hero-band__inner {
    padding-left: 64px;
  }

  .ktpl-hero-line {
    gap: 6px;
  }

  .ktpl-hero-line h1,
  .ktpl-hero-line p {
    white-space: normal;
  }
}
