/* Trợ Lý AI Giáo Viên — giao diện dùng chung */
:root {
  --navy: #1b2a4a;
  --ink: #26324a;
  --muted: #5d6b85;
  --line: #e5e9f2;
  --bg: #fffdf8;
  --bg-soft: #f4f7fd;
  --brand: #2f6fed;
  --brand-dark: #1f56c4;
  --sun: #ffc83d;
  --sun-soft: #fff3cf;
  --mint: #22b07d;
  --mint-soft: #e2f7ee;
  --coral: #f26b5b;
  --coral-soft: #fde6e3;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(27, 42, 74, 0.08);
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { color: var(--navy); line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3.4vw, 36px); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 12px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head p { color: var(--muted); font-size: 17px; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand); background: #e8f0ff;
  padding: 6px 12px; border-radius: 999px; margin-bottom: 14px;
}
.hl { background: linear-gradient(transparent 60%, var(--sun) 60%); padding: 0 4px; }

/* Nút */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 12px; font-weight: 700; font-size: 16px;
  border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-sun { background: var(--sun); color: var(--navy); }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-block { width: 100%; }

/* Header */
.header {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 253, 248, .92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--navy); font-size: 18px; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 11px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 800;
}
.nav { display: flex; gap: 26px; align-items: center; }
.nav a { font-weight: 600; color: var(--muted); }
.nav a:hover, .nav a.active { color: var(--brand); }
.nav a.btn { color: #fff; padding: 10px 16px; white-space: nowrap; }
.menu-toggle { display: none; background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--navy); }

/* Hero */
.hero { padding: 64px 0 72px; }
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-sub { font-size: 18px; color: var(--muted); max-width: 540px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 22px; }
.hero-points { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 15px; }
.hero-points span::before { content: "✓ "; color: var(--mint); font-weight: 800; }

.compare { display: grid; gap: 14px; }
.compare-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.compare-card .label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.compare-card.before .label { color: var(--coral); }
.compare-card.after .label { color: var(--mint); }
.compare-card.after { border: 2px solid var(--mint); }
.task { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.task:last-child { border-bottom: 0; }
.task b { white-space: nowrap; }
.before .task b { color: var(--coral); }
.after .task b { color: var(--mint); }

/* Thẻ */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card p { color: var(--muted); margin: 0; }
.icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  font-size: 24px; margin-bottom: 14px;
}
.icon-coral { background: var(--coral-soft); }
.icon-sun { background: var(--sun-soft); }
.icon-mint { background: var(--mint-soft); }
.icon-blue { background: #e8f0ff; }
.quote { font-style: italic; color: var(--navy) !important; margin-top: 10px !important; font-size: 14px; }

/* Khóa học */
.course { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; overflow: hidden; }
.course-cover {
  background: linear-gradient(135deg, var(--brand), #6a8dff); color: #fff; padding: 36px;
  display: flex; flex-direction: column; justify-content: center; min-height: 320px;
}
.course-cover h3 { color: #fff; font-size: 26px; }
.course-cover .tag { display: inline-block; background: var(--sun); color: var(--navy); font-weight: 800; font-size: 13px; padding: 4px 10px; border-radius: 8px; margin-bottom: 14px; width: fit-content; }
.course-body { padding: 32px; }
.checklist { list-style: none; padding: 0; margin: 0 0 22px; }
.checklist li { padding: 7px 0 7px 30px; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 7px; width: 20px; height: 20px; border-radius: 50%; background: var(--mint-soft); color: var(--mint); font-weight: 800; font-size: 12px; display: grid; place-items: center; }
.price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.price-now { font-size: 34px; font-weight: 800; color: var(--coral); }
.price-old { text-decoration: line-through; color: var(--muted); }
.badge { background: var(--coral); color: #fff; font-weight: 700; font-size: 13px; padding: 3px 9px; border-radius: 8px; }
.course-soon { opacity: .9; }
.course-soon .tag-soon { display: inline-block; background: var(--line); color: var(--muted); font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 8px; margin-bottom: 12px; }

/* Quà tặng */
.gift {
  background: var(--navy); color: #fff; border-radius: 26px; padding: 44px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
}
.gift h2 { color: #fff; }
.gift p { color: #c7d1e6; }
.gift .checklist li { color: #e9eefa; }
.form { background: #fff; border-radius: var(--radius); padding: 26px; color: var(--ink); }
.form label { display: block; font-weight: 600; font-size: 14px; margin: 0 0 6px; }
.form input, .form select {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; margin-bottom: 14px; background: #fff;
}
.form input:focus, .form select:focus { outline: none; border-color: var(--brand); }
.form small { color: var(--muted); display: block; margin-top: 10px; text-align: center; }
.form-ok { display: none; text-align: center; padding: 20px 0; }
.form-ok.show { display: block; }

/* Các bước */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step::before {
  counter-increment: step; content: counter(step);
  width: 40px; height: 40px; border-radius: 50%; background: var(--sun); color: var(--navy);
  font-weight: 800; display: grid; place-items: center; margin-bottom: 12px;
}

/* Người dạy */
.teacher { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: center; }
.avatar {
  aspect-ratio: 1; border-radius: 24px; background: var(--sun-soft); border: 2px dashed var(--sun);
  display: grid; place-items: center; color: var(--muted); text-align: center; padding: 20px; font-size: 14px;
}

/* Dịch vụ */
.service { background: var(--mint-soft); border-radius: 26px; padding: 44px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.service ul { margin: 0; padding-left: 20px; }
.service li { margin-bottom: 6px; }

/* Câu hỏi thường gặp */
.faq { max-width: 780px; margin: 0 auto; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; padding: 18px 20px; font: inherit;
  font-weight: 700; color: var(--navy); cursor: pointer; display: flex; justify-content: space-between; gap: 12px;
}
.faq-q::after { content: "+"; font-size: 22px; line-height: 1; color: var(--brand); }
.faq-item.open .faq-q::after { content: "–"; }
.faq-a { display: none; padding: 0 20px 18px; color: var(--muted); }
.faq-item.open .faq-a { display: block; }

/* CTA cuối */
.final-cta { text-align: center; }
.final-cta .hero-cta { justify-content: center; }

/* Footer */
.footer { background: var(--navy); color: #c7d1e6; padding: 56px 0 28px; font-size: 15px; }
.footer .grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer h4 { color: #fff; margin: 0 0 14px; font-size: 16px; }
.footer a { display: block; margin-bottom: 8px; }
.footer a:hover { color: #fff; }
.footer .logo { color: #fff; margin-bottom: 14px; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 20px; font-size: 13px; text-align: center; }

/* Nút nổi Zalo */
.float-contact { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; z-index: 60; }
.float-contact a {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 13px; box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
.float-zalo { background: #0068ff; }
.float-mess { background: linear-gradient(135deg, #00b2ff, #a033ff); font-size: 22px !important; }

/* Điện thoại / máy tính bảng */
@media (max-width: 900px) {
  .hero .container, .gift, .course, .teacher, .service { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer .grid { grid-template-columns: 1fr; }
  .teacher .avatar { max-width: 240px; }
}
@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff;
    flex-direction: column; align-items: stretch; gap: 0; border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 12px; }
  .section { padding: 52px 0; }
  .hero { padding: 36px 0 52px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .gift, .service { padding: 26px 20px; border-radius: 20px; }
  .course-cover, .course-body { padding: 24px; }
  .course-cover { min-height: 0; }
  .hero-cta .btn { width: 100%; }
}

/* ===== Thương hiệu Soạn Xong ===== */
.logo-mark { font-size: 20px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text small { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.footer .logo-text small { color: #9fb0cf; }
.badge-sun { background: var(--sun); color: var(--navy); }

/* ===== Trang bán khóa ===== */
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--brand); font-weight: 600; }
.buy-card { background: #fff; border: 2px solid var(--brand); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); }
.buy-card .label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.buy-card .checklist { margin-bottom: 18px; }
.buy-card small { display: block; text-align: center; color: var(--muted); margin-top: 10px; font-size: 13px; }

.time-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.time-table th, .time-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.time-table th { background: var(--navy); color: #fff; font-size: 14px; }
.time-table td.before { color: var(--coral); font-weight: 700; white-space: nowrap; }
.time-table td.after { color: var(--mint); font-weight: 800; white-space: nowrap; }
.small-note { font-size: 13px; color: var(--muted); margin-top: 12px; text-align: center; }

.lessons { display: grid; gap: 12px; max-width: 820px; margin: 0 auto; }
.lesson { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.lesson-no { width: 48px; height: 48px; border-radius: 14px; background: #e8f0ff; color: var(--brand); font-weight: 800; display: grid; place-items: center; }
.lesson h3 { margin-bottom: 4px; font-size: 17px; }
.lesson p { margin: 0; color: var(--muted); font-size: 15px; }

.xlist { list-style: none; padding: 0; margin: 0; }
.xlist li { padding: 7px 0 7px 30px; position: relative; }
.xlist li::before { content: "✕"; position: absolute; left: 0; top: 7px; width: 20px; height: 20px; border-radius: 50%; background: var(--coral-soft); color: var(--coral); font-weight: 800; font-size: 11px; display: grid; place-items: center; }

.note-box { display: grid; grid-template-columns: 56px 1fr; gap: 16px; background: #e8f0ff; border-radius: 20px; padding: 24px; max-width: 860px; margin: 0 auto; }
.note-box .icon { background: #fff; margin: 0; }
.note-box p { margin: 0; color: var(--ink); }
.guarantee { border: 2px dashed var(--mint); background: var(--mint-soft); border-radius: 18px; padding: 20px 22px; margin-top: 24px; text-align: center; }

/* ===== Trang quà tặng ===== */
.form .consent { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.form .consent input { width: auto; margin: 3px 0 0; }
.form .consent a { color: var(--brand); }
.prompt-preview { background: #fbfcff; border: 1px dashed #c9d5ee; border-radius: 12px; padding: 14px 16px; white-space: pre-wrap; font-size: 15px; color: var(--ink); }
.form-error { color: var(--coral); font-size: 13px; margin: -6px 0 12px; display: none; }
.form-error.show { display: block; }

/* ===== Thanh toán & cảm ơn ===== */
.checkout-grid { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
.order-summary { position: sticky; top: 88px; }
.order-summary .label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sum-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.sum-row.total b { color: var(--coral); font-size: 22px; }
.step-title { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--navy); font-size: 18px; margin-bottom: 16px; }
.num { width: 30px; height: 30px; border-radius: 50%; background: var(--sun); color: var(--navy); font-weight: 800; display: inline-grid; place-items: center; flex: none; font-size: 15px; }
.step-done-note { display: none; color: var(--mint); font-weight: 700; }
.step-box.done form { display: none; }
.step-box.done .step-done-note { display: block; }
.pay-box { display: none; margin-top: 20px; border: 2px solid var(--brand); }
.pay-box.show { display: block; }
.pay-grid { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.qr-wrap { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-align: center; }
.qr-wrap img { width: 100%; height: auto; }
.qr-missing { padding: 24px 10px; color: var(--coral); font-size: 14px; }
.info-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.info-row span { color: var(--muted); }
.info-row.highlight { background: var(--sun-soft); border-radius: 10px; padding: 10px 12px; border: 0; margin-top: 6px; }
.info-row.highlight b { font-size: 20px; letter-spacing: .05em; color: var(--navy); }
.mini-copy { border: 0; background: var(--brand); color: #fff; font: inherit; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 8px; cursor: pointer; }
.pay-note { font-size: 14px; color: var(--muted); margin-top: 12px; }
.thanks { text-align: center; }
.code-pill { background: var(--sun-soft); padding: 4px 12px; border-radius: 8px; letter-spacing: .06em; }
.thanks-steps { text-align: left; display: grid; gap: 12px; margin: 22px 0; }
.t-step { display: flex; gap: 12px; align-items: flex-start; background: var(--bg-soft); padding: 14px; border-radius: 12px; }
@media (max-width: 900px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .order-summary { position: static; }
}
@media (max-width: 560px) {
  .pay-grid { grid-template-columns: 1fr; }
  .qr-wrap { max-width: 260px; margin: 0 auto; }
}

/* ===== Trang chính sách ===== */
.policy { max-width: 800px; }
.policy h1 { font-size: clamp(28px, 4vw, 40px); }
.policy h2 { font-size: 21px; margin-top: 30px; }
.policy p, .policy li { color: var(--ink); }
.policy ul, .policy ol { padding-left: 22px; }
.policy li { margin-bottom: 6px; }
.policy a { color: var(--brand); font-weight: 600; }
.policy .updated { color: var(--muted); font-size: 14px; }
.owner-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; font-size: 15px; margin: 18px 0 8px; }

/* ===== Trang học viên ===== */
.video-wrap { position: relative; padding-top: 56.25%; border-radius: 12px; overflow: hidden; margin: 12px 0 8px; background: #000; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lesson-btn { padding: 9px 14px; font-size: 14px; margin: 10px 8px 0 0; }
.soon { color: var(--muted); font-style: italic; margin-top: 8px !important; }

/* ===== Trang cảm ơn: mã truy cập tự hiện ===== */
.access-box { background: var(--mint-soft); border: 2px solid var(--mint); border-radius: 16px; padding: 20px; margin: 18px 0; }
.access-key { font-size: 34px; font-weight: 800; letter-spacing: .18em; color: var(--navy); background: #fff; border-radius: 12px; padding: 10px; margin: 6px auto; max-width: 280px; }
.waiting { background: var(--sun-soft); border-radius: 12px; padding: 12px 14px; margin: 16px 0 0; }

.sticky-buy { display: none; }
.has-sticky .float-contact { bottom: 16px; }

@media (max-width: 760px) {
  .sticky-buy {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: #fff; border-top: 1px solid var(--line); padding: 10px 16px;
    align-items: center; justify-content: space-between; gap: 12px;
    box-shadow: 0 -6px 20px rgba(27, 42, 74, .08);
  }
  .sticky-buy b { color: var(--coral); font-size: 20px; display: block; line-height: 1.1; }
  .sticky-buy span { font-size: 12px; color: var(--muted); }
  .sticky-buy .btn { padding: 12px 18px; }
  .has-sticky { padding-bottom: 72px; }
  .has-sticky .float-contact { bottom: 84px; }
  .time-table th, .time-table td { padding: 12px 10px; font-size: 14px; }
  .note-box { grid-template-columns: 1fr; padding: 20px; }
  .lesson { grid-template-columns: 40px 1fr; padding: 16px; gap: 12px; }
  .lesson-no { width: 40px; height: 40px; }
}
