/* 固定导航栏样式 */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(
    180deg,
    rgba(240, 245, 255, 0.9) 0%,
    rgba(240, 245, 255, 0.8) 100%
  );
  backdrop-filter: blur(10px);
}

/* 默认背景 */
#header.header-default {
  background-color: #f2f4fa !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

/* 浅蓝色背景 */
#header.header-light-blue {
  background-color: #ddeeff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

/* 透明背景 */
#header.header-transparent {
  background: transparent !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

/* 透明背景时的文字颜色 */
#header.header-transparent .logo-btn,
#header.header-transparent li a {
  color: #454545;
  font-family: var(--font-medium), sans-serif;
  text-shadow: none;
}

#header.header-transparent li a:hover,
#header.header-transparent li a.active {
  color: #0066ff;
  font-family: var(--font-medium), sans-serif;
  text-shadow: none;
}

/* 导航栏内容样式 */
nav {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 5%;
}

/* Logo按钮样式 */
.logo-btn {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-decoration: none;
  color: #333;
  font-size: 16px;
  width: 20%;
  gap: 10px;
  flex: 0 0 auto;
}

.logo-btn img {
  height: 32px;
  margin-right: 8px;
}

/* 导航菜单样式 */
nav ul {
  width: 60%;
  display: flex;
  padding-left: 10%;
  gap: 5%;
  margin: 0;
  padding: 0;
  font-family: var(--font-medium);
  justify-content: space-around;
  list-style: none;
}

nav ul li a {
  text-decoration: none;
  color: #333;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
  color: #0066ff;
}

/* 为内容区域添加顶部内边距 */
body {
  padding-top: 70px !important;
  margin-top: 0 !important;
}

/* 禁用可能影响导航栏的滚动动画 */
html {
  scroll-behavior: auto !important;
}

/* 仅针对导航栏禁用动画效果 */
#header > nav,
#header > nav * {
  transition: none !important;
  animation: none !important;
}

/* 汉堡菜单按钮样式 */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: #333;
  transition: 0.3s;
}

/* 透明背景时汉堡菜单的颜色 */
#header.header-transparent .menu-toggle span {
  background: #454545;
  box-shadow: none;
}

.menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
}

.menu-overlay.active {
  display: block;
}

/* 响应式导航样式 */
@media (max-width: 992px) {
  nav ul {
    gap: 3%;
  }
}

@media (max-width: 850px) {
  nav ul {
    gap: 2%;
  }

  nav ul li a {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  nav ul {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  nav ul.active {
    display: flex;
  }
}
