/* ================= 基础与动画 ================= */
*{margin:0;padding:0;box-sizing:border-box;font-family:'Segoe UI','PingFang SC',Roboto,sans-serif}
body{background:#fff;color:#333;line-height:1.6;overflow-x:hidden}
a{text-decoration:none;color:inherit;transition:color .2s}
ul{list-style:none}
img{max-width:100%;display:block}
.container{max-width:1200px;margin:0 auto;padding:0 20px}

/* WOW 动画类 */
.wow{opacity:0;transform:translateY(30px);transition:all .8s cubic-bezier(0.5, 0, 0, 1)}
.wow.visible{opacity:1;transform:translateY(0)}
.wow-left{opacity:0;transform:translateX(-50px);transition:all .8s cubic-bezier(0.5, 0, 0, 1)}
.wow-left.visible{opacity:1;transform:translateX(0)}
.wow-right{opacity:0;transform:translateX(50px);transition:all .8s cubic-bezier(0.5, 0, 0, 1)}
.wow-right.visible{opacity:1;transform:translateX(0)}
.wow-zoom{opacity:0;transform:scale(.9);transition:all .6s cubic-bezier(0.5, 0, 0, 1)}
.wow-zoom.visible{opacity:1;transform:scale(1)}

/* ================= 顶部通栏 + 导航 ================= */
.top-header-group { position: sticky; top: 0; z-index: 1000; background: #fff; box-shadow: 0 2px 20px rgba(0,0,0,0.06); }
.top-bar{background:#1a2b3c;color:#b0c4de;font-size:13px;padding:10px 0;line-height:1}
.top-bar .container{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px}
.top-bar i{margin-right:6px;color:#db0f31}

.header{background:#fff;transition:all .3s ease}
.header .container{display:flex;align-items:center;justify-content:space-between;padding:0 20px;height:80px;position:relative}
/* Logo 图片样式 */
.header .logo {
  display: flex;
  align-items: center;
  height: 100%; /* 撑满头部高度 */
  flex-shrink: 0;
  z-index: 2;
}

.header .logo img {
  height: 50px; /* 根据你的 Logo 实际比例调整，一般 40px - 60px 之间 */
  width: auto;
  object-fit: contain;
  display: block;
}

/* 手机端稍微缩小 Logo */
@media (max-width: 768px) {
  .header .logo img {
    height: 40px; 
  }
}
.nav-menu{display:flex;align-items:center;gap:2px;height:100%;transition:all .3s}
.nav-menu>li{position:relative;height:100%;display:flex;align-items:center}
.nav-menu>li>a{display:flex;align-items:center;gap:4px;padding:0 18px;height:100%;font-size:16px;font-weight:500;color:#333;cursor:pointer;transition:all .25s ease;position:relative}
.nav-menu>li>a::after{content: '';position: absolute;bottom: 0;left: 50%;transform: translateX(-50%);width: 0;height: 3px;background: #db0f31;transition: width 0.3s;}
.nav-menu>li>a:hover::after,.nav-menu>li.active>a::after { width: 100%; }
.nav-menu>li>a:hover,.nav-menu>li.active>a { color:#db0f31; }
.nav-menu>li>a i{font-size:12px; color:#999; transition:transform .2s}
.nav-menu>li:hover>a i{transform:rotate(180deg); color:#db0f31}

/* 二级下拉菜单 */
.dropdown{position:absolute;top:100%;left:0;background:#fff;min-width:160px;box-shadow:0 10px 30px rgba(0,0,0,.1);border-radius:0 0 8px 8px;padding:10px 0;opacity:0;visibility:hidden;transform:translateY(10px);transition:all .3s cubic-bezier(0.4, 0, 0.2, 1);z-index:50;border-top: 2px solid #db0f31;}
.nav-menu>li:hover .dropdown{opacity:1; visibility:visible; transform:translateY(0)}
.dropdown li a{display:flex; justify-content:space-between; align-items:center; padding:10px 24px;font-size:14px;color:#555;transition:all .2s}
.dropdown li a:hover{background:#f7faff; color:#db0f31; padding-left:28px}

/* ======== 三级下拉菜单 ======== */
.dropdown li.has-sub { position: relative; }
.dropdown li.has-sub > a { display: flex; justify-content: space-between; align-items: center; }
.dropdown li.has-sub > a i { font-size: 12px; transition: transform 0.3s; }
.sub-dropdown {
  position: absolute;
  top: -10px; /* 对齐 */
  left: 100%; /* 显示在右侧 */
  background: #fff;
  min-width: 160px;
  box-shadow: 0 10px 30px rgba(0,0,0,.1);
  border-radius: 8px;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: all .3s;
}
.dropdown li.has-sub:hover > .sub-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}
.dropdown li.has-sub:hover > a i { transform: translateX(3px); }
.sub-dropdown li a { padding: 10px 24px; font-size: 14px; color: #555; display: block; }
.sub-dropdown li a:hover { background: #f7faff; color: #db0f31; padding-left: 28px; }

/* JS 自动匹配高亮状态 */
.subCurSet > a { background: #f7faff; color: #db0f31 !important; font-weight: 600; border-left: 3px solid #db0f31; }

.menu-toggle { display: none; font-size: 24px; color: #1a2b3c; cursor: pointer; z-index: 1002; transition: transform 0.3s; border: none; background: transparent; padding: 0; }
.menu-toggle:focus-visible { outline: 2px solid #db0f31; outline-offset: 4px; border-radius: 4px; }

/* 移动端导航 */
@media (max-width: 992px) {
  .menu-toggle { display: block; }
  .nav-menu { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background: #fff; flex-direction: column; align-items: flex-start; padding-top: 100px; box-shadow: -5px 0 30px rgba(0,0,0,0.1); transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1001; overflow-y: auto; }
  .nav-menu.open { right: 0; }
  .nav-menu>li { width: 100%; height: auto; display: block; }
  .nav-menu>li>a { padding: 15px 30px; height: auto; font-size: 16px; justify-content: space-between; }
  .nav-menu>li>a::after { display: none; }
  .nav-menu>li>a:hover { background: #f9fbfe; }
  .dropdown { position: relative; top: 0; left: 0; box-shadow: none; border-top: none; padding: 0; background: #f9fbfe; display: none; visibility: visible; opacity: 1; transform: none; }
  .nav-menu>li.active .dropdown { display: block; }
  .dropdown li a { padding: 12px 30px 12px 50px; font-size: 14px; border-bottom: 1px solid #eef2f7; }
  .dropdown li a:hover { padding-left: 55px; background: #fff; }
  
  /* 移动端三级菜单 */
  .sub-dropdown {
    position: relative;
    left: 0; top: 0;
    box-shadow: none;
    border-radius: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none; /* 默认隐藏 */
    background: #f0f4f8; /* 背景更深一层 */
    padding: 0;
  }
  .dropdown li.has-sub > a { padding-right: 30px; }
  .dropdown li.has-sub > a i { transform: rotate(90deg); }
  .dropdown li.has-sub.active > a i { transform: rotate(270deg); }
  .dropdown li.has-sub.active > .sub-dropdown { display: block; }
  .sub-dropdown li a { padding: 12px 30px 12px 70px; border-bottom: 1px solid #e2e8f0; }

  .menu-mask { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.3s; }
  .menu-mask.show { opacity: 1; visibility: visible; }
}

/*导航*/

.page-banner { background: url("../images/com_banner.jpg") no-repeat center center/cover; padding: 80px 0; text-align: center; color: #fff; position: relative; overflow: hidden; }
.page-banner h1 { font-size: 42px; font-weight: 800; letter-spacing: 4px; margin-bottom: 16px; position: relative; z-index: 1; }
.page-banner p { font-size: 18px; color: #fff; letter-spacing: 2px; position: relative; z-index: 1; }
@media (max-width: 768px) {
  .page-banner { padding: 50px 0; }
  .page-banner h1 { font-size: 28px; }
}

/* ================= 页脚 ================= */
.footer{background:#0e1a26;color:#a0b4c8;padding:60px 0 0;font-size:14px}
.footer-top{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:36px;padding-bottom:40px;border-bottom:1px solid rgba(255,255,255,.08)}
.footer-col h4{color:#fff;font-size:16px;margin-bottom:20px;font-weight:600}
.footer-col p,.footer-col li{margin-bottom:10px;line-height:1.8}
.footer-col i{margin-right:6px;color:#db0f31;width:16px}
.footer-col .hotline{font-size:26px;font-weight:800;color:#db0f31;letter-spacing:1px;margin-bottom:20px}
.footer-col .hotline small{font-size:13px;font-weight:400;color:#a0b4c8;display:block;margin-top:4px}
.footer-bottom{padding:24px 0;text-align:center;font-size:13px;color:#6b8099}
.footer-bottom a:hover{color:#db0f31}

.footer-qr { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 10px; }
.footer-qr img { width: 100px; height: 100px; border-radius: 6px; box-sizing: border-box; object-fit: cover; }
.footer-qr p { font-size: 13px; color: #a0b4c8; margin: 0; letter-spacing: 1px; }

/* ================= 悬浮客服 & 返回顶部 ================= */
.float-btn { position: fixed; right: 15px; height: 56px; background: #1a2b3c; color: #fff; border-radius: 12px; cursor: pointer; display: flex; align-items: center; width: 56px; transition: width 0.3s ease, background 0.3s ease; overflow: hidden; z-index: 9999; }
.float-btn:hover { background: #db0f31; width: 150px; }
.float-btn i { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.float-btn .text { white-space: nowrap; font-size: 15px; font-weight: 600; padding-left: 10px; opacity: 0; transition: opacity 0.2s ease; }
.float-btn:hover .text { opacity: 1; transition: opacity 0.2s 0.1s ease; }
.float-kefu { top: calc(50% - 40px); }
.float-phone { top: calc(50% + 30px); }

.back-top{position:fixed;right:20px;bottom:30px;width:46px;height:46px;background:#db0f31;color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:20px;cursor:pointer;box-shadow:0 6px 16px rgba(219,15,49,.35);transition:all .3s;z-index:999;opacity:0;visibility:hidden;transform:translateY(20px);border:none}
.back-top.show{opacity:1;visibility:visible;transform:translateY(0)}
.back-top:focus-visible{outline:2px solid #fff;outline-offset:2px}

/* ================= 弹窗样式 ================= */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  display: flex;
  opacity: 1;
}
.modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  position: relative;
  width: 90%;
  max-width: 380px;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.modal-overlay.active .modal-content {
  transform: translateY(0);
}
.modal-close {
  position: absolute;
  top: 15px; right: 20px;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  transition: color 0.3s;
  line-height: 1;
}
.modal-close:hover { color: #db0f31; }
.modal-content h3 {
  margin-bottom: 20px;
  color: #1a2b3c;
  font-size: 20px;
}
.qrcode-box {
  width: 220px;
  height: 220px;
  margin: 0 auto 15px;
  background: #f7faff;
  border: 1px solid #eee;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.qrcode-box img {
  width: 100%; height: 100%; object-fit: contain;
}
.phone-box {
  font-size: 28px;
  font-weight: bold;
  color: #db0f31;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.phone-box a {
  color: #db0f31;
  text-decoration: none;
}
.phone-box a:hover { text-decoration: underline; }
.modal-content p {
  color: #666;
  font-size: 14px;
}

/* ================= 移动端响应式优化 ================= */
@media(max-width:768px){
  /* 1. 移动端悬浮按钮优化：只保留圆形图标 */
  .float-btn { 
    right: 10px; 
    width: 45px; 
    height: 45px; 
    border-radius: 50%; 
    justify-content: center;
  }
  .float-btn i { 
    width: 45px; 
    height: 45px; 
    font-size: 20px; 
  }
  .float-btn .text { 
    display: none; 
  }
  .float-kefu { top: calc(50% - 25px); }
  .float-phone { top: calc(50% + 25px); }

  /* 2. 移动端页脚优化：隐藏上半部分，仅留底部版权 */
  .footer { 
    padding: 20px 0 0; 
  }
  .footer-top { 
    display: none; /* 隐藏复杂信息区域 */
  }
  .footer-bottom {
    padding: 20px 0;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #6b8099;
  }
  .footer-bottom a {
    color: inherit;
  }
}

.divider {
  color: #5a6d7f; /* 深灰色，不抢眼 */
  font-size: 12px;
  padding: 0 10px;
}


/* ================= 移动端溢出终极修复 ================= */
@media (max-width: 992px) {
  /* 1. 修复侧边栏隐藏导致的横向溢出 */
  .nav-menu { 
    right: auto; /* 清除原有的 -100% */
    right: 0;
    transform: translateX(100%); /* 使用平移移出屏幕 */
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
  }
  .nav-menu.open { 
    transform: translateX(0); 
    visibility: visible;
  }
}

@media (max-width: 768px) {
  /* 2. 强制全局限宽，防止任何元素撑破屏幕 */
  html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden !important;
  }

  /* 3. 修复顶部文字撑破屏幕 */
  .top-bar .container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 5px;
  }
  .top-bar .container > div {
    font-size: 12px;
    white-space: normal;
    word-break: break-all; /* 防止长串数字把屏幕撑破 */
    line-height: 1.4;
  }
  .top-bar .divider {
    display: none; /* 移动端隐藏竖线，节省空间 */
  }

  /* 4. 修复底部版权文字过长导致的溢出 */
  .footer-bottom {
    padding: 20px 15px; /* 增加左右内边距 */
    word-break: break-all; 
  }

  /* 5. 移动端导航图标完全固定在可视区域内 */
  .menu-toggle {
    right: 20px;
  }
}