/* Menu chính của website (server/src/site/layout.ts siteHeader). Nạp cả trên trang 3DVista: chỉ selector .hd* / .bk-bar, không reset toàn cục.
   Biến màu khai báo ngay trên .hd để header không phụ thuộc site.css; --p, --a, --font, --rb, --bk, --bk-fg đến từ themeCss(). */
.hd {
  --s: #ffffff; --s2: #f1f4f7; --fg: #0f172a; --mu: #4b5563; --ln: #e3e7ec;
  --ps: color-mix(in srgb, var(--p, #0e7490) 10%, transparent);
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --ring: var(--p, #0e7490);
  --hd: 68px;
  position: sticky; top: 0; z-index: 50; color: var(--fg); font-family: var(--font, system-ui, sans-serif); font-size: 16px; line-height: 1.6;
  background: color-mix(in srgb, var(--s) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--ln);
  transition: box-shadow .2s;
}
.hd[data-mode="dark"] {
  --s: #13161d; --s2: #1a1e27; --fg: #eef0f4; --mu: #a1aab8; --ln: rgba(255, 255, 255, .09); --ring: #fff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
}
.hd, .hd *, .hd *::before, .hd *::after { box-sizing: border-box; }
.hd a { color: inherit; }
.hd img, .hd svg { display: block; max-width: 100%; }
.hd .hd-in { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 24px; height: var(--hd); display: flex; align-items: center; gap: 24px; transition: height .2s; }
.hd :focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
/* Scrolled: a lower bar with a shadow (site-header.js, IntersectionObserver). The margin keeps the page from moving */
.hd.is-compact { --hd: 56px; box-shadow: var(--shadow); }
.hd.is-compact:not(.hd-glass) { margin-bottom: 12px; }
.hd-brand { display: flex; align-items: center; min-height: 44px; text-decoration: none; font-size: 18px; flex-shrink: 0; }
.hd-brand img { height: 36px; width: auto; }
.hd-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.hd-nav > a, .hd-nav .hd-sub-a, .hd-more summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14.5px; color: var(--mu); white-space: nowrap; cursor: pointer; }
.hd-nav > a:hover, .hd-nav .hd-sub-a:hover, .hd-more summary:hover { color: var(--fg); background: var(--s2); }
.hd-nav > a.on, .hd-sub.on > .hd-sub-a { color: var(--p); background: var(--ps); }
.hd-more { position: relative; }
.hd-more summary { list-style: none; gap: 4px; }
.hd-more summary::-webkit-details-marker { display: none; }
.hd-more[open] summary svg { transform: rotate(180deg); }
.hd-drop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 2; min-width: 240px; color: var(--fg); text-shadow: none; background: var(--s); border: 1px solid var(--ln); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; }
.hd-drop a { min-height: 44px; padding: 11px 12px; border-radius: 9px; text-decoration: none; font-weight: 600; font-size: 14px; line-height: 1.5; }
.hd-drop a > svg { display: inline-block; vertical-align: -3px; margin-right: 6px; }
.hd-drop a small { display: block; font-weight: 500; font-size: 12.5px; color: var(--mu); }
.hd-drop a:hover, .hd-drop a.on { background: var(--s2); color: var(--p); }
.hd-drop .hd-ov { margin-bottom: 4px; border-bottom: 1px solid var(--ln); border-radius: 9px 9px 0 0; }
/* Badge of an entry (Menu CMS): fixed tones with white text at AA contrast whatever the theme */
.hd-badge { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 18px; letter-spacing: .02em; color: #fff; background: #b45309; text-shadow: none; vertical-align: 1px; }
.hd-badge-new { background: #047857; }
.hd-badge-hot { background: #b91c1c; }
/* Entry with a dropdown (disclosure, not role=menu): label = link to its page, chevron (or hover on a computer) = open; js adds .open */
.hd-sub { position: relative; display: flex; align-items: center; }
.hd-nav .hd-sub-a { padding-right: 4px; }
.hd-sub-t { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 44px; margin-left: -2px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--mu); cursor: pointer; }
.hd-sub-t:hover { color: var(--fg); background: var(--s2); }
.hd-sub-t svg { transition: transform .15s; }
.hd-sub.open .hd-sub-t svg { transform: rotate(180deg); }
.hd-sub .hd-drop { visibility: hidden; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s, visibility 0s linear .15s; }
.hd-sub .hd-drop::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.hd-sub.open .hd-drop { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
@media (hover: hover) and (min-width: 1181px) {
  .hd-sub:hover .hd-drop { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
}
@media (min-width: 1181px) {
  .hd-home, .hd .hd-mob, .hd-foot { display: none !important; }
}
.hd-act { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.hd-tel { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; justify-content: center; text-decoration: none; font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.hd-tel-m { display: none; }
.hd-tg { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--ln); background: var(--s); color: var(--fg); align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.hd-tg svg + svg, .hd.open .hd-tg svg:first-child { display: none; }
.hd.open .hd-tg svg + svg { display: block; }
.hd-book { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: var(--rb, 12px); border: 1.5px solid transparent; font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap; background: var(--bk, var(--p)); color: var(--bk-fg, #fff) !important; transition: filter .15s; }
.hd-book:hover { filter: brightness(1.07); }
/* VI | EN: links to this page in each language (layout.ts langSwitch) */
.hd-lang { display: flex; align-items: center; }
.hd-lg { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 44px; padding: 0 6px; text-decoration: none; font-weight: 700; font-size: 13px; letter-spacing: .04em; color: var(--mu) !important; border-radius: 8px; }
.hd-lg + .hd-lg::before { content: ''; position: absolute; left: 0; top: 50%; height: 14px; margin-top: -7px; border-left: 1px solid currentColor; opacity: .45; }
.hd-lg:hover { color: var(--fg) !important; }
.hd-lg[aria-current] { color: var(--fg) !important; text-decoration: underline 2px; text-underline-offset: 5px; }
/* Language suggestion (Accept-Language of the browser, until a choice is stored in the site_lang cookie) */
.hd-lb { position: absolute; top: calc(100% + 8px); right: 16px; z-index: 3; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); padding: 6px 6px 6px 14px; color: var(--fg); text-shadow: none; background: var(--s); border: 1px solid var(--ln); border-radius: 12px; box-shadow: var(--shadow); font-size: 14px; }
.hd-lb a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 9px; font-weight: 700; text-decoration: none; color: var(--bk-fg, #fff) !important; background: var(--bk, var(--p)); white-space: nowrap; }
.hd-lb button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--mu); cursor: pointer; }
.hd-lb button:hover { background: var(--s2); color: var(--fg); }
.bk-bar { display: none; }

/* Header floating over the homepage hero (theme.header = overlay): stays fixed, transparent until the page is scrolled (.is-compact). Desktop only: the mobile bar stays solid */
@media (min-width: 1181px) {
  .hd-float .hd { position: fixed; left: 0; right: 0; }
  .hd-float .hd:not(.is-compact) { background: linear-gradient(180deg, rgba(5, 8, 14, .5), rgba(5, 8, 14, 0)); border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; color: #fff; --ring: #fff; }
  .hd-float .hd:not(.is-compact) .hd-nav > a, .hd-float .hd:not(.is-compact) .hd-sub-a, .hd-float .hd:not(.is-compact) .hd-sub-t, .hd-float .hd:not(.is-compact) .hd-more summary, .hd-float .hd:not(.is-compact) .hd-lg { color: rgba(255, 255, 255, .92) !important; text-shadow: 0 1px 10px rgba(0, 0, 0, .45); }
  .hd-float .hd:not(.is-compact) .hd-nav > a:hover, .hd-float .hd:not(.is-compact) .hd-sub-a:hover, .hd-float .hd:not(.is-compact) .hd-sub-t:hover, .hd-float .hd:not(.is-compact) .hd-more summary:hover { color: #fff; background: rgba(255, 255, 255, .16); }
  .hd-float .hd:not(.is-compact) .hd-nav > a.on, .hd-float .hd:not(.is-compact) .hd-sub.on > .hd-sub-a { color: #fff; background: rgba(255, 255, 255, .22); }
  .hd-float .hd:not(.is-compact) .hd-brand, .hd-float .hd:not(.is-compact) .hd-lg[aria-current] { color: #fff !important; text-shadow: 0 1px 10px rgba(0, 0, 0, .45); }
}

/* Kính mờ nổi trên nền 360° (tour, link ngắn cảnh): luôn nổi, chữ sáng, nền tối đủ đậm để chữ trắng đạt AA trên mọi cảnh */
.hd.hd-glass { --ring: #fff; position: fixed; left: 0; right: 0; top: 0; z-index: 2147482999; color: #fff; background: linear-gradient(180deg, rgba(8, 12, 20, .72), rgba(8, 12, 20, .52)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, .12); }
.hd-glass .hd-brand { color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, .35); }
.hd-glass .hd-nav > a, .hd-glass .hd-sub-a, .hd-glass .hd-sub-t, .hd-glass .hd-more summary, .hd-glass .hd-lg { color: rgba(255, 255, 255, .92) !important; text-shadow: 0 1px 10px rgba(0, 0, 0, .35); }
.hd-glass .hd-lg[aria-current] { color: #fff !important; }
.hd-glass .hd-nav > a:hover, .hd-glass .hd-sub-a:hover, .hd-glass .hd-sub-t:hover, .hd-glass .hd-more summary:hover { color: #fff; background: rgba(255, 255, 255, .16); }
.hd-glass .hd-nav > a.on, .hd-glass .hd-sub.on > .hd-sub-a { color: #fff; background: rgba(255, 255, 255, .22); }
.hd-glass .hd-drop { color: #fff; background: rgba(12, 16, 24, .94); border-color: rgba(255, 255, 255, .14); }
.hd-glass .hd-drop small { color: rgba(255, 255, 255, .75); }
.hd-glass .hd-drop a:hover, .hd-glass .hd-drop a.on { color: #fff; background: rgba(255, 255, 255, .12); }
.hd-glass .hd-drop .hd-ov { border-bottom-color: rgba(255, 255, 255, .14); }
.hd-glass .hd-tg { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); color: #fff; }
/* Ẩn giao diện (nút trong cụm công cụ 360) ẩn cả header */
.so-bare .hd.hd-glass { display: none; }

/* Seven entries + languages + hotline + Đặt phòng on one line: the hotline number and the button icon show on wide screens only, then everything tightens */
@media (min-width: 1720px) {
  .hd .hd-in { max-width: 1600px; }
}
@media (min-width: 1440px) and (max-width: 1719px) {
  .hd .hd-in { max-width: 1440px; }
}
@media (max-width: 1719px) {
  .hd .hd-in { gap: 16px; }
  .hd-act { gap: 6px; }
  .hd-tel span, .hd-book-top svg { display: none; }
}
@media (max-width: 1439px) {
  .hd .hd-in { gap: 12px; }
  .hd-brand { flex-shrink: 1; min-width: 0; max-width: 130px; font-size: 15px; line-height: 1.2; }
  .hd-nav > a, .hd-nav .hd-sub-a, .hd-more summary { padding: 8px 6px; font-size: 13.5px; }
  .hd-nav .hd-sub-a { padding-right: 2px; }
  .hd-sub-t { width: 20px; }
  .hd-lg { min-width: 30px; padding: 0 3px; font-size: 12.5px; }
  .hd-book { padding: 0 14px; }
}
/* Narrow computers: the hotline leaves the bar (still in the footer and the contact buttons) */
@media (max-width: 1279px) {
  .hd-tel { display: none; }
}
@media (max-width: 1180px) {
  .hd-tg { display: inline-flex; }
  .hd .hd-dsk, .hd-act .hd-lang { display: none !important; }
  /* backdrop-filter would make the header the containing block of the fixed drawer */
  .hd { background: var(--s); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .hd.hd-glass { background: rgba(8, 12, 20, .82); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .hd-tel { display: none; }
  /* Drawer from the right; the dimmed rest of the page (header::before) closes it */
  html:has(.hd.open) .so-root { display: none; }
  .hd.open::before { content: ''; position: fixed; left: 0; right: 0; top: var(--hd); bottom: 0; background: rgba(15, 23, 42, .5); }
  .hd-nav { position: fixed; top: var(--hd); right: 0; bottom: 0; width: min(420px, calc(100% - 48px)); flex-direction: column; align-items: stretch; gap: 4px; padding: 16px; background: var(--s); overflow-y: auto; overscroll-behavior: contain; transform: translateX(100%); visibility: hidden; transition: transform .28s ease, visibility 0s linear .28s; }
  .hd.hd-glass .hd-nav { background: rgba(8, 12, 20, .96); }
  .hd.open .hd-nav { transform: none; visibility: visible; transition-delay: 0s; }
  .hd-nav > a, .hd-nav .hd-sub-a, .hd-more summary { font-size: 17px; min-height: 48px; padding: 12px; }
  .hd-more .hd-drop { position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; background: transparent; }
  .hd-sub { flex-wrap: wrap; }
  .hd-sub-a { flex: 1; }
  .hd-sub-t { width: 48px; height: 48px; border-radius: 12px; }
  .hd-sub .hd-drop { display: none; position: static; flex-basis: 100%; min-width: 0; visibility: visible; opacity: 1; transform: none; transition: none; box-shadow: none; border: 0; padding: 0 0 8px 12px; background: transparent; }
  .hd-sub.open .hd-drop { display: flex; }
  .hd-sub .hd-drop a { font-size: 15.5px; }
  .hd-glass .hd-drop { background: transparent; }
  /* Foot of the drawer: languages, hotline, Book Now */
  .hd-foot { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--ln); }
  .hd-glass .hd-foot { border-top-color: rgba(255, 255, 255, .2); }
  .hd-foot .hd-lang { gap: 4px; }
  .hd-foot .hd-lg { min-width: 48px; min-height: 48px; font-size: 15px; }
  .hd-tel-m { display: inline-flex !important; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; text-decoration: none; font-weight: 700; color: var(--p) !important; }
  .hd-glass .hd-tel-m { color: #fff !important; }
  .hd-foot .hd-book { min-height: 50px; }
  .hd-lb { right: 12px; left: 12px; max-width: none; }
}
@media (max-width: 640px) {
  .hd .hd-in { padding: 0 16px; gap: 12px; }
  .hd-brand { font-size: 16px; flex-shrink: 1; min-width: 0; line-height: 1.2; }
  /* Book Now leaves the top bar for the bar at the bottom of the screen; hidden while the drawer, the chat or the tour's room panel is open */
  .hd-book-top { display: none !important; }
  .bk-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--s); border-top: 1px solid var(--ln); box-shadow: 0 -6px 20px rgba(15, 23, 42, .1); }
  .hd-glass .bk-bar { background: rgba(8, 12, 20, .88); border-top-color: rgba(255, 255, 255, .14); }
  .bk-bar .hd-book { flex: 1; min-height: 48px; }
  .hd.open .bk-bar, html:has([data-room-panel].open) .bk-bar, html:has(.so-chat.open) .bk-bar, .so-bare .bk-bar { display: none; }
  body:has(> .hd:not(.hd-glass)) { padding-bottom: 64px; }
  body:has(.bk-bar) .so-root { bottom: 76px; }
  html:has([data-room-panel].open) body .so-root, html:has(.so-chat.open) body .so-root { bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hd, .hd .hd-in, .hd-nav, .hd-sub .hd-drop, .hd-sub-t svg { transition: none; }
}
