/* ==========================================================================
   Trang chủ — section "Đào tạo lái xe trên nền tảng số" (16/11/2026)
   1) Cụm 01 Lý thuyết: 3 thẻ xanh (hình trên, chữ dưới) — cùng hình + câu chữ khối
      "Học lý thuyết" trang Ưu đãi (chuong-trinh-uu-dai/), markup .pv2-learn-cards.
   2) Cụm 02 Thực hành: 2 thẻ đỏ Sa hình + DAT trình bày theo đúng brochure (16/11),
      markup .pv2-drive-cards.
   Thẻ xanh: ngay dưới phần mô tả cụm 01. Thẻ đỏ: cuối cụm 02, trải ngang dưới cả
   mục mở/đóng + ảnh mô phỏng, 2 thẻ cạnh nhau. Không đổi JS.
   Tiền tố `html body` để thắng các selector lồng trong style.css gốc.
   ========================================================================== */

/* ---- Dòng dẫn trên mỗi cụm thẻ ---- */
html body .pv2-learn-cards,
html body .pv2-drive-cards { margin-top: clamp(20px, 2.2vw, 28px); }
html body .pv2-learn-cards__lead,
html body .pv2-drive-cards__lead {
  margin: 0 0 16px;
  padding-left: 14px;
  border-left: 5px solid #2b26fb;
  color: #2d3489;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: clamp(18px, 1.6vw, 21px);
  font-weight: 700;
  line-height: 1.4;
}
html body .pv2-drive-cards__lead { border-left-color: #ea1e24; color: #b3151d; }

/* ==========================================================================
   1) 3 thẻ xanh "Học lý thuyết"
   ========================================================================== */
html body .pv2-learn-cards__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
html body .pv2-learn-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 18px 20px 22px;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(145deg, #2b26fb, #163b9f);
  box-shadow: 0 16px 34px -24px #142b85;
  color: #fff;
  text-align: center;
}
/* Vòng tròn trang trí góc phải (giống thẻ trang Ưu đãi) */
html body .pv2-learn-card::after {
  content: "";
  position: absolute;
  top: -96px;
  right: -88px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(255, 255, 255, .045);
  pointer-events: none;
}
html body .pv2-learn-card__art {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  max-width: 100%;
  height: clamp(104px, 10vw, 126px);
  margin: 0 auto 12px;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(5, 12, 60, .35));
}
html body .pv2-learn-card h4 {
  position: relative;
  margin: 0 0 4px;
  color: #fff;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: clamp(22px, 2.2vw, 27px);
  font-weight: 800;
  line-height: 1.28;
}
html body .pv2-learn-card p {
  position: relative;
  margin: 0;
  color: #eef2ff;
  font-size: 19px;
  line-height: 1.5;
}
html body .pv2-learn-card a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
html body .pv2-learn-card a:focus-visible { outline: 3px solid #facc15; outline-offset: 3px; border-radius: 4px; }

/* Máy tính bảng: vẫn 3 cột, hình thấp hơn */
@media (min-width: 601px) and (max-width: 860px) {
  html body .pv2-learn-card { padding: 14px 12px 18px; }
  html body .pv2-learn-card h4 { font-size: 20px; }
  html body .pv2-learn-card p { font-size: 17px; }
  html body .pv2-learn-card__art { height: 88px; }
}
/* Điện thoại: xếp 1 cột */
@media (max-width: 600px) {
  html body .pv2-learn-cards__grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  html body .pv2-learn-card { padding: 14px 16px 18px; }
  html body .pv2-learn-card__art { height: 96px; margin-bottom: 8px; }
}

/* ==========================================================================
   2) 2 thẻ đỏ "Học thực hành": SA HÌNH + DAT — theo mẫu ChatGPT (16/11, user chọn sau bản brochure)
   Mẫu: thẻ to, trải hết bề ngang cụm (2 thẻ bằng nhau), tỉ lệ 447 × 245; ảnh to; chữ SA HÌNH canh trái.
   Số đo lấy trên ảnh mẫu, quy về đơn vị --u = bề ngang thẻ / 447 (dùng cqw) → mọi khổ giữ đúng tỉ lệ.
   Font Montserrat Bold như brochure (ngoại lệ riêng 2 thẻ, user chốt 16/11). Ảnh xe DAT giữ ảnh cũ (user dặn).
   ========================================================================== */
@font-face {
  font-family: "Montserrat HP";
  src: url("../fonts/montserrat/montserrat-700-latin-vietnamese.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
html body .platform-v2-panel--practice .pv2-drive-cards {
  width: 100%;                      /* trải hết bề ngang khối → dòng dẫn + 2 thẻ cùng mép trái với 2 thẻ mô tả phía trên (user 16/11) */
  margin: clamp(20px, 2.2vw, 28px) 0 0;
}
html body .pv2-drive-cards__lead { margin-bottom: clamp(12px, 1.2vw, 18px); }

html body .pv2-drive-cards__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 30px);
  width: max(88%, min(100%, 880px)); /* user 16/11: thu tổng thể 2 thẻ nhỏ lại (~12%), canh giữa; chữ/ảnh theo --u nên co đúng tỉ lệ.
                                       Sàn 880px: khổ ~1024 không co thêm, tránh chữ DAT chạm 14px rồi tràn */
  margin-inline: auto;
}
html body .pv2-drive-card {
  --u: calc(100cqw / 447);
  container-type: inline-size;
  position: relative;
  min-width: 0;
  aspect-ratio: 447 / 245;          /* cao tối thiểu đúng tỉ lệ mẫu; chữ dài hơn thì thẻ tự cao thêm */
  padding: 0;
  border-radius: 22px;
  background: #e2141b;              /* đỏ khung brochure; chữ trắng tương phản ≈ 4.8:1 */
  box-shadow: 0 16px 34px -24px rgba(120, 14, 20, .85);
  color: #fff;
  font-family: "Montserrat HP", "Montserrat", "Be Vietnam Pro", system-ui, sans-serif;
  font-weight: 700;
}

/* Tiêu đề + gạch vàng (mẫu: SA HÌNH x40.8 tâm y35.6, gạch dài 166.5; DAT x34.2 tâm y34.2, gạch 103.8; chữ 37.5) */
html body .pv2-drive-card__title {
  position: absolute;
  left: calc(40.8 * var(--u));
  top: calc(16.9 * var(--u));
  margin: 0;
  color: #fff;
  font-family: inherit;
  font-size: max(24px, calc(37.5 * var(--u)));
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
html body .pv2-drive-card--road .pv2-drive-card__title { left: calc(34.2 * var(--u)); top: calc(15.5 * var(--u)); }
html body .pv2-drive-card__title::after {
  content: "";
  position: absolute;
  left: 0;
  top: calc(100% + 10.8 * var(--u));
  width: calc(166.5 * var(--u));
  height: max(4px, calc(6.6 * var(--u)));
  background: #ffcd00;
}
html body .pv2-drive-card--road .pv2-drive-card__title::after {
  top: calc(100% + 8.8 * var(--u));
  width: calc(103.8 * var(--u));
  height: max(4px, calc(5.9 * var(--u)));
}

/* Ảnh (mẫu: ảnh sân x254.8–407.5 y9.9–94.8; khung ảnh xe x236.5–412 y11.2–85.4, xe tách nền giữ tỉ lệ) */
html body .pv2-drive-card__photo {
  position: absolute;
  left: calc(254.8 * var(--u));
  top: calc(9.9 * var(--u));
  width: calc(152.7 * var(--u));
  height: calc(85 * var(--u));
  object-fit: cover;
  border-radius: calc(6 * var(--u));
}
html body .pv2-drive-card--road .pv2-drive-card__photo {
  left: calc(236.5 * var(--u));
  top: calc(8 * var(--u));
  width: calc(175.5 * var(--u));
  height: calc(80 * var(--u));
  object-fit: contain;
  border-radius: 0;
  filter: drop-shadow(0 6px 8px rgba(40, 0, 6, .4));
}

/* Thân thẻ: chữ trắng đậm, 1 cỡ */
html body .pv2-drive-card__body { position: relative; }
html body .pv2-drive-card__body p,
html body .pv2-drive-card__body ol,
html body .pv2-drive-card__body ul,
html body .pv2-drive-card__body li {
  margin: 0;
  padding: 0;
  color: #fff;
  font: inherit;
  list-style: none;
  text-wrap: nowrap;
}
html body .pv2-drive-card__steps { counter-reset: pv2-step; }
html body .pv2-drive-card__steps > li { counter-increment: pv2-step; }
html body .pv2-drive-card__steps > li::before { content: counter(pv2-step) ". "; }

/* SA HÌNH (mẫu: câu dẫn x34.2 tâm y118.5; "1." x31 y147.5; "2." y174.4; ngoặc x54 y198.8; chữ 18.4) */
html body .pv2-drive-card--yard .pv2-drive-card__body {
  padding: calc(105 * var(--u)) calc(12 * var(--u)) calc(30 * var(--u)) calc(34.2 * var(--u));
  font-size: max(14px, calc(18.4 * var(--u)));
  line-height: 1.46;                /* bước dòng ~27 */
}
html body .pv2-drive-card__lead { margin-bottom: calc(2 * var(--u)) !important; }
html body .pv2-drive-card--yard .pv2-drive-card__steps { margin-left: calc(-3.2 * var(--u)) !important; }
html body .pv2-drive-card__note { margin-left: calc(19.8 * var(--u)) !important; margin-top: calc(-2.6 * var(--u)) !important; }

/* DAT (mẫu: "1." x21 tâm y101.2; chấm con x40.7, chữ x55.8; "2." y162.3; chấm thời gian x57.2, chữ x72.3; cột ":" x257.5; bước 20.3; chữ 16.1) */
html body .pv2-drive-card--road .pv2-drive-card__body {
  padding: calc(91 * var(--u)) calc(10 * var(--u)) calc(12 * var(--u)) calc(21 * var(--u));
  font-size: max(14px, calc(15.5 * var(--u))); /* mẫu 16.1, Montserrat rộng hơn font mẫu → 15.5 để có lề phải ~13 như mẫu */
  line-height: 1.31;               /* giữ bước dòng 20.3 */
}
html body .pv2-drive-card__bullets { margin-left: calc(19.7 * var(--u)) !important; }
html body .pv2-drive-card__bullets > li::before {
  content: "•";
  display: inline-block;
  width: calc(15.1 * var(--u));
}
html body .pv2-drive-card__times { margin-left: calc(36.2 * var(--u)) !important; }
html body .pv2-drive-card__times > li { display: flex; }
html body .pv2-drive-card__times > li::before { flex: none; }
html body .pv2-drive-card__key { flex: 0 0 calc((257.5 - 72.3) * var(--u)); }
html body .pv2-drive-card__val { white-space: nowrap; }

/* Hẹp (thẻ < ~400px thì chữ chạm cỡ tối thiểu 14px và tràn): xếp chồng, mỗi thẻ tối đa 560px */
@media (max-width: 960px) {
  html body .pv2-drive-cards__grid { grid-template-columns: minmax(0, 1fr); width: 100%; max-width: 560px; margin-inline: 0; } /* canh trái cùng dòng dẫn */
}
/* Điện thoại: chữ tối thiểu 14px nên cho xuống dòng đều; số km/giờ xuống dưới tên hạng */
@media (max-width: 480px) {
  html body .pv2-drive-card__body p,
  html body .pv2-drive-card__body li { text-wrap: balance; }
  html body .pv2-drive-card--yard .pv2-drive-card__body { padding-left: calc(24 * var(--u)); padding-right: calc(16 * var(--u)); }
  html body .pv2-drive-card__note { margin-left: 0 !important; text-align: center; }
  html body .pv2-drive-card__times > li { flex-wrap: wrap; }
  html body .pv2-drive-card__key { flex: 1 1 0; min-width: 0; }
  html body .pv2-drive-card__val { flex: 0 0 100%; padding-left: calc(15.1 * var(--u)); }
}

/* ---- Bảng "Chương trình đào tạo lái xe ô tô thông minh" gọn lại (16/11/2026) ----
   Chỉ trang chủ: bớt đệm trên/dưới mỗi hàng, căn giữa theo chiều dọc.
   Giữ cỡ chữ (tiêu đề 18px, nhãn 14px) và nút mở 40px; cả hàng vẫn bấm được. */
html body #chuong-trinh-mon-hoc .syll-list--chapters .syll-row {
  padding-top: 9px !important; /* thắng !important ở homepage-platform-theory-practice-refresh.css */
  padding-bottom: 9px !important;
  row-gap: 4px;
  align-items: center;
}
html body #chuong-trinh-mon-hoc .syll-list--chapters .syll-row .syll-title-main {
  line-height: 1.3;
}
/* Điện thoại: bỏ lề thừa của khung lồng (12px mỗi bên) để tiêu đề môn rộng hơn,
   nhãn "3 phần / 15 chương" nằm cùng 1 hàng, khoảng cách giữa tiêu đề và nhãn nhỏ lại. */
@media (max-width: 600px) {
  html body #chuong-trinh-mon-hoc.syll--chapters {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  html body #chuong-trinh-mon-hoc .syll-list--chapters .syll-row {
    grid-template-columns: 26px minmax(0, 1fr) 40px !important;
    column-gap: 10px !important;
    padding-left: 12px !important;
    padding-right: 10px !important;
  }
  html body #chuong-trinh-mon-hoc .syll-list--chapters .syll-row .syll-title {
    gap: 6px !important;
  }
}
/* Tiêu đề "Chương trình đào tạo lái xe ô tô thông minh" to hơn (16/11): 21px → 24–32px */
html body #chuong-trinh-mon-hoc #chuong-trinh-mon-hoc-title {
  font-size: clamp(24px, 2.2vw, 32px) !important;
  line-height: 1.25;
}
