/* ---------- Hiệu ứng THẢ menu header (js/80-hieu-ung-menu.js) – áp cho mọi .mdrop (menu thả của mục .mi) ở mọi trang ----------
   body[data-hd] = 0 tắt (hiện ngay như cũ) | 1 Trượt xuống mềm | 2 Mở rèm | 3 Phóng nở | 4 Lật 3D | 5 Lần lượt từng mục;
   màu nhấn body[data-hd-mau] (mục đang rê trong menu), tốc độ body[data-hd-toc]. .mi.hd-mo = xem thử (menu mở như đang rê chuột).
   Khi bật: menu luôn ở trong trang (display:block) nhưng ẩn (visibility/opacity, không bấm được) để chạy được chuyển động lúc mở và lúc đóng. */
body{--hd-c:#0a91d9;--hd-bg:rgba(10,145,217,.09);--hd-t:.28s;--hd-e:cubic-bezier(.22,.61,.36,1)}
body[data-hd-mau=vang]{--hd-c:#a07b45;--hd-bg:rgba(176,141,87,.13)}
body[data-hd-mau=navy]{--hd-c:#1c3f94;--hd-bg:rgba(28,63,148,.09)}
body[data-hd-toc=nhanh]{--hd-t:.18s}
body[data-hd-toc=cham]{--hd-t:.45s}

body[data-hd]:not([data-hd="0"]) .mdrop{display:block;visibility:hidden;opacity:0;pointer-events:none;
  transition:opacity var(--hd-t) var(--hd-e),transform var(--hd-t) var(--hd-e),clip-path var(--hd-t) var(--hd-e),visibility 0s linear var(--hd-t)}
body[data-hd]:not([data-hd="0"]) .mi:is(:hover,:focus-within,.hd-mo) .mdrop{visibility:visible;opacity:1;pointer-events:auto;transition-delay:0s}
/* mục trong menu: màu nhấn khi rê */
body[data-hd]:not([data-hd="0"]) .mdrop span:hover{background:var(--hd-bg);color:var(--hd-c)}

/* 1. Trượt xuống mềm */
body[data-hd="1"] .mdrop{transform:translateY(-8px)}
body[data-hd="1"] .mi:is(:hover,:focus-within,.hd-mo) .mdrop{transform:none}

/* 2. Mở rèm: lộ dần từ trên xuống */
body[data-hd="2"] .mdrop{clip-path:inset(0 0 100% 0 round 8px);opacity:1}
body[data-hd="2"] .mi:is(:hover,:focus-within,.hd-mo) .mdrop{clip-path:inset(-16px -2px -30px -2px round 8px)} /* chừa -16px trên: cầu nối rê chuột .mdrop::before (css/23) không bị cắt */
body[data-hd="2"] .mdrop>span{opacity:0;transition:opacity var(--hd-t) var(--hd-e)}
body[data-hd="2"] .mi:is(:hover,:focus-within,.hd-mo) .mdrop>span{opacity:1;transition-delay:calc(var(--hd-t)*.35)}

/* 3. Phóng nở từ mép trên */
body[data-hd="3"] .mdrop{transform:scale(.9);transform-origin:20% 0}
body[data-hd="3"] .mi:is(:hover,:focus-within,.hd-mo) .mdrop{transform:none}

/* 4. Lật 3D từ mép trên */
body[data-hd="4"] .mdrop{transform:perspective(700px) rotateX(-70deg);transform-origin:50% 0}
body[data-hd="4"] .mi:is(:hover,:focus-within,.hd-mo) .mdrop{transform:none}

/* 5. Lần lượt từng mục: khung mờ dần, các mục trượt vào lần lượt */
body[data-hd="5"] .mdrop>span{opacity:0;transform:translateX(-10px);transition:opacity var(--hd-t) var(--hd-e),transform var(--hd-t) var(--hd-e),background .15s,color .15s}
body[data-hd="5"] .mi:is(:hover,:focus-within,.hd-mo) .mdrop>span{opacity:1;transform:none}
body[data-hd="5"] .mi:is(:hover,:focus-within,.hd-mo) .mdrop>span:nth-child(2){transition-delay:calc(var(--hd-t)*.25),calc(var(--hd-t)*.25),0s,0s}
body[data-hd="5"] .mi:is(:hover,:focus-within,.hd-mo) .mdrop>span:nth-child(3){transition-delay:calc(var(--hd-t)*.5),calc(var(--hd-t)*.5),0s,0s}
body[data-hd="5"] .mi:is(:hover,:focus-within,.hd-mo) .mdrop>span:nth-child(4){transition-delay:calc(var(--hd-t)*.75),calc(var(--hd-t)*.75),0s,0s}
body[data-hd="5"] .mi:is(:hover,:focus-within,.hd-mo) .mdrop>span:nth-child(5){transition-delay:var(--hd-t),var(--hd-t),0s,0s}
body[data-hd="5"] .mi:is(:hover,:focus-within,.hd-mo) .mdrop>span:nth-child(n+6){transition-delay:calc(var(--hd-t)*1.25),calc(var(--hd-t)*1.25),0s,0s}

/* Không tắt theo "giảm chuyển động" của máy (nhiều máy Windows tắt hiệu ứng động – tắt theo thì người xem không thấy hiệu ứng mà không biết vì sao; cùng cách css/74). */
