/* ============================================================
   首页专用样式
   ============================================================ */

/* 回到顶部: 位置与尺寸统一由 site.css 控制(与咨询按钮同列同大) */

/* ---------- 轮播 ---------- */
.carousel-band { width: 100%; background: #000; }
.carousel {
  position: relative;
  overflow: hidden;
  width: calc(100% - 40px);
  max-width: calc(var(--container-w) - 40px);
  margin: 0 auto;
  height: 420px;
  background: transparent;
}
.carousel-track {
  display: flex;
  transition: transform .5s ease;
  height: 100%;
}
.carousel-slide { min-width: 100%; height: 100%; }
.carousel-slide a, .carousel-slide img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.carousel-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: background .2s;
}
.carousel-dots span.active { background: #fff; }

/* ---------- 板块通用 ---------- */
.home-section { padding: 70px 0; }
.home-section.dark { background: #0a0d14; color: #fff; }
.home-section.gray { background: #f5f7fa; }
.home-title {
  text-align: center;
  font-size: 30px;
  font-weight: 600;
  margin-bottom: 8px;
}
.home-sub {
  text-align: center;
  color: #888;
  font-size: 15px;
  margin-bottom: 40px;
}
.dark .home-title { color: #fff; }
.dark .home-sub { color: #9aa3b0; }

/* ---------- 板块内容 ---------- */
.home-tabs-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid #eee;
  margin-bottom: 30px;
}
.dark .home-tabs-nav { border-bottom-color: rgba(255,255,255,.15); }
.home-tabs-nav button {
  background: transparent;
  border: none;
  padding: 12px 20px;
  font-size: 15px;
  color: #777;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color .2s, border-color .2s;
}
.dark .home-tabs-nav button { color: #aab3c0; }
.home-tabs-nav button:hover { color: var(--primary); }
.home-tabs-nav button.active { color: var(--primary); border-bottom-color: var(--primary); }
.dark .home-tabs-nav button.active { color: #fff; border-bottom-color: var(--primary); }

.home-tab-pane { display: none; }
.home-tab-pane.active { display: block; }

/* 左右图文 */
.feature-row {
  display: flex;
  align-items: center;
  gap: 60px;
}
.feature-row .feat-img { flex: 0 0 46%; }
.feature-row .feat-img img { width: 100%; border-radius: 8px; box-shadow: var(--shadow); }
.feature-row .feat-img video { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #111; border-radius: 8px; box-shadow: var(--shadow); display: block; }
.feature-row.rev .feat-img { order: 2; }
.feature-row .feat-text { flex: 1; }
.feature-row .feat-text h3 { font-size: 22px; margin-bottom: 14px; }
.feature-row .feat-text p { color: #555; font-size: 15px; line-height: 1.9; }
.dark .feature-row .feat-text p { color: #b8c0cc; }
.feature-list { margin: 16px 0 24px; }
.feature-list li {
  position: relative;
  padding-left: 20px;
  color: #555;
  font-size: 14px;
  line-height: 2;
}
.dark .feature-list li { color: #b8c0cc; }
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}
.btn-view {
  display: inline-block;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 9px 34px;
  border-radius: 999px;
  font-size: 14px;
  transition: all .25s;
}
.btn-view:hover { background: var(--primary); color: #fff; }

/* ---------- 卡片(高精度地图) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.card img { width: 100%; height: 180px; object-fit: cover; }
.card-body { padding: 22px; }
.card-body h4 { font-size: 18px; margin-bottom: 8px; }
.card-body p { color: #666; font-size: 14px; line-height: 1.8; }

/* ---------- 图标卡片(数据服务) ---------- */
.icon-card {
  display: flex;
  gap: 20px;
  background: #fff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: var(--shadow);
}
.icon-card .ic-img { flex-shrink: 0; width: 72px; height: 72px; }
.icon-card .ic-img img { width: 100%; }
.icon-card h4 { font-size: 18px; margin-bottom: 8px; }
.icon-card p { color: #666; font-size: 14px; line-height: 1.9; }

/* 智能交通 - 深色卡片区 */
.traffic-bg {
  background: url('../images/index/indexnew/traffic1.png') center/cover no-repeat;
}
.traffic-text {
  background: rgba(0,0,0,.35);
  padding: 34px;
  border-radius: 8px;
  max-width: 560px;
}
.traffic-text h3 { color: #fff; font-size: 22px; margin-bottom: 12px; }
.traffic-text p { color: #e6ecf4; font-size: 14px; line-height: 2; }

/* ---------- 合作伙伴 ---------- */
.partner-wrap { text-align: center; }
.partner-wrap img { max-width: 100%; margin: 0 auto; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
  .feature { flex-direction: column; gap: 30px; }
  .feature-row { flex-wrap: wrap; gap: 22px; }
  .feature-row .feat-img { flex: 0 0 auto; width: 100%; order: 1 !important; }
  .feature-row .feat-text { flex: 0 0 auto; width: 100%; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .home-section { padding: 46px 0; }
  .home-title { font-size: 24px; }
  .traffic-bg { background-position: center; }
  .carousel { height: 300px; }
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
  .home-tabs-nav button { padding: 10px 12px; font-size: 13px; }
  .icon-card { flex-direction: column; align-items: center; text-align: center; }
  .carousel { height: 180px; }
}