/* ============================================================
   MISA ASP — NEW MENU (self-contained, tái sử dụng)
   Chỉ tác động trong phạm vi .new-menu
   - >1280px : desktop bar 72px + megamenu hover
   - <=1280px: thu gọn, burger mở .nm-pop
   - <=1023px: drawer .nm-drawer full
   ============================================================ */
body:has(#wpadminbar) .new-menu {
  margin-top: 32px;
}
body:has(#wpadminbar) .nm-drawer {
  top: 32px;
  height: calc(100vh - 32px);
}
.new-menu,
.new-menu *,
.new-menu *::before,
.new-menu *::after { box-sizing: border-box; margin: 0; padding: 0; }

.new-menu {
  position: relative;
  width: 100%;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  color: #181D27;
  -webkit-font-smoothing: antialiased;
}
.new-menu ul, .new-menu ol { list-style: none; }
.new-menu a { text-decoration: none; }
.new-menu img { max-width: none; display: inline-block; }
.new-menu button { background: none; border: 0; cursor: pointer; font-family: inherit; color: inherit; min-width: 20px !important;}

/* ---------- Bar ---------- */
.nm-bar {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 72px;
  background: #fff;
  z-index: 1200;
}

/* ---------- Logo ---------- */
.nm-logo { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nm-logo-ic { width: 40px; height: 40px; }
.nm-logo-text { display: inline-flex; flex-direction: column; line-height: 0; }
.nm-logo-t1 { width: 108px; height: 15px; }
.nm-logo-t2 { width: 108px; height: 8px; margin-top: 3px; }

/* ---------- Primary nav ---------- */
.nm-nav { display: flex; flex: 1 1 auto; min-width: 0; height: 100%; margin-left: 16px }
.nm-nav > ul { display: flex; align-items: center; height: 100%; }
.nm-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 72px;
  padding: 0 10px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}
.nm-item > a {
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: -0.2px;
  color: #181D27;
  white-space: nowrap;
}
.nm-item:hover a{
  color: #181D27;
}
.nm-item .nm-caret { width: 16px; height: 16px; transition: transform .2s ease; }
.nm-item:hover .nm-caret,
.nm-item.nm-open .nm-caret { transform: rotate(180deg); }
.nm-item:hover,
.nm-item.nm-open {
  border-bottom: 3px solid var(--Stroke-Brand, #0E9A62);
}

/* item active = gạch chân dưới */
.nm-item.nm-active { position: relative; }
.nm-item.nm-active > a { color: #181D27; }
.nm-item.nm-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  border-bottom: 3px solid var(--Stroke-Brand, #0E9A62);
  background: #FFF;
}

.nm-item--hide-tablet { } /* JS bật class .nm-hide để ẩn theo width */

/* ---------- Right actions ---------- */
.nm-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; flex-shrink: 0; }
.nm-phone span{
  color: #4CA30D;
}
.nm-phone { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 14px; font-weight: 700; line-height: 18px; letter-spacing: -0.2px; color: #4CA30D; }
.nm-phone img { width: 20px; height: 20px; }
.nm-globe { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 40px; }
.nm-globe img { width: 20px; height: 20px; }

.nm-auth { display: inline-flex; align-items: center; gap: 12px; }
.nm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: -0.2px;
  white-space: nowrap;
}
.nm-btn-login { color: #4CA30D; border: 2px solid #099250; background: #fff; }

.nm-btn-register {
  color: #fff;
  padding: 0 24px;
  height: 42px;
  border: none;
  border-radius: var(--radius-m, 8px);
  background: var(--gradient, linear-gradient(48deg, var(--Green-600, #099250) 0.14%, var(--Greenlight-500, #66C61C) 106.04%));
  box-shadow: inset 0 0 0 1000px rgba(0,0,0,0); /* tránh bị theme đè bg */
}
.nm-auth .nm-btn-register {
  color: #fff;
}
.nm-burger { display: none; align-items: center; justify-content: center; width: 36px; height: 40px; }
.nm-burger img { width: 24px; height: 24px; }

/* ============================================================
   MEGAMENU (hover / class .open)
   ============================================================ */
.nm-mega {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.10);
  z-index: 1500;
  visibility: hidden;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  pointer-events: none;
}
.nm-mega a{
  color:#10141B
}
.nm-mega a:hover{
  color:#10141B
}
.nm-mega ul li a:hover{
  color:#0E9A62
}
.nm-mega.open { visibility: visible; opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ---------- Phần mềm ---------- */
.nm-mega-soft {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 24px;
  width: auto;
}
.nm-mega-soft-col { flex: 0 0 auto; min-width: 220px; }
.nm-mega-title {
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
  color: #000;
  margin-bottom: 20px;
  white-space: nowrap;
}
.nm-mega-list li { margin-bottom: 10px; }
.nm-mega-list a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: #10141B;
  border-radius: 8px;
  transition: background .15s ease;
}
.nm-mega-list a:hover { background: #F0F6FE; }
.nm-mega-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #F0F6FE;
  flex-shrink: 0;
}
.nm-mega-ic img { width: 24px; height: 24px; }

.nm-mega-free { margin-top: 18px; }
.nm-mega-free > a {
  background: #FEF3F2;
  border-radius: 8px;
  padding: 12px 16px;
  gap: 16px;
  width: 100%;
}
.nm-mega-free-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  flex-shrink: 0;
}
.nm-mega-free-ic img { width: 32px; height: 32px; }
.nm-mega-free-txt { display: inline-flex; flex-direction: column; gap: 0; }
.nm-mega-free-txt b { font-size: 14px; font-weight: 600; line-height: 20px; color: #10141B; }
.nm-mega-free-txt span { font-size: 14px; line-height: 20px; color: #10141B; }

.nm-mega-soft-banner {
  position: relative;
  align-self: stretch;
  width: 248px;
  min-height: 444px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.nm-msb-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nm-msb-txt { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); width: 210px; text-align: center; }
.nm-msb-t1 { font-size: 20px; font-weight: 700; line-height: 24px; color: #fff; }
.nm-msb-t2 {
  font-size: 30px;
  font-weight: 700;
  line-height: 30px;
  background: linear-gradient(180deg, #39C065 0%, #62FF95 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 2px 6px 4px rgba(0,0,0,.32);
}
.nm-msb-t3 { font-size: 13px; font-weight: 600; line-height: 20px; color: #fff; }
.nm-msb-laptop { position: absolute; top: 133px; left: 50%; margin-left: -81px; width: 162px; }
.nm-msb-laptop img { width: 100%; height: auto; }
.nm-msb-robot { position: absolute; left: -14px; bottom: 0; width: 137px; height: auto; }
.nm-msb-btn {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding: 0 24px;
  height: 36px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
  border-radius: var(--radius-m, 8px);
}
.nm-msb-btn:hover{
  color: #fff;
}
.btn-free-advise{
  display: flex;
  align-items: center;
  width: 100%;
  text-align: center;
  min-width: 100%;
  padding: 0 24px;
  height: 32px;
  border-radius: var(--radius-m, 8px);
  background: var(--gradient, linear-gradient(48deg, var(--Green-600, #099250) 0.14%, var(--Greenlight-500, #66C61C) 106.04%));
}
.nm-mega-soft-banner a:hover{
  opacity: 1;
}

/* ---------- Kiến thức ---------- */
.nm-mega-know-wrap{
  display: flex;
  flex-direction: row;
  gap: 48px;
}
.nm-mega-know {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
}
.nm-mega-know-cols { display: flex; gap: 48px; }
.nm-mega-know-col { display: flex; flex-direction: column; }
.nm-mega-know-head {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: #10141B;
  margin-bottom: 16px;
  white-space: nowrap;
}
.nm-mega-know-list li { margin-bottom: 8px; }
.nm-mega-know-list a {
  display: inline-block;
  padding: 4px 0;
  font-size: 14px;
  line-height: 20px;
  color: #10141B;
}
.nm-mega-know-list a:hover { color: #245FDF; }

/* Chevron right hiện sau link khi hover/active trong megamenu */
.nm-mega ul li a {
  position: relative;
}
.nm-mega ul li a::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  vertical-align: -2px;
  background: url('/sites/menu/assets/img/chevron-right.svg') no-repeat center / contain;
  opacity: 0;
  transform: translateX(-3px);
  transition: opacity .18s ease, transform .18s ease;
}
.nm-mega ul li a:hover::after,
.nm-mega ul li a.active::after {
  opacity: 1;
  transform: translateX(0);
}
.nm-mega-know-list--mark a { font-weight: 600; white-space: nowrap; }
.nm-mega-know-more {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  color: #245FDF;
}
.nm-mega-know-more a{
  color: #0E9A62;
  display: flex;
  align-items: center;
  gap: 8px

}
.nm-mega-know-more a:hover{
  color: #0E9A62
}
.nm-mega-know-more img { width: 16px; height: 16px; }

/* ============================================================
   Tablet popover
   ============================================================ */
.nm-pop {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 0 12px rgba(0,0,0,.10);
  padding: 24px;
  min-width: 226px;
  z-index: 1500;
  visibility: hidden;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.nm-pop.open { visibility: visible; opacity: 1; transform: translateY(0); }
.nm-pop li + li { margin-top: 16px; }
.nm-pop a { font-size: 14px; font-weight: 500; line-height: 20px; color: #10141B; white-space: nowrap; }
.nm-pop a:hover { color: #245FDF; }

/* ============================================================
   Drawer mobile
   ============================================================ */
.nm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9000;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.nm-overlay.open { opacity: 1; visibility: visible; }

.nm-drawer {
  position: fixed;
  top: 0;
  left: 0;
  /* width: min(460px, 100vw); */
  width: 100%;
  height: 100vh;
  background: #fff;
  z-index: 9001;
  transform: translateX(-100%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
}
.nm-drawer.open { transform: translateX(0); }

.nm-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 24px;
  flex-shrink: 0;
  border-bottom: 1px solid #F0F1F3;
}
.nm-drawer-head .nm-logo { gap: 4px; }
.nm-close { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; }

.nm-drawer-body { flex: 1 1 auto; overflow-y: auto; }
.nm-drawer-list > li { border-bottom: 1px solid #E5E6E9; }
.nm-drawer-list > li > a,
.nm-drawer-list > li > button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: -0.2px;
  color: #181D27;
}
.nm-drawer-parent > .nm-drawer-link::after {
  content: "";
  width: 16px; height: 16px;
  flex-shrink: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M4 6L8 10L12 6" stroke="%236B707A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat center / contain;
  transition: transform .2s ease;
}
.nm-drawer-parent.open > .nm-drawer-link::after { transform: rotate(180deg); }
.nm-drawer-sub { display: none; padding: 4px 24px 20px; }
.nm-drawer-parent.open .nm-drawer-sub { display: block; }
.nm-ds-title { font-size: 14px; font-weight: 600; line-height: 20px; color: #10141B; margin: 12px 0 6px; }
.nm-drawer-sub ul { margin-bottom: 6px; padding-left: 16px;}
.nm-drawer-sub a { display: block; padding: 6px 0; font-size: 14px; line-height: 20px; color: #10141B; }
.nm-drawer-sub > a.nm-ds-title { display: block; padding: 12px 0 6px; font-size: 14px; font-weight: 600; line-height: 20px; color: #10141B; }
.nm-drawer-sub > a.nm-ds-title:first-child { margin-top: 4px; }
.nm-drawer-sub > a.nm-ds-title:hover { color: #0E9A62; }
.nm-drawer-sub li a { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.nm-drawer-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #F0F6FE;
  flex-shrink: 0;
}
.nm-drawer-ic img { width: 24px; height: 24px; }

.nm-drawer-promo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 24px;
  padding: 16px;
  border: 1px solid #7CC7AE;
  border-radius: 12px;
  background: #E6F5EF;
}
.nm-drawer-promo img { width: 48px; height: 48px; flex-shrink: 0; border-radius: 8px; }
.nm-drawer-promo b { display: block; font-size: 18px; font-weight: 600; line-height: 22px; color: #0E9A62; }
.nm-drawer-promo span { display: block; font-size: 14px; line-height: 20px; color: #6B707A; }

.nm-drawer-foot { flex-shrink: 0; border-top: 1px solid #E5E6E9; padding: 16px 24px; background: #fff; }
.nm-drawer-auth { display: flex; gap: 16px; }
.nm-drawer-auth a{ display: flex; width: 100%; }
.nm-drawer-auth .nm-btn { flex: 1 1 0; }
.nm-drawer-hotline { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; }
.nm-drawer-hotline > span { font-size: 14px; font-weight: 500; color: #6B707A; }
.nm-drawer-hotline .nm-phone { font-weight: 700; color: #4CA30D }

/*polylang Chọn ngôn ngữ*/
.lang-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #1f2328;
    cursor: pointer;
}
.language-dropdown-toggle span.language-name.notranslate, .dropdown-arrow{
  display: none !important;
}
.language-dropdown{
  width: 20px !important;
}
.language-link .language-name{
  padding: 10px 12px
}
/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ---- > 1366 : desktop, mọi thứ đầy đủ ---- */
.nm-burger { display: none; }
.nm-globe { display: inline-flex; }
.nm-actions .nm-auth { display: inline-flex; }
@media (max-width: 1475px) {
  .nm-actions .nm-phone{
    display: none;
  }
}
/* ---- 1281 – 1366 : nới nhẹ, Figma 1366 bỏ phone ---- */
@media (max-width: 1366px) {
  .nm-item { padding: 0 8px; }
  .nm-logo { margin-right: 6px; }
  .nm-actions { gap: 10px; }
  .nm-phone { display: none; }   /* node 24-5425: chỉ globe + ĐN/ĐK */
}
@media (max-width: 1325px) {
  .nm-item--hide-tablet {display: none;}
}

/* ---- <= 1280 : rút item cuối, ẩn auth, hiện burger + globe ---- */
@media (max-width: 1280px) {
  .nm-item--hide-tablet { display: none; }   /* "Giới thiệu nhận thưởng" vào popover */
  .nm-actions .nm-auth { display: none; }     /* ĐN/ĐK vào popover */
  .nm-actions { gap: 8px; }
  .nm-globe { display: inline-flex; }
  .nm-burger { display: inline-flex; }
  .nm-phone { display: inline-flex; }        /* node 1-18719: phone + globe + burger */
  .nm-logo { margin-right: 4px; }
  .nm-item { padding: 0 6px; }
}

/* ---- <= 1024 : chuyển hẳn sang bố cục thu gọn ---- */
@media (max-width: 1024px) {
  .nm-nav { display: none; }
  .nm-bar { height: 72px; }
  .nm-logo { margin-right: 0; }
  .nm-actions .nm-phone{
    display: flex;
  }
}

/* ---- <= 767 : mobile, drawer ---- */
@media (max-width: 767px) {
  /* Figma mobile header (node 106): icon + chữ MISA ASP + phone + globe + burger */
  .nm-logo-text { display: inline-flex; }
  .nm-logo { gap: 8px; }
  .nm-globe { display: inline-flex; }
  .nm-phone { display: inline-flex; }
  .nm-actions .nm-auth { display: none; }
}
@media (max-width: 400px) {
  .nm-actions .nm-phone{
    display: none;
  }
}

/* ============================================================
   Neutralize các CSS theme Newspaper đè lên header này
   ============================================================ */
.new-menu { z-index: 100; }
.td-header-style-7 .new-menu { float: none; }

/* bọc ngoài do theme bóp width 1068px => bỏ để full width */
.td-header-style-7 .td-header-menu-wrap .td-container,
.td-header-style-7 .td-header-menu-wrap .td-header-row {
  width: auto;
  max-width: none;
  padding: 0 48px;
}
@media (max-width: 1280px) {
  .td-header-style-7 .td-header-menu-wrap .td-container,
  .td-header-style-7 .td-header-menu-wrap .td-header-row { padding: 0 24px; }
}

/* hạ height cứng từ theme (mobile) để bar tự do 72px */
.td-header-wrap .td-header-menu-wrap,
.td-header-wrap .td-header-main-menu { height: auto; }
.td-header-main-menu { position: static; }
.td-header-gradient::before { content: none; }
.td-header-gradient { background: transparent; }

/* Header theo Figma không có top bar → ẩn khi dùng style-7 + new-menu */
.td-header-style-7 > .td-header-top-menu-full { display: none; }

/* Hiệu ứng viền chuyển động cho nút (chỉ đổi màu viền, nền giữ nguyên) */
/* animation button bonus */
/* animation button bonus */
.bordermove {
    position: relative;
    overflow: visible;
    /* display: inline-block; */
}

/* Content ben trong button luon hien thi tren ::before */
.bordermove > * {
    position: relative;
    z-index: 1;
}

/* Pseudo element tao shadow */
.bordermove::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 12px;
    background: linear-gradient( 90deg, #ff6ec4, #7873f5, #22d3ee, #4ade80, #ff6ec4 );
    background-size: 300% 300%;
    z-index: -1;
    opacity: 0;
    filter: blur(3px);
    transition: opacity 0.3s ease;
}

/* Hover */
.bordermove:hover::before {
    opacity: 1;
    animation: shadowMove 4s linear infinite;
}

/* Animation chay gradient */
@keyframes shadowMove {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 300% 50%;
    }
}


/* Hieu ung gradient border khi hover cho nut Mua ngay o banner */
.ai-btn {
    outline: none !important;
    /* border: 2px solid #1B49F5; */
    /* transition: all 0.3s ease; */
    opacity: 1 !important;
    overflow: hidden;
}

/* Hover */
.ai-btn:hover {
    border: 2px solid transparent;
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient( 90deg, #ff6ec4, #7873f5, #4ade80, #22d3ee, #ff6ec4 ) border-box !important;
    background-size: 200% 200% !important;
    animation: aiBtnBorderMove 3s linear infinite;
}

/* Animation chÄ‚Â¡Ă‚ÂºĂ‚Â¡y gradient */
@keyframes aiBtnBorderMove {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}
.ai-btn img {
  transition: transform 0.3s ease;
}
.ai-btn:hover img {
  transform: translateX(4px);
}