/* ==========================================================================
   Trang chủ — khối "Đào tạo lái xe trên nền tảng số", thiết kế V3 (chốt 20/11/2026).
   Nguồn: phương án B nhánh thiet-ke-nen-tang-so (+ 2 hình mô phỏng ở cụm "Học mọi lúc, mọi nơi",
   + 2 thẻ đỏ SA HÌNH / DAT dùng CSS homepage-platform-learn-and-drive-cards.css).
   Markup: section.platform-v2.dts trong index.html. Lý thuyết nền navy + vòng 70%; dưới là cột
   "Học mọi lúc, mọi nơi" cạnh danh mục 6 môn; Thực hành 2 hàng (mô tả | thẻ đỏ).
   Quy tắc: chữ nội dung ≥17px, phụ ≥14px, không giấu chữ sau nút bấm, giữ nguyên câu chữ.
   ========================================================================== */

html body .dts .dts-variant--b { display: grid; gap: clamp(20px, 2.4vw, 32px); }

/* ---------- Thành phần dùng chung ---------- */
html body .dts { --b: #1e40af; --b-deep: #1e3a8a; --b-hp: #2b26fb; --navy: #2d3489; --ink: #0a1330; --txt: #334155;
  --red: #e2141b; --red-txt: #c8141a; --line: #dbe3f0; --soft: #f3f6fd; }
html body .dts .dts-panel { min-width: 0; padding: clamp(20px, 2.6vw, 36px); border: 1px solid var(--line); border-radius: 24px;
  background: #fff; box-shadow: 0 24px 60px -40px rgba(20, 40, 100, .45); }
/* reset bằng :where() để không thắng các lớp thành phần bên dưới */
html body .dts :where(.dts-panel) :where(h3, h4, h5, p, ul, ol, figure) { margin: 0; }
html body .dts :where(.dts-panel) :where(ul, ol) { padding: 0; list-style: none; }
html body .dts .dts-panel img { display: block; max-width: 100%; height: auto; }
html body .dts .dts-eyebrow { display: flex; align-items: center; gap: 14px; color: var(--b-deep); font: 800 clamp(24px, 2.2vw, 34px)/1 var(--ff-display); letter-spacing: .05em; text-transform: uppercase; }
html body .dts .dts-eyebrow__num { display: grid; place-items: center; width: 1.8em; height: 1.8em; border-radius: 14px; background: var(--b); color: #fff; font-size: .88em; letter-spacing: 0; box-shadow: 0 12px 26px -14px rgba(30, 64, 175, .8); }
html body .dts .dts-eyebrow--red { color: var(--red); }
html body .dts .dts-eyebrow--red .dts-eyebrow__num { background: var(--red); box-shadow: 0 12px 26px -14px rgba(226, 20, 27, .8); }
html body .dts .dts-eyebrow--light { color: #fff; }
html body .dts .dts-eyebrow--light .dts-eyebrow__num { background: #fff; color: var(--b-deep); }
html body .dts .dts-eyebrow--on-dark { color: #fff; }
html body .dts .dts-h3 { margin-top: 14px; color: var(--ink); font: 800 clamp(24px, 2.3vw, 36px)/1.2 var(--ff-display); letter-spacing: -.015em; }
html body .dts .dts-desc { margin-top: 12px; max-width: 64ch; color: var(--txt); font: 400 clamp(17px, 1.3vw, 19px)/1.6 var(--ff-body); }
html body .dts .dts-ico { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 14px; background: #e8eeff; color: var(--b); }
html body .dts .dts-ico svg { width: 28px; height: 28px; }
html body .dts .dts-ico--sm { width: 36px; height: 36px; border-radius: 10px; }
html body .dts .dts-ico--sm svg { width: 20px; height: 20px; }
/* Ô điều kiện hoàn thành (đỏ nhạt) */
html body .dts .dts-cond { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; background: #fff1f1; border: 1px solid #fecaca; color: #3f0d0f; font: 500 17px/1.5 var(--ff-body); }
html body .dts .dts-cond strong { color: var(--red-txt); font-weight: 800; }
html body .dts .dts-cond__ico { display: grid; place-items: center; flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: var(--red); color: #fff; }
html body .dts .dts-cond__ico svg { width: 14px; height: 14px; }
/* Nội dung trên HPO + bảng thời gian */
html body .dts .dts-hpo { display: grid; gap: 6px; align-content: start; color: var(--ink); font: 500 17px/1.5 var(--ff-body); }
html body .dts .dts-hpo__lead { font-weight: 800; color: var(--ink); }
html body .dts .dts-hpo__list { display: grid; gap: 2px; counter-reset: dts; }
html body .dts .dts-hpo__list > li { position: relative; padding-left: 30px; }
html body .dts .dts-hpo__list > li::before { counter-increment: dts; content: counter(dts); position: absolute; left: 0; top: .2em; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--b); color: #fff; font: 800 13px/1 var(--ff-display); }
html body .dts .dts-hpo__list--dot > li::before { content: ""; top: .55em; left: 8px; width: 8px; height: 8px; border-radius: 50%; }
html body .dts .dts-hpo__note { color: var(--txt); font-weight: 600; }
html body .dts .dts-times { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
html body .dts .dts-times li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 14px; border-top: 1px solid var(--line); font: 500 17px/1.4 var(--ff-body); color: var(--txt); }
html body .dts .dts-times li:first-child { border-top: 0; }
html body .dts .dts-times b { color: var(--red-txt); font-weight: 800; white-space: nowrap; }
html body .dts .dts-times span { white-space: nowrap; }
html body .dts .dts-safe { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font: 700 clamp(17px, 1.4vw, 20px)/1.3 var(--ff-display); }
html body .dts .dts-safe .dts-ico { background: #fff1f1; color: var(--red); }
/* Danh mục 6 môn khi nằm trong phương án: bỏ khung ngoài, giữ hàng môn */
html body .dts .platform-v2-curriculum.syll.syll--chapters { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent !important; }
html body .dts .platform-v2-curriculum .curr-head--chapters { margin: 0 0 14px; }
/* ==========================================================================
   PHƯƠNG ÁN A — Bento sáng
   ========================================================================== */
/* A: bảng thời gian DAT thành 3 ô ngang cho gọn */
/* ==========================================================================
   PHƯƠNG ÁN B — Khối xanh đậm + hàng ngang
   ========================================================================== */
html body .dts .dts-b-theory { padding: 0; overflow: hidden; }
html body .dts .dts-b-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 48px); align-items: center; padding: clamp(22px, 3vw, 44px); background: radial-gradient(90% 120% at 100% 0%, #3b49ff 0%, transparent 55%), linear-gradient(135deg, #1b22a8 0%, var(--navy) 55%, #151c5c 100%); color: #fff; }
html body .dts .dts-b-hero .dts-h3 { color: #fff; }
html body .dts .dts-b-hero .dts-desc { color: #dfe6ff; }
html body .dts .dts-b-feats { display: grid; gap: 12px; margin-top: 20px; }
html body .dts .dts-b-feats li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); }
html body .dts .dts-b-feats .dts-ico { background: rgba(250, 204, 21, .16); color: #facc15; }
html body .dts .dts-b-feats h4 { color: #fff; font: 800 clamp(17px, 1.35vw, 20px)/1.3 var(--ff-display); }
html body .dts .dts-b-feats p { margin-top: 4px; color: #dfe6ff; font: 400 17px/1.5 var(--ff-body); }
html body .dts .dts-b-hero__gauge { display: grid; justify-items: center; gap: 18px; text-align: center; }
html body .dts .dts-b-ring { --p: 70; position: relative; width: min(100%, 320px); aspect-ratio: 1; padding: 14px; border-radius: 50%; background: conic-gradient(#facc15 calc(var(--p) * 1%), rgba(255, 255, 255, .16) 0); }
html body .dts .dts-b-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 6px solid #1b2280; }
html body .dts .dts-b-ring__badge { position: absolute; right: 2%; bottom: 6%; display: grid; place-items: center; width: 27.5%; aspect-ratio: 1; border-radius: 50%; background: #facc15; color: #0b1240; font: 900 clamp(20px, 1.94vw, 29px)/1 var(--ff-display); box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .5); }
html body .dts .dts-b-hero__gauge figcaption { max-width: 34ch; color: #dfe6ff; font: 500 17px/1.5 var(--ff-body); }
html body .dts .dts-b-hero__gauge figcaption strong { color: #facc15; }
/* 21/11: 2 hình trong vòng 70% (Xác thực khuôn mặt / Ứng dụng đa nền tảng) tự chuyển qua lại;
   bấm cụm bên trái để xem hình tương ứng. JS: assets/js/homepage-theory-feature-image-switcher.js */
html body .dts .dts-b-ring__slides { position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; border: 6px solid #1b2280; background: #1b2280; }
html body .dts .dts-b-ring .dts-b-ring__slide { position: absolute; inset: 0; border: 0; border-radius: 0; opacity: 0; transform: scale(1.06); transition: opacity .7s ease, transform .9s ease; }
html body .dts .dts-b-ring .dts-b-ring__slide.is-active { opacity: 1; transform: none; }
html body .dts .dts-b-ring .dts-b-ring__slide--contain { object-fit: contain; object-position: center; padding: 0 14%; background: #fff; }   /* 21/11: căn giữa. border-radius:0 ở trên là bắt buộc: bo 50% + padding làm trình duyệt cắt hình theo hình bầu dục hẹp → mất góc nút Google Play/App Store */
html body .dts .dts-b-feats li[data-slide] { position: relative; overflow: hidden; cursor: pointer; transition: background-color .25s ease, border-color .25s ease; }
html body .dts .dts-b-feats li[data-slide]:hover { background: rgba(255, 255, 255, .13); }
html body .dts .dts-b-feats li[data-slide].is-active { background: rgba(250, 204, 21, .1); border-color: #facc15; }
html body .dts .dts-b-feats li[data-slide]:focus-visible { outline: 3px solid #facc15; outline-offset: 3px; }
/* vạch chạy dưới cụm đang hiện = còn bao lâu nữa thì tự chuyển hình */
html body .dts .dts-b-feats li[data-slide]::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: #facc15; }
html body .dts .dts-b-feats.is-cycling li[data-slide].is-active::after { animation: dts-theory-slide-timer var(--dts-slide-ms, 5000ms) linear forwards; }
html body .dts .dts-b-feats.is-paused li[data-slide].is-active::after { animation-play-state: paused; }
@keyframes dts-theory-slide-timer { to { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
html body .dts .dts-b-ring .dts-b-ring__slide { transition: none; transform: none; }
}
html body .dts .dts-b-learn { display: grid; grid-template-columns: minmax(250px, .9fr) minmax(0, 2.6fr); gap: clamp(16px, 2.4vw, 32px); padding: clamp(20px, 2.6vw, 36px); align-items: start; }
html body .dts .dts-b-side { display: grid; gap: 12px; }
html body .dts .dts-b-side__lead { padding-left: 12px; border-left: 4px solid var(--b-hp); color: var(--b-deep); font: 800 clamp(20px, 1.6vw, 24px)/1.2 var(--ff-display); }
html body .dts .dts-b-side__list { display: grid; gap: 12px; }
html body .dts .dts-b-side__item { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 16px; background: linear-gradient(120deg, var(--b-hp), var(--navy)); color: #fff; box-shadow: 0 16px 30px -22px rgba(43, 38, 251, .9); }
html body .dts .dts-b-side__item img { flex: none; width: 84px; height: 66px; object-fit: contain; }
html body .dts .dts-b-side__item h5 { font: 800 clamp(17px, 1.35vw, 20px)/1.25 var(--ff-display); color: #fff; }
html body .dts .dts-b-side__item p { margin-top: 3px; font: 400 15px/1.4 var(--ff-body); color: #dbe4ff; }
html body .dts .dts-b-side__item a { color: #facc15; }
html body .dts .dts-b-practice { border-top: 4px solid var(--red); }
html body .dts .dts-b-phead { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 24px; }
html body .dts .dts-b-phead .dts-h3 { margin: 0; }
html body .dts .dts-b-phead__lead { grid-column: 1 / -1; color: var(--txt); font: 500 clamp(17px, 1.3vw, 19px)/1.4 var(--ff-body); }
html body .dts .dts-b-rows { display: grid; gap: 14px; margin-top: 16px; }
html body .dts .dts-b-row { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.2fr) minmax(0, 1.15fr); gap: clamp(14px, 1.8vw, 24px); align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: #fbfcff; }
html body .dts .dts-b-row__media { aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #e8eefb; }
html body .dts .dts-b-row__media img { width: 100%; height: 100%; object-fit: cover; object-position: 75% 55%; }
html body .dts .dts-b-row__main { display: grid; gap: 8px; }
html body .dts .dts-b-row__tag { justify-self: start; padding: 4px 12px; border-radius: 8px; background: var(--red); color: #fff; font: 800 15px/1.2 var(--ff-display); letter-spacing: .06em; }
html body .dts .dts-b-row__main h4 { color: var(--b-deep); font: 800 clamp(19px, 1.6vw, 24px)/1.25 var(--ff-display); }
html body .dts .dts-b-row__desc { color: var(--txt); font: 400 17px/1.5 var(--ff-body); }
html body .dts .dts-b-row__side { padding: 14px; border-radius: 14px; background: #fff; border: 1px solid #e3e9f6; }
html body .dts .dts-times--exam li { justify-content: space-between; }
html body .dts .dts-b-practice .dts-safe { margin-top: 14px; }
/* ==========================================================================
   PHƯƠNG ÁN C — Số liệu lớn + bảng so sánh nền tối
   ========================================================================== */
html body .dts .dts-safe--dark { color: #fff; }
html body .dts .dts-safe--dark .dts-ico { background: rgba(250, 204, 21, .16); color: #facc15; }
html body .dts .dts-cond--dark { background: rgba(226, 20, 27, .14); border-color: rgba(252, 165, 165, .35); color: #fff; }
html body .dts .dts-cond--dark strong { color: #facc15; }
/* ==========================================================================
   Khổ vừa / nhỏ
   ========================================================================== */
@media (max-width: 1199px) {
html body .dts .dts-b-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
html body .dts .dts-b-row__side { grid-column: 2; }
html body .dts .dts-b-row__media { grid-row: span 2; }
}
@media (max-width: 1023px) {
html body .dts .dts-b-hero { grid-template-columns: 1fr; }
html body .dts .dts-b-learn { grid-template-columns: 1fr; }
html body .dts .dts-b-side { position: static; }
html body .dts .dts-b-side__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html body .dts .dts-b-side__item { flex-direction: column; text-align: center; }
}
@media (max-width: 899px) {
html body .dts .dts-b-row { grid-template-columns: 1fr; }
html body .dts .dts-b-row__media { grid-row: auto; aspect-ratio: 16 / 7; }
html body .dts .dts-b-row__side { grid-column: auto; }
}
@media (max-width: 640px) {
html body .dts .dts-panel { border-radius: 18px; }
html body .dts .dts-b-theory { padding: 0; }
html body .dts .dts-b-side__list { grid-template-columns: 1fr; }
html body .dts .dts-b-side__item { flex-direction: row; text-align: left; }
html body .dts .dts-b-feats li { padding: 14px; }
html body .dts .dts-ico { width: 44px; height: 44px; }
}
/* ---------- Đầu khối Thực hành gọn 1 dòng (≥1200px): "02 THỰC HÀNH  Rèn kỹ năng…" ---------- */
/* ---------- Gọn thêm cho B và C ở máy tính (để vừa 1 màn 1440×900 dưới header) ---------- */
@media (min-width: 1200px) {
html body .dts .dts-b-row { grid-template-columns: minmax(0, .85fr) minmax(0, 1.35fr) minmax(0, 1.15fr); padding: 10px; }
html body .dts .dts-b-row__media { aspect-ratio: 16 / 11; }
html body .dts .dts-b-row__side { padding: 12px; }
html body .dts .dts-b-rows { gap: 12px; margin-top: 12px; }
html body .dts .dts-b-practice .dts-times li { padding: 6px 14px; }
}
/* ---------- Điện thoại / máy tính bảng: ảnh mô phỏng đủ khung, danh mục môn không bị ép ---------- */
@media (max-width: 640px) {
html body .dts .dts-panel { padding: 16px; }
html body .dts .dts-b-learn { padding: 16px 12px; }
html body .dts .dts-times span { white-space: normal; }
}
@media (max-width: 899px) {
html body .dts .dts-b-phead { grid-template-columns: 1fr; }
html body .dts .dts-b-phead .dts-h3 { margin-top: 8px; }
}
/* ===== 20/11 — Phương án B: 2 hình Mô phỏng sa hình / DAT chuyển lên cụm "Học mọi lúc, mọi nơi"
   (hàng trải ngang dưới 3 thẻ xanh + danh mục môn; bỏ ảnh nhỏ ở 2 hàng Thực hành → hàng còn 2 cột) ===== */
html body .dts .dts-b-sims { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.2vw, 32px); margin-top: clamp(4px, 1vw, 12px); }
html body .dts .dts-b-sim { display: grid; gap: 12px; margin: 0; }
html body .dts .dts-b-sim img { display: block; width: 100%; height: auto; aspect-ratio: 1428 / 803; object-fit: cover; border-radius: 18px; border: 1px solid #e3e9f6; background: #e8eefb; box-shadow: 0 22px 40px -28px rgba(27, 34, 128, .55); }
html body .dts .dts-b-sim figcaption { text-align: center; color: var(--b-deep); font: 800 clamp(20px, 1.7vw, 26px)/1.25 var(--ff-display); }
/* 20/11 (tiếp): cột phải mỗi hàng = thẻ đỏ SA HÌNH / DAT của bản hiện tại (chữ theo --u nên cần thẻ ≥ ~500px mới đủ to)
   ≥1100px: 2 cột bằng nhau; hẹp hơn: xếp dọc, thẻ tối đa 560px canh trái (giống bản hiện tại ≤960px) */
html body .dts .dts-b-row,
html body .dts .dts-b-row:has(> .dts-b-row__main) { grid-template-columns: minmax(0, 1fr); padding: clamp(14px, 1.6vw, 22px); gap: clamp(16px, 2vw, 28px); }
html body .dts .dts-b-row__side { grid-column: auto; }
html body .dts .dts-b-row__side--card { padding: 0; border: 0; background: none; width: 100%; max-width: 560px; }
/* rule chung ".dts .dts-panel img { height: auto }" làm ảnh xe thẻ DAT phóng to đè chữ → trả lại cao theo toạ độ mẫu */
html body .dts .dts-panel .pv2-drive-card__photo { max-width: none; height: calc(85 * var(--u)); }
html body .dts .dts-panel .pv2-drive-card--road .pv2-drive-card__photo { height: calc(80 * var(--u)); }
@media (min-width: 1100px) {
html body .dts .dts-b-row,
html body .dts .dts-b-row:has(> .dts-b-row__main) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
html body .dts .dts-b-row__side--card { max-width: none; }
}
@media (max-width: 640px) {
/* điện thoại: thẻ đỏ lồng trong 2 lớp khung → bớt lề hàng + cho thẻ tràn sát mép hàng để chữ không bé quá */
html body .dts .dts-b-row,
html body .dts .dts-b-row:has(> .dts-b-row__main) { padding: 12px 8px; }
html body .dts .dts-b-row__main { padding-inline: 4px; }
html body .dts .dts-b-row__side--card { margin-inline: -4px; width: calc(100% + 8px); }
html body .dts .dts-b-sims { grid-template-columns: 1fr; }
html body .dts .dts-b-sim img { border-radius: 14px; }
}

/* ===== 20/11 (sau chốt V3) — góp ý user:
   - "Rèn kỹ năng lái xe thực hành môi trường ảo" thành tiêu đề kiểu "HỌC LÝ THUYẾT…" đặt trên 2 hình mô phỏng (trải ngang)
   - đầu khối Thực hành chỉ còn "02 THỰC HÀNH", ngay dưới là "An toàn, hiệu quả… 1 - 1", rồi câu dẫn ===== */
html body .dts .dts-b-sims__lead { grid-column: 1 / -1; margin-top: clamp(8px, 1.4vw, 20px); }
html body .dts .dts-b-sims { margin-top: 0; }
html body .dts .dts-b-phead { grid-template-columns: minmax(0, 1fr); gap: 12px; }
html body .dts .dts-b-phead .dts-safe { margin: 0; justify-self: start; }

/* ===== 20/11 — cụm "02 THỰC HÀNH" vừa 1 màn hình (máy tính ≥1100px) =====
   Header dính cao 109px → vùng nhìn = 100svh − 109px. Thẻ đỏ giữ tỉ lệ 447×245 nên chiều cao hàng phụ thuộc bề ngang thẻ:
   bề ngang thẻ = ((vùng nhìn − 36px chừa − ~200px phần cố định: đệm khung + đầu khối + khoảng cách) / 2 hàng − 28px đệm hàng) × 447/245.
   1440×900 → thẻ ~455px, 1920×1080 → ~620px; tối thiểu 420px (chữ trong thẻ không dưới ~14px), tối đa 56% bề ngang hàng. */
@media (min-width: 1100px) {
  html body .dts .dts-b-practice {
    --dts-card-w: clamp(420px, calc(((100vh - 345px) / 2 - 28px) * 1.8245), 640px);
    --dts-card-w: clamp(420px, calc(((100svh - 345px) / 2 - 28px) * 1.8245), 640px);
    padding: clamp(20px, 1.8vw, 28px) clamp(22px, 2.2vw, 36px);
  }
  html body .dts .dts-b-phead { gap: 8px; }
  html body .dts .dts-b-rows { margin-top: 12px; gap: 12px; }
  html body .dts .dts-b-row,
  html body .dts .dts-b-row:has(> .dts-b-row__main) {
    grid-template-columns: minmax(0, 1fr) min(var(--dts-card-w), 56%);
    padding: 14px 14px 14px clamp(16px, 1.6vw, 24px);
    gap: clamp(16px, 2vw, 32px);
  }
  html body .dts .dts-b-row__side--card { justify-self: end; }
}

/* 21/11 — dòng dẫn "HỌC LÝ THUYẾT" / "sẵn sàng mọi lúc, mọi nơi": luôn đúng 2 dòng.
   Dòng 2 không xuống dòng; nhỏ hơn dòng 1 một chút để vừa cột hẹp (1440px cột chỉ ~280px). */
html body .dts .dts-b-side__lead-line { white-space: nowrap; font-size: 0.9em; }
