/* =========================================================================
 * ĐIỆN THOẠI GỌN (dưới 768px) — Duy duyệt 16/11/2026. Máy tính KHÔNG đổi.
 * Đi cùng nd-mobile.js. Nạp sau style.css (functions.php, cạnh nd-cta.js).
 * A header 60px (nút "Sắp xếp 15 nguyện vọng" vào đầu menu, ô tìm thành kính lúp, ẩn khi cuộn xuống)
 * B 1 thanh dưới ≤56px: nút chính + Zalo; bỏ nút tròn Zalo; đồng hồ ra khỏi thanh; không nhấp nháy liên tục
 * F ô lương trang ngành, mờ mép hàng chip · C hàng tab không dính, mờ mép, tab đang chọn vào giữa
 * E trang ngành: mục lục 6 mục, thu gọn từ H2 thứ 5, nút lên đầu trang · D ẩn khối kêu gọi trùng (chỉ điện thoại)
 * ========================================================================= */
.nd-m-only,.nd-sticky-zalo,.nd-m-len{display:none}

@media (max-width:767px){
  /* ---------- A. HEADER ---------- */
  .nd-header{transition:transform .22s ease}
  .nd-header.nd-m-an{transform:translateY(-110%)}
  .nd-header .nd-wrap{min-height:59px;padding-top:7px;padding-bottom:7px;gap:6px}
  .nd-header .nd-logo{order:1;margin-right:auto;font-size:22px}
  .nd-header .nd-logo .mark-lb{width:38px;height:38px;flex-basis:38px}
  .nd-header #nd-nv-hdr,.nd-header .nd-cta-fixed{display:none!important}
  .nd-header .nd-search{display:none!important}
  .nd-header.nd-tim-mo .nd-search{display:flex!important;order:4;flex:1 1 100%;width:100%;margin:0}
  .nd-m-only{display:flex}
  .nd-header .nd-kinhlup{order:2;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border:0;background:none;font-size:19px;cursor:pointer;border-radius:10px}
  .nd-header .nd-kinhlup[aria-expanded="true"]{background:var(--pink-soft,#fbf1f2)}
  .nd-header .nd-burger{order:3}
  .nd-header .nd-mainnav{order:5}
  .nd-mainnav .nd-m-nv,.nd-mainnav .nd-m-tv{background:var(--maroon)!important;color:#fff!important;border-color:var(--maroon)!important;justify-content:center;font-weight:800}

  /* ---------- B. THANH DƯỚI ---------- */
  #nd-zalo-fab{display:none!important}
  #nd-sticky.nd-sticky-cta{height:56px;box-sizing:border-box;padding:6px 10px;gap:8px;justify-content:stretch;transform:translateY(115%);transition:transform .25s ease}
  #nd-sticky.nd-sticky-cta.nd-m-hien{transform:none}
  #nd-sticky .nd-dem{display:none!important}
  #nd-sticky .nd-cta-nut{flex:1 1 auto;min-height:44px;padding:10px 12px;font-size:15px;animation:none!important}
  #nd-sticky.nd-m-moi .nd-cta-nut{animation:nd-nhay 1.4s ease-out 1!important}
  #nd-sticky .nd-sticky-zalo{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-width:76px;min-height:44px;padding:10px 14px;border-radius:999px;background:#0068FF;color:#fff;font-weight:800;font-size:15px;text-decoration:none}
  #nd-sticky .nd-m-len{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--maroon);font-size:18px;font-weight:800;cursor:pointer}
  #nd-sticky .nd-m-len[hidden]{display:none}
  html.nd-co-thanh body{padding-bottom:calc(56px + env(safe-area-inset-bottom,0px))}
  html.nd-go #nd-sticky,html.nd-go .nd1011-sticky,html.nd-go .nd-m-zalo-1011{display:none!important}
  /* Lớp 10–11: giữ nút riêng "💬 Đặt tư vấn", thêm Zalo cạnh bên, cùng 1 hàng sát đáy */
  .nd1011-sticky{left:10px!important;right:96px!important;bottom:8px!important;text-align:center}
  .nd-m-zalo-1011{position:fixed;right:10px;bottom:8px;z-index:90;display:inline-flex;align-items:center;justify-content:center;min-width:76px;height:44px;padding:0 14px;border-radius:999px;background:#0068FF;color:#fff;font-weight:800;font-size:15px;text-decoration:none;box-shadow:0 6px 18px rgba(0,104,255,.3)}
  /* đồng hồ thi: 1 dòng chữ nhỏ ở đầu nội dung trang Lớp 12 */
  .nd-m-dem{margin:0;padding:8px 16px;font-size:13px;line-height:1.4;color:var(--maroon);background:#fff6f7;border-bottom:1px solid var(--line);text-align:center}
  .nd-m-dem b{font-weight:800}

  /* ---------- F. SỬA LỖI ---------- */
  .ndn-facts>div,.ndn-facts>a{min-width:0}
  a.ndn-fact-a{flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 14px}
  a.ndn-fact-a b{white-space:nowrap}
  .nd-m-mo-phai{-webkit-mask-image:linear-gradient(90deg,#000 82%,transparent);mask-image:linear-gradient(90deg,#000 82%,transparent)}

  /* ---------- C. HÀNG TAB ---------- */
  .nd12-subnav,.dl-buoc{position:static!important}
  .nd12-subnav,.ndsv-subnav{scrollbar-width:none}
  .nd12-subnav::-webkit-scrollbar,.ndsv-subnav::-webkit-scrollbar{display:none}

  /* ---------- E. TRANG NGÀNH ---------- */
  .ndn-hero .ndn-toc{display:none!important}
  .nd-m-toc{margin-top:16px}
  .nd-m-toc p{margin:0 0 8px;font-size:13px;font-weight:700;color:var(--gray)}
  .nd-m-toc ol{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .nd-m-toc a{display:flex;align-items:center;min-height:44px;padding:8px 12px;border:1.5px solid var(--maroon);border-radius:12px;background:#fff;color:var(--maroon);font-weight:700;font-size:14px;line-height:1.25;text-decoration:none}
  .nd-m-gon>*:not(.nd-m-gon-h){display:none!important}
  .nd-m-gon-h h2,.nd-m-mo-h h2{cursor:pointer;position:relative;padding-right:30px}
  .nd-m-gon-h h2::after,.nd-m-mo-h h2::after{content:"▾";position:absolute;right:4px;top:.1em;font-size:18px;color:var(--gray);transition:transform .15s}
  .nd-m-mo-h h2::after{transform:rotate(180deg)}
  .ndn-sec.nd-m-gon{padding-top:14px;padding-bottom:14px}

  /* ---------- D. KHỐI KÊU GỌI TRÙNG (ẩn trên điện thoại, máy tính giữ) ---------- */
  body.nd9-home .nd-ht-nv{display:none!important}
  body.nd9-home .nd-so-goi-m .nd-btn{display:none!important}
  body.nd9-home .nd-faq-cta,body.page-id-54 .nd-faq-cta{display:none!important}
  .nd-cta-blk.nd-m-bo{display:none!important}
}
@media (max-width:767px) and (prefers-reduced-motion:reduce){
  .nd-header,#nd-sticky.nd-sticky-cta{transition:none}
  #nd-sticky.nd-m-moi .nd-cta-nut{animation:none!important}
}
