/* ===== 首页样式（1:1 转换自 uni-app pages/index/index.vue） ===== */

/* ===== 顶部导航 ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e6eef8;
}

.header-inner {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-area {
  display: flex;
  align-items: center;
}

.logo {
  height: 34px;
  width: 98px;
  object-fit: contain;
}

.header-btns {
  display: flex;
  gap: 10px;
}

.h-btn {
  height: 30px;
  line-height: 28px;
  padding: 0 14px;
  border: 1px solid #9dc3ff;
  border-radius: 15px;
  color: #1e7bff;
  font-size: 13px;
  background: #fff;
}

/* ===== Hero ===== */
/* 移动端：顶部背景切图作为整段背景（文字叠于上方留白区，插画位于右下） */
.hero {
  background: #eaf3ff url('../static/images/hero-bg-m.png') no-repeat right bottom;
  background-size: cover;
  overflow: hidden;
}

.hero-inner {
  padding-top: 26px;
  padding-bottom: 26px;
}

.hero-title {
  font-size: 26px;
  font-weight: 800;
  color: #1668dc;
  line-height: 1.3;
}

.hero-sub {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #1f2d3d;
}

.hero-desc {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.8;
  color: #6b7a90;
}

.hero-btns {
  margin-top: 20px;
  display: flex;
  gap: 14px;
}

/* ===== 通用版块 ===== */
.section {
  padding: 36px 0 8px;
  background: #fff;
}

.sec-title {
  text-align: center;
  font-size: 21px;
  font-weight: 700;
  color: #1f2d3d;
}

.sec-sub {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  color: #6b7a90;
}

/* 卡片：2 列（手机版 UI 布局） */
.grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.img-card {
  border-radius: 14px;
  overflow: hidden;
}

.card-img {
  width: 100%;
  display: block;
}

/* ===== 接入流程 ===== */
.steps {
  margin-top: 20px;
  padding-bottom: 28px;
  text-align: center;
}

.steps-img {
  width: 100%;
  max-width: 1000px;
  display: block;
  margin: 0 auto;
}

.steps-img-m {
  width: 100%;
  max-width: 420px;
  display: block;
  margin: 0 auto;
}

/* ===== 底部 CTA ===== */
.footer-cta {
  position: relative;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* 对应 uni image 的 aspectFill */
}

.cta-inner {
  position: relative;
  z-index: 1;
  padding-top: 28px;
  padding-bottom: 28px;
}

.cta-title {
  font-size: 20px;
  font-weight: 800;
  color: #1668dc;
}

.cta-sub {
  margin-top: 6px;
  font-size: 13px;
  color: #5b7ba6;
}

.cta-btns {
  margin-top: 18px;
  display: flex;
  gap: 14px;
}

/* ================= 桌面端响应式（≥768px） ================= */
@media (min-width: 768px) {
  .desktop-only {
    display: block;
  }

  .mobile-only {
    display: none;
  }

  .header-inner {
    height: 64px;
  }

  .logo-area .logo {
    height: 40px;
    width: 115px;
  }

  .header-btns .h-btn {
    height: 34px;
    line-height: 32px;
    padding: 0 18px;
    font-size: 14px;
  }

  /* 桌面端：整段使用顶部背景切图（右侧含 API 立方体插画） */
  .hero {
    background: url('../static/images/hero-bg.png') no-repeat center right;
    background-size: cover;
  }

  .hero-inner {
    padding-top: 72px;
    padding-bottom: 72px;
    min-height: 380px;
  }

  .hero-left {
    max-width: 460px;
  }

  .hero-title {
    font-size: 40px;
  }

  .hero-sub {
    font-size: 19px;
  }

  .hero-desc {
    font-size: 14px;
    width: 280px;
  }

  .section {
    padding: 56px 0 16px;
    background: #fff;
  }

  .sec-title {
    font-size: 26px;
  }

  .sec-sub {
    font-size: 14px;
  }

  /* 桌面端：卡片 5 列 */
  .grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    margin-top: 28px;
  }

  /* 优势/场景卡区：flex + 固定卡宽（= 原 5 列布局的单卡宽度），
     5 张卡正好占满一行，4 张卡（应用场景）自动整体居中 */
  .grid.card-grid {
    display: flex;
    justify-content: center;
  }

  .grid.card-grid .img-card {
    width: calc((100% - 72px) / 5); /* 72px = 4 个 18px 间隙，与 5 列 grid 卡宽一致 */
    flex-shrink: 0;
  }

  .img-card {
    border-radius: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
  }

  .img-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(30, 100, 200, 0.16);
  }

  .steps {
    margin-top: 28px;
    padding-bottom: 40px;
  }

  .footer-cta {
    margin-top: 32px;
  }

  .cta-inner {
    padding-top: 48px;
    padding-bottom: 52px;
  }

  .cta-title {
    font-size: 26px;
  }

  .cta-sub {
    font-size: 14px;
  }

  /* 桌面端按钮居中 */
  .cta-btns {
    margin-top: 22px;
    justify-content: center;
  }
}
