/* ============ 头部主题样式 ============ */
.header-blue {
  position: relative;
  background: #fff;
  z-index: 100;
}

.header-top-bar {
  background: #fff;
  padding: 12px 0 12px 0;
}

.header-top-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  flex: 1;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

/* Logo只设高度，宽度自适应 */
.site-logo {
  height: 80px;
  width: auto;
  margin-right: 15px;
}

/* 右侧：注册登录 */
.header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.auth-links {
  display: flex;
  align-items: center;
  background: #f5f7fa;
  padding: 8px 18px;
  border-radius: 25px;
  border: 1px solid #e4e8ed;
  white-space: nowrap;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.auth-btn i {
  margin-right: 5px;
  color: #7BA7BC;
}

.auth-btn:hover {
  color: #5B8FA6;
}

.auth-divider {
  margin: 0 10px;
  color: #ccc;
}

/* ============ 导航栏：钢蓝色（明亮专业，与网站暖色调协调） ============ */
.header-navbar {
  background: #4A7C9E;
  padding: 0;
}

.nav-blue-list {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

.nav-blue-list .nav-item {
  margin: 0;
  position: relative;
}

.nav-blue-list .nav-link {
  color: #fff !important;
  font-size: 15px;
  font-weight: 500;
  padding: 14px 26px !important;
  transition: all 0.25s ease;
  position: relative;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-blue-list .nav-item:first-child .nav-link {
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-blue-list .nav-link:hover {
  background: #3A6B8E;
  color: #fff !important;
}

.nav-blue-list .nav-item.active .nav-link {
  background: #fff;
  color: #4A7C9E !important;
  font-weight: 700;
}

.nav-blue-list .nav-item.active .nav-link::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #E8857A;
}

/* 导航内注册登录：PC/平板端默认隐藏 */
.nav-auth-item {
  display: none !important;
}

.nav-auth-item .nav-link {
  color: #FFE8B0 !important;
  font-weight: 500;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

/* 移动端折叠按钮 */
.header-blue .navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.6);
  margin: 0;
}

.header-blue .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* 导航栏container默认样式 */
.header-navbar > .container {
  padding: 0 15px;
}

/* ============ PC端 (>1200px) ============ */
@media (min-width: 1201px) {
  .site-logo {
    height: 45px;
  }
  .nav-blue-list .nav-link {
    padding: 16px 28px !important;
  }
}

/* ============ PC小屏 (1025-1200px) ============ */
@media (max-width: 1200px) and (min-width: 1025px) {
  .site-logo {
    height: 75px;
  }
  .nav-blue-list .nav-link {
    padding: 14px 22px !important;
    font-size: 14px;
  }
}

/* ============ 平板横屏 (992px - 1024px) ============ */
@media (max-width: 1024px) and (min-width: 769px) {
  .site-logo {
    height: 55px;
    margin-right: 10px;
  }
  .nav-blue-list .nav-link {
    padding: 12px 14px !important;
    font-size: 13px;
  }
  .auth-links {
    padding: 6px 14px;
  }
  .auth-btn {
    font-size: 13px;
  }
  .header-top-bar {
    padding: 10px 0 4px 0;
  }
}

/* ============ 手机端 (<768px) ============ */
@media (max-width: 767.98px) {
  .header-top-bar {
    padding: 8px 0 0 0;
    background: #fff;
  }
  .header-top-content {
    flex-direction: row;
    align-items: center;
  }
  .header-left {
    flex: 1;
    min-width: 0;
  }
  .header-right {
    display: none;
  }
  .site-logo {
    height: 40px;
    margin-right: 8px;
  }
  /* 导航条保持文档流，只有汉堡按钮占据空间 */
  .header-navbar.navbar {
    position: relative;
    padding: 0;
    margin: 0;
    border: 0;
    background: #4A7C9E !important;
    border-radius: 0;
    --bs-navbar-padding-x: 0;
    --bs-navbar-padding-y: 0;
    --bs-navbar-border-width: 0;
  }
  /* 导航栏container内边距 */
  .header-navbar > .container {
    padding: 0;
    background: #4A7C9E;
  }
  /* 汉堡按钮紧贴顶部 */
  .header-blue .navbar-toggler {
    margin: 0;
    padding: 10px 15px;
  }
  /* 展开菜单绝对定位覆盖在banner上方，不推动页面 */
  .header-navbar .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: #4A7C9E;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    max-height: 70vh;
    overflow-y: auto;
  }
  .header-navbar .navbar-collapse > .container {
    padding: 0;
    max-width: 100%;
    background: #4A7C9E;
  }
  .nav-blue-list {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .nav-blue-list .nav-item {
    width: 100%;
  }
  .nav-blue-list .nav-link {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    padding: 14px 20px !important;
  }
  .nav-blue-list .nav-item:first-child .nav-link {
    border-left: none;
  }
  /* 手机端导航内注册登录显示 */
  .nav-auth-item {
    display: block !important;
  }
}

/* ============ 小手机 (<576px) ============ */
@media (max-width: 576px) {
  .header-top-bar {
    padding: 6px 0 2px 0;
  }
  .site-logo {
    height: 34px;
    margin-right: 6px;
  }
}
