* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0a4d8f;
  --primary-light: #1565c0;
  --primary-dark: #063e72;
  --accent: #00b0ff;
  --accent-warm: #ff8f00;
  --text-dark: #1a1a2e;
  --text-body: #444;
  --text-light: #888;
  --bg-white: #fff;
  --bg-light: #f5f7fa;
  --bg-section: #eef3f9;
  --border: #e0e6ed;
  --shadow: 0 4px 20px rgba(0,0,0,.08);
  --shadow-hover: 0 8px 30px rgba(10,77,143,.15);
  --radius: 10px;
  --max-width: 1480px;
  --header-h: 72px; */
  --header-h-mobile: 120px;
  /* 轮播图宽高比：1900/860 ≈ 1.86 */
  --carousel-ratio: 2.21;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-body);
  background: var(--bg-white);
  line-height: 1.7;
  font-size: 15px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ============ Header ============ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
  transition: all .3s;
}

.header.scrolled {
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}

.logo-icon {
  width: 60px;
  height: auto;
  object-fit: contain;
}

/* === Nav with Dropdown === */
.nav {
  display: flex;
  gap: 0;
}

.nav > li {
  position: relative;
  margin-left: 10px;
}

.nav > li > a {
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  transition: all .25s;
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav > li > a:hover {
  color: var(--primary);
  background: var(--bg-light);
}

.nav > li > a.active {
  color: var(--primary);
  background: rgba(10,77,143,.08);
}

.nav > li > a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.nav-arrow {
  font-size: 10px;
  transition: transform .3s;
  margin-left: 10px;
  display: none; /* Hidden by default on desktop */
}

.nav > li:hover > a .nav-arrow {
  transform: rotate(180deg);
}

/* Dropdown */
.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 200px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transition: all .3s;
  z-index: 100;
}

.dropdown::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #fff;
}

.nav > li:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown li a {
  display: block;
  padding: 10px 24px;
  font-size: 14px;
  color: var(--text-body);
  transition: all .2s;
  white-space: nowrap;
}

.dropdown li a:hover {
  color: var(--primary);
  background: var(--bg-light);
  padding-left: 28px;
}

.dropdown li a::before {
  content: "·";
  color: var(--accent);
  margin-right: 6px;
  font-weight: 700;
}

.header-cta {
  padding: 9px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  transition: all .25s;
  cursor: pointer;
}

.header-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  font-size: 26px;
  color: var(--primary);
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.footer-brand .logo {
  color: #fff;
  margin-bottom: 16px;
}

.footer-brand .logo-icon {
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.8;
  max-width: 280px;
}
/* ============ Footer ============ */
.footer {
  background: #0a1929;
  color: rgba(255,255,255,.7);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
    /* 
      调整列宽：
      - 技术中心、产品中心、解决方案：各占 1 份，内容较少，均匀分布
      - 联系方式：给 1.8 份，确保地址等长文本有足够空间
      - 二维码：给 0.8 份，并配合内部居中，紧凑显示
    */
    grid-template-columns: 1fr 1fr 1fr 1.6fr 1fr;
    gap: 26px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-col h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-col ul li {
  padding: 4px 0;
}

.footer-col ul li a {
  font-size: 13px;
  transition: color .25s;
}

.footer-col ul li a:hover {
  color: var(--accent);
}

/* 为联系方式列内的长地址添加换行保护 */
.footer-contact li {
  font-size: 13px;
  padding: 6px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  word-break: break-word;    /* 防止邮箱/网址溢出 */
}

.footer-contact li .icon {
  color: var(--accent);
  flex-shrink: 0;
}
/* 二维码列内部居中（已在行内 style 写了，这里统一处理） */
.footer-col:last-child {
  text-align: center;
}
.footer-col:last-child img {
  max-width: 100%;          /* 确保图片不溢出 */
  height: auto;
}
.footer-col:last-child br {
  display: none;            /* 去掉 <br>，用 margin 控制间距 */
}
.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom a {
  color: var(--accent);
}

/* ============ Back to Top ============ */
.back-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all .3s;
  box-shadow: 0 4px 12px rgba(10,77,143,.3);
}

.back-top.show {
  opacity: 1;
  visibility: visible;
}

.back-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}



/* Safe area for notched devices */
@supports (padding: max(0px)) {
  .header-inner {
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }
  
  .back-top {
    bottom: max(30px, env(safe-area-inset-bottom));
    right: max(30px, env(safe-area-inset-right));
  }
}
/* Mobile devices */
@media (max-width: 768px) {
  :root {
    --header-h: 60px;
  }
  
  .container {
    padding: 0 16px;
  }
  
  /* Header Mobile */
  .nav, .header-cta {
    display: none;
  }
  
  .mobile-toggle {
    display: block;
  }
  /* Show nav-arrow only on mobile */
  .nav-arrow {
  	display: inline-block;
  }
  .nav.open {
    display: flex;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    gap: 0;
    max-height: 70vh;
    overflow-y: auto;
  }
  
  .nav.open > li {
    margin-left: 0;
    width: 100%;
  }
  
  .nav.open > li > a {
    padding: 12px 16px;
    width: 100%;
    justify-content: space-between;
  }
  
  .dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    padding: 0 0 0 24px;
    min-width: auto;
    display: none;
  }
  
  .nav.open > li.expanded .dropdown {
    display: block;
  }
  
  .nav.open > li > a .nav-arrow {
    transform: rotate(-90deg);
  }
  
  .nav.open > li.expanded > a .nav-arrow {
    transform: rotate(0deg);
  }
  
  .dropdown::before {
    display: none;
  }
  
  /* Footer Mobile */
  .footer-grid {
    grid-template-columns: 2fr;  /* 1列，占满宽度 */
    grid-template-rows: 2fr;     /* 1行，占满高度 */
    gap: 24px;
  }
  
  .footer-brand {
    grid-column: 1/-1;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  
  /* Section padding mobile */
  section {
    padding: 40px 0;
  }
  
  .section-head h2 {
    font-size: 26px;
  }
  
  .section-head .eyebrow {
    font-size: 12px;
  }
  
  /* Back to top mobile */
  .back-top {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
    font-size: 18px;
  }
}

/* Small mobile devices */
@media (max-width: 375px) {
  .container {
    padding: 0 12px;
  }

  .section-head h2 {
    font-size: 22px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }

}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .nav > li > a:hover {
    background: transparent;
  }
}