/* =====================================================================
   PHƯƠNG ĐÔNG — tối ưu trang dịch vụ chạy quảng cáo (01/12/2026)
   Giữ nguyên thứ tự khối + màu; chỉ sắp lại vị trí thẻ cho đều, dễ đọc.
   Gỡ: xoá file này.
   ===================================================================== */

/* ---------- Máy tính: "Dấu hiệu" (vấn đề) trước, "Hạng mục" (giải pháp) sau,
              mỗi khối trải ngang, lưới đều không còn thẻ lẻ ---------- */
@media (min-width: 992px) {
  .single-dich_vu .ka-dv-cats > .container > .row { flex-direction: column !important; }
  .single-dich_vu .ka-dv-cats > .container > .row > .col-lg-5,
  .single-dich_vu .ka-dv-cats > .container > .row > .col-lg-7 { flex: 0 0 100%; width: 100%; max-width: 100%; }
  .single-dich_vu .ka-dv-cats > .container > .row > .col-lg-7 { margin-top: 28px; }

  /* lưới thẻ: mặc định 3 cột */
  .single-dich_vu .ka-dv-cats .row.g-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
  }
  /* chia cột theo số thẻ để không còn thẻ lẻ: 4 -> 4 cột; 5–6 -> 3 cột; 7–8 -> 4 cột; 9–10 -> 5 cột */
  .single-dich_vu .ka-dv-cats .row.g-3:has(> :nth-child(4)):not(:has(> :nth-child(5))) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .single-dich_vu .ka-dv-cats .row.g-3:has(> :nth-child(7)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .single-dich_vu .ka-dv-cats .row.g-3:has(> :nth-child(9)) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .single-dich_vu .ka-dv-cats .row.g-3 > * { width: auto; max-width: none; margin: 0; padding: 0; }
  .single-dich_vu .ka-dv-cats .ka-dv-cat { height: 100%; }
  /* ảnh thẻ: lưới 3 cột thấp lại (16:9) cho trang ngắn hơn; lưới 5 cột 3:2 */
  .single-dich_vu .ka-dv-cats .row.g-3 .ka-dv-cat img { width: 100%; height: auto !important; aspect-ratio: 16 / 9; object-fit: cover; }
  .single-dich_vu .ka-dv-cats .row.g-3:has(> :nth-child(4)):not(:has(> :nth-child(5))) .ka-dv-cat img,
  .single-dich_vu .ka-dv-cats .row.g-3:has(> :nth-child(7)) .ka-dv-cat img { aspect-ratio: 3 / 2; }

  /* tiêu đề 2 khối cùng một kiểu, mô tả không kéo quá dài */
  .single-dich_vu .ka-dv-signs h2, .single-dich_vu .ka-dv-cats .ka-dv-h2 { margin-bottom: 6px; }
  .single-dich_vu .ka-dv-signs > p { max-width: 720px; margin-bottom: 18px; }
  .single-dich_vu .ka-dv-cats .ka-dv-sec-head { margin-bottom: 16px; }
}

/* ---------- Khối "Liên hệ ngay" cuối trang: bớt chật ---------- */
@media (min-width: 992px) {
  .ka-dv-cta .row > .col-lg-4:first-child { flex: 0 0 42%; max-width: 42%; }
  .ka-dv-cta .row > .col-lg-4.list { flex: 0 0 27%; max-width: 27%; }
  .ka-dv-cta .row > .col-lg-4:last-child { flex: 0 0 31%; max-width: 31%; }
  .ka-dv-cta .ka-dv-checks ul { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; }
  .ka-dv-cta .ka-dv-checks ul li { width: auto !important; white-space: nowrap; }
  .ka-dv-cta .home-hbox1-btn { display: flex; flex-direction: column; gap: 12px; }
  .ka-dv-cta .home-hbox1-btn .ka-btn { width: 100%; margin: 0 !important; justify-content: center; }
}
