/**
 * assets/css/nav.css
 * CSS riêng cho sections/00-nav.php (Header sticky).
 *
 * LUÔN LUÔN: kính mờ sáng + logo tối + chữ tối.
 * Không có trạng thái đổi màu theo section nào nữa.
 */

.site-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;

  width: calc(100% - 40px);
  max-width: 1280px;
  margin-top: 14px;
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 4px 20px rgba(42, 38, 32, 0.06);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 32px;
}

/* --- Logo: chỉ dùng bản tối, luôn luôn --- */
.site-header__logo {
  display: block;
  flex-shrink: 0;
  line-height: 0;
}

.logo-img {
  height: clamp(26px, 5vw, 32px);
  width: auto;
  display: block;
}

.logo-light {
  display: none;
}
.logo-dark {
  display: block;
}

/* --- Menu chính --- */
.site-header__nav {
  display: none;
  align-items: center;
  gap: 32px;
}

.site-header__nav a {
  position: relative;
  color: var(--green);
  text-decoration: none;
  font-size: 0.9rem;
}

.site-header__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.25s ease;
}

.site-header__nav a:hover::after {
  width: 100%;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.site-header__cta {
  white-space: nowrap;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition:
    transform 0.25s ease,
    background-color 0.25s ease;
}

.site-header__cta:hover {
  transform: translateY(-1px);
  background: #a37b42;
}

/* --- Hamburger --- */
.site-header__burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.site-header__burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.site-header__burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-header__burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.site-header__burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Mobile/Tablet dropdown --- */
@media (max-width: 1024px) {
  .site-header__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 12px 24px rgba(42, 38, 32, 0.1);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition:
      max-height 0.35s ease,
      opacity 0.3s ease;
  }

  .site-header__nav a {
    width: 100%;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(42, 38, 32, 0.08);
  }

  .site-header__nav a::after {
    display: none;
  }

  .site-header.is-nav-open .site-header__nav {
    display: flex;
    max-height: 420px;
    opacity: 1;
  }
}

/* --- Desktop: hiện menu, ẩn hamburger --- */
@media (min-width: 1025px) {
  .site-header__nav {
    display: flex;
    position: static;
    flex-direction: row;
    max-height: none;
    opacity: 1;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .site-header__nav a {
    width: auto;
    padding: 0;
    border-bottom: none;
  }

  .site-header__nav a::after {
    display: block;
  }

  .site-header__burger {
    display: none;
  }
}

/* --- Mobile nhỏ --- */
@media (max-width: 640px) {
  .site-header {
    margin-top: 10px;
    max-width: calc(100% - 24px);
  }

  .site-header__inner {
    padding: 12px 16px;
    gap: 10px;
  }

  .site-header__cta {
    padding: 9px 14px;
    font-size: 0.75rem;
  }
}
