/* =========================================================================
   Mẫu Website Đẹp – app.css (site-wide: tokens, buttons, header, footer, bar)
   ========================================================================= */
:root {
    --mwd-primary: #1E5AA8;
    --mwd-primary-dark: #174683;
    --mwd-secondary: #4790CD;
    /* Nhận diện: xanh + vàng gold (theo logo). Vàng dùng nền → chữ navy đậm. */
    --mwd-cta: #FFC220;
    --mwd-cta-dark: #E8A800;
    --mwd-cta-text: #14233b;
    --mwd-gold-ink: #9A6B00;   /* vàng đậm dùng cho CHỮ trên nền sáng */
    --mwd-danger: #E51E22;     /* chỉ dùng cho lỗi / trường bắt buộc */
    --mwd-bg: #F5F9FD;
    --mwd-bg-soft: #EAF2FA;
    --mwd-text: #1F2937;
    --mwd-muted: #64748B;
    --mwd-white: #FFFFFF;
    --mwd-border: #E2E8F0;
    --mwd-radius: 14px;
    --mwd-radius-sm: 10px;
    --mwd-shadow: 0 8px 30px rgba(20, 40, 80, .08);
    --mwd-shadow-sm: 0 2px 10px rgba(20, 40, 80, .06);
    --mwd-ring: 0 0 0 3px rgba(30, 90, 168, .28);
    --mwd-header-h: 68px;
    --mwd-topbar-h: 38px;
    --mwd-font: "Be Vietnam Pro", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.mwd, body.mwd { font-family: var(--mwd-font); color: var(--mwd-text); background: var(--mwd-white); }
.mwd *, .mwd *::before, .mwd *::after { box-sizing: border-box; }
.mwd img { max-width: 100%; height: auto; }
.mwd-noscroll { overflow: hidden; }
.mwd-ico { flex: 0 0 auto; }

.mwd-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.mwd-container--narrow { max-width: 840px; }

.mwd-visually-hidden, .mwd-skip {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mwd-skip:focus {
    position: fixed; top: 8px; left: 8px; width: auto; height: auto; z-index: 2000;
    padding: 10px 16px; clip: auto; background: var(--mwd-primary); color: #fff;
    border-radius: 8px;
}

/* ---------- Buttons ---------- */
.mwd-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-weight: 700; line-height: 1.2; cursor: pointer;
    padding: 11px 20px; border-radius: 999px; border: 1.5px solid transparent;
    text-decoration: none; transition: background .2s, color .2s, border-color .2s, transform .12s, box-shadow .2s;
    min-height: 44px;
}
.mwd-btn:active { transform: translateY(1px); }
.mwd-btn .mwd-ico { width: 19px; height: 19px; }
.mwd-btn--sm { padding: 8px 14px; font-size: .9rem; min-height: 40px; }
.mwd-btn--lg { padding: 14px 26px; font-size: 1.05rem; }
.mwd-btn--block { width: 100%; }
.mwd-btn--primary { background: var(--mwd-primary); color: #fff; border-color: var(--mwd-primary); }
.mwd-btn--primary:hover { background: var(--mwd-primary-dark); border-color: var(--mwd-primary-dark); color: #fff; }
.mwd-btn--cta { background: var(--mwd-cta); color: var(--mwd-cta-text); border-color: var(--mwd-cta); box-shadow: 0 6px 18px rgba(232, 168, 0, .28); }
.mwd-btn--cta:hover { background: var(--mwd-cta-dark); border-color: var(--mwd-cta-dark); color: var(--mwd-cta-text); }
.mwd-btn--cta.is-loading::after { border-color: rgba(20, 35, 59, .35); border-top-color: var(--mwd-cta-text); }
.mwd-btn--outline { background: transparent; color: var(--mwd-primary); border-color: var(--mwd-primary); }
.mwd-btn--outline:hover { background: var(--mwd-primary); color: #fff; }
.mwd-btn--ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .6); }
.mwd-btn--ghost:hover { background: #fff; color: var(--mwd-primary); border-color: #fff; }
.mwd-btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.mwd-btn.is-loading::after {
    content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: mwd-spin .7s linear infinite;
}
@keyframes mwd-spin { to { transform: rotate(360deg); } }

.mwd :focus-visible { outline: 2px solid var(--mwd-primary); outline-offset: 2px; border-radius: 4px; }

/* ---------- Section heads (shared) ---------- */
.mwd-eyebrow {
    display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--mwd-primary); margin-bottom: 10px;
}
.mwd-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.mwd-head__title { font-size: clamp(1.5rem, 3.4vw, 2.15rem); line-height: 1.25; margin: 0 0 12px; color: #14233b; font-weight: 700; }
.mwd-head__sub { color: var(--mwd-muted); font-size: 1.02rem; margin: 0; }
.mwd-head--light .mwd-eyebrow { color: #bcd6f2; }
.mwd-head--light .mwd-head__title { color: #fff; }
.mwd-head--light .mwd-head__sub { color: #d5e4f5; }

.mwd-section { padding: clamp(48px, 7vw, 88px) 0; }
.mwd-section--soft { background: var(--mwd-bg); }

/* =========================================================================
   HEADER
   ========================================================================= */
.mwd-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: #fff; transition: box-shadow .25s; }
.mwd-header.is-stuck { box-shadow: 0 4px 20px rgba(20, 40, 80, .1); }
.mwd-header__spacer { height: calc(var(--mwd-header-h) + var(--mwd-topbar-h)); }

.mwd-topbar { background: var(--mwd-primary-dark); color: #dfeaf7; font-size: .84rem; }
.mwd-header.is-stuck .mwd-topbar { display: none; }
.mwd-topbar__inner { display: flex; align-items: center; justify-content: space-between; height: var(--mwd-topbar-h); gap: 16px; }
.mwd-topbar__msg { display: inline-flex; align-items: center; gap: 7px; margin: 0; }
.mwd-topbar__msg .mwd-ico { width: 16px; height: 16px; color: #ffd76a; }
.mwd-topbar__contact { display: flex; align-items: center; gap: 18px; list-style: none; margin: 0; padding: 0; }
.mwd-topbar__contact a, .mwd-topbar__support { display: inline-flex; align-items: center; gap: 6px; color: #dfeaf7; text-decoration: none; }
.mwd-topbar__contact a:hover { color: #fff; }
.mwd-topbar__contact .mwd-ico { width: 15px; height: 15px; }

.mwd-bar__inner { display: flex; align-items: center; gap: 20px; height: var(--mwd-header-h); }

.mwd-logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--mwd-primary); flex: 0 0 auto; }
.mwd-logo__mark { display: inline-flex; align-items: center; flex: 0 0 auto; }
.mwd-logomark { display: block; width: auto; height: 40px; }
.mwd-logo--sm .mwd-logomark, .mwd-logo--footer .mwd-logomark { height: 36px; }
.mwd-logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.mwd-logo__main { font-weight: 800; font-size: 1.16rem; color: #14233b; letter-spacing: -.01em; }
.mwd-logo__sub { font-size: .72rem; font-weight: 700; color: var(--mwd-gold-ink); letter-spacing: .05em; text-transform: uppercase; }
.mwd-footer .mwd-logo__sub { color: var(--mwd-cta); }

.mwd-nav { margin-left: auto; }
.mwd-menu { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.mwd-menu > li { position: relative; }
.mwd-menu > li > a { display: inline-flex; align-items: center; gap: 4px; padding: 10px 12px; border-radius: 9px; color: #26364d; font-weight: 600; font-size: .94rem; text-decoration: none; transition: color .18s, background .18s; white-space: nowrap; }
.mwd-menu > li > a:hover { color: var(--mwd-primary); background: var(--mwd-bg); }
.mwd-menu > li.current-menu-item > a,
.mwd-menu > li.current-menu-ancestor > a,
.mwd-menu > li.current_page_item > a { color: var(--mwd-primary); }
.mwd-menu__caret { width: 15px; height: 15px; transition: transform .2s; }
.mwd-menu > li:hover > a .mwd-menu__caret, .mwd-menu > li:focus-within > a .mwd-menu__caret { transform: rotate(180deg); }

/* Dropdown submenu (menu WordPress) */
.mwd-menu .sub-menu {
    position: absolute; top: calc(100% + 6px); left: 0; min-width: 250px; max-width: 320px;
    background: #fff; border: 1px solid var(--mwd-border); border-radius: 12px; box-shadow: var(--mwd-shadow);
    padding: 8px; list-style: none; margin: 0; z-index: 60;
    opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.mwd-menu > li:hover > .sub-menu, .mwd-menu > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.mwd-menu .sub-menu a { display: block; padding: 9px 12px; border-radius: 8px; color: #33415a; font-size: .91rem; font-weight: 500; text-decoration: none; line-height: 1.35; }
.mwd-menu .sub-menu a:hover { background: var(--mwd-bg); color: var(--mwd-primary); }
/* Mục cuối bên phải: mở submenu sang trái để không tràn màn hình */
.mwd-menu > li:nth-last-child(-n+2) .sub-menu { left: auto; right: 0; }

/* Mega menu */
.mwd-mega {
    position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(8px);
    width: min(680px, 90vw); background: #fff; border: 1px solid var(--mwd-border); border-radius: var(--mwd-radius);
    box-shadow: var(--mwd-shadow); padding: 16px; opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s; z-index: 60;
}
.mwd-menu__item.has-mega:hover .mwd-mega, .mwd-menu__item.has-mega:focus-within .mwd-mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mwd-mega__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.mwd-mega__link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 9px; color: #26364d; text-decoration: none; font-size: .93rem; font-weight: 500; }
.mwd-mega__link:hover { background: var(--mwd-bg); color: var(--mwd-primary); }
.mwd-mega__link em { font-style: normal; font-size: .78rem; color: var(--mwd-muted); background: var(--mwd-bg-soft); border-radius: 999px; padding: 1px 8px; }
.mwd-mega__all { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--mwd-border); color: var(--mwd-primary); font-weight: 700; text-decoration: none; font-size: .92rem; }
.mwd-mega__all .mwd-ico { width: 16px; height: 16px; }

.mwd-bar__actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.mwd-burger { display: none; width: 46px; height: 46px; align-items: center; justify-content: center; background: var(--mwd-bg); border: 1px solid var(--mwd-border); border-radius: 11px; color: var(--mwd-primary); cursor: pointer; }

/* ---------- Off-canvas ---------- */
.mwd-overlay { position: fixed; inset: 0; background: rgba(15, 30, 55, .5); z-index: 1100; opacity: 0; transition: opacity .25s; }
.mwd-overlay.is-open { opacity: 1; }
.mwd-offcanvas {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 86vw); background: #fff; z-index: 1200;
    transform: translateX(100%); transition: transform .3s ease; display: flex; flex-direction: column;
    box-shadow: -10px 0 40px rgba(15, 30, 55, .18);
}
.mwd-offcanvas.is-open { transform: translateX(0); }
.mwd-offcanvas__head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--mwd-border); }
.mwd-offcanvas__close { width: 44px; height: 44px; display: grid; place-items: center; background: var(--mwd-bg); border: 1px solid var(--mwd-border); border-radius: 10px; color: #26364d; cursor: pointer; }
.mwd-offcanvas__nav { flex: 1 1 auto; overflow-y: auto; padding: 8px 0; }
.mwd-offcanvas__nav ul { list-style: none; margin: 0; padding: 0; }
.mwd-offcanvas__list > li { border-bottom: 1px solid #f1f5f9; }
.mwd-offcanvas__nav a {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 13px 20px; color: #26364d; text-decoration: none; font-weight: 600; font-size: 1rem;
    min-height: 46px;
}
.mwd-offcanvas__nav a:hover { color: var(--mwd-primary); }
/* Ẩn mũi tên trong link (mobile dùng nút toggle riêng do JS chèn) */
.mwd-offcanvas__nav a .mwd-menu__caret { display: none; }
/* Nút mở/đóng submenu — JS chèn, tách khỏi link để bấm link vẫn đi được */
.mwd-subtoggle {
    flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center;
    background: none; border: 0; border-left: 1px solid #f1f5f9; color: #64748b; cursor: pointer;
}
.mwd-subtoggle .mwd-ico { width: 20px; height: 20px; transition: transform .2s; }
.mwd-subtoggle[aria-expanded="true"] .mwd-ico { transform: rotate(180deg); }
.mwd-offcanvas__list > li.menu-item-has-children > .mwd-row { display: flex; align-items: center; justify-content: space-between; }
.mwd-offcanvas__list > li.menu-item-has-children > .mwd-row > a { flex: 1 1 auto; }
.mwd-offcanvas__nav .sub-menu { background: var(--mwd-bg); }
.mwd-offcanvas__nav .sub-menu a { padding: 11px 20px 11px 34px; font-weight: 500; font-size: .93rem; min-height: 44px; }
.mwd-offcanvas__foot { padding: 16px; border-top: 1px solid var(--mwd-border); display: grid; gap: 10px; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.mwd-footer { background: #0f2643; color: #c6d6ea; }
.mwd-footer__main { padding: clamp(40px, 6vw, 64px) 0 32px; }
.mwd-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; }
.mwd-footer .mwd-logo__main { color: #fff; }
.mwd-footer__slogan { color: #9fd0ff; font-weight: 600; margin: 14px 0 8px; }
.mwd-footer__about { color: #9db4d0; font-size: .92rem; line-height: 1.6; margin: 0; }
.mwd-footer .mwd-footer__title { color: #fff; font-size: 1.02rem; margin: 0 0 16px; font-weight: 700; }
.mwd-footer__links, .mwd-footer__contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.mwd-footer__links a { color: #b8cae1; text-decoration: none; font-size: .93rem; }
.mwd-footer__links a:hover { color: #fff; }
.mwd-footer__contact li { display: flex; align-items: flex-start; gap: 9px; font-size: .93rem; }
.mwd-footer__contact .mwd-ico { width: 17px; height: 17px; color: #6aa5e0; margin-top: 2px; }
.mwd-footer__contact a { color: #c6d6ea; text-decoration: none; }
.mwd-footer__contact a:hover { color: #fff; }
.mwd-footer__socials { display: flex; gap: 10px; margin: 18px 0 14px; }
.mwd-footer__socials a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .08); color: #d6e6fa; }
.mwd-footer__socials a:hover { background: var(--mwd-primary); color: #fff; }
.mwd-footer__socials .mwd-ico { width: 19px; height: 19px; }
.mwd-footer__legal { display: flex; flex-wrap: wrap; gap: 14px; }
.mwd-footer__legal a { color: #9db4d0; text-decoration: none; font-size: .86rem; }
.mwd-footer__legal a:hover { color: #fff; }
.mwd-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.mwd-footer__bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 0; font-size: .86rem; color: #9db4d0; }
.mwd-footer__bottom-inner a { color: #b8cae1; }
.mwd-footer__bottom-inner p { margin: 0; }

/* =========================================================================
   MOBILE BOTTOM BAR
   ========================================================================= */
.mwd-mobilebar { display: none; }
@media (max-width: 767px) {
    .mwd-mobilebar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: grid;
        grid-auto-flow: column; grid-auto-columns: 1fr; background: #fff;
        border-top: 1px solid var(--mwd-border); box-shadow: 0 -4px 20px rgba(20, 40, 80, .1);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    .mwd-mobilebar a {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        padding: 9px 4px; min-height: 56px; color: #26364d; text-decoration: none; font-size: .74rem; font-weight: 600;
    }
    .mwd-mobilebar a .mwd-ico { width: 21px; height: 21px; }
    .mwd-mobilebar a.is-cta { color: var(--mwd-cta-text); background: var(--mwd-cta); }
    body.mwd { padding-bottom: 60px; }
}

/* =========================================================================
   RESPONSIVE HEADER
   ========================================================================= */
@media (max-width: 991px) {
    .mwd-nav { display: none; }
    .mwd-burger { display: inline-flex; }
    .mwd-bar__cta { display: none; }
    .mwd-topbar__contact li:not(:first-child) { display: none; }
    .mwd-header__spacer { height: calc(var(--mwd-header-h) + var(--mwd-topbar-h)); }
}
@media (max-width: 560px) {
    .mwd-topbar__msg span { display: none; }
    .mwd-topbar { font-size: .8rem; }
    .mwd-footer__bottom-inner { flex-direction: column; align-items: flex-start; }
}

/* =========================================================================
   FOOTER RESPONSIVE
   ========================================================================= */
@media (max-width: 900px) {
    .mwd-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
    .mwd-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .mwd-footer__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .mwd *, .mwd *::before, .mwd *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
