/* ===== 全站导航栏CSS式样 ===== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky; /* 滚动时吸顶 */
  top: 0; /* 吸到顶部 */
  z-index: 1000; /* 防止被内容覆盖 */
}

/* 让包含 NAV 的DIV 右对齐 */
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

nav {
  display: flex;
  gap: 16px;
}

.nav-item {
  text-decoration: none;
  color: #333;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: 0.2s;
}

.nav-item:hover {
  background: #f3f4f6;
}

/* 当前高亮 */
.nav-item.active {
  background: #eef2ff;
  color: #4f46e5;
}

/* 右侧按钮容器 */
.nav-action {
  display: flex;
  align-items: center;
}

/* 按钮 */
.btn-primary {
  background: #6366f1;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  transition: 0.2s;
}

.btn-primary:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

/* ===== LOGO整体 ===== */
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #111;
}

/* 图片 */
.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-right: 10px;
}

/* 文字容器 */
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

/* 主标题 */
.logo-text .title {
  font-size: 16px;
  font-weight: bold;
}

/* 副标题 */
.logo-text .subtitle {
  font-size: 12px;
  color: #666;
}

/* ===== 汉堡按钮（默认隐藏） ===== */
.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

/* ===== Navbar 响应式 ===== */
@media (max-width: 768px) {
  .navbar {
    flex-direction: row;
    justify-content: space-between;
  }

  /* 显示汉堡 */
  .menu-toggle {
    display: block;
  }

  .nav-right {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100%;
    background: #fff;
    flex-direction: column;
    padding: 60px 20px;
    gap: 20px;
    transition: 0.3s;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
  }

  /* 打开菜单 */
  .nav-right.active {
    right: 0;
  }

  nav {
    flex-direction: column;
    gap: 12px;
  }

  .nav-item {
    font-size: 16px;
  }

  .nav-action {
    width: 100%;
  }

  .btn-primary {
    width: 100%;
    text-align: center;
  }

  /* LOGO 移动端优化 */
  .logo-img {
    width: 30px;
    height: 30px;
  }

  .logo-text .title {
    font-size: 14px;
  }

  .logo-text .subtitle {
    font-size: 11px;
  }
}
/* ===== 全站导航栏CSS式样结束 ===== */