.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-4) var(--spacing-8);
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--color-gray-200);
  position: relative;
  z-index: 100;
}

.header__logo img {
  height: 48px;
}

.header__nav ul {
  display: flex;
  gap: var(--spacing-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.header__nav li {
  position: relative;
}

.header__nav a {
  text-decoration: none;
  color: var(--color-gray-900);
  font-weight: 500;
  font-size: var(--font-size-base);
  transition: color var(--transition-fast);
  padding: var(--spacing-2) var(--spacing-3);
  border-radius: var(--radius-md);
  display: block;
}

.header__nav a:hover,
.header__nav .dropdown li a:hover {
  color: var(--color-primary-dark);
  background: var(--color-red-50);
}

/* 下拉菜单样式 */
.has-dropdown > a::after {
  content: '\25BC';
  font-size: 0.7em;
  margin-left: 0.4em;
  vertical-align: middle;
  color: var(--color-primary);
  transition: transform 0.2s;
}

.has-dropdown.dropdown-open > a::after,
.has-dropdown:hover > a::after {
  transform: rotate(180deg);
}

.dropdown {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 220px;
  background: var(--color-white);
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  border-radius: var(--radius-lg);
  padding: var(--spacing-2) 0;
  margin-top: 8px;
  z-index: 1001;
  flex-direction: column;
  animation: dropdownIn 0.2s;
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.has-dropdown:hover > .dropdown,
.has-dropdown.dropdown-open > .dropdown {
  display: block;
}

.dropdown li {
  width: 100%;
}

.dropdown li a {
  color: var(--color-gray-900);
  padding: var(--spacing-2) var(--spacing-5);
  font-size: var(--font-size-base);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.dropdown li a:hover {
  background: var(--color-red-50);
  color: var(--color-primary-dark);
}

/* 移动端样式 */
@media (max-width: 1024px) {
  .hamburger {
    display: flex !important;
  }
  .header__nav {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    z-index: 1001;
    flex-direction: column;
    padding: var(--spacing-4) 0;
    max-height: 100vh;
    overflow-y: auto;
  }
  .header__nav.nav-open {
    display: flex !important;
  }
  .header__nav ul {
    flex-direction: column;
    gap: var(--spacing-2);
    width: 100%;
  }
  .menu-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.3);
    z-index: 1000;
  }
  .menu-backdrop.active {
    display: block;
  }
} 

/* 强制隐藏二级菜单，仅在悬停或点击时显示 */
.dropdown {
  display: none !important;
}
.has-dropdown:hover > .dropdown,
.has-dropdown.dropdown-open > .dropdown {
  display: block !important;
} 

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
}
.hamburger-bar {
  width: 26px;
  height: 3px;
  background: #dc2626;
  margin: 4px 0;
  border-radius: 2px;
  transition: all 0.3s;
} 

/* 桌面端始终显示菜单 */
.header__nav {
  display: flex;
  align-items: center;
} 