/* ==========================================================================
   factory.css — 厂区实景视觉增强（2026-11-07）
   独立加载，不改动 style.css：避免全站缓存版本号批量替换与既有样式回归。
   复用 cert-gallery 的横滑交互 / 左右箭头 / 圆点 / 灯箱（JS 零改动）。
   图片位于 assets/img/factory/，相对本文件为 ../img/factory/。
   ========================================================================== */

/* ---------- 1. 首页 Hero：自动电泳线实景背景 ---------- */
.hero--photo {
  background-image:
    linear-gradient(90deg,
      rgba(7, 38, 66, .95) 0%,
      rgba(7, 38, 66, .88) 34%,
      rgba(7, 38, 66, .68) 66%,
      rgba(7, 38, 66, .44) 100%),
    url("../img/factory/xintai-ced-line-hero.jpg");
  background-size: cover;
  background-position: center 46%;
  background-repeat: no-repeat;
  padding: 88px 0 76px;
}
.hero--photo .hero-lead,
.hero--photo h1 { text-shadow: 0 2px 14px rgba(0, 0, 0, .28); }
.hero--photo .hero-eyebrow {
  background: rgba(255, 255, 255, .19);
  border: 1px solid rgba(255, 255, 255, .22);
}

/* ---------- 2. 首页「厂区实景」三图展示 ---------- */
/* 独立底色 + 上下细线，插在两节之间不与前后同色连成一片 */
.factory-section {
  background: linear-gradient(180deg, #f4f8fc 0%, #ffffff 100%);
  border-top: 1px solid var(--c-border, #e2e8ef);
  border-bottom: 1px solid var(--c-border, #e2e8ef);
}
.factory-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 8px;
}
.factory-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius, 10px);
  overflow: hidden;
  background: #eef1f5;
  box-shadow: 0 4px 18px rgba(10, 40, 70, .10);
  text-decoration: none;
}
.factory-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .55s cubic-bezier(.2, .7, .3, 1);
}
.factory-card:hover img { transform: scale(1.06); }
.factory-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7, 38, 66, 0) 38%, rgba(7, 38, 66, .86) 100%);
  pointer-events: none;
}
.factory-card-cap {
  position: absolute; z-index: 2;
  left: 18px; right: 18px; bottom: 16px;
  color: #fff;
}
.factory-card-cap strong {
  display: block; font-size: 16px; line-height: 1.4; font-weight: 700;
  letter-spacing: .3px;
}
.factory-card-cap small {
  display: block; font-size: 12px; opacity: .86; margin-top: 4px;
  line-height: 1.5;
}
.factory-card-arrow {
  position: absolute; z-index: 2; right: 16px; top: 14px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, .9); color: var(--c-primary, #0f4c75);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .25s, transform .25s;
}
.factory-card:hover .factory-card-arrow { opacity: 1; transform: translateY(0); }

.factory-more {
  text-align: center; margin-top: 22px; font-size: 13.5px;
  color: var(--t-2, #4a5a6a);
}
.factory-more a { color: var(--c-primary, #0f4c75); font-weight: 600; }

/* ---------- 3. 内页页头：淡实景背景 ---------- */
/* 渐变只压左侧文字区，右侧留给照片——2026-11-07 前版整条压到 0.93→0.56，照片糊成一片。
   ★ hero 高度随视口走（17vw，上不超 340）：背景 cover 按宽度缩放，视口越宽竖向被裁越多，
     定高会导政招牌在不同屏幕上时而被切时而不切。 */
.page-hero--reception,
.page-hero--workshop {
  min-height: clamp(240px, 17vw, 340px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}
.page-hero--reception {
  background-image:
    linear-gradient(90deg, rgba(9, 46, 78, .88) 0%, rgba(9, 46, 78, .55) 38%, rgba(9, 46, 78, .15) 100%),
    url("../img/factory/xintai-reception-hero.jpg?v=20261107e");
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}
.page-hero--workshop {
  background-image:
    linear-gradient(90deg, rgba(9, 46, 78, .88) 0%, rgba(9, 46, 78, .55) 38%, rgba(9, 46, 78, .15) 100%),
    url("../img/factory/xintai-workshop-hero.jpg?v=20261107e");
  background-size: cover;
  background-position: center 20%;
  background-repeat: no-repeat;
}
.page-hero--reception h1, .page-hero--workshop h1,
.page-hero--reception p, .page-hero--workshop p {
  text-shadow: 0 1px 10px rgba(0, 0, 0, .24);
}

/* ---------- 4. about.html 厂区实景画廊（复用 cert-gallery） ---------- */
.factory-gallery .cert-slide { width: 340px; }
.factory-gallery .cert-frame {
  padding-top: 75%;               /* 4:3 横版，实景照统一裁切为 1200x900 */
  background: #eef1f5;
}
.factory-gallery .cert-frame img { object-fit: cover; }
.factory-gallery .cert-tag {
  background: rgba(7, 38, 66, .9);
  letter-spacing: .3px;
}
.factory-gallery .cert-slide figcaption { font-size: 13.5px; }
.factory-gallery .cert-slide .cert-kind { font-size: 11.5px; }

/* 分组小标题：把 10 张图按「办公环境 / 生产车间 / 厂区外景」串起来 */
.factory-legend {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  margin: 0 0 16px; padding: 0; list-style: none;
  font-size: 12.5px; color: var(--t-2, #4a5a6a);
}
.factory-legend li { display: flex; align-items: center; gap: 7px; }
.factory-legend i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-primary, #0f4c75); display: inline-block;
}
.factory-legend li:nth-child(2) i { background: #e08a2e; }
.factory-legend li:nth-child(3) i { background: #3f8f7a; }

/* ---------- 5. 响应式 ---------- */
@media (max-width: 1024px) {
  .factory-gallery .cert-slide { width: 300px; }
  .hero--photo { padding: 76px 0 66px; }
}
@media (max-width: 768px) {
  .factory-gallery .cert-slide { width: 78vw; }
  .factory-showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .factory-card-cap { left: 13px; right: 13px; bottom: 12px; }
  .factory-card-cap strong { font-size: 14px; }
  .factory-card-cap small { font-size: 11px; }
  .hero--photo { padding: 62px 0 56px; }
}
@media (max-width: 560px) {
  .factory-showcase { grid-template-columns: 1fr; }
  .factory-card { aspect-ratio: 16 / 9; }
}
/* 触屏无 hover：放大提示常显，否则手机用户不知道图片可点开 */
@media (hover: none) {
  .factory-gallery .cert-zoom { opacity: 1; transform: translateY(0); }
  .factory-card-arrow { opacity: 1; transform: none; }
}
