
/* /App_Themes/all/allcss/qi-modern-mb.css */
/* ============================================================================
 *  qi-modern-mb.css — SKIN HIỆN ĐẠI cho MOBILE (scoped .qi-modern-mb)
 *  Áp cho homehcmmb: khối tin -> CARD bo góc + đổ bóng nhẹ, header chuyên mục có
 *  gạch nhấn trái, ảnh bo tròn, tiêu đề rõ, meta/ngày xám, item danh sách gọn +
 *  tap-highlight, "Xem tiếp" -> pill. Scoped nên KHÔNG rò sang trang mobile khác.
 *  Màu chính lấy theo tenant qua var(--mau-md).
 * ========================================================================== */
.qi-modern-mb {
    --mb-primary: var(--mau-md, #c8102e);
    --mb-text: #1a2330;
    --mb-muted: #7b8794;
    --mb-surface: #ffffff;
    --mb-surface-2: #f4f6f9;
    --mb-border: #e6ebf1;
    --mb-radius: 14px;
    --mb-radius-sm: 10px;
    --mb-shadow: 0 1px 3px rgba(16, 32, 52, .07), 0 1px 2px rgba(16, 32, 52, .04);
    color: var(--mb-text);
    -webkit-tap-highlight-color: transparent;
}

/* Canh đều 2 biên (justify) cho tiêu đề + tóm tắt — nhìn gọn cạnh, hợp bố cục float */
.qi-modern-mb .news-item__title,
.qi-modern-mb .news-item__titleTop,
.qi-modern-mb .news-item__title a,
.qi-modern-mb .news-item__titleTop a,
.qi-modern-mb .moreless-content.more {
    text-align: justify;
    text-justify: inter-word;
}

/* ====================== KHỐI TIN -> CARD ====================== */
/* Khối tin chính đầu trang (.HomeTop = mobileHomeTop) KHÔNG card/border — để trải thoáng. */
.qi-modern-mb .HomeTops,
.qi-modern-mb .HomeCategory,
.qi-modern-mb .qiContainer {
    background: var(--mb-surface);
    border: 1px solid var(--mb-border);
    border-radius: var(--mb-radius);
    box-shadow: var(--mb-shadow);
    padding: 14px 14px 8px;
    margin: 0 0 14px;
    overflow: hidden;
}
.qi-modern-mb .HomeTop { margin: 0 0 10px; }
/* Ảnh bài dẫn ĐẦU TIÊN (hero) trong khối tin chính: vuông cạnh, không bo góc */
.qi-modern-mb .HomeTop .HomeTopMains:first-child img { border-radius: 0 !important; }

/* ====================== HEADER CHUYÊN MỤC ====================== */
/* gạch nhấn trái (::before) + gạch dưới mảnh; chữ hoa, đậm, màu thương hiệu */
.qi-modern-mb .HomeTopTitles {
    position: relative;
    margin: 0 0 12px;
    padding: 2px 0 9px 13px;
    border-bottom: 2px solid var(--mb-border);
}
.qi-modern-mb .HomeTopTitles::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 11px;
    width: 4px;
    border-radius: 3px;
    background: linear-gradient(var(--mb-primary), var(--mb-primary));
}
.qi-modern-mb .s_CategoryHome_Title_Parent a {
    font-size: 17.5px !important;
    font-weight: 800;
    color: var(--mb-primary) !important;
    text-transform: uppercase;
    letter-spacing: .01em;
    line-height: 1.3;
    padding: 0 !important;
}
.qi-modern-mb .expand_ico,
.qi-modern-mb .HomeTops .toogle,
.qi-modern-mb .glyphicon-menu-right { color: var(--mb-muted); }

/* ====================== BÀI DẪN (ẢNH LỚN) ====================== */
.qi-modern-mb .HomeTopMains {
    border: 0 !important;
    margin: 0 0 13px !important;
    padding: 0 0 13px !important;
    border-bottom: 1px solid var(--mb-border) !important;
}
.qi-modern-mb .HomeTopMains:last-child {
    border-bottom: 0 !important;
    padding-bottom: 2px !important;
    margin-bottom: 0 !important;
}
.qi-modern-mb .HomeTopMains img {
    width: 100%;
    border-radius: var(--mb-radius-sm);
}
.qi-modern-mb .HomeTopMains h4 { margin: 11px 0 6px; }
/* Ảnh bài dẫn trong CARD chuyên mục: bỏ full-bleed (.qimargin15 margin âm) -> không dính border card */
.qi-modern-mb .HomeTops .qimargin15 { margin: 0 0 8px !important; }
/* Divider ngăn cách bài dẫn (.NewHome_Left) với danh sách tin bên dưới trong 1 card
   (base !important xóa border-bottom của .HomeTopMains khi last-child, nên tách ở container cha) */
.qi-modern-mb .NewHome_Left:not(:last-child) {
    border-bottom: 1px solid var(--mb-border);
    padding-bottom: 12px;
    margin-bottom: 12px;
}
.qi-modern-mb .news-item__titleTop a,
.qi-modern-mb .news-item__titleTop .qitieudechinh {
    font-size: 19px !important;
    line-height: 1.35 !important;
    font-weight: 700;
    color: var(--mb-text) !important;
    opacity: 1 !important;
}

/* tóm tắt (mobile dùng .moreless-content.more, không phải .sapo) */
.qi-modern-mb .moreless-content.more,
.qi-modern-mb .moreless-content.more.shortened {
    color: var(--mb-muted);
    font-size: 14.5px;
    line-height: 1.55;
    margin: 6px 0 8px;
    opacity: 1;
    text-align: left;
}
.qi-modern-mb .morelink { color: var(--mb-primary); font-weight: 600; }

/* ====================== META / NGÀY ====================== */
.qi-modern-mb p.time,
.qi-modern-mb .time,
.qi-modern-mb p.my-2 .time {
    color: var(--mb-muted) !important;
    font-size: 12.5px;
    line-height: 1.55 !important;
    letter-spacing: .1px;
    margin: 6px 0 0 !important;
}
.qi-modern-mb .tenchuyenmucmobile {
    color: var(--mb-primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11.5px;
    margin-right: 8px;
}

/* ====================== ITEM DANH SÁCH ====================== */
.qi-modern-mb .HomeTopListNewss { margin-top: 4px; }
.qi-modern-mb .HomeTopListNewsItem {
    border-radius: var(--mb-radius-sm);
    padding: 7px 6px !important;
    margin: 0 -6px !important;
    border-bottom: 1px solid var(--mb-border) !important;
    transition: background .12s ease;
    align-items: center;
}
/* triệt padding/margin thừa bên trong item cho khe gọn (không thì cộng dồn ~30px) */
.qi-modern-mb .HomeTopListNewsItem .col-sm-12.qimaxheight,
.qi-modern-mb .HomeTopListNewsItem .col-7 { padding-bottom: 0 !important; margin-top: 0 !important; margin-bottom: 0 !important; }
.qi-modern-mb .HomeTopListNewsItem h4 { margin: 0 !important; padding: 0 !important; }
.qi-modern-mb .HomeTopListNewsItem p.time,
.qi-modern-mb .HomeTopListNewsItem .time { margin: 6px 0 0 !important; line-height: 1.55 !important; }
.qi-modern-mb .HomeTopListNewsItem:last-child { border-bottom: 0 !important; }
.qi-modern-mb .HomeTopListNewsItem:active { background: var(--mb-surface-2); }
.qi-modern-mb .HomeTopListNewsItem .col-sm-12.border-bottom { border-bottom: 0 !important; }
.qi-modern-mb .HomeTopListNewsItem img,
.qi-modern-mb .qiborderimgthump {
    border-radius: var(--mb-radius-sm);
    padding: 0 !important;
}
.qi-modern-mb .HomeTopListNewsItem .news-item__title a,
.qi-modern-mb .HomeTopListNewsItem .qitieudechinh {
    font-size: 18px !important;
    line-height: 1.4 !important;
    font-weight: 700;
    color: var(--mb-text) !important;
}
/* Bố cục FLOAT (kiểu tạp chí): thumbnail nổi góc TRÊN-PHẢI; tiêu đề dài chảy xuống
   choán khoảng trống dưới ảnh thay vì để ảnh căn giữa chừa trống trên/dưới.
   (dùng float thay flex vì flex-cột không cho chữ bao quanh ảnh) */
.qi-modern-mb .HomeTopListNewsItem.row { display: flow-root !important; }
.qi-modern-mb .HomeTopListNewsItem .col-5 {
    float: right;
    width: 42%;
    max-width: 155px;
    margin: 2px 0 6px 12px !important;
    padding: 0 !important;
}
.qi-modern-mb .HomeTopListNewsItem .col-7 {
    float: none !important;          /* BS3 grid mặc định float:left -> bỏ để chữ bao quanh ảnh */
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    overflow: visible !important;   /* KHÔNG tạo BFC để chữ bao quanh float */
    padding: 0 !important;
    margin: 0 !important;
}
.qi-modern-mb .HomeTopListNewsItem .col-5 img,
.qi-modern-mb .HomeTopListNewsItem .qiborderimgthump {
    width: 100%;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    border-radius: var(--mb-radius-sm);
}
/* Tin KHÔNG ảnh (.col-sm-12): base cho margin 0 10px -> thụt trái + tràn/sát phải. Bỏ để căn đều 2 biên */
.qi-modern-mb .HomeTopListNewsItem .col-sm-12,
.qi-modern-mb .HomeTopListNewsItem .col-sm-12.qimaxheight {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    float: none !important;
}

/* ====================== "XEM THÊM/TIẾP" -> PILL VIỀN + HOVER ====================== */
.qi-modern-mb .xem-tiep {
    display: block;
    text-align: center;
    border: 1.5px solid var(--mb-primary) !important;
    background: var(--mb-surface) !important;
    color: var(--mb-primary) !important;
    font-weight: 700;
    font-size: 14.5px !important;
    border-radius: 999px !important;
    padding: 11px 18px !important;
    margin: 10px 0 4px !important;
    box-shadow: none !important;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.qi-modern-mb .xem-tiep i { margin-left: 7px; transition: transform .18s ease; }
.qi-modern-mb .xem-tiep:hover,
.qi-modern-mb .xem-tiep:active,
.qi-modern-mb .xem-tiep:focus {
    background: var(--mb-primary) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px -4px var(--mb-primary);
}
.qi-modern-mb .xem-tiep:hover i,
.qi-modern-mb .xem-tiep:active i { transform: translateX(4px); }

/* ====================== CHILD CATEGORIES ====================== */
.qi-modern-mb .child-categories {
    border-radius: var(--mb-radius-sm);
    border-color: var(--mb-border) !important;
    overflow: hidden;
    margin-top: 8px;
}
.qi-modern-mb .child-categories .child-category a {
    border-top-color: var(--mb-border) !important;
    color: var(--mb-text);
    font-weight: 600;
}

/* ====================== QUẢNG CÁO (ảnh full) bo góc ====================== */
.qi-modern-mb > a.w-100 img,
.qi-modern-mb a.w-100.py-1 img { border-radius: var(--mb-radius-sm); }

/* ====================== BỎ HIỆU ỨNG CHẠM XẤU (mobile) ====================== */
/* Khi chạm link tin, trình duyệt mobile hiện tap-highlight + outline focus tạo khung bo
   viền quanh tiêu đề rất xấu -> tắt trong skin mobile (scoped .qi-modern-mb). */
.qi-modern-mb,
.qi-modern-mb * { -webkit-tap-highlight-color: transparent; }
.qi-modern-mb a:focus,
.qi-modern-mb a:active,
.qi-modern-mb a:focus-visible { outline: none !important; box-shadow: none !important; }

/* /App_Themes/all/allcss/qi-menu-mb.css */
/* ================================================================================
   qi-menu-mb.css — THANH MỤC CHUYÊN MỤC TRÊN ĐIỆN THOẠI (kiểu thanh mục báo Dân trí)
   ================================================================================
   DÙNG CHUNG cho: các trang chủ bản mobile (/homemb · /homehcmmb · /hometab …), mọi trang mobile khác
   có `.scrollmenu`, và trang chủ RESPONSIVE bản mới (hậu tố "rp").
   Trước đây bộ quy tắc này nằm trong qi-home-rp.css nên chỉ trang "rp" được hưởng; user chốt
   2026-08-04 áp dụng chung nên tách ra tệp riêng.

   Bốn điểm học từ Dân trí:
     ① biểu tượng NGÔI NHÀ đứng đầu (`.qirp-menu-nha`);
     ② hai NÚT ĐIỀU HƯỚNG: mũi tên phải khi còn mục phía sau, mũi tên trái khi đã cuộn đi để quay lại
        (ẩn/hiện do /js/qi-home-rp.js quyết định);
     ③ THANH CHỈ BÁO MẢNH 3 px phía dưới — thấy còn mục và kéo được bằng tay;
     ④ DÍNH TRÊN ĐỈNH khi cuộn để luôn thao tác được.

   Số đo chữ lấy theo Dân trí: 14 px đậm 600, dòng 18 px, màu #000, mục đang xem gạch chân màu đơn vị.

   ⚠️ KHÔNG dùng `scroll-snap` (kéo vị trí về mốc gần nhất ⇒ nút điều hướng bấm mà không cuộn) và
      KHÔNG đổi `padding` bằng JS (làm scrollWidth/scrollLeft nhảy ⇒ vòng lặp scroll, nút nhấp nháy).
   ⚠️ Sửa tệp này thì phải TĂNG `?v=` ở mọi nơi nạp nó — tài sản tĩnh có Cache-Control 7 ngày.
   ================================================================================ */

/* ---------- 1. Thanh mục (áp cho MỌI trang mobile có .scrollmenu) ---------- */
.scrollmenu {
    display: flex;
    align-items: stretch;
    gap: 2px;
    height: auto;                       /* bản cũ đặt cứng 37 px ⇒ chữ bị hàng dưới đè */
    padding: 0 10px;
    background: #fff;
    border-bottom: 1px solid #e3e5e8;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;

    /* ③ thanh chỉ báo mảnh */
    scrollbar-width: thin;                                  /* Firefox */
    scrollbar-color: rgba(0, 0, 0, .35) transparent;
}

.scrollmenu::-webkit-scrollbar { height: 3px; }
.scrollmenu::-webkit-scrollbar-track { background: transparent; }
.scrollmenu::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .35); border-radius: 3px; }
.scrollmenu::-webkit-scrollbar-thumb:hover { background: var(--mau-md, #0071a6); }

.scrollmenu > a, .scrollmenu li > a {
    flex: 0 0 auto;
    padding: 11px 9px 9px;
    font-size: 14px;
    font-weight: 600;
    line-height: 18px;
    color: #000;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.scrollmenu > a:hover, .scrollmenu li > a:hover,
.scrollmenu a.active, .scrollmenu li.active > a {
    color: var(--mau-md, #0071a6);
    border-bottom-color: var(--mau-md, #0071a6);
}

/* markup của bản cũ có thể bọc trong <ul>/<li> — đưa về một hàng, bỏ dấu đầu dòng */
.scrollmenu ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.scrollmenu li { flex: 0 0 auto; list-style: none; }

/* ① biểu tượng trang chủ */
.scrollmenu .qirp-menu-nha { padding-left: 2px; padding-right: 12px; font-size: 16px; color: var(--mau-md, #0071a6); }

/* ---------- 2. Khung bọc: dính đỉnh + mốc định vị cho hai nút ---------- */
/* ④ Dính đỉnh. Ở bản mobile, vùng cuộn là `.snap-content` (position: fixed; overflow: auto) nên thanh
   mục dính theo vùng đó — đúng như mong đợi. */
.qirp-menu-wrap {
    position: sticky;
    top: 0;
    z-index: 90;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

/* có hai nút ⇒ chừa chỗ CỐ ĐỊNH hai bên (không đổi bằng JS) */
/*  Chừa chỗ hai bên cho hai nút điều hướng. User chốt 2026-08-05: **15px CỐ ĐỊNH** (trước để 34px nên
    biểu tượng trang chủ nằm thụt hẳn vào trong). Vẫn phải là số CỐ ĐỊNH — đổi padding bằng JS sẽ làm
    scrollWidth/scrollLeft nhảy, gây vòng lặp cuộn và nút nhấp nháy (xem chú thích đầu tệp). */
.qirp-menu-wrap .scrollmenu { padding: 0 15px; }

/* ---------- 3. Hai nút điều hướng ---------- */
.qirp-menu-lui,
.qirp-menu-toi {
    display: none;                      /* JS bật khi cần */
    position: absolute;
    top: 0;
    bottom: 4px;                        /* chừa đường kẻ + thanh chỉ báo */
    width: 34px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: #fff;
    color: #000;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.qirp-menu-toi { right: 0; background: linear-gradient(to right, rgba(255, 255, 255, 0) 0, #fff 45%); }
.qirp-menu-lui { left: 0; background: linear-gradient(to left, rgba(255, 255, 255, 0) 0, #fff 45%); }

.qirp-menu-lui:hover, .qirp-menu-toi:hover { color: var(--mau-md, #0071a6); }

/* Vỏ desktop có rule `.fa-angle-right:before { color: white }` (mũi tên trên nền màu của slideshow)
   ⇒ mũi tên hai nút này bị tô TRẮNG trên nền trắng, coi như mất. Ép lại màu chữ. */
.qirp-menu-lui i, .qirp-menu-lui i:before,
.qirp-menu-toi i, .qirp-menu-toi i:before { color: inherit !important; }

/* ---------- 4. Hàng chữ chạy + đổi ngôn ngữ (đi liền dưới thanh mục) ---------- */
.qirp-hang-chuchay .chuchaymobile,
.qirp-vo-mb .chuchaymobile {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    color: #d32f2f;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
}

/* Chữ chạy phải GIÃN hết phần còn lại của hàng. Markup (cả /homemb, /homehcmmb và bản rp) có class
   Bootstrap `flex-grow-0` = `flex-grow: 0 !important` nên `flex: 1 1 auto` ở trên bị ghi đè ⇒ khối chữ
   chạy đứng đúng **320px** (bề rộng mặc định của thẻ <marquee>) và để trống một dải bên phải — đo ở
   cửa sổ 611px: trống 225px, nhìn như nút EN nằm trong một ô trắng rộng bất thường. */
.qirp-hang-chuchay .chuchaymobile,
.qirp-vo-mb .chuchaymobile,
.chuchaymobile.qiChuChay { flex-grow: 1 !important; }

.chuchaymobile.qiChuChay marquee { width: 100%; }

/* ---------- 5. NÚT ĐỔI NGÔN NGỮ — KÍCH THƯỚC CỐ ĐỊNH TRÊN MỌI GIAO DIỆN ----------
   User chốt 2026-08-04: "phần tiếng anh nên fix cố định kích thước trên các giao diện".
   Bản cũ khai mỗi chỗ một kiểu: `width="50px"` (trang mobile), `width="50"` (_MasterTab), KHÔNG khai gì
   (vỏ desktop Hóc Môn ⇒ ăn cỡ gốc của ảnh), có nơi thêm `.logo-tienganh{max-height:45px}`. Ảnh
   `/Images/eng.svg` · `/Images/vn.svg` cỡ gốc **49×24** ⇒ chốt **50×24** cho mọi nơi.
   (Rule này còn được lặp trong `qistyleall-modern.css` để các vỏ DESKTOP cũng ăn — hai bộ CSS không
   trang nào nạp cả hai một cách bắt buộc.) */
#tienganh, #tiengviet { flex: 0 0 auto; display: inline-flex; align-items: center; }

#tienganh img, #tiengviet img {
    width: 50px !important;
    height: 24px !important;
    /* `max-height: none` là BẮT BUỘC: nhiều vỏ chặn ảnh kiểu `.landing-2 img{max-height:20px!important}`
       (vỏ Hóc Môn) và max-height thắng height ⇒ không mở ra thì mỗi vỏ vẫn một cỡ. */
    max-height: none !important;
    max-width: none;
    object-fit: contain;
    display: block;
}

/* nút ngôn ngữ luôn dính lề phải của hàng chữ chạy */
.qirp-hang-chuchay > .px-2:last-child { margin-left: auto; }

/* ---------- KHAY CHỌN NGÔN NGỮ CĂN GIỮA HÀNG CHỮ CHẠY ----------
   (user 2026-08-07: "combo chọn ngôn ngữ dính sát vào border trên => căn giữa").
   Hàng `.qirp-hang-chuchay` là flex nhưng để `align-items` mặc định (stretch) — ô bọc `.px-2` giãn hết
   chiều cao còn cái nút bên trong chỉ cao 26px nên nằm sát MÉP TRÊN của hàng 39px (đo: nút y=135 ≡ mép
   trên hàng). Cho cả hàng và ô bọc căn giữa theo trục dọc. */
.qirp-hang-chuchay { align-items: center; }
.qirp-hang-chuchay > .px-2 { display: flex; align-items: center; }

/* ---------- TRANG CHI TIẾT TIN (bản điện thoại): NGÀY-LƯỢT ĐỌC-CHIA SẺ và BỘ CÔNG CỤ là HAI KHỐI ----------
   User 2026-08-07: "phải tách nhau thành 2 dòng và 2 khối riêng biệt có đường bo và màu nền giống nhau".
   Đo trước khi sửa: khối ngày/lượt đọc nền #e9f3ff, KHÔNG bo góc, rộng 390 (x=25); còn thanh công cụ
   nền #f3f3f4, bo 10px, rộng 420 (x=10) — do nó nằm trong `.row` có lề âm -15px. Cho khối trên cùng
   lề âm ⇒ hai khối trùng khít bề ngang, cùng nền + bo góc, cách nhau 10px. */
.qiluotdocchitiet.qi-nhom-ngaydoc {
    margin: 0 -15px 10px !important;
    padding: 5px 20px !important;
    background: #f3f3f4 !important;
    border-radius: 10px;
}

/* Khối công cụ: bỏ gạch chân (bản cũ dùng `border-bottom` để ngăn cách) vì nay đã là khối bo góc riêng. */
.action_bar_news.border-bottom { border-bottom: 0 !important; }

/* ---------- "TIN CÙNG CHUYÊN MỤC" (trang chi tiết bản điện thoại): ẢNH và CHỮ cách nhau 10px ----------
   User 2026-08-07: "tin cùng chuyên mục xấu, chữ ảnh còn dính nhau, chưa theo chuẩn 10px".
   Markup: `ul.item_hint > li.d-flex.flex-row` = ảnh bên trái + khối chữ bên phải, không có khe nào;
   khối tin lớn `.big_item_news` đã có `mt-10` cho tiêu đề nên chỉ cần lo phần danh sách. */
.qiboxtincungchuyenmuc ul.item_hint { row-gap: 10px; }
.qiboxtincungchuyenmuc ul.item_hint > li { column-gap: 10px; }
.qiboxtincungchuyenmuc ul.item_hint > li > *:not(:first-child) { min-width: 0; }

/* Tiêu đề "Tin cùng chuyên mục": gạch chân sát chữ quá (user 2026-08-07) ⇒ chừa 8px trước vạch,
   10px sau vạch tới tin đầu tiên. */
.qiboxtincungchuyenmuc .qitieudetincungchuyenmuc { padding-bottom: 8px !important; margin-bottom: 10px !important; }
