/* Header chuẩn dùng chung cho mọi trang công khai (rút từ <style>
    nội tuyến của index.html). Index + 10 trang nội dung đều link file này;
    các rule header nội tuyến cũ của từng trang đã gỡ. Giữ nguyên các rule
    header trong assets/css/fme-refined.css (override theo body[data-fme-page]).
    #fme-header giữ font 'Be Vietnam Pro' như header cũ (trước đây thừa hưởng
    từ div gốc dc-template / body của từng trang). */
#fme-header{font-family:'Be Vietnam Pro',Arial,sans-serif}
@keyframes fmeFadeUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.ul{background-image:linear-gradient(#dc7840,#dc7840);background-size:0 2px;background-repeat:no-repeat;background-position:0 100%;transition:background-size .3s}.ul:hover{background-size:100% 2px;color:#fff}
.nv{position:relative}.nv .dd{display:none;position:absolute;top:100%;left:0;width:240px;background:#fff;border-top:3px solid #dc7840;box-shadow:0 8px 20px #0002;z-index:20}.nv:hover .dd,.nv:focus-within .dd{display:block;animation:fmeFadeUp .25s ease both}
.dd a{display:block;padding:11px 16px;font-size:13px;color:#132d65;border-bottom:1px solid #eef1f5;font-weight:500}.dd a:hover{background:#edf3fa}
.hdr{position:sticky;top:0;z-index:30;transition:box-shadow .3s}
/* LOGO-HEADER — .brand-mark khung trang, chu navy, giong het moi trang
   cong khai. Cac trang cong khai KHONG load app.css nen rule .brand-mark
   trong app.css (nen #fff, chu var(--navy), bo 7px) khong ap dung o day;
   inline cu trong fme-header.js de background:transparent/color:#fff nen
   khung trang bien mat. Gia tri khop brand o panel trai login (app.css):
   nen #fff, chu #102c49 (= var(--navy)), bo 7px. Chi dat mau/nen/bo,
   khong dung font-size/padding (inline + rule compact/mobile lo). */
#fme-header .brand-mark{background:#fff;color:#102c49;border-radius:7px}
/* LOGO-HEADER — thong nhat mau nen header: fme-refined.css:43,45 doi
   rieng trang chu sang #102d49 (hdr) / #103452 (nav) bang !important,
   lech voi mau chung #1a3062/#132d65 cua header dung chung o cac trang
   khac. File nay load SAU fme-refined.css o moi trang cong khai va
   selector co #fme-header nen thang ca hai rule do (cung !important).
   fme-refined.css khong thuoc pham vi sua cua nhom nay nen de nguyen. */
body[data-fme-page="index"] #fme-header .hdr{background:#1a3062 !important}
body[data-fme-page="index"] #fme-header .nav{background:#132d65 !important}
/* ô tìm kiếm header (desktop + mobile.msearch): khi focus
    chỉ đổi viền + bóng mờ hợp tông nền navy, không khung vàng/cam. Input tự
    bỏ outline, vòng sáng nằm trên label bao ngoài (:focus-within). */
#fme-header input:focus-visible{outline:none !important}
#fme-header label:focus-within{border-color:#bcd6ea !important;box-shadow:0 0 0 3px rgba(126,180,220,.35)}
.hdr.compact{box-shadow:0 6px 18px #0005}
.hdr-in,.brand-mark,.brand-name,.nav-in>a,.nav-in .nv>a{transition:padding .25s ease,font-size .25s ease}
.hdr.compact .hdr-in{padding-top:8px !important;padding-bottom:8px !important}
.hdr.compact .brand-mark{font-size:15px !important;padding:5px 5px !important}
.hdr.compact .brand-sub{display:none !important}
.hdr.compact .brand-name{font-size:18px !important}
.hdr.compact .hdr-in input{padding:7px 0 !important}
.hdr.compact .nav-in>a,.hdr.compact .nav-in .nv>a{padding-top:10px !important;padding-bottom:10px !important}
@media (max-width:820px){
.hb,.msearch{display:flex !important}
.hide-m{display:none !important}
.hdr{position:sticky;top:0;z-index:30;box-shadow:0 4px 14px #0003}
.hdr-in{padding:10px 16px !important;flex-wrap:nowrap !important;gap:10px !important}
.brand-mark{font-size:16px !important;padding:7px 6px !important}
.brand-sub{font-size:9px !important}
.brand-name{font-size:17px !important}
.nav{display:none}
.nav.open{display:block;max-height:calc(100vh - 66px);overflow-y:auto;animation:fmeFadeUp .25s ease both}
.nav-in{flex-direction:column !important;padding:4px 0 10px !important}
.nav-in>a,.nav-in .nv>a{padding:13px 18px !important;border-bottom:1px solid #ffffff14}
.nav .ul{background-image:none}
.nv .dd,.nv:hover .dd,.nv:focus-within .dd{display:block;position:static;width:auto;border:0;box-shadow:none;background:#0e2350;animation:none}
.dd a{color:#c9d7ee;padding:10px 34px;border-bottom:1px solid #ffffff10;font-size:13px}.dd a:hover{background:#1a3062;color:#fff}
}
/* Nav 9 mục rớt 2 dòng ở 1024x768 (hamburger chỉ bật <=820px)
    thu hẹp padding + cỡ chữ nav ở 821–1100px để vừa 1 hàng. Padding inline
    15px 14px nên cần !important để ghi đè. PHẢI ở cấp cao nhất, sau khối
    @media (max-width:820px) — lồng trong đó thì không bao giờ khớp. */
@media (min-width:821px) and (max-width:1100px){
.nav-in>a,.nav-in .nv>a{padding:15px 8px !important;font-size:13px}
.hdr-in{gap:10px !important}
}
/* Sticky footer cho mọi trang công khai.
    Chỉ body.fme-publication (trang chủ + 18 trang publish): body thành cột
    flex cao tối thiểu 100vh/100dvh, footer (trực tiếp trong body, trong
    #fme-footer, hoặc trong cây dc #root) có margin-top:auto nên trang ngắn
    thì dính đáy viewport, trang dài thì ở cuối tài liệu như thường.
    Portal/admin (body.app-page) và trang auth KHÔNG load file này nên
    không bị ảnh hưởng. #fme-header giữ flex:0 0 auto để header sticky
    (.hdr) không đổi hành vi. */
body.fme-publication{display:flex;flex-direction:column;min-height:100vh;min-height:100dvh}
body.fme-publication>#fme-header{flex:0 0 auto}
body.fme-publication>#root{flex:1 0 auto;display:flex;flex-direction:column;min-width:0}
body.fme-publication>#root>div:not(#fme-footer){flex:1 0 auto;display:flex;flex-direction:column;min-width:0}
body.fme-publication>footer,body.fme-publication>#fme-footer{margin-top:auto;flex-shrink:0}
body.fme-publication #root footer{margin-top:auto;flex-shrink:0}
/* Form "Nhận tin mới qua email" gọn 1 hàng trên desktop
    (email + nhóm + nút), dòng thông báo xuống hàng riêng. Rule này trước đây
    chỉ nằm trong <style> nội tuyến của index.html nên footer dùng
    chung ở các trang khác (render bởi fme-header.js) xếp dọc; chuyển về đây
    để MỌI trang đều 1 hàng như trang chủ. Inline style width:100% của các ô
    cần !important để ghi đè; không đổi hành vi subscribe/honeypot. */
#fme-newsletter-form{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
#fme-newsletter-form #fme-newsletter-email{flex:1 1 220px !important;min-width:0 !important;width:auto !important;margin-bottom:0 !important}
#fme-newsletter-form #fme-newsletter-group{flex:0 0 auto !important;width:auto !important;margin-bottom:0 !important}
#fme-newsletter-form button[type="submit"]{flex:0 0 auto;white-space:nowrap}
#fme-newsletter-form #fme-newsletter-msg{flex:1 1 100%;margin-top:0}
@media (max-width:820px){
/* Newsletter trên mobile (như trang chủ): email chiếm trọn 1 hàng, nhóm + nút chung hàng dưới, không tràn màn hình hẹp. */
#fme-newsletter-form #fme-newsletter-email{flex:1 1 100% !important}
#fme-newsletter-form #fme-newsletter-group{flex:1 1 auto !important}
}
