/* ==============================================
【模块01：全局基础重置】
统一清除内外边距、盒模型、字体、清除点击外轮廓
============================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft YaHei", sans-serif;
  outline: none; /* 清除全局点击黑色外框 */
}

/* ==============================================
【模块02：顶部联系栏 top-contact】
页面最顶部深色联系信息栏：电话、微信、搜索链接
============================================== */
.top-contact {
  background-color: #1a4072;
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-end;
  align-items: center;
}
.top-contact a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 14px;
  color: #fff;
  transition: 0.3s;
}
.top-contact img {
  width: 20px;
  height: 20px;
}
.top-contact a:hover {
  color: #3498db;
  transform: scale(1.05);
}
.search-link {
  margin-left: 8px;
}

/* ==============================================
【模块03：主导航栏 电脑端PC通用样式】
白色导航容器、Logo、一级导航菜单、下拉三角、二级下拉菜单、汉堡按钮基础样式
============================================== */
/* 导航外层容器 */
.navbar {
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: relative;
  z-index: 999;
}
.nav-container {
  background-color: #ffffff;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: 90px;
  position: relative;
  z-index: 999;
}

/* Logo 品牌标识 */
.logo {
  flex-shrink: 0;
  color: #1a1a1a;
  font-size: 22px;
  font-weight: bold;
  text-decoration: none;
  z-index: 2;
  margin-left: 20px;
}

/* 默认：5个及以上靠右布局 */
.nav-menu {
  display: flex;
  list-style: none;
  margin-left: auto;
  gap: 1px;
}

/* 小于5个时添加该类，居中覆盖 */
.nav-menu.nav-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin-left: 0;
}
/* 导航单项 li */
.nav-item {
  position: relative;
  padding: 0 20px;
  line-height: 90px;
  white-space: nowrap;
}
/* 导航链接文字 */
/* 你现在写的 */
.nav-link {
  text-decoration: none;
  font-weight: normal;
  font-size: 18px; 
  line-height: 250%;
  color: rgba(38,38,38,1);
  padding: 1.4rem 0em;
  transition: color 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}


.nav-link:hover {
  color: #22a054;
}

/* 下拉菜单V型线条箭头（匹配你截图样式） */
.nav-item.has-sub > .nav-link::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: all 0.25s ease;
}
.nav-item.has-sub:hover > .nav-link::after {
  transform: rotate(-135deg);
  border-color: #22a054;
}

/* PC端二级下拉菜单 */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 100%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  border-radius: 4px;
  list-style: none;
  display: none;
  z-index: 9999;
}

.dropdown li {
  font-size: 16px;
  text-align: center;
  line-height: 45px;
  white-space: nowrap;
}
.dropdown a {
font-weight: normal;
    font-size: 1rem;
    line-height: 150%;
    color: rgba(0,0,0,1);
    text-align: center;
    
    text-transform: capitalize;
}

.dropdown a:hover {
  background: #f5f5f5;
  color: #22a054;
}
.nav-item:hover .dropdown {
  display: block !important;
}

/* 备用导航列表兼容样式 */
.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
    align-items: center;
}
.nav-list .nav-item {
    position: relative;
}
.nav-list .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin: 0;
    padding: 5px;
    list-style: none;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    white-space: nowrap;
}
.nav-list .dropdown li {
    margin: 6px 0;
}

/* 移动端汉堡开关按钮 基础样式 */
.hamburger {
  display: none;
  font-size: 40px;
  color: #1a1a1a;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
}
/* 汉堡图标默认三条杠 */
.hamburger::before {
  content: "☰";
}
/* 激活后变为关闭叉号 */
.hamburger.close::before {
  content: "✕";
  font-size: 38px;
}

/* PC搜索框激活 */
.nav-search-box.active {
  display: inline-flex;
}
.global-search-trigger.active {
  display: none;
}
.nav-search-input {
  flex: 1;
  min-width: 0;
  padding: 10px 10px;
  font-size: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background-color: #f8fafc;
  height: 42px;
}
.nav-search-input:focus {
  border-color: #3498db;
  background-color: #ffffff;
}
.nav-search-btn {
  height: 48px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #3498db;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}
.nav-search-btn,
.nav-search-close {
  flex-shrink: 0;
}

/* 搜索关闭按钮补充样式 */
.nav-search-close {
    position: relative;
    z-index: 1003;
    cursor: pointer;
    border: none;
    background: transparent;
    color: #666;
    font-size: 24px;
    line-height: 1;
    padding: 4px 8px;
    user-select: none;
    flex-shrink: 0;
    transition: color 0.2s ease;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-search-close:hover {
    color: #f44336;
}
.nav-search-input,
.nav-search-btn,
.nav-search-close {
    position: relative;
    z-index: 2;
}
.dropdown.open {
  display: block;
}

/* ==============================================
【模块04：移动端响应式适配 ≤768px】
============================================== */
@media (max-width: 768px) {
  /* 4.1 顶部联系栏手机样式 */
  .top-contact {
    justify-content: center;
    gap: 12px;
    padding: 8px 10px;
  }
  .top-contact a {
    font-size: 13px;
  }

  /* 4.2 主导航菜单：侧边滑出布局 */
  .nav-menu {
    position: absolute;
    top: 90px;
    left: -100%;
    transform: none;
    flex-direction: column;
    background-color: #ffffff;
    width: 100%;
    transition: 0.3s;
    z-index: 999;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    margin-left: 0;
  }
  .nav-menu.active {
    left: 0;
  }
  /* 显示汉堡按钮 */
  .hamburger {
    display: block;
    position: relative;
    z-index: 1002;
  }

  /* 4.3 手机端一级导航项 */
  .nav-item {
    line-height: 60px;
    height: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    text-align: left !important;
    border-bottom: 1px solid #f3eaea;
  }
  .nav-item .nav-link {
    justify-content: flex-start !important;
    padding: 14px 25px !important;
    width: 100%;
    display: flex !important;
  }

  /* 4.4 兼容导航列表手机样式 */
  .nav-list {
        flex-direction: column;
        gap: 0;
        align-items: flex-start !important;
        width: 100%;
        padding: 6px 0;
  }
  .nav-item a {
        display: inline-flex;
        align-items: center;
        justify-content: flex-start !important;
        gap: 3px;
        padding: 12px 22px !important;
        font-size: 18px;
        color: #1a1a1a;
        line-height: 1.2;
  }

  /* 4.5 手机端二级下拉菜单 */
  .dropdown {
    position: static;
    display: none;
    width: 100%;
    background: #f5f7fa;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }
  .dropdown li {
    line-height: 50px;
    white-space: normal;
    width: 100%;
    list-style: none;
  }
  .dropdown a {
    color: #333;
    font-size: 15px;
    text-align: center;
    display: block;
    width: 100%;
    padding: 0;
  }
  .dropdown a:hover {
    background: #3498db;
    color: #fff;
  }
  .nav-item:hover .dropdown {
    display: block;
  }

  /* ========= 移动端搜索框样式 ========= */
  .header-right-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .search-component {
    position: relative;
  }

  /* 全屏遮罩层 */
  .search-mask {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
  }

  .nav-search-box {
    display: none;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 28px 28px;
    position: fixed;
    top: 160px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100vw - 30px);
    max-width: 340px;
    z-index: 1001;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  }
  .nav-search-input {
    font-size:16px !important;
  }

  /* 打开状态 */
  .search-mask.active,
  .nav-search-box.active {
    display: flex;
  }
}
