/* Menu danh mục Mẫu A "Hai cột" (Issue #231). Điện thoại: .htv2-mdm (≤991px, toàn màn hình). Máy tính: .htv2-mdmd trong .TITLE-MENUPC. */
html.htv2-mdm-mo, html.htv2-mdm-mo body { overflow: hidden; }

.htv2-mdm-ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.htv2-mdm-anh { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border-radius: 10px; background: #eaf1fb; color: #0f6fb0; overflow: hidden; }
.htv2-mdm-anh img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Điện thoại ---------- */
/* nút ☰ đầu trang: CSS cũ (max480.css) ẩn khối này, Issue #231 cần nút mở bảng */
@media (max-width: 991px) {
  .only-mb-wrap { display: flex; align-items: center; gap: 8px; }
  .only-mb-wrap > .SEAECH-MB { flex: 1 1 auto; min-width: 0; }
  /* max480.css: .navbar-container .navbar-content .menu-mobile { background: #042475; padding: 10px 0 } và :hover { background: #ff9800 } tạo khung xanh/cam quanh nút */
  .navbar-container .navbar-content .only-mb-wrap > .MENU-MB.menu-mobile,
  .navbar-container .navbar-content .only-mb-wrap > .MENU-MB.menu-mobile:hover { display: block !important; flex: none; width: auto; margin: 0; padding: 0; float: none; background: none; border: 0; box-shadow: none; }
  .only-mb-wrap > .MENU-MB .navbar-m, .only-mb-wrap > .MENU-MB .navbar-m .header { display: block; width: auto; height: auto; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
  .only-mb-wrap > .MENU-MB .navbar-m .header a,
  .only-mb-wrap > .MENU-MB .navbar-m .header a:hover { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: #eaf1fb; box-shadow: none; color: #13286b; font-size: 18px; line-height: 1; }
  .only-mb-wrap > .MENU-MB .navbar-m .header a i { margin: 0; }
  .only-mb-wrap > .MENU-MB .navbar-m .header a br, .only-mb-wrap > .MENU-MB .navbar-m .header a span { display: none; }
}
.htv2-mdm { display: none; }
@media (max-width: 991px) {
  .htv2-mdm:not([hidden]) {
    position: fixed; inset: 0; z-index: 1000010; display: flex; flex-direction: column; height: 100vh; height: 100dvh;
    background: #fff; color: #1c2433; font-size: 14px; line-height: 1.3; text-transform: none; overflow: hidden;
    padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}
.htv2-mdm * { box-sizing: border-box; }
.htv2-mdm a { text-decoration: none; }
.htv2-mdm button { font: inherit; cursor: pointer; }
.htv2-mdm a:focus-visible, .htv2-mdm button:focus-visible, .htv2-mdmd a:focus-visible { outline: 2px solid #0f6fb0; outline-offset: -2px; }

.htv2-mdm-tren { display: flex; align-items: center; gap: 6px; padding: 10px 8px 8px 12px; border-bottom: 1px solid #e3e8f0; flex: none; position: relative; z-index: 3; }
.htv2-mdm-tim { flex: 1; min-width: 0; position: relative; }
.htv2-mdm-dong { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: none; color: #1c2433; }

/* form tìm kiếm sẵn có (chuyển từ đầu trang sang khi mở bảng, trả lại khi đóng) */
.htv2-mdm-tim .search-widget, .htv2-mdm-tim .content-widget { margin: 0; padding: 0; width: 100%; position: static; }
.htv2-mdm-tim form { display: flex; align-items: center; height: 38px; width: 100%; margin: 0; padding: 0 4px 0 12px; border: 0; border-radius: 19px; background: #f0f3f8; }
.htv2-mdm-tim .custom-select { display: none; }
.htv2-mdm-tim form .input-keyword { flex: 1; min-width: 0; width: auto; height: 36px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 14px; color: #1c2433; }
.htv2-mdm-tim form .input-keyword:focus { outline: none; }
.htv2-mdm-tim form:focus-within { box-shadow: 0 0 0 2px #0f6fb0; }
.htv2-mdm-tim form button { position: static; flex: none; width: 34px; height: 34px; margin: 0; padding: 0; border: 0; background: transparent; color: #13286b; }
.htv2-mdm-tim .wrap-keyword { position: absolute; left: 0; right: 0; top: 100%; width: auto; max-height: 60vh; overflow-y: auto; z-index: 5; background: #fff; box-shadow: 0 8px 24px rgba(10, 20, 60, .2); }

.htv2-mdm-nhanh { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; flex: none; border-bottom: 1px solid #e3e8f0; scrollbar-width: none; }
.htv2-mdm-nhanh::-webkit-scrollbar { display: none; }
.htv2-mdm-nhanh a { flex: none; padding: 6px 12px; border: 1px solid #e3e8f0; border-radius: 999px; background: #fff; color: #13286b; font-size: 13px; font-weight: 600; white-space: nowrap; }
.htv2-mdm-nhanh a:first-child { color: #c8281c; border-color: #f2c9c5; background: #fff6f5; }

.htv2-mdm-than { flex: 1; min-height: 0; display: grid; grid-template-columns: 92px minmax(0, 1fr); }
.htv2-mdm-trai { background: #f2f5fa; overflow-y: auto; }
.htv2-mdm-goc { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 10px 4px; border: 0; border-left: 3px solid transparent; background: none; color: #5f6b80; font-size: 12px; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.htv2-mdm-goc .htv2-mdm-ic { width: 24px; height: 24px; }
.htv2-mdm-goc.is-chon { background: #fff; border-left-color: #c8281c; color: #13286b; font-weight: 700; }
.htv2-mdm-phai { overflow-y: auto; padding: 12px; min-width: 0; }
.htv2-mdm-pane[hidden] { display: none; }
.htv2-mdm-pane-dau { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.htv2-mdm-pane-dau h2 { margin: 0; min-width: 0; font-size: 15px; font-weight: 700; color: #13286b; text-transform: none; overflow-wrap: anywhere; }
.htv2-mdm-pane-dau a { flex: none; font-size: 12px; font-weight: 600; color: #0f6fb0; white-space: nowrap; }
/* danh sách 1 cột (Kiểu 1): logo + tên + mũi tên, gạch ngăn mảnh */
.htv2-mdm-luoi { display: block; }
.htv2-mdm-luoi a { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 40px; padding: 7px 4px; border: 0; border-bottom: 1px solid #eef1f6; border-radius: 0; color: #1c2433; line-height: 1.25; text-align: left; overflow-wrap: anywhere; }
.htv2-mdm-luoi a::after { content: "›"; flex: none; margin-left: auto; color: #9aa3b5; font-size: 16px; line-height: 1; }
.htv2-mdm-luoi a > span:last-of-type { min-width: 0; font-size: 13.5px; }
.htv2-mdm-luoi .htv2-mdm-anh { width: 40px; height: 26px; border-radius: 0; background: none; color: #0f6fb0; }
.htv2-mdm-luoi .htv2-mdm-anh img { background: #fff; }
.htv2-mdm-luoi .htv2-mdm-anh svg { width: 20px; height: 20px; }
.htv2-mdm-tat-ca { display: block; padding: 11px; border-radius: 10px; background: #13286b; color: #fff !important; font-weight: 600; text-align: center; }
.htv2-mdm-duoi { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 12px 12px; border-top: 1px solid #e3e8f0; }
.htv2-mdm-duoi.chi-mot { grid-template-columns: 1fr; }
.htv2-mdm-lien-he, .htv2-mdm-goi { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px; border: 1px solid #e3e8f0; border-radius: 10px; background: #fff; color: #13286b; font-size: 13px; font-weight: 600; }
.htv2-mdm-goi { background: #13286b; border-color: #13286b; color: #fff; }
.htv2-mdm-lien-he .htv2-mdm-ic, .htv2-mdm-goi .htv2-mdm-ic { width: 16px; height: 16px; }

/* ---------- Máy tính ---------- */
.navbar-container .navbar-content .menu-lap .TITLE-MENUPC { position: relative; }
.htv2-mdmd { display: none; }
.navbar-container .navbar-content .menu-lap .TITLE-MENUPC.is-mo > .htv2-mdmd {
  position: absolute; left: 0; top: 100%; z-index: 1000; display: grid; grid-template-columns: 250px minmax(0, 1fr);
  width: 900px; max-width: calc(100vw - 32px); height: 430px; background: #fff; color: #1c2433; border-radius: 0 0 14px 14px;
  box-shadow: 0 18px 40px rgba(10, 20, 60, .22); font-size: 14px; line-height: 1.3; text-transform: none; text-align: left; white-space: normal; overflow: hidden;
}
.htv2-mdmd * { box-sizing: border-box; }
.htv2-mdmd a { text-decoration: none; }
.htv2-mdmd-trai { padding: 6px 0; border-right: 1px solid #e3e8f0; overflow-y: auto; }
.navbar-container .navbar-content .menu-lap .htv2-mdmd .htv2-mdmd-goc { display: flex; align-items: center; gap: 10px; height: auto; padding: 9px 16px; background: none; color: #1c2433; font-size: 14px; font-weight: 400; line-height: 1.3; text-transform: none; white-space: normal; }
.htv2-mdmd-goc span { flex: 1; min-width: 0; }
.htv2-mdmd-goc .htv2-mdm-ic:last-child { width: 14px; height: 14px; opacity: .5; }
.navbar-container .navbar-content .menu-lap .htv2-mdmd .htv2-mdmd-goc.is-chon { background: #eaf1fb; color: #13286b; font-weight: 700; box-shadow: inset 3px 0 0 #c8281c; }
.htv2-mdmd-phai { padding: 18px 22px; overflow-y: auto; min-width: 0; }
.htv2-mdmd-pane[hidden] { display: none; }
.htv2-mdmd-pane-dau { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.htv2-mdmd-pane-dau h2 { margin: 0; min-width: 0; font-size: 18px; font-weight: 700; color: #13286b; text-transform: none; }
.navbar-container .navbar-content .menu-lap .htv2-mdmd .htv2-mdmd-pane-dau a { flex: none; height: auto; padding: 0; background: none; color: #0f6fb0; font-size: 13px; font-weight: 600; line-height: 1.3; text-transform: none; white-space: nowrap; }
.htv2-mdmd-luoi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.navbar-container .navbar-content .menu-lap .htv2-mdmd .htv2-mdmd-luoi a { display: flex; align-items: center; gap: 8px; min-width: 0; height: auto; padding: 8px; background: #fff; border: 1px solid #e3e8f0; border-radius: 12px; color: #1c2433; font-size: 13px; font-weight: 400; line-height: 1.25; text-transform: none; white-space: normal; overflow-wrap: anywhere; }
.navbar-container .navbar-content .menu-lap .htv2-mdmd .htv2-mdmd-luoi a:hover { border-color: #0f6fb0; color: #0f6fb0; }
.htv2-mdmd-luoi .htv2-mdm-anh { width: 34px; height: 34px; }

@media (prefers-reduced-motion: no-preference) {
  .htv2-mdm:not([hidden]) { animation: htv2-mdm-hien .15s ease-out; }
  .navbar-container .navbar-content .menu-lap .TITLE-MENUPC.is-mo > .htv2-mdmd { animation: htv2-mdm-hien .12s ease-out; }
}
@keyframes htv2-mdm-hien { from { opacity: 0; } to { opacity: 1; } }
