/* main-header.css — 全站统一导航栏样式（与 index.html 保持一致） */

:root {
  --header-height: 85px;
  --notice-bar-height: 0px;
}

/* body padding-top 由各页面自行设置：
   padding-top: calc(var(--header-height) + var(--notice-bar-height)); */

.main-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e9ecef;
  position: fixed;
  top: var(--notice-bar-height, 0px);
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: box-shadow 0.3s ease, top 0.2s ease;
}

.main-header .container,
.main-header .header-container.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-header a {
  text-decoration: none;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  position: relative;
}

.logo-container {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 10px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.logo-container:hover {
  background-color: rgba(111, 66, 193, 0.1);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: #6f42c1;
  color: #fff;
  font-size: 26px;
  font-weight: bold;
  border-radius: 8px;
  margin-right: 15px;
}

.logo-text h1 {
  margin: 0;
  font-size: 24px;
  color: #495057;
  font-weight: 600;
}

.logo-text .subtitle {
  font-size: 13px;
  color: #6c757d;
}

/* 桌面导航 */
.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.main-nav ul li a {
  color: #495057;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  white-space: nowrap;
  transition: all 0.3s ease;
  border-radius: 6px;
}

.main-nav ul li a:hover {
  color: #6f42c1;
  background-color: rgba(111, 66, 193, 0.1);
}

.main-nav ul li a i {
  color: #888;
  font-size: 14px;
}

.main-nav ul li a.nav-active {
  color: #6f42c1;
  background-color: rgba(111, 66, 193, 0.12);
  font-weight: 600;
}

.main-nav ul li a.nav-active i {
  color: #6f42c1;
}

/* 导航高亮 */
.nav-highlight {
  color: #495057;
  font-weight: 600;
}

.nav-highlight i {
  color: #888;
}

.nav-highlight:hover {
  background-color: rgba(111, 66, 193, 0.1);
}

/* “更多”下拉 */
.nav-more-item {
  position: relative;
}

.nav-more-list {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #fff;
  list-style: none;
  padding: 8px;
  min-width: 150px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 20;
}

.nav-more-item:hover .nav-more-list {
  display: block;
}

/* 用户操作区 */
.user-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
  margin-left: 20px;
}

.query-btn {
  background-color: #fff;
  color: #495057;
  border: 1px solid #ced4da;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.query-btn:hover {
  background-color: #f8f9fa;
  border-color: #adb5bd;
}

/* 更多服务 */
.more-services {
  position: relative;
}

.more-services-btn {
  font-size: 16px;
  color: #495057;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 150%;
  background-color: #fff;
  min-width: 260px;
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.1);
  padding: 20px;
  border-radius: 8px;
  z-index: 20;
  text-align: center;
}

.more-services:hover .dropdown-content {
  display: block;
}

.dropdown-content p {
  color: #333;
  font-size: 15px;
  margin-bottom: 10px;
}

.dropdown-content .wechat-id {
  font-weight: bold;
  color: #6f42c1;
}

.dropdown-content img {
  width: 150px;
  height: 150px;
  margin-top: 10px;
}

/* 移动端 */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: #333;
  cursor: pointer;
}

.mobile-nav-menu {
  display: none;
  position: absolute;
  top: var(--header-height);
  left: 0;
  width: 100%;
  background-color: #fff;
  flex-direction: column;
  padding: 20px 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 15;
}

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

.mobile-nav-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: center;
}

.mobile-nav-menu a {
  color: #495057;
  display: block;
  padding: 15px 0;
  font-size: 18px;
  text-align: center;
  justify-content: center;
}

.mobile-nav-menu .user-actions-mobile {
  border-top: 1px solid #f1f3f5;
  margin-top: 15px;
  padding-top: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

@media (max-width: 1024px) {
  .desktop-nav {
    display: none;
  }

  .mobile-nav-toggle {
    display: block;
  }
}
