/* ==========================================================
   home.css – Trang chủ Tuấn Kiệt (bố cục theo mẫu landing page)
   Tự chứa biến màu – không phụ thuộc phiên bản site.css
   ========================================================== */
.home {
  --brand: #c8102e; --brand-600: #a50d26; --brand-700: #7f0a1d; --brand-50: #fdf1f2; --brand-100: #fbe1e4;
  --gold: #ffc83d; --gold-600: #c9971c;
  --ink: #1c1b1f; --ink-2: #5b5760; --ink-3: #8c8791;
  --line: #ebe6e1; --line-2: #f4f1ee; --surface: #fff; --bg: #f6f6f7;
  --ok: #177245; --info: #0b57d0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -10px rgba(0,0,0,.12);
  --font-hanzi: "Noto Serif SC", "Songti SC", "SimSun", serif;
  background: var(--bg); color: var(--ink);
}
.home a { text-decoration: none; }
.home .wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Nút ---------- */
.home .hbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 11px 20px; font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; transition: background .15s, transform .06s, box-shadow .15s, color .15s; white-space: nowrap; line-height: 1.2; }
.home .hbtn:active { transform: translateY(1px); }
.home .hbtn svg { width: 16px; height: 16px; }
.home .hbtn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -8px rgba(200,16,46,.8); }
.home .hbtn-primary:hover { background: var(--brand-600); color: #fff; }
.home .hbtn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.home .hbtn-outline:hover { border-color: var(--brand); color: var(--brand); }
.home .hbtn-white { background: #fff; color: var(--brand); }
.home .hbtn-white:hover { background: #fff5f6; color: var(--brand-600); }
.home .hbtn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.home .hbtn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.home .hbtn-block { width: 100%; }

/* ---------- Header ---------- */
.hhead { position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.hhead .wrap { display: flex; align-items: center; gap: 22px; height: 68px; }
.hlogo { display: flex; flex-direction: column; align-items: center; line-height: 1; color: var(--brand); }
.hlogo .mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(145deg, var(--brand), var(--brand-700)); color: #fff; display: grid; place-items: center; font-family: var(--font-hanzi); font-size: 20px; font-weight: 700; }
.hlogo small { font-size: 9.5px; font-weight: 800; letter-spacing: .06em; margin-top: 3px; }
.hnav { display: flex; gap: 4px; align-items: center; }
.hnav a { color: var(--ink); font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: 8px; position: relative; }
.hnav a:hover { color: var(--brand); background: var(--brand-50); }
.hnav a .hot { position: absolute; top: -4px; right: -2px; background: #f59e0b; color: #fff; font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 4px; }
.hactions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.huser { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .9rem; }
.huser .av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(145deg, #e0a91c, #a8770c); color: #fff; display: grid; place-items: center; font-weight: 800; }
.hburger { display: none; margin-left: auto; width: 42px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 20px; cursor: pointer; }
@media (max-width: 1000px) {
  .hburger { display: grid; place-items: center; }
  .hnav, .hactions { display: none; }
  .hhead.open .hnav, .hhead.open .hactions { display: flex; }
  .hhead.open .wrap { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 14px; }
  .hhead.open .hnav { order: 3; width: 100%; flex-direction: column; align-items: stretch; }
  .hhead.open .hactions { order: 4; width: 100%; margin: 0; }
  .hhead.open .hactions .hbtn { flex: 1; }
}

/* ---------- Hero ---------- */
.hhero { position: relative; overflow: hidden; color: #fff; padding: 64px 0;
  background: radial-gradient(800px 400px at 15% 0%, rgba(255,255,255,.08), transparent 60%), linear-gradient(120deg, #6d0718 0%, #9e0b24 45%, #c8102e 100%); }
.hhero::after { content: "汉"; position: absolute; left: 44%; bottom: -120px; font-family: var(--font-hanzi); font-size: 420px; line-height: 1; opacity: .05; pointer-events: none; }
.hhero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: 56px; align-items: center; }
.hbadge { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.hbadge svg { width: 15px; height: 15px; color: var(--gold); }
.hhero h1 { font-size: clamp(2rem, 3.4vw + .8rem, 3.1rem); line-height: 1.15; margin: 20px 0 16px; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.hhero h1 em { font-style: normal; color: var(--gold); }
.hhero h1 .dot { color: rgba(255,255,255,.7); margin: 0 .15em; }
.hhero .lead { font-size: 1.02rem; opacity: .92; max-width: 560px; margin: 0 0 28px; line-height: 1.65; }
.hhero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hhero .cta .hbtn { padding: 14px 26px; }
.hstats { display: flex; gap: 40px; margin-top: 36px; flex-wrap: wrap; }
.hstats b { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.hstats span { font-size: .88rem; opacity: .85; }

.hform { position: relative; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.28); border-radius: 18px; padding: 32px 24px 22px; backdrop-filter: blur(8px); box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); }
.hform .ribbon { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #6b3d00; font-size: .78rem; font-weight: 800; padding: 4px 14px; border-radius: 999px; white-space: nowrap; }
.hform h3 { text-align: center; margin: 0; font-size: 1.3rem; color: #fff; }
.hform .sub { text-align: center; font-size: .86rem; opacity: .85; margin: 6px 0 18px; }
.hform input, .hform select { display: block; width: 100%; font: inherit; font-size: .95rem; border: 1px solid transparent; background: #fbeef0; color: var(--ink); border-radius: 10px; padding: 13px 14px; margin-bottom: 12px; min-height: 48px; }
.hform input::placeholder { color: #8a7c80; }
.hform select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='none' stroke='%238c8791' stroke-width='1.6' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.hform input:focus, .hform select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255,200,61,.35); }
.hform .hbtn { margin-top: 4px; padding: 14px; font-size: 1rem; }
.hform .note { text-align: center; font-size: .78rem; opacity: .8; margin: 12px 0 0; }

/* ---------- Thanh số liệu ---------- */
.hstatbar { background: #fff; border-bottom: 1px solid var(--line); }
.hstatbar .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.hstatbar .item { display: flex; align-items: center; gap: 14px; justify-content: center; }
.hstatbar .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.hstatbar .ic svg { width: 20px; height: 20px; }
.hstatbar b { display: block; font-size: 1.1rem; }
.hstatbar span { font-size: .82rem; color: var(--ink-2); }

/* ---------- Section chung ---------- */
.hsec { padding: 64px 0; }
.hsec.alt { background: #fff; }
.hsec-head { text-align: center; margin-bottom: 36px; }
.hsec-head .eyebrow { color: var(--brand); font-weight: 800; letter-spacing: .1em; font-size: .92rem; text-transform: uppercase; }
.hsec-head h2 { font-size: clamp(1.5rem, 1.6vw + 1rem, 2rem); margin: 8px 0 8px; font-weight: 800; }
.hsec-head p { color: var(--ink-2); margin: 0 auto; max-width: 620px; }
.hsec-foot { text-align: center; margin-top: 32px; }

/* Danh mục */
.hcats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 26px; }
.hcat { --c: var(--brand); --t: #fdecef; display: block; background: var(--t); border: 1px solid color-mix(in srgb, var(--c) 18%, transparent); border-radius: var(--radius); padding: 22px; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.hcat:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.hcat .ic { width: 48px; height: 48px; border-radius: 12px; background: #fff; color: var(--c); display: grid; place-items: center; font-family: var(--font-hanzi); font-size: 22px; font-weight: 700; margin-bottom: 18px; box-shadow: 0 4px 10px -6px rgba(0,0,0,.2); }
.hcat h3 { font-size: 1.05rem; margin: 0 0 4px; }
.hcat p { font-size: .84rem; color: var(--ink-2); margin: 0 0 16px; min-height: 2.6em; }
.hcat .go { color: var(--c); font-weight: 700; font-size: .88rem; }

/* Thẻ khóa học */
.hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.hcourse { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .18s, box-shadow .18s; }
.hcourse:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -20px rgba(0,0,0,.3); }
.hcover { position: relative; height: 150px; color: #fff; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 16px 18px; }
.hcover::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.25), transparent 45%); }
.hcover .hz { position: absolute; right: 10px; bottom: -18px; font-family: var(--font-hanzi); font-size: 110px; line-height: 1; opacity: .18; font-weight: 700; }
.hcover .tag { position: absolute; top: 10px; left: 10px; background: #fff; color: var(--brand); font-size: .72rem; font-weight: 800; padding: 3px 8px; border-radius: 6px; z-index: 1; }
.hcover .off { position: absolute; top: 10px; right: 10px; background: #fff; color: var(--ok); font-size: .72rem; font-weight: 800; padding: 3px 8px; border-radius: 6px; z-index: 1; }
.hcover .off.none { color: var(--ink-3); }
.hcover .code { position: relative; font-size: 2rem; font-weight: 900; font-style: italic; letter-spacing: -.02em; line-height: 1; text-shadow: 0 3px 10px rgba(0,0,0,.25); }
.hcover .sub { position: relative; font-size: .78rem; font-weight: 700; text-transform: uppercase; opacity: .92; margin-top: 6px; max-width: 75%; }
.hcourse .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.hcourse h3 { font-size: 1rem; margin: 0; line-height: 1.35; min-height: 2.7em; }
.hcourse h3 a { color: var(--ink); }
.hcourse h3 a:hover { color: var(--brand); }
.hmeta { display: flex; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-2); }
.hmeta span { display: inline-flex; align-items: center; gap: 4px; }
.hmeta svg { width: 14px; height: 14px; }
.hprice { font-size: 1.2rem; font-weight: 800; color: var(--brand); margin-top: auto; padding-top: 4px; }
.hcourse .hbtn { margin-top: 6px; }

/* Gợi ý AI */
.hai-note { display: block; text-align: center; margin: -14px auto 26px; font-size: .88rem; color: var(--ink-2); }
.hai-note b { color: var(--brand); }
.hrec .match { position: absolute; top: 10px; right: 10px; z-index: 1; background: var(--gold); color: #5a3500; font-size: .75rem; font-weight: 900; padding: 3px 9px; border-radius: 999px; }
.hrec ul { list-style: none; margin: 0; padding: 0; font-size: .82rem; color: var(--ink-2); }
.hrec li { position: relative; padding-left: 18px; margin-bottom: 4px; line-height: 1.4; }
.hrec li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 900; }

/* Lịch khai giảng + bảng xếp hạng */
.hsplit { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.hclasses { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.hclass { background: #fbeef0; border: 1px solid #f3d4da; border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.hclass.alt { background: #e9f4f0; border-color: #cfe7de; }
.hclass .pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--ok); font-size: .75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; border: 1px solid #cfe7de; }
.hclass h4 { margin: 0; font-size: .98rem; }
.hclass .hmeta { font-size: .78rem; }
.hclass .hbtn { padding: 10px; }
.hclass.alt .hbtn-primary { background: #0f8a6b; box-shadow: none; }
.hclass.alt .hbtn-primary:hover { background: #0b6f56; }
.hrank { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.hrank-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.hrank-head svg { width: 22px; height: 22px; color: var(--brand); flex-shrink: 0; margin-top: 2px; }
.hrank-head h4 { margin: 0; font-size: 1.05rem; flex: 1; }
.hrank-head a { color: var(--brand); font-size: .84rem; font-weight: 600; white-space: nowrap; }
.hrank-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.hrank-row:last-child { border-bottom: none; }
.hrank-row .no { width: 24px; height: 24px; border-radius: 6px; background: var(--line-2); color: var(--ink-2); display: grid; place-items: center; font-size: .78rem; font-weight: 800; flex-shrink: 0; }
.hrank-row:nth-child(2) .no { background: #fff3cd; color: #9a6200; }
.hrank-row:nth-child(3) .no { background: #eef0f3; color: #5b6573; }
.hrank-row:nth-child(4) .no { background: #fde6d8; color: #a2521b; }
.hrank-row .av { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-family: var(--font-hanzi); font-weight: 700; flex-shrink: 0; }
.hrank-row .nm { flex: 1; min-width: 0; }
.hrank-row .nm a { color: var(--ink); font-weight: 600; font-size: .9rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrank-row .nm small { color: var(--ink-3); font-size: .76rem; }
.hrank-row .sc { background: var(--brand); color: #fff; font-weight: 800; font-size: .82rem; padding: 4px 9px; border-radius: 6px; }

/* Lộ trình HSK */
.hpath { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.hstep { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 16px; text-align: center; }
.hstep .lv { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #fff; background: linear-gradient(145deg, var(--brand), var(--brand-700)); box-shadow: 0 8px 18px -8px rgba(200,16,46,.7); }
.hstep h4 { margin: 0 0 4px; font-size: 1rem; }
.hstep p { margin: 0; font-size: .82rem; color: var(--ink-2); }
.hstep a { display: inline-block; margin-top: 10px; font-size: .82rem; font-weight: 700; color: var(--brand); }

/* Giảng viên */
.hteach-wrap { position: relative; }
.hteach { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 60px) / 4); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 12px; }
.hteach::-webkit-scrollbar { display: none; }
.hteacher { scroll-snap-align: start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 18px; text-align: center; }
.hteacher .ph { width: 92px; height: 92px; margin: 0 auto 14px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #e0374f, var(--brand-700)); color: #fff; display: grid; place-items: center; font-size: 2rem; font-weight: 800; box-shadow: 0 10px 24px -10px rgba(200,16,46,.7); }
.hteacher h4 { margin: 0 0 4px; font-size: 1rem; }
.hteacher .role { color: var(--brand); font-size: .9rem; margin-bottom: 8px; }
.hteacher .deg { color: var(--ink-2); font-size: .82rem; margin-bottom: 12px; min-height: 2.4em; }
.hteacher .chip { display: inline-flex; align-items: center; gap: 6px; background: var(--line-2); padding: 5px 12px; border-radius: 999px; font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.harrow { position: absolute; top: 45%; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center; z-index: 2; font-size: 18px; color: var(--ink); }
.harrow.l { left: -18px; } .harrow.r { right: -18px; }
@media (max-width: 1000px) { .hteach { grid-auto-columns: calc((100% - 20px) / 2); } .harrow { display: none; } }
@media (max-width: 560px) { .hteach { grid-auto-columns: 82%; } }

/* CTA + Footer */
.hcta { background: var(--brand-700); color: #fff; }
.hcta .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; flex-wrap: wrap; }
.hcta h3 { margin: 0 0 4px; font-size: 1.2rem; color: #fff; }
.hcta p { margin: 0; opacity: .85; font-size: .92rem; }
.hfoot { background: var(--brand); color: #fff; }
.hfoot .top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; padding-top: 44px; padding-bottom: 36px; }
.hfoot h5 { font-size: .92rem; letter-spacing: .06em; margin: 0 0 18px; padding-bottom: 10px; position: relative; text-transform: uppercase; }
.hfoot h5::after { content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 2px; background: rgba(255,255,255,.6); }
.hfoot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .9rem; }
.hfoot a { color: #fff; opacity: .92; }
.hfoot a:hover { opacity: 1; text-decoration: underline; }
.hfoot .brand-mark { width: 64px; height: 64px; border-radius: 16px; background: #fff; color: var(--brand); display: grid; place-items: center; font-family: var(--font-hanzi); font-size: 36px; font-weight: 700; margin-bottom: 12px; }
.hfoot .brand-name { font-weight: 900; font-size: 1.3rem; letter-spacing: .04em; }
.hfoot .company { font-weight: 800; margin: 14px 0 12px; font-size: .95rem; }
.hfoot .info li { display: flex; gap: 10px; align-items: flex-start; }
.hfoot .info svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; opacity: .85; }
.hfoot .bottom { background: var(--brand-700); font-size: .84rem; }
.hfoot .bottom .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.hfoot .bottom span { opacity: .85; }

/* Nút nổi */
.hfloat { position: fixed; right: 20px; bottom: 24px; display: flex; flex-direction: column; gap: 12px; z-index: 70; }
.hfloat a { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: .8rem; box-shadow: 0 10px 24px -8px rgba(0,0,0,.4); transition: transform .15s; }
.hfloat a:hover { transform: scale(1.06); color: #fff; }
.hfloat .zalo { background: #0068ff; }
.hfloat .call { background: var(--brand); }
.hfloat svg { width: 22px; height: 22px; }

.hskel { background: linear-gradient(90deg, #eee 25%, #f6f6f6 50%, #eee 75%); background-size: 200% 100%; animation: hsk 1.2s infinite linear; border-radius: var(--radius); min-height: 300px; }
@keyframes hsk { to { background-position: -200% 0; } }
.hempty { grid-column: 1 / -1; text-align: center; color: var(--ink-2); padding: 30px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hhero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .hsplit { grid-template-columns: 1fr; }
  .hfoot .top { grid-template-columns: 1fr 1fr; }
  .hstatbar .wrap { grid-template-columns: repeat(2, 1fr); }
  .hstatbar .item { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .hhero { padding: 40px 0 44px; }
  .hstats { gap: 24px; }
  .hstats b { font-size: 1.5rem; }
  .hclasses { grid-template-columns: 1fr; }
  .hfoot .top { grid-template-columns: 1fr; }
  .hsec { padding: 44px 0; }
}
.hclass .pill svg, .hteacher .chip svg { width: 14px; height: 14px; flex-shrink: 0; }
.hstatbar .item > div { min-width: 0; }
.home section[id] { scroll-margin-top: 72px; }
.hcover .tag { max-width: 52%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================
   BỔ SUNG: Thi thử · Tài liệu · Vinh danh · Cảm nhận
   ========================================================== */
.hdemo { display: inline-block; vertical-align: middle; margin-left: 10px; font-size: .7rem; font-weight: 800; letter-spacing: .02em; text-transform: none; background: #fff3cd; color: #8a5a00; border: 1px dashed #e0b44a; padding: 2px 8px; border-radius: 6px; }

/* Thi thử */
.hexams { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.hexam { background: #fbeef0; border: 1px solid #f3d4da; border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.hexam.alt { background: #e9f4f0; border-color: #cfe7de; }
.hexam.alt .hbtn-primary { background: #0f8a6b; box-shadow: none; }
.hexam.alt .hbtn-primary:hover { background: #0b6f56; }
.hexam .free { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; background: #e6f4ee; color: var(--ok); border: 1px solid #bfe0d1; font-size: .76rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.hexam .free svg { width: 14px; height: 14px; }
.hexam h4 { margin: 0; font-size: .98rem; }
.hexam .hbtn { padding: 10px; }
.hrank-row.me { background: #fff8e1; border-radius: 8px; padding-left: 6px; padding-right: 6px; }
.hrank-row .nm b { display: block; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Modal làm bài */
.hquiz-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(20, 10, 12, .55); display: grid; place-items: center; padding: 16px; }
.hquiz { width: 100%; max-width: 720px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
.hquiz header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: linear-gradient(120deg, #7f0a1d, #c8102e); color: #fff; }
.hquiz header h3 { margin: 0; font-size: 1.1rem; color: #fff; }
.hquiz header small { opacity: .85; font-weight: 700; }
.hquiz header > div { flex: 1; min-width: 0; }
.hquiz .timer { background: rgba(255,255,255,.18); padding: 6px 12px; border-radius: 8px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hquiz .x { background: rgba(255,255,255,.18); border: none; color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.hquiz .qbody { overflow-y: auto; padding: 18px 20px; flex: 1; margin: 0; }
.qitem { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; }
.qitem legend { padding: 0 6px; font-size: .95rem; }
.qitem label { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-weight: 500; margin: 2px 0; }
.qitem label:hover { background: var(--line-2); }
.qitem input { width: 17px; height: 17px; margin: 0; accent-color: var(--brand); flex-shrink: 0; }
.qitem.ok { border-color: #9fd3b8; background: #f2faf5; }
.qitem.bad { border-color: #f1b3bd; background: #fff5f6; }
.qitem label.right { background: #dff3e8; color: #0f5d3a; font-weight: 700; }
.hquiz footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line); background: #faf9f8; }
.hquiz footer .row { display: flex; gap: 8px; }
.qresult b { font-size: 1.8rem; color: var(--brand); }

/* Tài liệu */
.hdocs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.hdoc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.hdoc:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -20px rgba(0,0,0,.3); }
.hdoc .cover { height: 150px; position: relative; display: grid; place-items: center; overflow: hidden; }
.hdoc .cover.c0 { background: linear-gradient(135deg, #fdecef, #f7c9d1); }
.hdoc .cover.c1 { background: linear-gradient(135deg, #fff6e0, #ffe0a3); }
.hdoc .cover.c2 { background: linear-gradient(135deg, #e8f0fc, #bcd3f5); }
.hdoc .cover.c3 { background: linear-gradient(135deg, #c8102e, #7f0a1d); }
.hdoc .cover .hz { font-family: var(--font-hanzi); font-size: 72px; font-weight: 700; color: var(--brand); line-height: 1; }
.hdoc .cover.c3 .hz { color: #fff; }
.hdoc .cover .brand { position: absolute; bottom: 10px; font-size: .72rem; font-weight: 900; letter-spacing: .08em; color: var(--brand); }
.hdoc .cover.c3 .brand { color: #fff; }
.hdoc .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.hdoc .dtag { align-self: flex-start; background: var(--brand-50); color: var(--brand); font-size: .74rem; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.hdoc h4 { margin: 0; font-size: .96rem; line-height: 1.4; min-height: 2.8em; }
.hdoc .pdf { color: var(--brand); font-weight: 700; }
.hdoc .hbtn { margin-top: auto; }

/* Vinh danh */
.hhonor-sec { position: relative; overflow: hidden; color: #fff; background: radial-gradient(600px 300px at 90% 0%, rgba(255,255,255,.12), transparent 60%), linear-gradient(120deg, #8e0c22, #c8102e); }
.hhonor-sec .hsec-head .eyebrow { display: inline-block; background: rgba(255,255,255,.15); color: #fff; padding: 5px 14px; border-radius: 999px; }
.hhonor-sec .hsec-head h2 { color: #fff; }
.hhonor-sec .hsec-head p { color: rgba(255,255,255,.85); }
.htabs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.htabs button { font: inherit; font-weight: 800; padding: 10px 22px; border-radius: 999px; border: 1px solid rgba(255,255,255,.6); background: transparent; color: #fff; cursor: pointer; }
.htabs button.active { background: #fff; color: var(--brand); border-color: #fff; }
.hhonor-wrap { position: relative; }
.hhonors { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 340px); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 6px; justify-content: start; }
@supports (justify-content: safe center) { .hhonors { justify-content: safe center; } }
.hhonors::-webkit-scrollbar { display: none; }
.hhonor { scroll-snap-align: start; background: #fff; color: var(--ink); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 40px -20px rgba(0,0,0,.5); }
.hhonor .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hhonor .lg { color: var(--brand); font-weight: 900; font-size: .8rem; letter-spacing: .06em; }
.hhonor .pts { border: 2px solid var(--brand); border-radius: 10px; text-align: center; padding: 4px 10px 0; min-width: 96px; overflow: hidden; }
.hhonor .pts small { display: block; color: var(--brand); font-weight: 700; font-size: .72rem; }
.hhonor .pts b { display: block; font-size: 1.35rem; color: var(--brand); line-height: 1.2; }
.hhonor .pts span { display: block; margin: 4px -10px 0; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 800; padding: 3px 4px; }
.hhonor .who { display: flex; align-items: center; gap: 12px; }
.hhonor .who .av { width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #e0374f, #7f0a1d); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 1.3rem; flex-shrink: 0; }
.hhonor .who b { display: block; font-size: 1.05rem; }
.hhonor .who small { color: var(--ink-2); }
.hhonor .note { background: var(--brand-50); color: var(--brand-700); font-weight: 700; font-size: .88rem; padding: 8px 12px; border-radius: 8px; }
.hhonor-sec .harrow { top: 50%; }

/* Cảm nhận */
.htesti-wrap { position: relative; }
.htestis { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 40px) / 3); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 10px; }
.htestis::-webkit-scrollbar { display: none; }
.htesti { scroll-snap-align: start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.htesti .q { font-size: 2.4rem; line-height: .6; color: #f1b3bd; font-family: Georgia, serif; }
.htesti .stars { color: #f5a623; letter-spacing: 2px; }
.htesti p { margin: 0; color: var(--ink); line-height: 1.6; flex: 1; }
.htesti .who { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.htesti .who .av { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.htesti .who b { display: block; font-size: .95rem; }
.htesti .who small { color: var(--ink-2); font-size: .8rem; }
@media (max-width: 1000px) { .htestis { grid-auto-columns: calc((100% - 20px) / 2); } .hhonors { justify-content: start; } }
@media (max-width: 640px) { .hexams { grid-template-columns: 1fr; } .htestis { grid-auto-columns: 85%; } .hhonors { grid-auto-columns: 85%; } }
.home #leadForm { scroll-margin-top: 96px; }

/* ---------- Carousel: mũi tên nằm ngoài thẻ ---------- */
.hteach-wrap, .hhonor-wrap, .htesti-wrap { padding: 0 30px; }
.hteach-wrap .harrow.l, .hhonor-wrap .harrow.l, .htesti-wrap .harrow.l { left: -12px; }
.hteach-wrap .harrow.r, .hhonor-wrap .harrow.r, .htesti-wrap .harrow.r { right: -12px; }
.harrow { top: 50%; transform: translateY(-50%); transition: background .15s, color .15s, transform .15s; }
.harrow:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.hhonors, .hteach, .htestis { scroll-snap-type: none; }
@media (max-width: 1000px) { .harrow { display: grid; width: 34px; height: 34px; } .hteach-wrap, .hhonor-wrap, .htesti-wrap { padding: 0 22px; } }
.hhonors { grid-auto-columns: calc((100% - 36px) / 3); }
@media (max-width: 1000px) { .hhonors { grid-auto-columns: calc((100% - 18px) / 2); } }
@media (max-width: 640px) { .hhonors { grid-auto-columns: 100%; } .htestis, .hteach { grid-auto-columns: 100%; } }
/* Menu 7 mục: thu gọn khoảng cách ở màn hình laptop nhỏ */
@media (min-width: 1001px) and (max-width: 1280px) {
  .hnav { gap: 0; }
  .hnav a { padding: 8px 8px; font-size: .9rem; }
}/* Thẻ giảng viên: ảnh thật + bấm mở hồ sơ */
a.hteacher { display: block; color: inherit; text-decoration: none; transition: transform .15s, border-color .15s, box-shadow .15s; }
a.hteacher:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow); }
.hteacher img.ph { display: block; object-fit: cover; object-position: center top; background: var(--line-2); padding: 0; border: 3px solid #fff; }
.hteach-all { text-align: center; margin-top: 14px; }
.hteach-all a { font-weight: 700; color: var(--brand); text-decoration: none; }
.hteach-all a:hover { text-decoration: underline; }
/* Thẻ có ảnh bìa: khung 16:9 hiện trọn ảnh (ảnh đã có tên khóa) – ẩn chữ đè lên ảnh */
.hcover.img { height: auto; aspect-ratio: 16 / 9; padding: 0; }
.hcover.img::before, .hcover.img .code, .hcover.img .sub, .hcover.img .tag { display: none; }
.hcover.img .off, .hcover.img .match { font-size: .68rem; padding: 2px 8px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }

/* ===== Chân trang: danh sách cơ sở bấm được + bản đồ ===== */
.hfoot .top { grid-template-columns: 1.7fr .85fr .95fr .6fr 2fr; gap: 26px; }
.hfoot .fbrs { gap: 6px; }
.hfoot .fbr { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 10px 4px 0; border-radius: 8px; color: #fff; opacity: .85; font-size: .9rem; transition: opacity .2s, padding .25s, background .2s; }
.hfoot .fbr::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45); transition: background .2s, transform .2s; }
.hfoot .fbr:hover { opacity: 1; }
.hfoot .fbr:focus-visible { outline: 2px solid #ffd166; outline-offset: 2px; }
.hfoot .fbr.on { opacity: 1; font-weight: 700; background: rgba(255,255,255,.14); padding-left: 10px; }
.hfoot .fbr.on::before { background: #ffd166; transform: scale(1.3); }
.hfoot .fmap { display: flex; flex-direction: column; min-width: 0; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 16px; overflow: hidden; box-shadow: 0 18px 40px -20px rgba(0,0,0,.45); }
.hfoot .fmap-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.hfoot .fmap-head > svg { width: 18px; height: 18px; flex: 0 0 auto; color: #ffd166; }
.hfoot .fmap-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.hfoot .fmap-head b { font-size: .92rem; }
.hfoot .fmap-head small { font-size: .78rem; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hfoot .fmap-head a { flex: 0 0 auto; font-size: .78rem; font-weight: 700; color: #1f3c88; background: #fff; opacity: 1; padding: 6px 12px; border-radius: 999px; text-decoration: none; }
.hfoot .fmap-head a:hover { text-decoration: none; background: #ffd166; }
.hfoot .fmap-frame { position: relative; flex: 1; min-height: 210px; background: #dfe6f3; }
.hfoot .fmap-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; transition: opacity .3s; }
.hfoot .fmap.loading .fmap-frame iframe { opacity: .35; }
.hfoot .fmap.loading .fmap-frame::after { content: ""; position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 3px solid rgba(31,60,136,.25); border-top-color: #1f3c88; border-radius: 50%; animation: fmapSpin .8s linear infinite; z-index: 1; }
@keyframes fmapSpin { to { transform: rotate(360deg); } }
@media (max-width: 1100px) {
  .hfoot .top { grid-template-columns: 1.3fr 1fr 1fr .8fr; }
  .hfoot .fmap { grid-column: 1 / -1; }
  .hfoot .fmap-frame { min-height: 260px; }
}
@media (max-width: 860px) { .hfoot .top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .hfoot .top { grid-template-columns: 1fr; } .hfoot .fmap-frame { min-height: 230px; } }

/* Tài liệu – ảnh tài liệu thật */
.hdoc .cover { text-decoration: none; }
.hdoc .cover.img { background: #eef3fc; }
.hdoc .cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.hdoc:hover .cover img { transform: scale(1.04); }
.hdoc .hbtn svg { width: 16px; height: 16px; }

/* Tài liệu trang chủ: thanh trượt giống Đội ngũ giảng viên (4 thẻ / màn hình, tự chạy, nút ‹ ›) */
.hdoc-track .hdoc { scroll-snap-align: start; min-width: 0; }
.hdoc-track .hdoc:hover { transform: translateY(-3px); }
.hdoc-track .hdoc .cover { height: auto; aspect-ratio: 4 / 3; }
.hdoc-track .hdoc h4 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hdoc .doc-btns .hbtn { padding-left: 10px; padding-right: 10px; }

/* ===== Căn đều bố cục: thẻ trong cùng hàng cao bằng nhau, nút / liên kết luôn nằm ở đáy thẻ ===== */
.hpath, .hclasses, .hexams, .hcourses, .hdocs { align-items: stretch; }
.hstep { display: flex; flex-direction: column; align-items: center; }
.hstep h4 { margin-top: 2px; }
.hstep p { min-height: 2.9em; }
.hstep a { margin-top: auto; padding-top: 10px; }
.hclass, .hexam { height: 100%; box-sizing: border-box; }
.hclass .hmeta, .hexam .hmeta { min-height: 2.6em; align-content: flex-start; }
.hclass > .hbtn, .hexam > .hbtn { margin-top: auto; }
.hclass h4, .hexam h4 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hhonors > .hhonor, .htestis > .htesti, .hteach > * { height: 100%; box-sizing: border-box; }
.hhonor .note { margin-top: auto; }
.htesti .who { margin-top: auto; }
.htesti p { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; flex: 0 1 auto; }
.hsplit { align-items: start; }
.hrank-empty { padding: 18px 6px; color: var(--ink-2); font-size: .9rem; line-height: 1.5; }
.hrank-empty a { font-weight: 700; color: var(--brand); }
.hexam .free { text-transform: none; }
img.av { object-fit: cover; padding: 0; }
.hhonor .who img.av { width: 52px; height: 52px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 4px 12px -4px rgba(15,23,42,.4); flex: 0 0 auto; }
.htesti .who img.av { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; }
#thi-thu .hteach-all { margin-top: 20px; }
.hcourse .hprice { margin-top: auto; padding-top: 4px; }
.hcourse h3 a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Dấu trích dẫn & biểu tượng nét mảnh */
.htesti .q svg { width: 30px; height: 30px; display: block; }
.hhonor .note .tki { color: var(--gold-600, #c98f12); }