:root{
    --brand:#0b63ce; --ink:#0f172a; --paper:#fff;
    --radius:16px; --shadow:0 6px 16px rgba(0,0,0,.12);
    --shadow-hover:0 12px 28px rgba(0,0,0,.18);
  }

  /* WRAPPER GIỮA TRANG */
  .item-sub-page-card-grid-wrapped{
    width:100%;
    padding-inline:12px;
  }

  /* FLEXBOX: TỰ CĂN GIỮA CÁC HÀNG */
  .item-sub-page-card-grid{
    display:flex;
    flex-wrap:wrap;
    gap:24px;                     /* khoảng cách giữa card */
    justify-content:center;       /* canh giữa theo hàng ngang */
    align-content:flex-start;     /* các hàng xếp sát lên trên */
    max-width:1200px;             /* giới hạn bề rộng đẹp mắt */
    margin-inline:auto;           /* đặt grid vào giữa trang */
  }

  /* CARD CỠ CỐ ĐỊNH => HÀNG DƯỢC CĂN GIỮA ĐẸP */
  .item-sub-page-card{
    flex:0 1 620px;               /* mỗi card rộng ~320px, tự xuống hàng */
    max-width:360px;
    width:100%;
    border-radius:var(--radius);
    overflow:hidden;
    background:var(--paper);
    box-shadow:var(--shadow);
    transition:transform .25s, box-shadow .25s;
    display:flex; flex-direction:column; height:100%;
  }
  .item-sub-page-card:hover{ transform:translateY(-4px); box-shadow:var(--shadow-hover); }

  /* Ảnh nền gọn, không quá dài */
  .item-sub-page-media{ height:180px; background-size:cover; background-position:center; position:relative; }
  .item-sub-page-badge{ position:absolute; top:10px; left:10px; background:rgba(11,99,206,.92); color:#fff; font-size:12px; font-weight:700; padding:4px 10px; border-radius:999px; }

  .item-sub-page-body{ padding:16px; display:flex; flex-direction:column; flex-grow:1; }
  .item-sub-page-title{ margin:0 0 6px; font-size:18px; font-weight:800; color:var(--ink); text-align:center; }
  .item-sub-page-sub{ margin:0 0 14px; font-size:14px; color:#475569; text-align:center; flex-grow:1; }

  .item-sub-page-btn{
    display:inline-flex; justify-content:center; align-items:center; gap:6px;
    background:var(--brand); color:#fff; text-decoration:none;
    font-weight:700; font-size:15px; padding:10px 14px; border-radius:999px;
    box-shadow:0 6px 12px rgba(11,99,206,.25); margin:auto;
  }
  .item-sub-page-btn:hover{ opacity:.9; }

  /* Breakpoints tinh chỉnh */
  @media (max-width:1024px){ .item-sub-page-card{ flex-basis:300px; } }  /* thường ra 3-2 card */
  @media (max-width:600px){
    .item-sub-page-card{ flex-basis:100%; max-width:520px; }             /* 1 cột giữa màn hình */
    .item-sub-page-title{ font-size:16px; } .item-sub-page-sub{ font-size:13px; }
    .item-sub-page-btn{ width:100%; padding:12px; font-size:16px; }
  }