/* ============================================================
   GLOBAL NAV — single source of truth for all pages
   Served as /nav.css — linked by every page
   ============================================================ */

/* Reset any page-level nav overrides */
nav.gn, nav.gn *, nav.gn a,
.gn-mobile, .gn-mobile * { box-sizing: border-box; }

/* ── Main bar ── */
nav.gn {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: rgba(11, 31, 58, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: 'Barlow', sans-serif;
}

/* ── Logo ── */
nav.gn .gn-logo {
  font-family: 'Barlow', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 3px;
  text-decoration: none;
  flex-shrink: 0;
  text-transform: uppercase;
}
nav.gn .gn-logo span { color: #c8a96e; }

/* ── Desktop links ── */
nav.gn .gn-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  flex: 1;
  justify-content: center;
}
nav.gn .gn-links a {
  font-family: 'Barlow', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  display: block;
}
nav.gn .gn-links a:hover,
nav.gn .gn-links a.active {
  color: #c8a96e;
  border-bottom-color: #c8a96e;
}

/* ── Right side ── */
nav.gn .gn-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
nav.gn .gn-lang {
  display: flex;
  gap: 6px;
}
nav.gn .gn-lang button {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.7);
  padding: 4px 10px;
  font-size: 0.72rem;
  font-family: 'Barlow', sans-serif;
  letter-spacing: 1px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
nav.gn .gn-lang button:hover { border-color: #c8a96e; color: #c8a96e; }
nav.gn .gn-lang button.active { border-color: #c8a96e; color: #c8a96e; }

/* ── Burger ── */
nav.gn .gn-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
nav.gn .gn-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  transition: transform 0.3s, opacity 0.3s;
}
nav.gn .gn-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.gn .gn-burger.open span:nth-child(2) { opacity: 0; }
nav.gn .gn-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile dropdown ── */
.gn-mobile {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: rgba(11, 31, 58, 0.99);
  padding: 12px 0;
  z-index: 999;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.gn-mobile.open { display: block; }
.gn-mobile a {
  display: block;
  padding: 13px 32px;
  font-family: 'Barlow', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.gn-mobile a:hover,
.gn-mobile a.active {
  color: #c8a96e;
  border-left-color: #c8a96e;
  background: rgba(255, 255, 255, 0.04);
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  nav.gn { padding: 0 28px; }
  nav.gn .gn-links { gap: 14px; }
  nav.gn .gn-links a { font-size: 0.78rem; letter-spacing: 0.5px; }
}
@media (max-width: 860px) {
  nav.gn .gn-links { display: none; }
  nav.gn .gn-burger { display: flex; }
}
@media (max-width: 480px) {
  nav.gn { padding: 0 16px; }
}

/* ── Logo bilingual: EN/ZH hardcoded, toggled by CSS class ── */
.logo-zh { display: none; }
html.lang-zh .logo-en { display: none; }
html.lang-zh .logo-zh { display: inline; }
