/* =========================================================
   创鸿网站 首页样式 index.css
   - Banner / 产品系列 / 产品应用行业 / 中部广告位 / 为什么选择创鸿
   ========================================================= */

/* ---------- 1. Banner ---------- */
.ch-banner { width: 100%; overflow: hidden; }
.ch-banner-swiper { width: 100%; height: 1000px; }
.ch-banner-swiper .swiper-slide a {
  display:block;
  width:100%;
  height:100%;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}
.ch-banner-pagination {
  position: absolute;
  bottom: 30px !important;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 10;
}
.ch-banner-pagination .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: #fff;
  opacity: 0.4;
  margin: 0 6px !important;
  transition: all 0.3s ease;
}
.ch-banner-pagination .swiper-pagination-bullet-active {
  opacity: 1;
}

/* ---------- 2. 产品系列 ---------- */
.ch-products { padding-bottom: 60px; }
.ch-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.ch-product-card {
  position: relative;
  display: block;
  height: 260px;
  border-radius: 6px;
  overflow: hidden;
  background: #f0f0f0;
}
.ch-product-card .img {
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transition: transform 0.5s ease;
  z-index: 0;
}
.ch-product-card .mask {
  position: absolute;
  inset: 0;
  background: var(--color-mask-30);
  transition: background 0.4s ease;
  z-index: 1;
}
.ch-product-card .name {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 2px;
  z-index: 2;
}
.ch-product-card:hover .img { transform: scale(1.1); }
.ch-product-card:hover .mask { background: var(--color-mask-50); }

/* ---------- 3. 产品应用行业 ---------- */
.ch-industry { padding-bottom: 60px; background: var(--color-bg-light); }
.ch-industry-swiper {
  position: relative;
  padding-bottom: 50px; /* 给 progress 条留位置 */
}
.ch-industry-card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: var(--transition-base);
}
.ch-industry-card:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}
.ch-industry-card .img {
  width: 100%;
  height: 180px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.ch-industry-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-main);
  margin: 16px 18px 10px;
  line-height: 1.4;
}
.ch-industry-card p {
  font-size: 13px;
  color: var(--color-text-sub);
  line-height: 1.7;
  margin: 0 18px 18px;
  flex: 1;
}

.ch-industry-swiper .swiper-slide {
  height: auto;
  display: flex;
}

/* progress 分页器 */
.ch-industry-pagination.swiper-pagination-progress {
  background: #D3D3D3;
  height: 8px !important;
  border-radius: 2px;
  overflow: hidden;
  bottom: 10px;
  left: 50% !important;
  transform:translateX(-50%);
  width: 220px !important;
  top: auto !important;
  position: absolute;
}
.ch-industry-pagination.swiper-pagination-progress .swiper-pagination-progressbar {
  background: var(--color-primary);
  height: 100%;
  border-radius: 2px;
}

/* ---------- 4. 中部广告位 ---------- */
.ch-ad {
  width: 100%;
  height: 260px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: center;
  position: relative;
}
.ch-ad::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}
.ch-ad-inner {
  position: relative;
  z-index: 1;
  color: #fff;
  text-align: center;
  width: 100%;
}
.ch-ad-title {
  font-size: 42px;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: 6px;
}
.ch-ad-slogan {
  font-size: 20px;
  margin: 0;
  letter-spacing: 2px;
  line-height: 1.6;
}

/* ---------- 5. 为什么选择创鸿（左右全屏铺满，不受 max-width 限制） ---------- */
.ch-why { padding-bottom: 0; }

.ch-why-row {
  width: 100%;
  background: #fff;
}
.ch-why-row + .ch-why-row { border-top: 1px solid var(--color-bg-light2); }

.ch-why-inner {
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 480px;
}
.ch-why-text {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 8% 60px 10%;
  background: #fff;
}
.ch-why-text-inner {
  max-width: 600px;
}
.ch-why-text h3 {
  font-size: 30px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 22px;
  position: relative;
  padding-bottom: 16px;
}
.ch-why-text h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 3px;
  background: var(--color-primary);
}
.ch-why-text p {
  font-size: 15px;
  line-height: 2;
  color: var(--color-text-sub);
  margin: 0;
  text-align: justify;
}
.ch-why-img {
  flex: 1 1 50%;
  min-height: 480px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* 文左图右（第 1、3 个）：默认 flex 排列即可 */
.ch-why-row--text-left .ch-why-inner { flex-direction: row; }
/* 图左文右（第 2 个）：DOM 顺序已为 img→text，直接 row 即可 */
.ch-why-row--text-right .ch-why-inner { flex-direction: row; }
.ch-why-row--text-right .ch-why-text { padding: 60px 10% 60px 8%; }

/* ---------- 6. 响应式 ---------- */

/* Pad (768 ~ 1199) */
@media (max-width: 1199px) {
  .ch-banner-swiper { height: 500px; }
  .ch-banner-pagination .swiper-pagination-bullet { width: 10px; height: 10px; }
  .ch-banner-pagination .swiper-pagination-bullet-active { width: 22px; }

  .ch-product-grid { gap: 20px; }
  .ch-product-card { height: 220px; }
  .ch-product-card .name { font-size: 22px; }

  .ch-industry-card .img { height: 160px; }
  .ch-industry-card h3 { font-size: 16px; margin: 14px 14px 8px; }
  .ch-industry-card p { font-size: 12px; margin: 0 14px 14px; }

  .ch-ad { height: 220px; }
  .ch-ad-title { font-size: 34px; }
  .ch-ad-slogan { font-size: 16px; }

  .ch-why-inner { min-height: 380px; }
  .ch-why-img { min-height: 380px; }
  .ch-why-text { padding: 40px 5%; }
  .ch-why-row--text-right .ch-why-text { padding: 40px 5%; }
  .ch-why-text h3 { font-size: 24px; margin-bottom: 16px; padding-bottom: 12px; }
  .ch-why-text p { font-size: 14px; line-height: 1.85; }
}

/* iPhone (<768) */
@media (max-width: 767px) {
  /* Banner */
  .ch-banner-swiper { height: 300px; }
  .ch-banner-pagination { bottom: 14px !important; }
  .ch-banner-pagination .swiper-pagination-bullet { width: 8px; height: 8px; margin: 0 4px !important; }
  .ch-banner-pagination .swiper-pagination-bullet-active { width: 18px; }

  /* 产品系列：两列 */
  .ch-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .ch-product-card { height: 150px; border-radius: 4px; }
  .ch-product-card .name { font-size: 18px; letter-spacing: 1px; }
  .ch-products { padding-bottom: 36px; }

  /* 行业卡片 */
  .ch-industry-card .img { height: 140px; }
  .ch-industry-card h3 { font-size: 15px; margin: 12px 12px 6px; }
  .ch-industry-card p { font-size: 12px; line-height: 1.6; margin: 0 12px 12px; }
  .ch-industry-swiper { padding-bottom: 36px; }
  .ch-industry { padding-bottom: 36px; }

  /* 广告位 */
  .ch-ad { height: 170px; }
  .ch-ad-title { font-size: 24px; letter-spacing: 3px; margin-bottom: 6px; }
  .ch-ad-slogan { font-size: 13px; letter-spacing: 0; padding: 0 16px; }

  /* 为什么选择：移动端图上文下 */
  .ch-why { padding-bottom: 0; }
  .ch-why-inner {
    flex-direction: column !important;
    min-height: 0;
  }
  .ch-why-img {
    width: 100%;
    height: 220px;
    min-height: 0;
    flex: 0 0 auto;
    order: 1;
  }
  .ch-why-text {
    padding: 28px 20px !important;
    flex: 0 0 auto;
    order: 2;
  }
  .ch-why-text-inner { max-width: none; }
  .ch-why-text h3 { font-size: 20px; margin-bottom: 14px; padding-bottom: 10px; }
  .ch-why-text p { font-size: 13px; line-height: 1.8; }
}
