/* =========================
   A2E Header / Desktop Menu
   Không cần sửa HTML
========================= */

body, div, p, a, span, h1, h2, h3, h4, h5, h6, strong {
  font-family: 'Inter', sans-serif;
}

.font-heading {font-family: 'Inter', sans-serif !important;}

* {
  font-family: 'Inter', sans-serif;
}


html {margin-top: 0 !important}

/* Header nền trắng */
.site-header,
header,
.header,
.header-wrapper {
  background: #fff;
}

.site-header {padding: 20px 0}
.site-header div.header {position: initial !important; padding: 0 30px}

/* Container menu */
.container.flex.justify-between.transition-all.duration-300.relative.items-center.lg\:items-start {
  min-height: 92px;
  align-items: center !important;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.logo a {
  display: block;
  max-width: 280px !important;
}

.logo img {
  display: block;
  width: 200px;
  max-width: 100% !important;
  height: auto;
}

.wdg-333 .a2e-btn span {font-size: 14px; font-weight: 400; text-transform: none;}

/* Wrapper ngoài cùng của menu + logo */
.desktop-menu-wrapper {
  display: flex;
  align-items: center;
}

/* Reset menu */
#menu-main-menu,
#menu-main-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Menu cấp 1 */
#menu-main-menu {
  display: flex;
  align-items: center;
  gap: 22px;
}

/* Item cấp 1 */
#menu-main-menu > li {
  position: relative;
  margin-left: 0 !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  font-style: normal;
}

#menu-main-menu > li:nth-child(1) > a,#menu-main-menu > li:nth-child(2) > a {font-weight: 500;}

/* Link cấp 1 */

#menu-main-menu > li > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 64px;
  padding: 0 10px;
  color: rgb(0, 55, 171) !important;
  font-size: 16px !important;
  line-height: 1.35;
  text-decoration: none !important;
  letter-spacing: 0;
  transition: color 0.25s ease;
  white-space: normal;
}

/* Hover / focus */
#menu-main-menu > li:hover > a,
#menu-main-menu > li:focus-within > a {
  color: #1d4fbf !important;
}

/* Gạch cam dưới item cấp 1 */
#menu-main-menu > li > a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 14px;
  bottom: 2px;
  height: 3px;
  border-radius: 999px;
  background: #ff7a00;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s ease;
}

/* Active / hover hiện gạch */
#menu-main-menu > li.current-menu-item > a::after,
#menu-main-menu > li.current-menu-parent > a::after,
#menu-main-menu > li.current-menu-ancestor > a::after,
/*#menu-main-menu > li:hover > a::after,*/
#menu-main-menu > li:focus-within > a::after {
  transform: scaleX(1);
}

.effect-underline:after {opacity: inherit;}

/* Item có submenu: thêm khoảng phải cho icon */
#menu-main-menu > li.menu-item-has-children > a {
  padding-right: 5px;
}

#menu-main-menu li a {font-size: 14px !important; font-family: "inter"}

/* Icon mũi tên xuống cho menu cấp 1 */
#menu-main-menu > li.menu-item-has-children > a::before {
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1px solid #1d4fbf;
  border-bottom: 1px solid #1d4fbf;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

/* Khi mở/hover thì mũi tên hướng lên */
#menu-main-menu > li.menu-item-has-children:hover > a::before,
#menu-main-menu > li.menu-item-has-children:focus-within > a::before {
  transform: translateY(-35%) rotate(-135deg);
}

/* ===== Dropdown cấp 2 ===== */
#menu-main-menu > li > .sub-menu {
  position: absolute;
  top: calc(100% - 10px);
  left: 0;
  min-width: 300px;
  background: #fff;
  border: 1px solid #e6eaf2;
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(16, 44, 84, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  z-index: 999;
  overflow: hidden;
}

/* Hiện dropdown */
#menu-main-menu > li:hover > .sub-menu,
#menu-main-menu > li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Item trong dropdown */
#menu-main-menu > li > .sub-menu > li {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  display: block;
  border-bottom: 1px solid #edf1f7;
}

#menu-main-menu > li > .sub-menu > li:last-child {
  border-bottom: none;
}

/* Link dropdown */
#menu-main-menu > li > .sub-menu > li > a {
  display: block;
  padding: 15px 20px;
  color: #1d4fbf !important;
  font-size: 14px !important;
  line-height: 1.35;
  font-weight: 400;
  text-decoration: none !important;
  background: #fff;
  transition: background 0.2s ease, color 0.2s ease;
}

/* Hover dropdown */
#menu-main-menu > li > .sub-menu > li:hover > a,
#menu-main-menu > li > .sub-menu > li:focus-within > a,
#menu-main-menu > li > .sub-menu > li.current-menu-item > a,
#menu-main-menu > li > .sub-menu > li.current-menu-parent > a,
#menu-main-menu > li > .sub-menu > li.current-menu-ancestor > a {
  background: #f7f9fd;
  color: #1d4fbf !important;
}

/* ===== Dropdown cấp 3 ===== */
#menu-main-menu .sub-menu .menu-item-has-children {
  position: relative;
}

#menu-main-menu .sub-menu .menu-item-has-children > a {
  position: relative;
  padding-right: 42px !important;
}

/* Mũi tên phải cho cấp 3 */
#menu-main-menu .sub-menu .menu-item-has-children > a::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid #1d4fbf;
  border-bottom: 2px solid #1d4fbf;
  transform: translateY(-50%) rotate(-45deg);
}

/* Panel cấp 3 */
#menu-main-menu .sub-menu .sub-menu {
  position: absolute;
  top: -1px;
  left: calc(100% - 6px);
  min-width: 260px;
  background: #fff;
  border: 1px solid #e6eaf2;
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(16, 44, 84, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateX(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  z-index: 1000;
  overflow: hidden;
}

#menu-main-menu .sub-menu .menu-item-has-children:hover > .sub-menu,
#menu-main-menu .sub-menu .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

#menu-main-menu .sub-menu .sub-menu li {
  border-bottom: 1px solid #edf1f7;
}

#menu-main-menu .sub-menu .sub-menu li:last-child {
  border-bottom: none;
}

#menu-main-menu .sub-menu .sub-menu a {
  display: block;
  padding: 16px 24px;
  color: #1d4fbf !important;
  font-size: 16px !important;
  font-weight: 500;
  text-decoration: none !important;
  background: #fff;
  transition: background 0.2s ease;
}

#menu-main-menu .sub-menu .sub-menu li:hover > a {
  background: #f7f9fd;
}

/* ===== effect-underline cũ: vô hiệu để không bị đè sai ===== */
#menu-main-menu a.effect-underline::before,
#menu-main-menu a.effect-underline::after {
  text-decoration: none;
}

/* Nếu theme cũ có underline riêng thì tắt */
#menu-main-menu a.effect-underline {
  background-image: none !important;
}

/* ===== Divider nhẹ giữa các block menu lớn (tùy chọn) =====
   Nếu muốn giống hình hơn, có thể thêm đường kẻ dọc sau item 2
*/
#menu-main-menu > li:nth-child(2) {
  padding-right: 30px !important;
}

#menu-main-menu > li:nth-child(2)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 1px;
  height: 28px;
  background: #d7deeb;
  transform: translateY(-50%);
}
.a-lang-item {color: rgb(148, 163, 184); font-size: 16px;}
.lang-active {color: rgb(0, 55, 171);}

/* ===== Canh dropdown item active của Trang chủ giống ảnh ===== */
#menu-main-menu > li.current-menu-parent > .sub-menu,
#menu-main-menu > li.current-menu-ancestor > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}


/* =========================
  MOBILE HEADER / DRAWER < 1024px only
========================= */
@media (max-width: 1023.98px) {
  body.mobile-menu-open {
    overflow: hidden;
    touch-action: none;
  }

  /* Header mobile */
  .site-header .header {
    background: #fff !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
    margin-top: 0 !important;
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-header .logo {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }

  .site-header .logo a {
    max-width: 240px !important;
  }

  .site-header .logo img {
    max-width: 100% !important;
    width: 100%;
    height: auto;
    display: block;
  }

  .desktop-menu-wrapper > .items-center.flex.wdg-333 {
    display: none !important;
  }

  .site-header .block-lang-md {
    display: none !important;
  }

  /* Hamburger */
  .a2e-mobile-toggle {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0;
    cursor: pointer;
  }

  .a2e-mobile-toggle span {
    display: block;
    width: 22px;
    height: 2.5px;
    border-radius: 999px;
    background: #1746b5;
    transition: all 0.25s ease;
  }

  /* Overlay */
  .a2e-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9998;
  }

  .a2e-mobile-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Drawer */
  .a2e-mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    /*width: min(100%, 420px);*/
    width: 98%;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 9999;
    box-shadow: -12px 0 40px rgba(2, 6, 23, 0.14);
  }

  .a2e-mobile-drawer.is-open {
    transform: translateX(0);
  }

  .a2e-mobile-drawer__inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    min-height: 0;
  }

  .a2e-mobile-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 16px 16px;
    border-bottom: 1px solid #eef2f7;
  }

  .a2e-mobile-drawer__logo {
    display: inline-flex;
    align-items: center;
    max-width: 230px;
  }

  .a2e-mobile-drawer__logo img {
    display: block;
    width: 98%;
    height: auto;
  }

  .a2e-mobile-close {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #1746b5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
  }

  .a2e-mobile-drawer__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 16px;
  }

  /* Menu level 1 */
  .a2e-mobile-menu,
  .a2e-mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .a2e-mobile-menu > li {
    border-bottom: 1px solid #eef2f7;
    position: relative;
  }

  .a2e-mobile-menu > li > a {
    min-height: 50px;
    display: flex;
    align-items: center;
    padding: 0 25px;
    padding-right: 56px;
    color: #1746b5;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
    text-decoration: none;
  }

  .a2e-mobile-menu > li > a:hover {
    color: #1746b5;
  }

  /* Toggle submenu button */
  .a2e-submenu-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 52px;
    height: 60px;
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ff7a00;
  }

  .a2e-submenu-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform 0.25s ease;
  }

  .a2e-submenu-toggle.is-open svg {
    transform: rotate(180deg);
  }

  /* Submenu */
  .a2e-mobile-menu .sub-menu {
    display: none;
    background: #f6f8fc;
    padding: 2px 0;
  }

  .a2e-mobile-menu .sub-menu.is-open {
    display: block;
  }

  .a2e-mobile-menu .sub-menu li a {
    display: block;
    padding: 10px 10px 10px 35px;
    color: #1746b5;
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
    border-top: 1px solid rgba(23, 70, 181, 0.06);
  }

  .a2e-mobile-menu .sub-menu li:first-child a {
    border-top: 0;
  }

  /* Footer */
  .a2e-mobile-drawer__footer {
    padding: 14px 16px 35px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    padding-bottom: calc(16px + constant(safe-area-inset-bottom));
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid #eef2f7;
    background: #fff;
  }

  .a2e-mobile-lang {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
  }

  /* style fallback cho block ngôn ngữ */
  .a2e-mobile-lang .lang-item,
  .a2e-mobile-lang a,
  .a2e-mobile-lang button,
  .a2e-mobile-lang .pll-parent-menu-item > a {
    border-radius: 12px;
  }

  .a2e-mobile-cta {
    height: 50px;
    border-radius: 18px;
    background: #ff7a00;
    color: #fff !important;
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 24px rgba(255, 122, 0, 0.2);
  }

  .a2e-mobile-cta__icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .a2e-mobile-cta__icon svg {
    width: 20px;
    height: 20px;
  }
}

/* Ẩn hoàn toàn drawer ở desktop */
@media (min-width: 1024px) {
  .a2e-mobile-overlay,
  .a2e-mobile-drawer {
    display: none !important;
  }
}

/* =========================
   A2E Button System
========================= */

:root {
  --a2e-btn-radius: 999px;
  --a2e-btn-font-size: 18px;
  --a2e-btn-font-weight: 700;
  --a2e-btn-padding-y: 16px;
  --a2e-btn-padding-x: 40px;

  --a2e-orange: #ff7300;
  --a2e-orange-hover: #f06c00;
  --a2e-white: #ffffff;

  --a2e-shadow-orange: 0 10px 28px rgba(255, 115, 0, 0.28);
  --a2e-shadow-orange-hover: 0 14px 32px rgba(255, 115, 0, 0.34);

  --a2e-transition: all 0.28s ease;
}

/* Base button */
.a2e-btn {
  --btn-bg: var(--a2e-orange);
  --btn-color: var(--a2e-white);
  --btn-border: transparent;
  --btn-shadow: var(--a2e-shadow-orange);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  min-height: 58px;
  padding: var(--a2e-btn-padding-y) var(--a2e-btn-padding-x);

  border-radius: var(--a2e-btn-radius);
  border: 2px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-color) !important;

  font-size: var(--a2e-btn-font-size);
  font-weight: var(--a2e-btn-font-weight);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;

  box-shadow: var(--btn-shadow);
  transition: var(--a2e-transition);
  appearance: none;
  -webkit-appearance: none;
}

/* Hover / focus */
.a2e-btn:hover,
.a2e-btn:focus-visible {
  transform: translateY(-2px);
  text-decoration: none !important;
  outline: none;
}

/* Active */
.a2e-btn:active {
  transform: translateY(0);
}

/* Disabled */
.a2e-btn:disabled,
.a2e-btn.is-disabled {
  opacity: 0.6;
  pointer-events: none;
  cursor: not-allowed;
}

/* =========================
   Primary orange
========================= */
.a2e-btn--primary {
  --btn-bg: var(--a2e-orange);
  --btn-color: #fff;
  --btn-border: var(--a2e-orange);
  --btn-shadow: var(--a2e-shadow-orange);
}

.a2e-btn--primary:hover,
.a2e-btn--primary:focus-visible {
  background: var(--a2e-orange-hover);
  border-color: var(--a2e-orange-hover);
  box-shadow: var(--a2e-shadow-orange-hover);
  color: #fff !important;
}

/* =========================
   Outline white
   Dùng trên nền xanh/ảnh tối
========================= */
.a2e-btn--outline-light {
  --btn-bg: transparent;
  --btn-color: #fff;
  --btn-border: rgba(255, 255, 255, 0.65);
  --btn-shadow: none;
}

.a2e-btn--outline-light:hover,
.a2e-btn--outline-light:focus-visible {
  background: rgba(255, 255, 255, 0.10);
  border-color: #fff;
  color: #fff !important;
}

/* =========================
   Outline blue
   Dùng trên nền trắng
========================= */
.a2e-btn--outline-blue {
  --btn-bg: transparent;
  --btn-color: #1d4fbf;
  --btn-border: rgba(29, 79, 191, 0.45);
  --btn-shadow: none;
}

.a2e-btn--outline-blue:hover,
.a2e-btn--outline-blue:focus-visible {
  background: rgba(29, 79, 191, 0.06);
  border-color: #1d4fbf;
  color: #1d4fbf !important;
}

.a2e-btn--outline-white {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.32);
  box-shadow: none;
}

.a2e-btn--outline-white:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
}

.a2e-btn--outline-white .a2e-btn__icon {
  color: currentColor;
}

/* OUTLINE BLUE (giống hình) */
.a2e-btn--outline {
  border: 1px solid #1d4ed8;
  color: #1d4ed8;
  background: #fff;
  box-shadow: none !important;
}

/* HOVER */
.a2e-btn--outline:hover {
  transform: translateY(-2px); /* 👈 nhích lên */
  box-shadow: 0 6px 18px rgba(29, 78, 216, 0.25);
}

/* ACTIVE */
.a2e-btn--outline:active {
  transform: scale(0.98);
  box-shadow: none;
}

.a2e-btn--outline > span {color: rgb(0, 55, 171)}

/* =========================
   Icon wrapper
========================= */
.a2e-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 1;
}

/* Nếu dùng icon svg */
.a2e-btn__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Nếu chỉ muốn arrow bằng CSS, không cần svg */
.a2e-btn--arrow::after {
  content: "";
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  margin-left: 2px;
}

.a2e-btn--arrow:hover::after,
.a2e-btn--arrow:focus-visible::after {
  transform: translateX(3px) rotate(45deg);
}

/* Kích thước */
.a2e-btn--sm {
  min-height: 46px;
  padding: 12px 26px;
  font-size: 15px;
}

.a2e-btn--md {
  min-height: 58px;
  padding: 16px 40px;
  font-size: 18px;
}

.a2e-btn--lg {
  min-height: 64px;
  padding: 18px 46px;
  font-size: 20px;
}

/* Responsive */
@media (max-width: 767px) {
  .a2e-btn {
    min-height: 50px;
    padding: 13px 24px;
    font-size: 15px;
    gap: 10px;
  }

  .a2e-btn--lg {
    min-height: 56px;
    padding: 14px 28px;
    font-size: 16px;
  }

  .site-header {padding: 0}
}

.block-lang-md {padding: 0 30px;}

/* ===== Responsive desktop nhỏ hơn ===== */
@media (max-width: 1399px) {
  #menu-main-menu {
    gap: 14px;
  }

  #menu-main-menu > li > a {
    font-size: 16px !important;
    padding-left: 10px;
    padding-right: 10px;
  }

  #menu-main-menu > li.menu-item-has-children > a {
    padding-right: 28px;
  }

  #menu-main-menu > li.menu-item-has-children > a::before {
    right: 9px;
  }
}

/* Ẩn menu desktop ở mobile nếu theme chưa xử lý */
@media (max-width: 1023px) {
  .desktop-menu-wrapper .lg\\:block.hidden,
  .desktop-menu-wrapper #menu-main-menu {
    display: none !important;
  }
}

/* mobile only */
@media (max-width: 768px) {
  .a2e-mobile-lang {
    display: flex;
    gap: 10px;
  }

  .a2e-mobile-lang a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 5px 12px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    text-transform: none;

    background: #e5e7eb; /* xám */
    color: #1f3b8f; /* xanh chữ */

    text-decoration: none;
    transition: all 0.2s ease;
  }

  /* active (ngôn ngữ hiện tại) */
  .a2e-mobile-lang a.active {
    background: #1f3b8f;
    color: #fff;
  }

  /* hover nhẹ */
  .a2e-mobile-lang a:hover {
    opacity: 0.9;
  }

  /* ẩn dấu "|" */
  .a2e-mobile-lang span {
    display: none;
  }

  .hero-slider .hero-title.fix-font-size {font-size: 36px !important;}
}

