/* =========================================================
   Header AAS (bố cục theo trang /gioi-thieu-aas/)
   - Mọi selector nằm dưới .hd và dùng tiền tố hd- để không đụng Tailwind CDN / main.css của theme.
   - Markup: template-parts/site-header.php · JS: assets/js/site-header.js
   ========================================================= */
.hd {
  --hd-navy: #203567;
  --hd-navy-hover: #17284f;
  --hd-navy-900: #0f1d3d;
  --hd-green: #8cc63f;
  --hd-green-700: #4d7a26;
  --hd-off: #f1f7f3;
  --hd-body: #34424f;
  --hd-line: #dde5e1;
  --hd-ease: cubic-bezier(.2, .7, .2, 1);
  font-family: "Bai Jamjuree", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  text-align: left;
}
.hd *, .hd *::before, .hd *::after { box-sizing: border-box; }
.hd ul, .hd ol { margin: 0; padding: 0; list-style: none; }
.hd li { margin: 0; }
.hd p { margin: 0; }
.hd a { color: inherit; text-decoration: none; background: none; }
.hd button, .hd input { font: inherit; color: inherit; box-sizing: border-box; } /* theme đặt input[type=search] là content-box */
.hd button { cursor: pointer; background: none; border: 0; padding: 0; }
.hd img { display: block; max-width: 100%; height: auto; }
.hd svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hd .hd-sprite, .hd-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hd .hd-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hd :focus-visible { outline: 3px solid var(--hd-green); outline-offset: 3px; border-radius: 6px; }
body.hd-noscroll { overflow: hidden; }

/* ---------- Khung header ---------- */
header.hd {
  position: fixed; left: 0; right: 0; top: 0; z-index: 999; padding-bottom: 14px;
  background: linear-gradient(180deg, var(--hd-navy-900) 0%, rgba(15, 29, 61, 0) 100%);
  transition: background-color .35s, box-shadow .35s, transform .35s var(--hd-ease);
}
header.hd.hd-scrolled { background: var(--hd-navy-900); box-shadow: 0 14px 30px -16px rgba(0, 0, 0, .55); }
header.hd.hd-hidden { transform: translateY(-105%); }
.hd .hd-container { width: calc(100% - 48px); max-width: 1600px; margin-inline: auto; }

/* ---------- Thanh trên ---------- */
.hd .hd-topbar { color: #c9d4e6; font-size: 14px; }
.hd .hd-topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 50px; padding: 0 70px 0 96px; }
.hd .hd-toplinks > ul { display: flex; gap: 6px; }
.hd .hd-toplink { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; color: #aebcd4; font-weight: 500; font-size: 14px; transition: color .2s; }
.hd .hd-toplink::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 6px; height: 1.5px; background: var(--hd-green); transform: scaleX(0); transition: transform .3s var(--hd-ease); }
.hd .hd-toplink.hd-current { color: var(--hd-green); }
.hd .hd-toplink.hd-current::after { transform: scaleX(1); }
.hd .hd-has-drop { position: relative; }
.hd .hd-has-drop:hover > .hd-toplink, .hd .hd-has-drop:focus-within > .hd-toplink, .hd .hd-has-drop.hd-open > .hd-toplink { color: #fff; }
.hd .hd-toplinks .hd-has-drop:hover > .hd-toplink::after, .hd .hd-toplinks .hd-has-drop:focus-within > .hd-toplink::after { transform: scaleX(1); }
.hd .hd-lang .hd-toplink::after { display: none; }
.hd .hd-toplink > svg { width: 16px; height: 16px; transition: transform .25s var(--hd-ease); }
.hd .hd-has-drop:hover > .hd-toplink > svg:last-child, .hd .hd-has-drop.hd-open > .hd-toplink > svg:last-child { transform: rotate(180deg); }

/* Dropdown chung (thanh trên + menu chính) */
.hd .hd-drop, .hd .hd-sub {
  position: absolute; left: 0; top: 100%; z-index: 30; min-width: 265px; padding: 14px;
  background: rgba(15, 29, 61, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .6);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .22s, transform .25s var(--hd-ease), visibility .22s;
}
.hd .hd-drop-right { left: auto; right: 0; min-width: 170px; }
.hd .hd-has-drop:hover > .hd-drop, .hd .hd-has-drop:focus-within > .hd-drop, .hd .hd-has-drop.hd-open > .hd-drop,
.hd .hd-has-sub:hover > .hd-sub, .hd .hd-has-sub:focus-within > .hd-sub { opacity: 1; visibility: visible; transform: none; }
.hd .hd-drop a, .hd .hd-sub a {
  position: relative; display: block; padding: 9px 12px; border-radius: 9px; color: #fff; font-size: 14.5px; font-weight: 600; line-height: 1.5;
  transition: background-color .2s, color .2s, padding-left .25s var(--hd-ease);
}
.hd .hd-drop a::before, .hd .hd-sub a::before { content: ""; position: absolute; left: 8px; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--hd-green); transform: translateY(-50%) scale(0); transition: transform .25s var(--hd-ease); }
.hd .hd-drop a:hover, .hd .hd-sub a:hover, .hd .hd-sub a:focus-visible, .hd .hd-drop a[aria-current], .hd .hd-sub a[aria-current] { color: var(--hd-green); background: rgba(255, 255, 255, .06); padding-left: 20px; }
.hd .hd-drop a:hover::before, .hd .hd-sub a:hover::before, .hd .hd-drop a[aria-current]::before, .hd .hd-sub a[aria-current]::before { transform: translateY(-50%) scale(1); }

/* Công cụ: tìm kiếm · ngôn ngữ · hotline */
.hd .hd-tools { display: flex; align-items: center; }
.hd .hd-tools > * + * { position: relative; margin-left: 16px; padding-left: 16px; }
.hd .hd-tools > * + *::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 20px; margin-top: -10px; background: rgba(255, 255, 255, .25); }
.hd .hd-search { position: relative; display: flex; align-items: center; }
.hd .hd-search:not(.hd-open) { width: 36px; height: 36px; }
.hd .hd-search input[type="search"] {
  width: 0; height: 36px; padding: 0; border: 0; border-radius: 999px; opacity: 0; background: rgba(255, 255, 255, .1); color: #fff; font-size: 14px; -webkit-appearance: none; appearance: none;
  transition: width .35s var(--hd-ease), padding .35s var(--hd-ease), opacity .25s;
}
.hd .hd-search input::placeholder { color: #9fb0ca; }
.hd .hd-search.hd-open input[type="search"] { width: 220px; padding: 0 44px 0 16px; opacity: 1; border: 1px solid rgba(140, 198, 63, .6); }
.hd .hd-search input:focus { outline: none; }
.hd .hd-search-btn { position: absolute; right: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--hd-navy); transition: background-color .25s, color .25s, transform .3s var(--hd-ease); }
.hd .hd-search-btn svg { width: 18px; height: 18px; stroke-width: 2.2; }
.hd .hd-search-btn:hover { background: var(--hd-green); color: var(--hd-navy-900); transform: scale(1.06); }
.hd .hd-lang .hd-toplink { gap: 8px; color: #fff; font-weight: 600; }
.hd .hd-flag { width: 20px; height: 20px; stroke: none; }
.hd .hd-hotline {
  display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 16px 0 4px; border-radius: 999px;
  background: linear-gradient(90deg, var(--hd-green), #b6dc7c); color: var(--hd-navy-900); font-weight: 700; font-size: 16px; white-space: nowrap;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); transition: transform .25s var(--hd-ease), box-shadow .25s, filter .25s;
}
.hd .hd-hotline-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--hd-navy-900); color: var(--hd-green); }
.hd .hd-hotline-ico svg { width: 16px; height: 16px; }
.hd .hd-hotline:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .6), 0 8px 18px -8px rgba(140, 198, 63, .8); }
.hd .hd-hotline:hover .hd-hotline-ico svg { animation: hd-ring .6s ease-in-out 2; }
@keyframes hd-ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-15deg); } 75% { transform: rotate(15deg); } }

/* ---------- Thanh menu chính ---------- */
.hd .hd-mainbar-inner {
  position: relative; display: flex; align-items: center; gap: 20px; height: 80px; padding: 0 20px;
  border-radius: 16px; background: rgba(32, 53, 103, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .14); transition: background-color .35s;
}
header.hd.hd-scrolled .hd-mainbar-inner { background: rgba(32, 53, 103, .9); }
.hd .hd-brand { flex-shrink: 0; display: block; }
.hd .hd-brand img { width: 120px; height: auto; transition: transform .3s var(--hd-ease); }
.hd .hd-brand:hover img { transform: scale(1.04); }
.hd .hd-nav { flex: 1; min-width: 0; }
.hd .hd-menu { display: flex; align-items: center; }
.hd .hd-menu > li { position: relative; }
.hd .hd-menu > li.hd-has-mega { position: static; }
.hd .hd-menu-link {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 80px; padding: 0 9px;
  color: #fff; font-weight: 500; font-size: 15px; white-space: nowrap; transition: color .2s;
}
.hd .hd-caret { width: 16px; height: 16px; fill: currentColor; stroke: none; transition: transform .25s var(--hd-ease); }
.hd .hd-menu-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 20px; height: 1.5px; background: linear-gradient(90deg, transparent, var(--hd-green), transparent); transform: scaleX(0); transition: transform .3s var(--hd-ease); }
.hd .hd-menu-link.hd-active { color: var(--hd-green); }
.hd .hd-menu-link.hd-active::after { transform: scaleX(1); }
.hd .hd-menu > li:hover > .hd-menu-link, .hd .hd-menu > li:focus-within > .hd-menu-link { color: var(--hd-green); }
.hd .hd-menu > li:hover > .hd-menu-link::after, .hd .hd-menu > li:focus-within > .hd-menu-link::after { transform: scaleX(1); }
.hd .hd-menu > li:hover > .hd-menu-link .hd-caret, .hd .hd-menu > li:focus-within > .hd-menu-link .hd-caret { transform: rotate(180deg); }
.hd .hd-menu > li > .hd-sub { top: calc(100% - 10px); }

/* Mega menu (nhóm có menu 3 cấp) */
.hd .hd-menu > li > .hd-mega { left: 212px; top: calc(100% + 7px); display: grid; grid-template-columns: 340px 1fr; gap: 40px; width: min(1050px, calc(100vw - 300px)); padding: 26px 40px; }
.hd .hd-mega::before { content: ""; position: absolute; left: 0; right: 0; top: -24px; height: 24px; } /* cầu nối hover giữa thanh menu và bảng mega */
.hd .hd-mega-tabs a { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-radius: 0; border-bottom: 1px solid rgba(255, 255, 255, .16); font-size: 17px; font-weight: 600; }
.hd .hd-mega-tabs li:last-child a { border-bottom: 0; }
.hd .hd-mega-tabs a::before { display: none; }
.hd .hd-mega-tabs a:hover, .hd .hd-mega-tabs a.hd-on { padding-left: 6px; background: none; color: var(--hd-green); }
.hd .hd-mega-tabs a svg { width: 18px; height: 18px; transition: transform .25s var(--hd-ease); }
.hd .hd-mega-tabs a.hd-on svg { transform: translateX(4px); }
.hd .hd-mega-panel { display: none; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 36px; align-content: start; animation: hd-fade-up .3s var(--hd-ease); }
.hd .hd-mega-panel.hd-on { display: grid; }
.hd .hd-mega-panel ul { display: grid; align-content: start; gap: 2px; }
.hd .hd-mega-panel a { padding: 8px 10px; white-space: nowrap; }
@keyframes hd-fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes hd-fade { from { opacity: 0; } }
@keyframes hd-slide-in { from { transform: translateX(100%); } }

/* ---------- Nút CTA + nút mở menu mobile ---------- */
.hd .hd-btn {
  position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px; border-radius: 999px; font-weight: 700; font-size: 15px; line-height: 1.2; white-space: nowrap;
  border: 1.5px solid transparent; transition: transform .28s var(--hd-ease), box-shadow .28s, background-color .22s, color .22s, border-color .22s;
}
.hd .hd-btn svg { width: 18px; height: 18px; }
.hd .hd-btn::before { content: ""; position: absolute; inset: -40% -60%; z-index: -1; pointer-events: none; background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, .45) 50%, transparent 68%); transform: translateX(-100%); }
.hd .hd-btn:hover::before { transition: transform .7s var(--hd-ease); transform: translateX(100%); }
.hd .hd-btn:hover { transform: translateY(-2px); }
.hd .hd-btn-green { background: var(--hd-green); color: var(--hd-navy-900); box-shadow: 0 10px 24px -12px rgba(140, 198, 63, .9); }
.hd .hd-btn-green:hover { background: #9bd24e; box-shadow: 0 16px 30px -12px rgba(140, 198, 63, .95); }
.hd .hd-btn-outline { color: var(--hd-navy); border-color: var(--hd-navy); background: transparent; }
.hd .hd-btn-outline:hover { background: var(--hd-navy); color: #fff; }
.hd .hd-cta { display: flex; gap: 14px; margin-left: auto; }
.hd .hd-cta .hd-btn { text-transform: uppercase; letter-spacing: .01em; }
.hd .hd-cta .hd-btn-outline { color: var(--hd-green); border-color: var(--hd-green); background: rgba(15, 29, 61, .35); }
.hd .hd-cta .hd-btn-outline:hover { background: var(--hd-green); color: var(--hd-navy-900); }
.hd .hd-cta .hd-btn-green { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); }
.hd .hd-toggle { display: none; place-items: center; width: 44px; height: 44px; margin-left: auto; border-radius: 12px; background: rgba(255, 255, 255, .1); color: #fff; transition: background-color .2s, color .2s; }
.hd .hd-toggle:hover { background: var(--hd-green); color: var(--hd-navy-900); }

/* ---------- Menu mobile (drawer) ---------- */
.hd.hd-drawer { position: fixed; inset: 0; z-index: 1001; }
.hd.hd-drawer[hidden] { display: none; }
.hd .hd-drawer-backdrop { position: absolute; inset: 0; background: rgba(15, 29, 61, .55); backdrop-filter: blur(2px); animation: hd-fade .25s; }
.hd .hd-drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(380px, 92vw); padding: 18px 20px 28px; background: #fff; color: var(--hd-body); overflow-y: auto; box-shadow: 0 28px 60px -22px rgba(15, 29, 61, .38); animation: hd-slide-in .32s var(--hd-ease); }
.hd .hd-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.hd .hd-drawer-head .hd-brand img { width: 112px; }
.hd .hd-icon-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--hd-navy); transition: background-color .2s, color .2s, transform .2s; }
.hd .hd-icon-btn:hover { background: var(--hd-off); transform: rotate(90deg); }
.hd .hd-drawer-tools { display: flex; gap: 8px; margin-bottom: 14px; }
.hd .hd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--hd-line); font-size: 14px; font-weight: 600; color: var(--hd-navy); }
.hd .hd-chip svg { width: 16px; height: 16px; }
.hd .hd-chip-green { background: var(--hd-off); border-color: #cfe6b5; color: var(--hd-green-700); }
.hd .hd-drawer-search { position: relative; margin-bottom: 10px; }
.hd .hd-drawer-search input[type="search"] { width: 100%; height: 44px; padding: 0 44px 0 16px; border-radius: 12px; border: 1px solid var(--hd-line); background: var(--hd-off); -webkit-appearance: none; appearance: none; }
.hd .hd-drawer-search input:focus { outline: none; border-color: var(--hd-green); }
.hd .hd-drawer-search button { position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; display: grid; place-items: center; color: var(--hd-navy); }
.hd .hd-drawer-nav hr { border: 0; border-top: 1px solid var(--hd-line); margin: 10px 0; }
.hd .hd-drawer-nav .hd-d-link, .hd .hd-drawer-nav summary {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 4px; font-weight: 600; color: var(--hd-navy); cursor: pointer; list-style: none;
  border-bottom: 1px solid #edf2ef; transition: color .2s;
}
.hd .hd-drawer-nav summary::-webkit-details-marker { display: none; }
.hd .hd-drawer-nav summary svg { width: 16px; height: 16px; transition: transform .25s var(--hd-ease); }
.hd .hd-drawer-nav details[open] > summary { color: var(--hd-green-700); }
.hd .hd-drawer-nav details[open] > summary svg { transform: rotate(180deg); }
.hd .hd-drawer-nav details a { display: block; padding: 9px 14px; font-size: 15px; color: var(--hd-body); border-radius: 8px; transition: background-color .2s, color .2s; }
.hd .hd-drawer-nav details a:hover, .hd .hd-drawer-nav details a[aria-current] { background: var(--hd-off); color: var(--hd-green-700); }
.hd .hd-drawer-nav .hd-lv2 { padding-left: 10px; }
.hd .hd-drawer-nav .hd-lv2 > summary { font-weight: 600; font-size: 15px; border: 0; padding: 9px 4px; }
.hd .hd-drawer-cta { display: grid; gap: 10px; margin-top: 20px; }
.hd .hd-drawer-cta .hd-btn-outline:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1440px) {
  .hd .hd-menu-link { padding: 0 7px; font-size: 14.5px; }
  .hd .hd-cta { gap: 10px; }
  .hd .hd-cta .hd-btn { padding: 0 18px; font-size: 14px; }
}
@media (max-width: 1320px) {
  .hd .hd-cta .hd-btn svg { display: none; }
  .hd .hd-cta .hd-btn { padding: 0 14px; }
  .hd .hd-menu > li > .hd-mega { left: 0; width: 100%; grid-template-columns: 280px 1fr; padding: 22px 28px; }
}
@media (max-width: 1200px) {
  header.hd { padding-bottom: 10px; }
  .hd .hd-topbar, .hd .hd-nav, .hd .hd-cta { display: none; }
  .hd .hd-mainbar-inner { height: 68px; margin-top: 10px; padding: 0 14px; }
  .hd .hd-brand img { width: 104px; }
  .hd .hd-toggle { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
  .hd *, .hd *::before, .hd *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =========================================================
   Font chữ thương hiệu mới (Bai Jamjuree) – áp dụng cho trang chủ (body.aas-home)
   Trước đây thân trang khai báo "SF Pro Display" nhưng file font không được nạp (typography.css không được nhúng) nên rơi về Arial.
   Muốn áp dụng toàn site: bỏ tiền tố body.aas-home (hoặc đặt biến --f-body trên :root).
   ========================================================= */
body.aas-home {
  --f-body: "Bai Jamjuree", "Segoe UI", Arial, sans-serif;
  font-family: var(--f-body);
}
body.aas-home .highcharts-container,
body.aas-home .highcharts-container * {
  font-family: inherit !important; /* biểu đồ Highcharts tự gán font riêng bằng style inline */
}
