/* ==========================================================================
 * 文件名: navbar.css
 * 描述: 美愫 MEISU 导航栏与移动端菜单样式
 * 版本: 1.0
 * 最后更新: 2026-06-23
 * ========================================================================== */

/* ==========================================================================
 * 1. Navbar — 固定顶部导航栏
 * ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition:
    background 0.4s ease,
    box-shadow 0.4s ease;
  padding: 0 24px;
}

/* 滚动后导航栏变为毛玻璃效果 */
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* Logo：初始白色（Hero区域上方），滚动后变深色 */
.navbar .logo {
  font-family: "Playfair Display", "Noto Serif SC", serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--white);
  transition: color 0.4s;
}

.navbar.scrolled .logo {
  color: var(--dark);
}

/* 桌面端导航链接 */
.navbar .nav-links {
  display: flex;
  gap: 32px;
}

.navbar .nav-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.3s;
  letter-spacing: 0.02em;
}

.navbar.scrolled .nav-links a {
  color: var(--mid-gray);
}

.navbar .nav-links a:hover,
.navbar.scrolled .nav-links a:hover {
  color: var(--rose-gold);
}

/* ==========================================================================
 * 2. Mobile Menu — 移动端汉堡菜单
 * 默认隐藏，768px 以下显示
 * ========================================================================== */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

/* 汉堡菜单三条横线 */
.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s;
}

.navbar.scrolled .mobile-menu-btn span {
  background: var(--dark);
}

/* 移动端展开的导航面板（全屏覆盖） */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  font-size: 18px;
  color: var(--dark);
  letter-spacing: 0.02em;
}

/* ==========================================================================
 * 3. Responsive — 导航栏响应式适配
 * ========================================================================== */

/* ----- 平板适配（≤768px）----- */
@media (max-width: 768px) {
  /* 隐藏桌面导航，显示汉堡菜单 */
  .navbar .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
}
