/* ============================================================
   安徽蕈苑生物科技 · 企业官网样式表
   组织顺序：
   1. 设计变量（主题色 / 间距 / 字体）
   2. 基础重置与排版
   3. 通用组件（容器 / 按钮 / 栏目头）
   4. 顶部导航
   5. 首页 Hero
   6. 各栏目样式
   7. 页脚 / 返回顶部
   8. 响应式断点（移动端）
   ============================================================ */

/* ---------- 1. 设计变量 ---------- */
:root {
  /* 品牌主色：森林绿，呼应“绿色菌业 / 数智”主题 */
  --brand: #1f6b3a;
  --brand-dark: #16512c;
  --brand-light: #2e8b50;
  --brand-soft: #eaf4ee;

  /* 强调色：匠心金，用于奖项 / 徽标 */
  --accent: #c9a227;
  --accent-soft: #f7efd6;
  /* 深金：小字号文字需满足 WCAG AA 4.5:1（实测值见注释） */
  --accent-deep: #8a6d12;  /* 白字对比 4.91:1 */
  --accent-ink: #7a5f0e;   /* 浅底文字对比 5.26:1 */

  /* 中性色 */
  --ink: #1c2520;       /* 主文字 */
  --ink-soft: #5a6660;  /* 次要文字 */
  --line: #e3e8e4;      /* 分隔线 */
  --bg: #ffffff;
  --bg-alt: #f6faf7;    /* 浅绿灰交替底色 */

  /* 间距与圆角 */
  --radius: 14px;
  --radius-sm: 10px;
  --gap: 24px;
  --container: 1180px;
  /* 吸顶导航总高（含 1px 下边框）：菜单定位、锚点偏移、Hero 留白统一依赖此值 */
  --header-h: 85px;

  /* 阴影 */
  --shadow: 0 10px 30px rgba(22, 60, 36, .08);
  --shadow-strong: 0 18px 48px rgba(22, 60, 36, .16);

  /* 字体 */
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑",
          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- 2. 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); } /* 锚点定位避开吸顶导航 */
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; } /* height:auto + width/height 属性 → 按比例预留空间 */
a { color: inherit; text-decoration: none; }
/* 键盘焦点统一可见（输入框自带 focus 光环，故仅作用于链接与按钮） */
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* 跳转到主内容：平时移出视口，获得键盘焦点时显现 */
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 2000;
  padding: 10px 18px; border-radius: var(--radius-sm);
  background: var(--brand-dark); color: #fff;
  font-size: 14px; font-weight: 600;
  transform: translateY(-200%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 3. 通用组件 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* 区块统一样式 */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.section-tag {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(26px, 4vw, 38px);
  color: var(--ink);
  position: relative;
  padding-bottom: 16px;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 56px; height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}
.section-lead { color: var(--ink-soft); margin-top: 14px; font-size: 16px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 15px; font-weight: 600;
  cursor: pointer; border: 2px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-2px); }
/* 半透明深绿底替代半透明白底：白字在实景图上对比度更稳定 */
.btn-ghost { background: rgba(22,81,44,.72); color: #fff; border-color: rgba(255,255,255,.8); }
.btn-ghost:hover { background: rgba(22,81,44,.9); transform: translateY(-2px); }

/* ---------- 4. 顶部导航 ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease, background .25s ease;
}
.site-header.scrolled { box-shadow: var(--shadow); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: calc(var(--header-h) - 1px); }

.brand { display: flex; align-items: center; gap: 10px; color: var(--brand); }
/* 页眉真实 Logo（logo.webp，白底，因页眉近白背景自然融合） */
.brand-logo {
  height: 72px; width: auto; display: block;
  /* 浅色页眉上白底自然融合；如后续换深色页眉再考虑去底版本 */
}

.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-menu a {
  padding: 8px 14px; border-radius: 8px;
  font-size: 15px; color: var(--ink-soft); font-weight: 500;
  transition: color .2s ease, background .2s ease;
}
.nav-menu a:hover,
.nav-menu a.active { color: var(--brand); background: var(--brand-soft); }

/* 汉堡按钮（移动端显示） */
.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 46px; height: 46px; padding: 0;
  background: none; border: none; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; border-radius: 2px;
  background: var(--ink); transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. 首页 Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center;
  color: #fff;
  /* 园区规划鸟瞰效果图作背景，叠加森林绿渐变保证文字可读 */
  background:
    linear-gradient(135deg, rgba(22,81,44,.80), rgba(31,107,58,.68) 55%, rgba(46,139,80,.60)),
    url('../img/about/about-factory-aerial.webp') center/cover no-repeat;
  overflow: hidden;
  padding-top: var(--header-h); /* 让出吸顶导航 */
}
.hero-inner { position: relative; z-index: 2; text-align: center; padding: 40px 0; }
.hero-eyebrow {
  letter-spacing: 2px; font-size: 13px; text-transform: uppercase;
  color: rgba(255,255,255,.85); margin-bottom: 14px;
}
.hero-title {
  font-size: clamp(38px, 7vw, 72px);
  font-weight: 800; letter-spacing: 4px;
  text-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.hero-sub { font-size: clamp(18px, 3vw, 26px); margin: 10px 0 22px; font-weight: 600; letter-spacing: 2px; }
.hero-desc { font-size: clamp(15px, 2.2vw, 19px); color: rgba(255,255,255,.92); margin-bottom: 30px; }
/* 「了解我们 / 查看产品」两个 CTA 暂隐藏（保留结构，删除下面 display:none 即可恢复） */
.hero-actions { display: none; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* 首页数据条 */
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin: 46px auto 0; max-width: 820px;
  padding-top: 30px; border-top: 1px solid rgba(255,255,255,.25);
}
.hero-stats li { text-align: center; }
.hero-stats b {
  display: block; font-size: clamp(24px, 4vw, 36px); font-weight: 800;
  color: #fff; line-height: 1.1;
}
.hero-stats span { font-size: 13px; color: rgba(255,255,255,.8); }

/* ---------- 6. 各栏目样式 ---------- */

/* 关于蕈苑：单栏正文，限制行长保证易读性，并居中对齐标题与下方大图的中轴 */
.about-grid { display: grid; grid-template-columns: 1fr; }
.about-text { max-width: 900px; margin-inline: auto; width: 100%; }
.about-text p { color: var(--ink-soft); font-size: 16px; }
.about-text strong { color: var(--brand); }

/* 资质荣誉：一段概览 + 分组证书墙（原 10 张文字卡与正文重复，已合并） */
.honor-intro {
  max-width: 860px; margin: 0 auto; text-align: center;
  color: var(--ink-soft); font-size: 16px; line-height: 1.9;
}
/* 荣誉证书现已统一为卡片网格，分组标题（honor-group-title）已弃用 */

/* 菌种研发：原 4 张文字要点卡与实拍照片重复，已并入图注，仅保留引导文字 */
.strain-intro { max-width: 860px; margin: 0 auto 32px; text-align: center; color: var(--ink-soft); font-size: 16px; }

/* 良种产品 */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.product-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-strong); }
.product-media {
  position: relative; height: 200px; overflow: hidden;
  background: var(--brand-soft); /* 图片加载前的占位底色 */
  display: block;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.product-card:hover .product-media img { transform: scale(1.06); }
.product-tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--accent-deep); color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
}
.product-body { padding: 18px 20px 22px; }
.product-body h3 { font-size: 18px; margin-bottom: 8px; }
.product-body p { margin: 0 0 14px; color: var(--ink-soft); font-size: 14px; }
.product-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.product-meta span {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-weight: 600;
}
.products-foot { margin-top: 36px; text-align: center; color: var(--ink-soft); max-width: 820px; margin-left: auto; margin-right: auto; }
/* 蕈苑良种为 5 个品种：改 flex 居中让末行 2 张居中，避免 3 列网格右下留空格；
   仅作用于 #breed，下方「蕈苑产品」区仍保持原来的 3 列网格 */
#breed .product-grid {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch;
}
#breed .product-card { flex: 0 0 calc((100% - 2 * var(--gap)) / 3); }
/* 蕈苑产品：4 张卡改 2×2 铺满，避免 3 列网格下第 4 张独占末行、右侧空两格；
   宽卡配 16:9 图片，比通用 200px 固定高更贴合品牌图 / 车间图的原始比例 */
#products .product-grid { grid-template-columns: repeat(2, 1fr); }
#products .product-media { height: auto; aspect-ratio: 16 / 9; }

/* 蕈苑数智：原「4 条文字卡 + 单张总览大图」左右分栏与相邻栏目内容重复，
   改为一段引导文字 + 6 张真实监控大屏合并为一组（3 列 × 2 行）、统一 16:9 完整显示 */
.digital-intro {
  max-width: 900px; margin: 0 auto 8px; text-align: center;
  color: var(--ink-soft); font-size: 16px; line-height: 1.9;
}
/* 整块是单个 .gallery 与单个 .digital-row，灯箱可连续翻看 6 张；
   标题只有一个，不再按功能分组，故无需组间额外上边距 */
.digital-gallery { display: block; margin-top: 32px; }
.digital-group-title {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 19px; color: var(--brand-dark);
  margin: 0; padding-left: 12px;
  border-left: 4px solid var(--brand);
}
.digital-group-title span { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
/* 6 张按 3 + 3 铺满两行，消除原 5 张 3 列网格末行右侧空格；同行卡片等高 */
.digital-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; }
.digital-row figure { flex: 0 0 calc((100% - 2 * 16px) / 3); }

/* ---------- 通用图集（荣誉墙 / 菌种 / 数智 等） ---------- */
.gallery { display: grid; gap: 16px; margin-top: 40px; }
.honor-gallery { display: block; margin-top: 32px; }
.strain-gallery { grid-template-columns: repeat(5, 1fr); }
.gallery figure { margin: 0; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.gallery figure a { display: block; }
.gallery img {
  width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
  transition: transform .4s ease;
}
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption {
  font-size: 13px; color: var(--ink-soft); text-align: center;
  padding: 8px 6px; background: #fff;
}
/* 菌种图集：flex 居中（5 张按 3+2 排布），统一 3:2 展示框铺满，
   原图 1.41 / 1.78 仅边缘轻微裁切，避免 contain 留白造成「照片忽大忽小」；
   两行图注承载原文字卡的分级说明，须写在通用 .gallery 规则之后才能覆盖 */
.strain-gallery {
  /* 默认 align-items: stretch：同一行卡片等高，避免两行图注换行数不同造成底边参差 */
  display: flex; flex-wrap: wrap; justify-content: center;
  margin-top: 8px;
}
.strain-gallery figure { flex: 0 0 calc((100% - 2 * 16px) / 3); }
.strain-gallery img { aspect-ratio: 3 / 2; }
.strain-gallery figcaption { padding: 12px 10px 14px; line-height: 1.5; }
.strain-gallery figcaption strong { display: block; font-size: 14px; color: var(--brand-dark); }
.strain-gallery figcaption span { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-soft); }

/* 数智监控大屏（须写在通用 .gallery 规则之后才能覆盖）：
   6 张原图均为 16:9 深色界面截图，通用 4/3 + cover 会切掉左右两侧的设备列表与参数，
   故统一 16:9 + contain 完整显示；深色底与截图边缘融合，不产生白色留白 */
.digital-gallery img { aspect-ratio: 16 / 9; object-fit: contain; background: #091521; }
.digital-gallery figcaption { padding: 12px 10px 14px; line-height: 1.5; }
.digital-gallery figcaption strong { display: block; font-size: 14px; color: var(--brand-dark); }
.digital-gallery figcaption span { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-soft); }
/* 大屏截图放大只会裁掉数据，改用卡片阴影提示可点击查看高清原图 */
.digital-gallery figure:hover { box-shadow: var(--shadow-strong); }
.digital-gallery figure:hover img { transform: none; }

/* 荣誉证书：统一白底卡片网格（19 张等比缩放、图注居中），不再分组、不再裸图贴底 */
.honor-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 22px;
  margin-top: 28px;
}
.honor-gallery figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow .3s ease, transform .3s ease;
}
.honor-gallery figure:hover { box-shadow: var(--shadow-strong); transform: translateY(-3px); }
/* 图片区统一 3/4 浅底框，证书按真实比例 contain 居中，不同方向证书留白一致 */
.honor-gallery figure a {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 4;
  background: #f3f6f4;
  padding: 14px;
}
.honor-gallery img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  display: block;
  transition: transform .4s ease;
}
.honor-gallery figure:hover img { transform: scale(1.04); }
.honor-gallery figcaption {
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
  padding: 11px 10px 15px;
  line-height: 1.45;
  border-top: 1px solid #eef1ef;
}

/* 生产工艺流程图：图内自带 ①—⑨ 编号与步骤名称，下方的重复图例卡片已删除，
   因此不再需要额外的下边距 */
/* 工艺流程图：去掉白底圆角阴影白框，图片直接贴合背景 */
.process-figure { margin: 0; }
.process-figure img { width: 100%; display: block; }
/* 工艺流程图本身为透明/浅底（见 china 工具重生成），去掉区块绿底，避免与图冲突 */
#process { background: var(--bg); }

/* 销售网络配图 */
/* 销售网络配图：去掉白底圆角阴影白框，地图直接贴合背景 */
.network-figure { margin: 0; }
.network-figure img { width: 100%; display: block; }
.network-figure figcaption { font-size: 13px; color: var(--ink-soft); padding: 12px 14px; text-align: center; }

/* ---------- 销售网络动态图层 ----------
   底图（network-base.webp）只画省界与领土要素；辐射线、城市点由 SVG 叠加，
   两者共用 1600×1306 画布坐标，因此缩放时始终对齐。默认状态即「完整静态网络」，
   .is-active 只负责进入视口时重播一次入场动画。 */
.network-map-stage { position: relative; }
.network-map-stage img { width: 100%; height: auto; display: block; }
.network-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.net-line {
  fill: none; stroke-width: 3.6; stroke-linecap: round; opacity: .95;
  stroke-dasharray: var(--len, 3000); stroke-dashoffset: 0;
}
/* 浅色底图上红/蓝各调深一档，与 china/build_network_animation.py 的 PALETTE 一致 */
.net-line--product, .net-flow--product { stroke: #cf2f2f; }
.net-line--rail, .net-flow--rail { stroke: #1f66b8; }

/* 沿线缓慢流动的光带：完成态仍保有轻微动态，但不喧宾夺主 */
.net-flow {
  fill: none; stroke-width: 4.5; stroke-linecap: round;
  stroke-dasharray: 26 260; opacity: 0;
  animation: net-flow 4.5s linear infinite;
  animation-delay: calc(var(--i) * -.31s);
}
.is-active .net-flow { opacity: .6; }
@keyframes net-flow { to { stroke-dashoffset: -286; } }

.net-dot { stroke: #fff; stroke-width: 2; }
.net-dot--product { fill: #cf2f2f; }
.net-dot--rail { fill: #1f66b8; }
.net-label {
  font-family: var(--font); font-size: 27px; fill: #23382c;
  /* 白描边在浅底上「挖空」，城市名压在辐射线上时仍清晰 */
  paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round;
}

.net-ring {
  fill: none; stroke: #cf2f2f; stroke-width: 3;
  transform-box: fill-box; transform-origin: center;
  animation: net-pulse 2.8s ease-out infinite;
  animation-delay: calc(var(--k) * .9s);
}
@keyframes net-pulse {
  0% { opacity: .7; transform: scale(1); }
  100% { opacity: 0; transform: scale(5); }
}
.net-core { fill: #cf2f2f; stroke: #fff; stroke-width: 3; }

/* 进入视口：线条依次从中心飞出，端点随后亮起 */
.is-active .net-line {
  animation: net-draw 1.1s ease-out both;
  animation-delay: calc(var(--i) * .07s);
}
@keyframes net-draw {
  from { stroke-dashoffset: var(--len, 3000); opacity: 0; }
  to { stroke-dashoffset: 0; opacity: .95; }
}
.is-active .net-dot {
  animation: net-fade .5s ease-out both;
  animation-delay: calc(var(--i) * .07s + .65s);
}
.is-active .net-label {
  animation: net-fade .6s ease-out both;
  animation-delay: calc(var(--i) * .07s + .7s);
}
@keyframes net-fade { from { opacity: 0; } to { opacity: 1; } }

/* 暂停按钮冻结当前帧；减少动态偏好时直接呈现完整静态网络 */
.net-paused .network-svg * { animation-play-state: paused !important; }
.net-static .network-svg * { animation: none !important; }
.net-static .net-flow { opacity: 0; }

/* 图例与暂停控件：克制的小色条 + 纯文字按钮，不用卡片 */
/* 默认隐藏：由 network-map.js 在动态图层就绪后加 .net-ready 才显示，
   避免无 JS / 数据加载失败时留下重复图例与无效按钮 */
/* 图例与暂停按钮整体水平居中 */
.network-toolbar {
  display: none; flex-wrap: wrap; align-items: center;
  justify-content: center; gap: 24px; margin-top: 14px;
}
.net-ready .network-toolbar { display: flex; }
.network-legend {
  display: flex; flex-wrap: wrap; gap: 18px;
  list-style: none; margin: 0; padding: 0;
}
.network-legend li { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-soft); }
.net-key { display: inline-block; width: 16px; height: 2px; border-radius: 2px; }
.net-key--product { background: #cf2f2f; }
.net-key--rail { background: #1f66b8; }
.net-key--center {
  width: 9px; height: 9px; border-radius: 50%;
  background: #cf2f2f; box-shadow: 0 0 0 1px rgba(0,0,0,.18);
}
.network-toggle {
  border: 0; background: none; padding: 4px 0; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--ink-soft);
  text-decoration: underline; text-underline-offset: 3px;
}
.network-toggle:hover { color: var(--brand); }
.network-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* 页脚 Logo（深色页脚上置于白色圆角卡片） */
.footer-logo { height: 60px; width: auto; display: inline-block; vertical-align: middle; margin-bottom: 10px; background: #fff; border-radius: 10px; padding: 6px; }

/* 销售网络：地图全宽做主视觉。原左右分栏把地图压到约 605px、城市名仅约 10px，
   反而不如平板单列清楚；业务要点改为地图下方三列，沿用联系区的细线朴素排版 */
.network-intro {
  max-width: 900px; margin: 0 auto 8px; text-align: center;
  color: var(--ink-soft); font-size: 16px; line-height: 1.9;
}
.network-map-col { margin-top: 24px; }
.network-points {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  list-style: none; margin: 40px 0 0; padding: 0;
}
.network-points li { border-top: 1px solid var(--line); padding-top: 18px; }
.network-points h3 { font-size: 15px; color: var(--brand); margin: 0 0 8px; }
.network-points p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.8; }

/* 联系我们：不用彩色 emoji 与圆角白卡（模板感重），改为细线分隔的朴素分栏，
   仅靠「品牌绿小标签 + 深色大字值」建立层级 */
.contact-info {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 30px 0; max-width: 940px; margin: 0 auto;
}
/* 列间距用左内边距实现，让相邻两格的底边细线接成一条贯通行线 */
.contact-row { padding: 0 0 22px; border-bottom: 1px solid var(--line); }
.contact-row:nth-child(even) { padding-left: 56px; }
.contact-row h3 {
  font-size: 13px; font-weight: 600; color: var(--brand);
  letter-spacing: .04em; margin: 0 0 8px;
}
.contact-row p { margin: 0; font-size: 17px; line-height: 1.6; overflow-wrap: anywhere; }
.contact-row a { color: var(--ink); }
.contact-row a:hover { color: var(--brand); }

/* ---------- 7. 页脚 / 返回顶部 ---------- */
.site-footer { background: var(--brand-dark); color: rgba(255,255,255,.85); padding: 54px 0 0; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 36px; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.footer-brand p { font-size: 14px; margin-top: 12px; }
.footer-col a { display: block; color: rgba(255,255,255,.8); font-size: 14px; padding: 4px 0; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 14px; margin: 0 0 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 40px; padding: 18px 0; text-align: center; }
.footer-bottom p { margin: 0; font-size: 13px; color: rgba(255,255,255,.7); }
/* ICP 备案号：比版权行略小，链接到工信部备案系统；用更高特异性覆盖 .footer-bottom p，无需 !important */
.footer-bottom .footer-beian { font-size: 12px; margin-top: 6px; }
.footer-bottom .footer-beian a { color: rgba(255,255,255,.7); text-decoration: none; }
.footer-bottom .footer-beian a:hover { color: #fff; text-decoration: underline; }

.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 900;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-strong); opacity: 0; pointer-events: none;
  transform: translateY(10px); transition: opacity .3s ease, transform .3s ease, background .2s ease;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { background: var(--brand-dark); }

/* 滚动揭示动画（由 JS 添加 .in-view 触发） */
/* 仅当 JS 启用（<html class="js">）时才隐藏 .reveal，
   防止脚本失效时整块内容停留在透明状态不可见 */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in-view { opacity: 1; transform: none; }

/* ---------- 图集灯箱（由 main.js 动态创建，无 JS 时 <a target="_blank"> 仍可查看原图） ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 3000;
  display: none; align-items: center; justify-content: center;
  background: rgba(10, 24, 15, .94); padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox-img {
  max-width: min(92vw, 1400px); max-height: 82vh;
  width: auto; height: auto; object-fit: contain;
  border-radius: 6px; background: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox-btn {
  position: absolute; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 12px;
  border: none; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.16); color: #fff;
  font-size: 22px; font-weight: 700; line-height: 1;
  transition: background .2s ease;
}
.lightbox-btn:hover { background: rgba(255,255,255,.32); }
.lightbox-close { top: 18px; right: 18px; font-size: 26px; }
.lightbox-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-counter {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.92); font-size: 14px;
  background: rgba(0,0,0,.4); padding: 6px 14px; border-radius: 999px;
}
body.lightbox-open { overflow: hidden; }

/* ---------- 减少动态效果（尊重系统无障碍设置） ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  /* 销售网络：直接呈现完整静态辐射图，不播飞线 / 脉冲 / 流动光带 */
  .network-svg * { animation: none !important; }
  .net-flow { opacity: 0; }
}

/* ---------- 8. 响应式断点 ---------- */

/* 平板：<= 1024px */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  #breed .product-card { flex-basis: calc((100% - var(--gap)) / 2); }
  /* 荣誉墙改为统一网格，窄屏由 grid auto-fill 自适应列数，无需本断点单独覆盖 */
  /* 数智大屏仍保持每组 3 张整行，避免 2 列时每组末尾出现单张空格 */
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

/* 移动端：<= 768px */
@media (max-width: 768px) {
  .section { padding: 56px 0; }

  /* 导航折叠为抽屉式：top 与页眉高度共用 --header-h，避免改页眉时再次失配 */
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    /* 关闭态 visibility:hidden：链接不再被键盘 Tab 聚焦 */
    max-height: 0; overflow-x: hidden; overflow-y: auto; visibility: hidden;
    transition: max-height .3s ease, visibility .3s ease;
    box-shadow: var(--shadow);
  }
  .nav-menu.open {
    /* 视口减去页眉；可纵向滚动，保证小屏下末项「联系我们」可达 */
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    visibility: visible;
  }
  .nav-menu a { padding: 14px 22px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav-menu a:hover, .nav-menu a.active { background: var(--brand-soft); }

  .hero { min-height: 86vh; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 18px; }

  .product-grid { grid-template-columns: 1fr; }
  /* ID 选择器优先级高于断点里的 .product-grid，需同特异性覆盖回单列 */
  #products .product-grid { grid-template-columns: 1fr; }
  #breed .product-card { flex-basis: 100%; }
  /* 荣誉墙窄屏由 grid auto-fill 自适应，无需本断点单独覆盖 */
  .strain-gallery { gap: 12px; }
  .strain-gallery figure { flex-basis: calc((100% - 12px) / 2); }
  /* 监控界面信息密集，窄屏改为单列全宽才看得清；6 张纵向排列不留空格 */
  .digital-row { gap: 12px; }
  .digital-row figure { flex-basis: 100%; }
  .digital-group-title { font-size: 17px; }
  /* 联系信息在窄屏改单列，长地址与邮箱不会在窄栏里反复折行；
     同时清掉桌面偶数列的左内边距，四条信息左对齐 */
  .contact-info { grid-template-columns: 1fr; gap: 0; }
  .contact-row, .contact-row:nth-child(even) {
    padding-left: 0; padding-bottom: 18px; margin-bottom: 18px;
  }
  /* SVG 随 viewBox 一起缩小，窄屏放大字号才能让城市名保持约 10px 可读；
     同时只保留重点市场名称，避免 20 多个标签在 350px 宽度里挤成一团 */
  .net-label { font-size: 46px; stroke-width: 6px; }
  .net-label--minor { display: none; }
  .network-toolbar { gap: 12px; }
  .network-legend { gap: 12px; }
  /* 窄屏要点改单列细线分隔，避免三列挤压 */
  .network-points { grid-template-columns: 1fr; gap: 0; margin-top: 28px; }
  .network-points li { padding: 16px 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

/* 超小屏：<= 420px */
@media (max-width: 420px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .btn { padding: 12px 22px; }
  /* 荣誉证书墙：窄屏两列，缩小卡片内边距与图注，避免 19 张单列过长滚动 */
  .honor-gallery { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .honor-gallery figure a { padding: 10px; }
  .honor-gallery figcaption { font-size: 12px; padding: 9px 6px 12px; }
}

/* 灯箱在窄屏上的按钮位置微调 */
@media (max-width: 768px) {
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
  .lightbox-counter { bottom: 10px; font-size: 13px; }
}
