/* ========== 基础 ========== */
:root {
  --primary: #2f6be6;
  --text: #333;
  --text-light: #666;
  --border: #e6e9ef;
  --bg-gray: #f6f8fb;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; } /* height:auto 让图片宽度被压缩时保持原比例 */
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
section[id] { scroll-margin-top: 72px; } /* 锚点定位时避开吸顶导航 */

/* ========== 顶部导航 ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 1px 0 var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { width: 36px; height: 36px; }
.logo span { font-size: 24px; font-weight: 700; letter-spacing: 2px; line-height: 1; white-space: nowrap; }
.nav { display: flex; gap: 8px; }
.nav a {
  padding: 6px 18px;
  font-size: 17px;
  font-weight: 600;
  border-radius: 20px;
  transition: color .2s, background-color .2s;
}
.nav a:hover { color: var(--primary); background: #eef3fe; }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; }
.nav-toggle span { width: 22px; height: 2px; margin: 0 auto; background: var(--text); }

/* ========== 轮播图 ========== */
.carousel { position: relative; aspect-ratio: 1920 / 730; overflow: hidden; background: #1b2f8a; }
/* 新图在上层淡入，旧图在下层保持显示，避免交叉淡入时闪一下底色 */
.carousel-slide {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0s .8s, visibility 0s .8s;
}
.carousel-slide.is-active { z-index: 1; opacity: 1; visibility: visible; transition: opacity .8s, visibility 0s; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-slide.text-right img { object-position: right center; }
.carousel-slide.text-left img { object-position: left center; }
.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  background: rgba(0, 0, 0, .3);
  transition: background-color .2s;
}
.carousel-arrow:hover { background: rgba(0, 0, 0, .5); }
.carousel-arrow.prev { left: 20px; }
.carousel-arrow.next { right: 20px; }
.carousel-dots { position: absolute; left: 0; right: 0; bottom: 16px; z-index: 2; display: flex; justify-content: center; gap: 10px; }
.carousel-dots button { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.carousel-dots button.is-active { background: #fff; }

/* ========== 通用区块 ========== */
.section { padding: 70px 0; }
.section-gray { background: var(--bg-gray); }
.section-title { margin-bottom: 12px; text-align: center; font-size: 30px; font-weight: 600; }
.section-title::after { content: ""; display: block; width: 40px; height: 3px; margin: 14px auto 0; border-radius: 2px; background: var(--primary); }
.section-title.left { text-align: left; }
.section-title.left::after { margin-left: 0; }
.section-sub { margin-bottom: 40px; text-align: center; color: var(--text-light); }
.sub-title { margin-bottom: 24px; text-align: center; font-size: 24px; }

/* ========== 产品介绍 ========== */
.system { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.system h3 { margin-bottom: 16px; font-size: 24px; }
.system p { margin-bottom: 12px; color: var(--text-light); }
.system .scenes { color: var(--text); }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 40px 0 60px; }
.feature { padding: 20px; border: 1px solid var(--border); border-radius: 8px; }
.feature h4 { margin-bottom: 6px; font-size: 18px; color: var(--primary); }
.feature p { font-size: 14px; color: var(--text-light); }
.products { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.products li {
  padding: 16px 10px;
  font-size: 14px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: box-shadow .2s, transform .2s;
}
.products li:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.products img { height: 120px; margin: 0 auto 10px; object-fit: contain; }

/* ========== 新闻动态 ========== */
.news { max-width: 900px; margin: 0 auto; }
.news li { display: flex; gap: 24px; padding: 16px 8px; border-bottom: 1px solid var(--border); }
.news time { flex: none; width: 110px; font-weight: 600; color: var(--primary); }

/* ========== 公司介绍 ========== */
.about { display: grid; grid-template-columns: 1fr 1.3fr; gap: 60px; align-items: center; }
.about img { width: 320px; margin: 0 auto; }
.about p { margin-bottom: 12px; color: var(--text-light); }
.about p:last-child { margin-bottom: 0; }

/* ========== 联系我们 ========== */
.section-primary { background: var(--primary); color: #fff; }
.contact { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.contact h2 { margin-bottom: 4px; font-size: 28px; }
.contact-tip { margin-bottom: 16px; opacity: .85; }
.contact-list li { margin-bottom: 8px; }
.contact-list b { display: inline-block; width: 48px; font-weight: 600; opacity: .85; }
.contact a:hover { text-decoration: underline; }
.qrcode { flex: none; padding: 16px; font-size: 14px; text-align: center; color: var(--text); border-radius: 8px; background: #fff; }
.qrcode img { width: 150px; margin-bottom: 6px; }

/* ========== 页脚 ========== */
.footer { padding: 30px 0; font-size: 14px; text-align: center; color: #fff; background: #111; }
.footer .logo { justify-content: center; margin-bottom: 10px; }
.footer a:hover { text-decoration: underline; }

/* ========== 响应式 ========== */
@media (max-width: 900px) {
  .section { padding: 50px 0; }
  .system, .about { grid-template-columns: 1fr; }
  .about img { width: 260px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .products { grid-template-columns: repeat(3, 1fr); }
  .contact { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    display: none;
    background: #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .08);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 24px; border-radius: 0; }
  .carousel { aspect-ratio: auto; height: 280px; }
  .carousel-arrow { display: none; }
  .products { grid-template-columns: repeat(2, 1fr); }
  .news li { gap: 16px; }
}
