/* ============================================================
   MOSINTER GROUP 工厂展示页 - 内容样式
   （顶部导航栏和底部导航栏样式已移至 main.css）
   ============================================================ */

/* ---------- CSS 变量（页面专用） ---------- */
:root {
  --green-dark:   #1a4a2e;
  --green-main:   #2d6a4f;
  --green-mid:    #3a7d5a;
  --green-light:  #52b788;
  --green-pale:   #d8f3dc;
  --text-dark:    #1a1a1a;
  --text-mid:     #444444;
  --text-light:   #777777;
  --border:       #e5e5e5;
  --bg-light:     #f8f9f6;
  --white:        #ffffff;
  --radius:       8px;
  --transition:   0.3s ease;
}

/* ============================================================
   通用 Section 样式
   ============================================================ */
.section {
  padding: 72px 0;
}
.section:nth-child(even) {
  background: var(--bg-light);
}

/* 标题装饰 */
.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 48px;
}
.section-title h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  letter-spacing: 2px;
}
.title-line {
  display: block;
  width: 60px;
  height: 1px;
  background: var(--green-light);
  position: relative;
}
.title-line::before {
  content: '';
  position: absolute;
  right: 0; top: -2px;
  width: 5px; height: 5px;
  background: var(--green-light);
  border-radius: 50%;
}
.section-title .title-line:first-child::before {
  right: auto; left: 0;
}

.section-desc {
  text-align: center;
  color: var(--text-mid);
  font-size: 14px;
  max-width: 700px;
  margin: -24px auto 40px;
  line-height: 1.8;
}

/* ============================================================
   工厂概况 - 统计数据
   ============================================================ */
.factory-overview {
  background: var(--white);
}
.overview-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}
.stat-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 96px;
  padding: 20px 14px;
  background: var(--white);
  border: 1px solid rgba(26, 74, 46, 0.08);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(26, 74, 46, 0.06);
}
.stat-icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
}
.stat-info {
  display: flex;
  flex-direction: column;
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}
.stat-value sup {
  font-size: 14px;
  font-weight: 500;
  vertical-align: super;
}
.stat-unit {
  font-size: 18px;
  font-weight: 500;
}
.stat-label {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ============================================================
   工厂环境 - 图片画廊
   ============================================================ */
.factory-env {
  background: var(--bg-light);
}
.env-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
  justify-content: center;
}
.env-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  background: var(--white);
}
.env-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.env-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.env-item p {
  text-align: center;
  padding: 12px 8px;
  font-size: 13px;
  color: var(--text-mid);
  font-weight: 500;
}

/* ============================================================
   生产设备
   ============================================================ */
.production-equip {
  background: var(--white);
}
.equip-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.equip-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  background: var(--white);
  border: 1px solid var(--border);
}
.equip-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.equip-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.equip-info {
  padding: 14px 12px;
}
.equip-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.equip-info p {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
}

/* ============================================================
   质量控制 - 流程
   ============================================================ */
.quality-control {
  background: var(--bg-light);
}
.quality-flow {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.quality-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 0 0 160px;
  padding: 24px 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.quality-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.quality-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.quality-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.quality-step h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.quality-step p {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
}
.quality-arrow {
  font-size: 28px;
  color: var(--green-light);
  line-height: 1;
  padding: 0 8px;
  align-self: center;
  flex-shrink: 0;
  margin-top: -8px;
}

/* ============================================================
   认证体系
   ============================================================ */
.cert-section {
  background: var(--white);
}
.cert-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.cert-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  min-width: 180px;
}
.cert-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.cert-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}
.cert-info h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.cert-info p {
  font-size: 12px;
  color: var(--text-light);
}

/* ============================================================
   CTA 欢迎参观
   ============================================================ */
.cta-section {
  position: relative;
  overflow: hidden;
  padding: 80px 0;
  background: linear-gradient(135deg, #e8f5ed 0%, #d0ead8 100%);
}
.cta-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.cta-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}
.cta-content {
  position: relative;
  z-index: 1;
}
.cta-content h2 {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}
.cta-content p {
  font-size: 15px;
  color: var(--text-mid);
  margin-bottom: 32px;
}
.btn-primary {
  display: inline-block;
  padding: 14px 36px;
  background: var(--green-main);
  color: var(--white);
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: background var(--transition), transform var(--transition);
}
.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
}

/* ============================================================
   图片占位符样式（当图片未加载时显示）
   ============================================================ */
img[src=""],
img:not([src]),
img[src$=".jpg"]:not([complete]),
img[src$=".png"]:not([complete]) {
  background: #e8f0eb;
}

/* 通用图片占位 */
.img-placeholder {
  background: linear-gradient(135deg, #e8f0eb 0%, #d4e8da 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-mid);
  font-size: 12px;
}

/* ============================================================
   滚动动画
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible,
.reveal-ready.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-ready {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ============================================================
   响应式 - 平板
   ============================================================ */
@media (max-width: 1024px) {
  .equip-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  /* 统计 */
  .overview-stats { gap: 24px; justify-content: flex-start; }
  .stat-value { font-size: 22px; }

  /* 环境图片 */
  .overview-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .env-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

  /* 设备 */
  .equip-grid { grid-template-columns: repeat(2, 1fr); }

  /* 质量流程 */
  .quality-flow { gap: 8px; }
  .quality-step { flex: 0 0 130px; }
  .quality-arrow { font-size: 20px; }

  /* 认证 */
  .cert-grid { gap: 16px; }
  .cert-item { min-width: 140px; padding: 14px 16px; }

  /* CTA */
  .cta-content h2 { font-size: 22px; }
}

@media (max-width: 480px) {
  .overview-stats { grid-template-columns: 1fr; }
  .stat-item { justify-content: flex-start; }
  .env-gallery { grid-template-columns: 1fr; }
  .equip-grid { grid-template-columns: 1fr; }
  .quality-flow { flex-direction: column; align-items: center; }
  .quality-arrow { transform: rotate(90deg); }
  .cert-grid { flex-direction: column; align-items: stretch; }
  .cert-item { min-width: auto; }
}

