/* 头部导航样式 */
header {
  background-color: #fff;
  padding: 18px 0;
}

header .container {
  display: flex;
  align-items: center;
  padding: 0px;
}

header .row {
  width: 100%;
  display: flex;
  align-items: center;
}

.logo-column {
  display: flex;
  align-items: center;
}

.logo-column a.logo {
  height: 45px;
  padding: 5px 0;
  display: flex;
  align-items: center;
}

.nav-column {
  padding: 5px 0;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-column a,
.nav-column span {
  color: #1a1a1a;
  line-height: 25px;
  vertical-align: top;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.84, 0.35, 0.39, 0.74) 0s;
}

.nav-column a:hover,
.nav-column span:hover {
  color: #b5c3d4;
}

.nav-column .right-nav {
  float: right;
  position: relative;
}

.nav-column .right-nav span {
  padding: 0 15px;
}

/* 主菜单样式 */
#menu {
  display: flex;
  align-items: center;
  flex: 1;
}

#menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: space-between;
  margin-left: 40px;
}

#menu ul li {
  position: relative;
}

/* 使用 space-between 布局，不需要额外的媒体查询设置 */

#menu ul > li > a {
  display: block;
  color: #1a1a1a;
  padding: 0 5px;
  font-weight: 400;
  padding: 0px;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.84, 0.35, 0.39, 0.74) 0s;
}

#menu ul > li > a:hover {
  color: #b5c3d4;
}

#menu ul > li.current-menu-item > a::after {
  content: "";
  position: absolute;
  bottom: -10px; /* 调整这个值可以控制下划线与文字的距离 */
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #5092f6;
  transition: all 0.3s cubic-bezier(0.84, 0.35, 0.39, 0.74);
}

/* 移动端菜单样式 */
.slicknav_menu {
  background-color: #1f2131 !important;
  padding: 10px 15px !important;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex !important;
  justify-content: space-between;
  align-items: center;
}

/* Logo样式 */
.slicknav_menu:before {
  content: "";
  background-image: url("../img/logo.webp");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 120px;
  height: 35px;
  display: block;
}

/* 汉堡按钮容器 */
.slicknav_menu .slicknav_btn-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 汉堡按钮样式 */
.slicknav_btn {
  background-color: #1f2131 !important;
  margin: 0;
  padding: 0.438em 0.625em;
  float: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* 媒体查询优化 */

/* PC端导航显示，移动端导航隐藏 */
@media (min-width: 992px) {
  /* 显示PC端导航 */
  header {
    display: block !important;
  }

  .nav-column,
  .nav-logo-item {
    display: flex !important;
  }

  /* 隐藏移动端导航 */
  .slicknav_menu {
    display: none !important;
  }
}

/* 中等屏幕PC端 - 992px-1199px */
@media (min-width: 992px) and (max-width: 1199px) {
  .nav-column a,
  .nav-column span {
    font-size: 0.95rem;
  }
}

/* 小屏幕PC端 - 992px-1100px */
@media (min-width: 992px) and (max-width: 1100px) {
  .nav-column a,
  .nav-column span {
    font-size: 0.9rem;
  }
}

/* 移动端和平板端导航 */
@media (max-width: 991px) {
  /* 隐藏PC端导航 */
  header {
    display: none !important;
  }

  /* 修复右侧空白问题 */
  html,
  body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }

  /* 显示移动端导航 */
  .slicknav_menu {
    background-color: #1f2131 !important;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex !important;
    justify-content: center; /* 修改为居中对齐 */
    align-items: center;
    padding: 10px 0;
  }

  /* Logo样式 */
  .slicknav_menu:before {
    content: "";
    background-image: url("../img/logo.webp");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
    width: 120px;
    height: 35px;
    display: block;
    position: absolute;
    left: 15px;
  }

  /* 汉堡按钮样式 */
  .slicknav_btn {
    background-color: #1f2131 !important;
    margin: 0;
    padding: 0.438em 0.625em;
    float: none;
    position: relative; /* 使按钮位于中间 */
  }

  /* 下拉菜单样式 */
  .slicknav_nav {
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    background-color: #1f2131;
    padding: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  }

  .slicknav_nav a {
    color: #fff !important;
    padding: 8px 15px;
    margin: 2px 0;
  }

  .slicknav_nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #4698ff !important;
  }

  /* 移动端菜单项样式 */
  #menu ul {
    flex-direction: column;
    align-items: flex-start;
  }

  #menu ul li {
    margin-left: 0;
    margin-bottom: 10px;
    width: 100%;
  }

  #menu ul li:last-child {
    margin-left: 0;
  }
}

/* 小屏幕移动设备调整 */
@media (max-width: 767px) {
  .slicknav_menu:before {
    width: 110px;
    height: 30px;
  }
}

/* 超小屏幕设备调整 */
@media (max-width: 576px) {
  .slicknav_menu:before {
    width: 100px;
    height: 28px;
  }
}

/* 文本主色调 */
.text-primary {
  font-size: 2.4rem;
  margin-bottom: 20px !important;
}

/* PC端导航栏固定顶部样式 */
@media only screen and (min-width: 992px) {
  header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
  }

  /* 为了防止内容被固定导航栏遮挡，给body添加上边距 */
  body {
    padding-top: 80px; /* 根据导航栏高度调整 */
  }

  /* 滚动效果类，可以通过JavaScript添加 */
  header.scrolled {
    padding: 15px 0; /* 滚动时减小padding使导航栏更紧凑 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); /* 增强阴影效果 */
  }
}
