/*!
 * ============================================================================
 *  qistyleall-modern.css — PHIÊN BẢN HIỆN ĐẠI (drop-in thay cho qistyleall.css)
 * ----------------------------------------------------------------------------
 *  Cách dùng: ở master/trang muốn hiện đại, ĐỔI link
 *      /App_Themes/all/allcss/qistyleall.css   →   /App_Themes/all/allcss/qistyleall-modern.css
 *  File này @import toàn bộ qistyleall.css gốc (giữ nguyên contract class) rồi
 *  phủ lớp skin hiện đại lên trên. Trang không đổi link => KHÔNG bị ảnh hưởng.
 *
 *  Màu bám động theo tenant qua var(--qi-primary) (= --mau-md, DB ColorSite).
 *  KHÔNG set font-family (để font động của master áp dụng).
 *  Chỉ chứa skin TÁI DÙNG (card, tiêu đề khối, menu, nav, footer, scrollbar,
 *  badge). KHÔNG chứa layout riêng của homehcm2 (qim-align3, TIÊU ĐIỂM neo...).
 * ============================================================================
 */

@import url("qistyleall.css");

:root {
    --m-primary: var(--qi-primary, var(--mau-md, #004a8f));
    --m-primary-dark: var(--qi-primary-dark, #003666);
    --m-accent: var(--qi-gold, #c8901f);
    --m-surface: #ffffff;
    --m-surface-2: #f6f8fb;
    --m-border: #dbe3ec;
    --m-text: #14202e;
    --m-muted: #5c6b7e;
    --m-radius: 12px;
    --m-radius-sm: 8px;
    --m-shadow: 0 1px 2px rgba(16, 32, 52, .04), 0 6px 18px rgba(16, 32, 52, .06);
    --m-shadow-h: 0 6px 14px rgba(16, 32, 52, .09), 0 18px 38px rgba(16, 32, 52, .12);
}

/* Nền trang sạch (tenant đặt BgcolorBody trong DB sẽ tự đè lên) */
body { background: #eef2f7; }

/* ============ KHỐI → CARD ============ */
.qiContainer {
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius);
    box-shadow: var(--m-shadow);
    overflow: visible; /* KHÔNG hidden — để dropdown 3-gạch trong header không bị cắt */
    margin-bottom: 10px;
    transition: box-shadow .18s;
}
.qiContainer:hover { box-shadow: var(--m-shadow-h); }

/* Tiêu đề khối: phẳng + gạch nhấn trái */
.qihome_tieudebg {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 48px; /* mọi header khối cao BẰNG NHAU */
    padding: 8px 16px 8px 26px !important;
    background: var(--m-surface) !important;
    border-bottom: 1px solid var(--m-border) !important;
    border-left: 0 !important;
}
/* "Xem thêm" → nút pill gọn đẹp (ẩn ảnh »» cũ, hover đổi màu thương hiệu) */
.qihome_tieudebg > .xem-them { margin-left: auto; }
.qihome_tieudebg .xem-them {
    display: inline-flex !important;
    align-items: center;
    white-space: nowrap;
    font-size: 12px !important;
    font-weight: 600;
    line-height: 1;
    color: var(--m-primary) !important;
    background: rgba(16, 32, 52, .05);
    padding: 5px 12px;
    border-radius: 999px;
    text-decoration: none !important;
    transition: background .15s ease, color .15s ease;
}
.qihome_tieudebg .xem-them:hover { background: var(--m-primary) !important; color: #fff !important; }
.qihome_tieudebg .xem-them img { display: none !important; }
.qihome_tieudebg .xem-them::after { content: "›"; margin-left: 5px; font-size: 15px; font-weight: 700; line-height: 0; }
/* Gỡ dải trắng 10px trên header (.qiContainer>.qihome_tieudebg{margin-top:10px} của qistyleall)
   để header các khối (THÔNG BÁO/THƯ MỜI trong .qiContainer vs VĂN BẢN trong .van-ban) ĐỒNG NHẤT.
   + bo góc trên header khớp card (vì card không còn overflow:hidden để clip). */
.qiContainer > .qihome_tieudebg { margin-top: 0 !important; border-radius: var(--m-radius) var(--m-radius) 0 0; }
/* Dropdown 3-gạch (.s_CategoryHome_Title_Chilrent) trong header: canh phải, mở vào TRONG card.
   Bootstrap dùng Popper đặt vị trí bằng transform inline → phải hủy transform + ép right:0. */
.qihome_tieudebg .dropdown-menu {
    right: 0 !important;
    left: auto !important;
    top: 100% !important;
    transform: none !important;
    margin-top: 2px !important;
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius-sm, 8px);
    box-shadow: 0 10px 26px rgba(16, 32, 52, .16);
    max-width: 260px;
}
.qihome_tieudebg::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 12px;
    bottom: 12px;
    width: 4px;
    border-radius: 3px;
    background: linear-gradient(var(--m-primary), var(--m-primary-dark));
}
.qiborderbottom-2 { border-bottom-width: 1px !important; }
/* Khối VĂN BẢN (dạng .qiContainer, vd homegd7) cao BẰNG THÔNG BÁO/THƯ MỜI (.noidungthongbao 600px):
   ghim vùng nội dung 600px + cuộn. Nhắm riêng khối tiêu đề "Văn bản" qua :has()+title, không đụng khối khác. */
.qiContainer:has(.qihome_tieude[title="Văn bản"]) > .qiContainer_border {
    max-height: 600px;
    overflow-y: auto;
}
.qihome_tieude {
    font-weight: 800 !important;
    font-size: 15px !important;
    text-transform: uppercase;
    letter-spacing: .01em;
    color: var(--m-primary) !important;
}

/* Vùng nội dung + item tin */
.qiContainer_border { border: 0 !important; padding: 6px 14px 12px !important; }
.qiContainer_border ul { margin: 0; }
.qiContainer_border li,
.qiContainer_border .qilinoimage {
    padding: 9px 4px !important;
    border-bottom: 1px dashed var(--m-border);
    border-left: 3px solid transparent;
    transition: background .15s, border-color .15s;
}
.qiContainer_border li:last-child { border-bottom: 0; }
.qiContainer_border li:hover { background: var(--m-surface-2); border-left-color: var(--m-accent); }
.qiContainer_border a { color: var(--m-text); }
.qiContainer_border a:hover { color: var(--m-primary); text-decoration: none; }
/* THANH BAR TRÁI khi hover — đồng bộ MỌI item tin đẹp như khối TIN MỚI NHẤT (.qiContainer_border li) */
.itemthongbao,
.mq13 li, .heightvanban li, .van-ban li,
.qiheightTop li, .tieudiemmtop li,
.listitem, .itemHomeTop {
    border-left: 3px solid transparent;
    padding-left: 8px;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.itemthongbao:hover,
.mq13 li:hover, .heightvanban li:hover, .van-ban li:hover,
.qiheightTop li:hover, .tieudiemmtop li:hover,
.listitem:hover, .itemHomeTop:hover {
    background: var(--m-surface-2, #f6f8fb);
    border-left-color: var(--m-accent, var(--m-primary)) !important;
}
/* Item tin CÓ THUMBNAIL trong khối chuyenmuchome_gd3 (.row.qigd3right: ảnh col-sm-5 + tiêu đề
   col-sm-7) — items này KHÔNG phải <li>/.listitem nên chưa có THANH BAR TRÁI hover như chuẩn.
   Bổ sung cho đồng bộ. (.qigd3right có .px-0 !important nên padding-left cần !important). */
.qiContainer_border .qigd3right {
    border-left: 3px solid transparent;
    padding-left: 6px !important;
    border-radius: 4px;
    transition: background .15s ease, border-color .15s ease;
}
.qiContainer_border .qigd3right:hover {
    background: var(--m-surface-2, #f6f8fb);
    border-left-color: var(--m-accent, var(--m-primary)) !important;
}
/* Số dòng TIÊU ĐỀ item chuyenmuchome_gd3: bỏ hard-clip .qimaxheighthome (max-height:100px cắt cụt
   giữa dòng), thay bằng line-clamp cắt gọn có "…":
   - Tin CÓ ảnh  (tiêu đề ở col-sm-7)  -> tối đa 3 dòng.
   - Tin KHÔNG ảnh (tiêu đề ở col-sm-12) -> tối đa 2 dòng. */
.qigd3right .qimaxheighthome { max-height: none !important; overflow: visible !important; }
.qigd3right .titevideolisthome a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.qigd3right > .col-sm-7.titevideolisthome a { -webkit-line-clamp: 3; }
.qigd3right > .col-sm-12.titevideolisthome a { -webkit-line-clamp: 2; }
/* TIN ẢNH CHÍNH (a.qitieudechinh trong .qiContainer_border > .row.mx-0 — khối đơn vị/chuyên mục có ảnh nổi bật):
   thanh BAR TRÁI + nền khi hover, đặt ở CỘT TEXT (cột chứa tiêu đề), KHÔNG ở cạnh ảnh.
   :has() để nhắm đúng cột dù mỗi control đặt class khác nhau (col-sm-6 / col-sm-6 qiheightmain...). */
/* :not(.qiheight4) — KHÔNG áp cho khối chuyenmuchome_gd4 (.row.mx-0.qiheight4) vì đó là
   layout 2 CỘT (featured + danh sách), cả 2 cột đều chứa a.qitieudechinh -> hover bất kỳ
   đâu sẽ sáng nền + bar CẢ 2 cột. Ở gd4 để item tự hover riêng (.listitem / a.qitieudechinh). */
.qiContainer_border > .row.mx-0:not(.qiheight4) > *:has(a.qitieudechinh) {
    border-left: 3px solid transparent;
    border-radius: var(--m-radius-sm, 6px);
    padding-left: 10px;
    transition: background .15s ease, border-color .15s ease;
}
.qiContainer_border > .row.mx-0:not(.qiheight4):hover > *:has(a.qitieudechinh) {
    background: var(--m-surface-2, #f6f8fb);
    border-left-color: var(--m-accent, var(--m-primary)) !important;
}
/* Title vốn đỏ thương hiệu (≈ primary) nên hover đổi màu không thấy -> làm tối nhẹ cho có phản hồi */
.qiContainer_border a.qitieudechinh { transition: filter .15s ease, color .15s ease; }
.qiContainer_border a.qitieudechinh:hover { filter: brightness(.82); }
.embed-responsive-16by9 { border-radius: var(--m-radius-sm); overflow: hidden; }
/* Khối 2 cột (vd CT GDPT 2018-SGK, Thông tin CSGD): bỏ border THỪA ở 2 mép ngoài,
   chỉ giữ 1 đường phân cách GIỮA 2 cột (border-left của cột từ thứ 2). */
.qiContainer_border .row > .col-sm-6.border { border-left: 0 !important; border-right: 0 !important; }
.qiContainer_border .row > .col-sm-6.border ~ .col-sm-6.border { border-left: 1px solid var(--m-border) !important; }

/* Khối tin dạng col KHÔNG bọc .qiContainer (vd chuyenmuchome_gd4 / homegd10):
   tạo VIỀN CARD BO GÓC riêng = viền header (bo góc trên) + viền nội dung (bo góc dưới). */
.col-sm-6:has(> .qihome_tieudebg) > .qihome_tieudebg {
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius) var(--m-radius) 0 0;
}
.col-sm-6:has(> .qihome_tieudebg) > .qiContainer_border {
    border: 1px solid var(--m-border) !important;
    border-top: 0 !important;
    border-radius: 0 0 var(--m-radius) var(--m-radius);
    box-shadow: var(--m-shadow);
}

/* Khối chuyenmuchome_gd4 (.row.mx-0.qiheight4): control đưa bài ẢNH CHÍNH (.gd4-main) lên TOP
   cột trái + rải tin khác lấp xuống dưới, phần dư sang cột phải. Xếp TỰ NHIÊN từ trên xuống
   (KHÔNG space-between vì sẽ giãn ảnh/tiêu đề ra xa trông xấu). .gd4-main giữ ảnh+tiêu đề dính
   liền (khối con), các .listitem xếp liền dưới. Khoảng trắng (nếu chuyên mục ít tin) dồn xuống
   ĐÁY một cách tự nhiên, không tạo khe giữa. */
.qiheight4 > [class*="col-sm-7"] > .gd4-main { margin-bottom: 6px; }
/* Gạch phân tách giữa TIN CHÍNH (.gd4-main) và TIN PHỤ thêm xuống dưới — chỉ hiện khi CÓ tin
   phụ (selector .gd4-main + .listitem chỉ khớp ở cột trái, nơi listitem đứng ngay sau bài chính). */
.qiheight4 .gd4-main + .listitem {
    border-top: 1px solid var(--m-border, #ddd);
    margin-top: 4px;
    padding-top: 10px;
}
/* 2 cột (featured trái + danh sách phải) trong khối gd4 sát nhau (cột phải px-0) -> thêm
   khoảng cách GIỮA 2 cột cho thoáng. */
.qiheight4 > [class*="col-sm-5"] { padding-left: 20px !important; }
.qiheight4 > [class*="col-sm-7"] { padding-left: 12px !important; padding-right: 12px !important; }
/* Đường kẻ dọc ngăn 2 cột — CHỈ khi cột TRÁI có tin phụ (.gd4-main kèm .listitem, tức bài
   chính mô tả ngắn nên có tin lấp xuống). Không có tin phụ thì không kẻ. */
.qiheight4:has(> [class*="col-sm-7"] .listitem) > [class*="col-sm-5"] {
    border-left: 1px solid var(--m-border, #ddd);
}
/* Tin (.listitem) trong khối gd4 THẲNG LỀ với bài chính (ảnh + tiêu đề): bỏ thụt do
   border+padding, cho chữ bắt đầu ở mép nội dung cột. Thanh bar hover chuyển sang ::before
   nằm trong gutter trái (px-2 của cột) -> KHÔNG đẩy chữ, KHÔNG dính chữ, KHÔNG lệch lề. */
.qiheight4 .listitem {
    padding-left: 0 !important;
    border-left: 0 !important;
    position: relative;
}
.qiheight4 .listitem::before {
    content: "";
    position: absolute;
    left: -9px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 2px;
    background: transparent;
    transition: background .15s ease;
}
.qiheight4 .listitem:hover::before { background: var(--m-accent, var(--m-primary)); }

/* Khối biến thể Hà Nội (.white-back trong section.bg-cl — TIN TỨC, CHUYÊN MỤC, THÔNG TIN CSGD homegd12):
   card viền bo góc + bóng, cách nhau. Dùng .bg-cl .white-back (2 class) để THẮNG .margin0 (hanoi)
   vốn làm các khối DÍNH SÁT nhau. GIỮ NGUYÊN cấu trúc bên trong. */
.bg-cl .white-back {
    border: 1px solid var(--m-border) !important;
    border-radius: var(--m-radius) !important;
    box-shadow: var(--m-shadow);
    overflow: hidden;
    margin: 0 auto 16px !important;
    background: var(--m-surface) !important;
}
/* Khối THÔNG BÁO/VĂN BẢN/ĐỌC NHIỀU (.r-hol-snip): mỗi cột đã là .card riêng → KHÔNG cần viền card ngoài */
.bg-cl .white-back.r-hol-snip {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    overflow: visible;
}
/* Vùng nội dung .hol-itct có class .padding0 (padding 0) → nội dung/ảnh SÁT viền card.
   Thêm padding để mọi thứ thụt vào, ảnh không dính viền. (.bg-cl .white-back thắng .padding0) */
.bg-cl .white-back .hol-itct { padding: 10px 14px !important; }
/* Header khối Hà Nội (.b-title — vd CHUYÊN MỤC) chỉ có padding-left → SÁT viền trên. Thêm padding dọc. */
.white-back .b-title { padding-top: 14px !important; padding-bottom: 12px !important; }
/* Cỡ chữ tiêu đề item TIN TỨC Hà Nội (.titnew-lv3/.txt-sl-lv2/.txt-tplv2) đang 13px → 15px cho ĐỒNG CHUẨN (= .txt-snipt) */
.white-back .titnew-lv3,
.white-back .txt-sl-lv2,
.white-back .txt-tplv2 { font-size: 15px !important; line-height: 21px !important; }
/* Ảnh trong khối Hà Nội: bo góc cho đẹp */
.white-back .item-ratio,
.white-back .img-tt2,
.white-back .img-evnews,
.white-back .img-lv2 { border-radius: 8px; }
/* Viền cột Hà Nội (.border-lr/.border-lr2/.border-right/.border-left): làm NHẠT, chỉ là đường phân cách */
.white-back .border-lr,
.white-back .border-lr2,
.white-back .border-right,
.white-back .border-left { border-color: var(--m-border) !important; }
/* .top-lv2-new (ảnh + tiêu đề) có border full → ảnh dán sát viền mép trên.
   Thêm padding cho ảnh thụt vào + bo góc trên + viền nhạt; last item bo góc dưới khớp. */
.white-back .top-lv2-new {
    padding: 6px !important;
    border-color: var(--m-border) !important;
    border-radius: 8px 8px 0 0;
    overflow: hidden; /* clip ảnh trong bo góc, không tràn viền */
}
/* NGUYÊN NHÂN ảnh .top-lv2-new "chèn lên border": .row bên trong có margin âm -15px của
   Bootstrap -> ảnh/nội dung TRÀN ra ngoài padding+viền card. Triệt margin âm để nằm gọn. */
.white-back .top-lv2-new .row { margin-left: 0 !important; margin-right: 0 !important; }
/* Item danh sách tin Hà Nội THOÁNG hơn: thêm khoảng đệm dọc cho .border-lr (cột giữa) +
   nới khe .divrelateCat (cột phải ảnh+tiêu đề). */
.white-back .border-lr,
.white-back .border-lr2 { padding-top: 9px !important; padding-bottom: 9px !important; }
.white-back .divrelateCat { margin-bottom: 16px !important; padding-bottom: 16px !important; }
.white-back .border-lr:last-child {
    border-color: var(--m-border) !important;
    border-radius: 0 0 8px 8px !important;
}
.qiContainer_border .embed-responsive-item img,
.qiContainer_border img { border-radius: var(--m-radius-sm); transition: transform .25s; }
.qiContainer_border li:hover img { transform: scale(1.03); }
/* Bài NỔI BẬT (.qiimagemain) & tin ảnh liên quan (.qiimgrelate) trong chuyenmuchome_gd1/dn1
   KHÔNG phải <li> nên chưa có hiệu ứng zoom ảnh khi hover -> bổ sung (khung đã overflow:hidden). */
.qiimagemain img,
.qiimgrelate .qiimg { transition: transform .45s ease; }
.qiimagemain:hover img,
.qiimgrelate:hover .qiimg { transform: scale(1.08); }
/* Cột tiêu đề item-có-ảnh (chuyenmuctraiphai/tieudiemhometop...). qistyleall gốc ép
   div.qimaxheight{max-height:80px;overflow:hidden}; cộng justify-content:center bên dưới ->
   tiêu đề dài (nhất là nét đậm 700) bị căn giữa rồi CẮT cả trên lẫn dưới = "che lấp".
   Bỏ giới hạn cứng để tiêu đề hiện đủ (tiêu đề đã giới hạn ~10 từ ở server). */
.qimaxheight {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-height: none !important;
    overflow: visible !important;
}
/* An toàn cho control đưa full title: cắt GỌN ở cuối bằng "..." (tối đa 4 dòng) thay vì
   cắt ngang che chữ; ngày tháng phía dưới vẫn hiển thị đủ. */
.qimaxheight .qitieudechinh {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Item CÓ ẢNH (ảnh .col-sm-5 + tiêu đề .col-sm-7.qimaxheight) trong khối chuyên mục trái/phải
   (chuyenmuctraiphai — vd KIỂM ĐỊNH CHẤT LƯỢNG) & tiêu điểm: ẢNH đẩy LÊN ĐẦU (float trái),
   tiêu đề CHẢY bên cạnh rồi XUỐNG DƯỚI ảnh khi dài -> choán khoảng trắng dưới ảnh (thay layout
   2 cột cố định vốn để trắng dưới ảnh khi tiêu đề ngắn/dài lệch nhau). :has() nhắm đúng hàng
   item-có-ảnh (chứa .col-sm-7.qimaxheight), không đụng item không ảnh (.qilinoimage). */
.qiContainer_border li .row:has(> .col-sm-7.qimaxheight) { display: flow-root; }
.qiContainer_border li .row:has(> .col-sm-7.qimaxheight) > .col-sm-5 {
    float: left;
    width: 40%;
    max-width: 40%;
    margin-right: 10px;
}
.qiContainer_border li .row:has(> .col-sm-7.qimaxheight) > .col-sm-7.qimaxheight {
    display: block;
    float: none;
    width: auto;
    max-width: none;
    overflow: visible !important;
}
/* Bỏ giới hạn 3 dòng cho tiêu đề item-có-ảnh này để chữ dài CHẢY đủ xuống dưới ảnh (choán trắng). */
.qiContainer_border li .row:has(> .col-sm-7.qimaxheight) .qitieudechinh {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

/* Khối "chữ chạy dọc" (chuchaydoc: <div class="border p-2 my-2"><marquee direction="up">...)
   chỉ dùng .border Bootstrap (viền vuông, không bo góc/bóng) -> làm thành CARD hiện đại đồng bộ
   các khối khác. :has(> marquee[direction="up"]) nhắm đúng khối này, không đụng .border khác. */
.border:has(> marquee[direction="up"]) {
    border: 1px solid var(--m-border) !important;
    border-radius: var(--m-radius) !important;
    box-shadow: var(--m-shadow);
    background: var(--m-surface);
}

/* ============ MENU DỌC (DANH MỤC) ============ */
.wrapper {
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius);
    box-shadow: var(--m-shadow);
    overflow: visible; /* KHÔNG hidden — để submenu flyout đâm ra phải không bị cắt */
    margin-bottom: 10px;
}
/* bo góc header khớp wrapper (vì overflow không còn hidden để clip) */
body .qihomemenudoc { border-radius: var(--m-radius) var(--m-radius) 0 0; }
/* body-prefix để THẮNG rule màu động inject (.qihomemenudoc{background:ColorSite!important}) */
body .qihomemenudoc {
    position: relative;
    background: var(--m-surface) !important;
    color: var(--m-primary) !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
    padding: 14px 16px 14px 26px !important;
    border-bottom: 1px solid var(--m-border);
    font-size: 15px;
}
body .qihomemenudoc::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 14px;
    bottom: 14px;
    width: 4px;
    border-radius: 3px;
    background: linear-gradient(var(--m-primary), var(--m-primary-dark));
}
.qimenudoc { margin: 0; padding: 6px 0; }
.qimenudoc li a,
.qimenudoc .qilist > a {
    display: block;
    padding: 10px 16px !important;
    font-weight: 600;
    font-size: 13.5px;
    color: var(--m-text) !important;
    border-left: 3px solid transparent;
    transition: background .15s, border-color .15s, color .15s;
}
.qimenudoc li a:hover,
.qimenudoc .qilist > a:hover {
    background: var(--m-surface-2);
    border-left-color: var(--m-accent);
    color: var(--m-primary) !important;
    text-decoration: none;
}

/* ===== Menu dọc dạng mở rộng (menudocexpand) ===== */
/* Màu chữ NHẤT QUÁN: mọi mục (parent + leaf) CÙNG 1 màu (dark); hover = màu thương hiệu.
   Dùng #sidebar (ID) để specificity cao, thắng chắc rule đỏ (inject/qicolordefault/parentNote). */
body #sidebar .qimenudoc a,
body #sidebar .qimenudoc .dropdown-toggle,
body #sidebar .qimenudoc .qitonggle,
body #sidebar .qimenudoc a.parentNote {
    color: var(--m-text) !important;
    font-weight: 600;
    font-size: 14.5px !important; /* cùng cỡ chữ cho mọi mục (cha .qitonggle + lá a trơn) */
    line-height: 1.35 !important;
}
body #sidebar .qimenudoc a:hover,
body #sidebar .qimenudoc .dropdown-toggle:hover,
body #sidebar .qimenudoc .qilist:hover > a { color: var(--m-primary) !important; }

/* Submenu TỰ SỔ RA BÊN PHẢI khi hover (flyout, theo hướng mũi tên ▸) */
body .qimenudoc .qilist.dropright { position: relative; }
body .qimenudoc .qilist.dropright:hover > .dropdown-menu,
body .qimenudoc .qilist.dropright:focus-within > .dropdown-menu { display: block !important; }
body .qimenudoc .dropright > .dropdown-menu {
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 230px;
    margin: 0 0 0 1px;
    border: 1px solid var(--m-border);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(16, 32, 52, .18);
    padding: 6px;
    background: #fff;
    z-index: 60;
}
body .qimenudoc .dropdown-menu a { padding: 8px 12px !important; border-radius: 6px; }
body .qimenudoc .dropdown-menu a:hover { background: var(--m-surface-2); }

/* ============ TIÊU ĐIỂM & VĂN BẢN → CARD ============ */
.van-ban {
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius);
    box-shadow: var(--m-shadow);
    overflow: hidden;
    margin-bottom: 10px;
}
/* .tieudiemmtop chỉ là wrapper (bên trong đã có .qiContainer là card) → KHÔNG card kép */
.tieudiemmtop { margin-bottom: 10px; }
/* Header TIÊU ĐIỂM: bar riêng giống DANH MỤC. tieudiemhometop render .logo-title (isShowImage=false)
   HOẶC .qihome_tieudebg → style CẢ HAI thành thanh header (chữ hoa đậm + border-bottom, GIỮ logo). */
body .tieudiemmtop .logo-title,
body .tieudiemmtop .qihome_tieudebg {
    display: flex;
    align-items: center;
    background: var(--m-surface) !important;
    border-bottom: 1px solid var(--m-border) !important;
    border-radius: var(--m-radius) var(--m-radius) 0 0;
    padding: 13px 16px !important;
    margin: 0 !important;
}
body .tieudiemmtop .logo-title img {
    width: 22px !important;
    height: 22px !important;
    margin-right: 8px;
    flex: none;
}
body .tieudiemmtop .qihome_tieude {
    font-weight: 800 !important;
    text-transform: uppercase;
    color: var(--m-primary) !important;
    font-size: 15px !important;
}

/* ===== TIÊU ĐIỂM / TIN MỚI NHẤT (cột phải row1 trang home) =====
   ĐÃ BỎ ép equal-height ở global (theo lựa chọn của user — ổn định toàn hệ thống):
   không neo position:absolute, không reserve slider. Cột phải giữ LAYOUT GỐC trong flow,
   list cao theo .qiheightTop của từng trang (cuộn nếu dài) → không đè, không trắng dư, không lệch.
   (homehcm2 giữ equal-height riêng qua qi-modern.css scope .qi-modern — không ảnh hưởng.) */

/* ============ "ĐỌC NHIỀU NHẤT" — badge tròn ============ */
/* body-prefix để thắng .s_LuotNghe{color:#cc0101} của qicolordefault (nạp sau) */
body .s_LuotNghe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--m-primary);
    color: #fff !important;
    font-weight: 800;
    font-size: 13px !important;
    font-style: normal;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(16, 32, 52, .18);
    flex: none;
}
/* Category cha (parentNote) trong menu dọc: dùng màu thương hiệu cho nhất quán,
   thắng qiStyleCategory (.qimenudoc li a.parentNote) bằng tiền tố body */
body .qimenudoc li a.parentNote,
body ul.qimenudoc li a.parentNote { color: var(--m-primary) !important; font-weight: 700; }
.qiContainer_border li:nth-child(1) .s_LuotNghe { background: linear-gradient(135deg, #f7ce46, #e0a800); color: #5a4300 !important; }
.qiContainer_border li:nth-child(2) .s_LuotNghe { background: linear-gradient(135deg, #cbd0d7, #9aa2ac); color: #333a42 !important; }
.qiContainer_border li:nth-child(3) .s_LuotNghe { background: linear-gradient(135deg, #e2a877, #c1804a); color: #4a2c12 !important; }
/* Số thứ tự (.s_LuotNghe) sang TRÁI + cách nội dung 10px (đảo thứ tự flex qua order) */
.qiContainer_border .d-flex:has(.s_LuotNghe) > *:has(> .s_LuotNghe) {
    order: -1;
    padding: 0 !important;
    margin-right: 10px !important;
}
.qiContainer_border .d-flex:has(.s_LuotNghe) > .mr-auto {
    margin-right: 0 !important;
    flex: 1;
}

/* ============ THANH NAV CHÍNH (đỏ) — giữ sticky ============ */
.qimenu.menu-main { box-shadow: 0 3px 14px rgba(0, 0, 0, .16); }
.qimenu .navbar,
.qimenu .navbar-collapse,
.qimenu .navbar-nav { align-items: center !important; }
.qimenu .navbar-nav > li { display: flex; align-items: center; justify-content: center; } /* center: chữ/icon giữa nút (nhất là menu mầm non li rộng) */
.qimenu .navbar-nav .nav-link {
    padding: 12px 16px !important;
    display: flex;
    align-items: center;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .015em;
    border-radius: 6px 6px 0 0;
    border-bottom: 3px solid transparent;
    transition: background .16s ease, border-color .16s ease;
}
.qimenu .navbar-nav > li:hover > .nav-link,
.qimenu .navbar-nav > li.active > .nav-link {
    background: rgba(255, 255, 255, .14) !important;
    border-bottom-color: var(--qi-gold, #ffd34d) !important;
    color: #fff !important;
}
/* Chữ menu chính (.qimenu = menungangall, nền màu tenant) GIỮ TRẮNG khi hover/mở-dropdown/active.
   Skin trên đã ép #fff nhưng bị hocmon.css (nạp toàn cục qua ProjectCssFile trên localhost) đè:
   .navbar-hover.navbar-dark .nav-item:hover .nav-link{color:#3c3c3c!important} (spec 0,0,5,0).
   Ép lại bằng spec cao hơn (body + 5 class = 0,0,5,1). KHÔNG đụng menu Hóc Môn .qimenu22 (khác class)
   — .qimenu mặc định luôn nền tenant nên chữ trắng là đúng. */
body .qimenu .navbar-nav .nav-item:hover .nav-link,
body .qimenu .navbar-nav .nav-link:hover,
body .qimenu .navbar-nav .nav-item.show > .nav-link,
body .qimenu .navbar-nav .nav-item.active > .nav-link {
    color: #fff !important;
}
.qimenu .navbar-nav > li.menu_0 > .nav-link {
    background: transparent !important;
    border-bottom-color: transparent !important;
    border-radius: 0 !important;
}
.qimenu .fa-home,
.qimenu .fa-th { font-size: 17px; }
.qimenu .dropdown-menu {
    border: 0;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 12px 30px rgba(16, 32, 52, .18);
    padding: 6px;
    margin-top: 0 !important;
}
.qimenu .dropdown-menu .dropdown-item { border-radius: 6px; padding: 8px 12px; font-weight: 500; transition: background .15s ease; }
.qimenu .dropdown-menu .dropdown-item:hover { background: var(--m-surface-2); color: var(--m-primary); }

/* ============ MEGAMENU (panel chuyên mục) — làm gọn/hiện đại ============ */
.megamenu { padding: 16px 10px !important; border-radius: 0 0 12px 12px; }
.megamenu .col-megamenu, .megamenu .widget { padding: 0 14px 16px !important; }
/* Tiêu đề cột: chữ hoa đậm màu thương hiệu + gạch nhấn dưới */
.megamenu .widget-title {
    margin: 0 0 9px !important;
    padding-bottom: 7px;
    border-bottom: 2px solid var(--m-border, #dbe3ec);
}
.megamenu .widget-title a {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: var(--m-primary) !important;
    text-decoration: none !important;
}
/* Link mục: bo góc, hover nền nhạt + đổi màu thương hiệu + trượt nhẹ */
.megamenu .navbar-item { margin: 0 !important; }
.megamenu .navbar-item .nav-link2 {
    display: block;
    padding: 5px 8px !important;
    border-radius: 6px;
    font-size: 13.5px;
    line-height: 1.35;
    font-weight: 500;
    color: #2b3648 !important;
    text-decoration: none !important;
    transition: background .14s ease, color .14s ease, padding-left .14s ease;
}
.megamenu .navbar-item .nav-link2:hover {
    background: var(--m-surface-2, #f6f8fb);
    color: var(--m-primary) !important;
    padding-left: 12px !important;
}
.megamenu .navbar-item .nav-link2 .fa-caret-right { color: var(--m-primary); opacity: .5; font-size: 11px; margin-right: 3px; }
.megamenu .maxhieght { padding-right: 6px; }

/* ============ DẢI TIỆN ÍCH TRÊN (logo · đơn vị · tìm kiếm) ============ */
.navbar-fixed-top { box-shadow: inset 0 -1px 0 var(--m-border); padding-top: 4px !important; padding-bottom: 4px !important; }
.navbar-fixed-top .d-flex { align-items: center !important; }
.navbar-fixed-top .d-flex > .py-1 { padding-top: 0 !important; padding-bottom: 0 !important; }
.navbar-fixed-top .d-flex > .mr-auto.pt-1 { padding-top: 0 !important; }
/* nav.qibgtop1 (Bootstrap navbar) padding lớn → gỡ để bar không cao dư + căn giữa dọc chữ */
.navbar-fixed-top .qibgtop1 { padding-top: 0 !important; padding-bottom: 0 !important; min-height: 0 !important; }
.navbar-fixed-top .qibgtop1 .navbar-nav { align-items: center; }
.navbar-fixed-top .mr-auto img { padding-top: 0 !important; max-height: 40px; }
.navbar-fixed-top .input-group,
.qiMenuTime_flex .input-group { align-items: center; flex-wrap: nowrap; } /* nowrap: nút search không rớt xuống dòng dưới */
/* Dải ngày/giờ (.qiMenuTime_flex): CĂN GIỮA DỌC mọi item + GIẢM chiều cao (search nhỏ lại, ảnh RSS/EN gọn) */
.qiMenuTime_flex .d-flex { align-items: center !important; }
.qiMenuTime_flex #qitxtSearch.form-control,
.qiMenuTime_flex .input-group-append .input-group-text { height: 32px !important; }
.qiMenuTime_flex img { max-height: 24px !important; width: auto !important; }
/* Chữ chạy (marquee) TRÀN khỏi khung: .qiChuChay là flex item chứa .scrolling-text
   (nowrap, rất dài). Thiếu min-width:0 -> min-width:auto = độ rộng nội dung THẮNG cả
   max-width:650px inline -> item nở ra tràn, đẩy RSS/EN/search. Cho co lại + ẩn tràn.
   Áp cho CẢ 2 biến thể: .qiMenuTime_flex (menuchuchayngang_flex) và .qiMenuTime
   (menuchuchayngang_Old, region hcmedu/haiphong/hungyen/hoabinh - bản Old KHÔNG có
   flex-grow/max-width nên phải thêm flex:1 1 0 để co trong khổ). */
.qiMenuTime_flex .qiChuChay,
.qiMenuTime .qiChuChay {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
}
.qiMenuTime_flex .scrolling-text,
.qiMenuTime .scrolling-text { width: 100% !important; overflow: hidden; }
nav.qibgtop1 .qilitop > .qifontbold-1 { padding: 7px 12px !important; border-radius: 8px; font-weight: 700; letter-spacing: .01em; transition: background .15s ease, color .15s ease; }
nav.qibgtop1 .qilitop:hover,
nav.qibgtop1 .qilitop.show { background: transparent !important; }
nav.qibgtop1 .qilitop:hover > .qifontbold-1,
nav.qibgtop1 .qilitop.show > .qifontbold-1 { background: var(--m-primary, #c8102e) !important; color: #fff !important; }
#qitxtSearch.form-control {
    border-radius: 999px 0 0 999px !important;
    border: 1.5px solid var(--m-border) !important;
    border-right: 0 !important;
    padding: 8px 16px;
    background: #f6f8fb;
    flex: 1 1 auto; /* co giãn thích ứng thay vì cố định 210px (tránh nhảy/lệch trên tenant khác) */
    min-width: 120px;
    height: 40px !important;
    box-shadow: none;
}
#qitxtSearch.form-control:focus { background: #fff; border-color: var(--m-primary) !important; }
.input-group-append { flex: 0 0 auto; }
.input-group-append .input-group-text {
    border-radius: 0 999px 999px 0 !important;
    background: var(--m-primary, #c8102e);
    color: #fff;
    border: 0;
    cursor: pointer;
    width: 46px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: filter .15s ease;
}
.input-group-append .input-group-text:hover { filter: brightness(1.1); }

/* ============ THANH CUỘN mảnh, hiện đại ============ */
/* .mq13 (vùng nội dung VĂN BẢN): qistyleall để overflow-y:scroll (LUÔN hiện thanh cuộn dù còn trống)
   → auto (chỉ hiện khi thực sự tràn). */
.mq13 { overflow-y: auto !important; }
/* Firefox */
.qiContainer_border,
.qiheightTop,
.noidungthongbao,
.mq13,
.tieudiemmtop *,
.Content_right *,
.megamenu,
.megamenu .maxhieght,
.qimenu .dropdown-menu { scrollbar-width: thin; scrollbar-color: rgba(120, 135, 155, .45) transparent; }
/* WebKit (Chrome/Edge/Safari) */
.qiContainer_border::-webkit-scrollbar,
.qiheightTop::-webkit-scrollbar,
.noidungthongbao::-webkit-scrollbar,
.mq13::-webkit-scrollbar,
.tieudiemmtop *::-webkit-scrollbar,
.Content_right *::-webkit-scrollbar,
.megamenu ::-webkit-scrollbar,
.qimenu .dropdown-menu ::-webkit-scrollbar { width: 8px; height: 8px; }
.qiContainer_border::-webkit-scrollbar-track,
.qiheightTop::-webkit-scrollbar-track,
.noidungthongbao::-webkit-scrollbar-track,
.mq13::-webkit-scrollbar-track,
.tieudiemmtop *::-webkit-scrollbar-track,
.Content_right *::-webkit-scrollbar-track,
.megamenu ::-webkit-scrollbar-track,
.qimenu .dropdown-menu ::-webkit-scrollbar-track { background: transparent !important; margin: 4px 0; }
.qiContainer_border::-webkit-scrollbar-thumb,
.qiheightTop::-webkit-scrollbar-thumb,
.noidungthongbao::-webkit-scrollbar-thumb,
.mq13::-webkit-scrollbar-thumb,
.tieudiemmtop *::-webkit-scrollbar-thumb,
.Content_right *::-webkit-scrollbar-thumb,
.megamenu ::-webkit-scrollbar-thumb,
.qimenu .dropdown-menu ::-webkit-scrollbar-thumb {
    background: rgba(120, 135, 155, .4) !important;
    border-radius: 999px !important;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: background .2s ease;
}
.qiContainer_border::-webkit-scrollbar-thumb:hover,
.qiheightTop::-webkit-scrollbar-thumb:hover,
.noidungthongbao::-webkit-scrollbar-thumb:hover,
.mq13::-webkit-scrollbar-thumb:hover,
.Content_right *::-webkit-scrollbar-thumb:hover,
.megamenu ::-webkit-scrollbar-thumb:hover { background: var(--m-primary, rgba(92, 107, 126, .7)) !important; }
/* homegd12 (biến thể Hà Nội): .heightvanban (THÔNG BÁO/VĂN BẢN/ĐỌC NHIỀU) dùng scroll xanh mặc định → đồng bộ scroll chung */
.heightvanban { scrollbar-width: thin; scrollbar-color: rgba(120, 135, 155, .45) transparent; }
.heightvanban::-webkit-scrollbar { width: 8px; height: 8px; }
.heightvanban::-webkit-scrollbar-track { background: transparent !important; }
.heightvanban::-webkit-scrollbar-thumb {
    background: rgba(120, 135, 155, .4) !important;
    border-radius: 999px !important;
    border: 2px solid transparent;
    background-clip: padding-box;
}
.heightvanban::-webkit-scrollbar-thumb:hover { background: var(--m-primary, rgba(92, 107, 126, .7)) !important; }

/* ============ TIÊU ĐỀ THUMBNAIL SLIDE ============ */
/* Tiêu đề quá dài → tự cắt gọn tối đa 3 dòng + "…" (tránh tràn khung thumbnail) */
.amazingslider-nav-thumbnail-tite-0 > a,
.amazingslider-nav-thumbnail-tite-1 > a,
.amazingslider-nav-thumbnail-tite-2 > a {
    display: -webkit-box !important;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
    text-overflow: ellipsis;
}

/* Item nhỏ trong khối tin (.qiheightItem — vd HOẠT ĐỘNG): tiêu đề dài cắt gọn 3 dòng + "…"
   thay cho max-height:95px;overflow:hidden của qistyleall (cắt cụt giữa dòng, xấu/ẩn chữ). */
.qiheightItem { max-height: none !important; overflow: visible !important; }
.qiheightItem a,
.qiheightItem .qitieudechinh {
    display: -webkit-box !important;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
}

/* ============ ƯU TIÊN CĂN ĐỀU 2 BÊN (JUSTIFY) cho TIÊU ĐỀ/NỘI DUNG tin ============ */
/* (KHÔNG áp cho header khối .qihome_tieude, ngày tháng .time, menu, badge) */
.qitieudechinh,
.titleItem, .titleItem a,
.qiheightmain, .qiheightmain a,
.qiheightItem, .qiheightItem a,
.qiContainer_border li a,
.tieudiemmtop li a,
.mq13 li a,
.noidungthongbao .titleItem,
.s_openmedia,
.van-ban li a { text-align: justify !important; text-justify: inter-word; }

/* ============ CHUẨN HÓA HOVER thẻ <a> TIN BÀI (toàn hệ thống) ============ */
/* Hover MỌI link tin bài -> đổi sang MÀU THƯƠNG HIỆU động var(--m-primary) (= ColorSite mỗi tenant),
   chuyển mượt, KHÔNG gạch chân. Bám theo container tin (bắt mọi <a> bên trong) + class tiêu đề đứng riêng.
   KHÔNG áp cho header khối (.qihome_tieude), "Xem thêm" (.xem-them), ngày (.time), menu, badge. */
.qiContainer_border a, .noidungthongbao a, .itemthongbao a,
.mq13 a, .heightvanban a, .van-ban li a,
.qiheightTop a, .qiheightItem a, .qiheightmain a, .tieudiemmtop a,
.listitem a, .titevideolisthome a, .qigd3right a,
.qitieudechinh, .tieudechinh a, .titleItem a, .s_openmedia,
.hol-itct a, .r-hol-snip a, .titnew-lv3 a, a.titnew-lv3,
.top-title, .txt-tplv2, .txt-sl-lv2, .txt-snipt,
.qitieudechinh_DN, .qitieudechinh_DN_right {
    transition: color .16s ease !important;
}
.qiContainer_border a:hover, .noidungthongbao a:hover, .itemthongbao a:hover,
.mq13 a:hover, .heightvanban a:hover, .van-ban li a:hover,
.qiheightTop a:hover, .qiheightItem a:hover, .qiheightmain a:hover, .tieudiemmtop a:hover,
.listitem a:hover, .titevideolisthome a:hover, .qigd3right a:hover,
.qitieudechinh:hover, .tieudechinh a:hover, .titleItem a:hover, .s_openmedia:hover,
.hol-itct a:hover, .r-hol-snip a:hover, .titnew-lv3 a:hover, a.titnew-lv3:hover,
.top-title:hover, .txt-tplv2:hover, .txt-sl-lv2:hover, .txt-snipt:hover,
.qitieudechinh_DN:hover, .qitieudechinh_DN_right:hover,
.itemHomeTop a:hover {
    color: var(--m-primary, #c8102e) !important;
    text-decoration: none !important;
}

/* ============ CHÂN TRANG ============ */
footer #CenterFooter .border-bottom { border-bottom: 0 !important; }
footer #CenterFooter > .d-flex:not(.border-bottom) { border-top: 1px solid rgba(0, 0, 0, .12); margin-top: 6px; padding-top: 12px; }
footer,
footer .jumbotron { background-color: #fdf2d6; margin: 0 !important; }
.yhy-append-wrap {
    position: fixed !important;
    left: 20px;
    bottom: 20px;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    z-index: 50;
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ============ TIÊU ĐỀ TIN — LÀM RÕ (toàn hệ thống) ============ */
/* .qitieudechinh đặt font-weight:500 nhưng nhiều tenant dùng font chỉ nạp nét 400 & 700
   (vd Cuprum) -> nét 500 rơi về 400 (mảnh, nhìn "mờ"). Ép 700 (bold thật của font) + màu
   đậm cho tiêu đề tin toàn hệ thống. Giữ màu thương hiệu cho tin nổi bật (.color-md). */
.qitieudechinh,
.qitieudechinh15,
.qiheightTop li a,
.a-simple.fw-500,
.a-simple.anim-title,
.itemHomeTop a,
.itemthongbao a {
    font-weight: 700 !important;
}

.qitieudechinh:not(.color-md),
.itemHomeTop a,
.itemthongbao a {
    color: #1a1a1a !important;
}
