/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 60px;
  background: transparent;
  border-bottom: 1px solid rgba(201, 168, 76, 0);
  transition: background 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
}

nav.scrolled {
  background: rgba(13, 26, 18, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px 60px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 42px;
  width: auto;
  display: block;
  transition: height 0.4s ease;
}

nav.scrolled .logo-img {
  height: 34px;
}

.nav-links {
  display: flex; gap: 40px; list-style: none;
  margin: 0; padding: 0;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ivory);
  text-decoration: none;
  opacity: .75;
  transition: opacity .2s, color .2s;
  display: block;
}

.nav-links a:hover { opacity: 1; color: var(--gold); }

/* Parent item indicators */
.nav-links .menu-item-has-children > a {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links .menu-item-has-children > a::after {
  content: '▾';
  font-size: 9px;
  color: var(--gold);
  transition: transform 0.3s ease;
  display: inline-block;
  opacity: 0.8;
}

.nav-links .menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
  opacity: 1;
}

/* ── SUBMENU DROPDOWN ── */
.nav-links .sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: rgba(13, 26, 18, 0.96);
  border: 1px solid rgba(201, 168, 76, 0.15); /* Đồng nhất viền mỏng bốn phía */
  border-radius: 4px;
  min-width: 220px;
  padding: 10px 0;
  margin: 16px 0 0; /* Tạo khoảng cách 16px so với menu chính */
  list-style: none;
  display: block;
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Spacer bridge to prevent accidental mouseout */
.nav-links .sub-menu::before {
  content: '';
  position: absolute;
  top: -30px; /* Bao phủ khoảng cách 16px margin + 12px translateY */
  left: 0;
  right: 0;
  height: 30px;
  background: transparent;
}

.nav-links .menu-item-has-children:hover > .sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-links .sub-menu li {
  width: 100%;
}

.nav-links .sub-menu a {
  padding: 10px 24px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ivory);
  opacity: 0.8;
  border-left: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links .sub-menu a:hover {
  opacity: 1;
  color: var(--gold) !important;
  background: rgba(201, 168, 76, 0.05);
  border-left-color: var(--gold);
  padding-left: 28px; /* Hiệu ứng đẩy chữ sang phải nhẹ nhàng */
}

.nav-cta {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink) !important;
  background: var(--gold);
  padding: 10px 22px;
  opacity: 1 !important;
  border-radius: 1px;
  transition: background .2s !important;
}

.nav-cta:hover { background: #e0bc5a !important; }

/* ── RESPONSIVE NAV ── */
@media (max-width: 900px) {
  nav { padding: 20px 24px; }
  .nav-links { display: none; }
}
