/* ==========================================================
   index.css — 首页样式
   模块：Hero轮播 / 数据条 / 核心产品矩阵 / 行业场景
        / 服务四宫格 / 核心卖点 / 选型横幅 / 合作案例 / 新闻动态
   ========================================================== */

/* ---------- 1. Hero 轮播（图片无文字，标语CSS叠加；首尾无缝衔接） ---------- */
.hero {
  position: relative; overflow: hidden;
  height: min(56.25vw, 720px);   /* 按 1920x1080 banner 比例 */
  min-height: 420px;
  background: var(--brand);
}
.hero-track {
  display: flex; height: 100%;
  animation: heroSlide 18s ease-in-out infinite;
}
.hero:hover .hero-track { animation-play-state: paused; }   /* 悬停暂停 */
@media (prefers-reduced-motion: reduce) {
  .hero-track { animation: none; }
}
.hero-slide { position: relative; flex: 0 0 100%; height: 100%; }
/* 轻暗遮罩：提升白字可读性，不压暗图片主体 */
.hero-slide::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(8,18,32,.22) 0%, rgba(8,18,32,.06) 45%, rgba(8,18,32,.34) 100%);
  pointer-events: none;
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background-size: cover; background-position: center;
}
/* 轮播底图（屏4 为复制屏1，复用同一张图实现无缝） */
.hero-slide:nth-child(1) .hero-bg,
.hero-slide:nth-child(4) .hero-bg { background-image: url("../img/hero-slide-1.webp"); }
.hero-slide:nth-child(2) .hero-bg { background-image: url("../img/hero-slide-2.webp"); }
.hero-slide:nth-child(3) .hero-bg { background-image: url("../img/hero-slide-3.webp"); }
/* 标语（CSS 文字，不生成在图片上） */
.hero-text {
  position: absolute; left: 0; right: 0; top: 50%;
  transform: translateY(-50%); z-index: 2;
  text-align: center; color: var(--white); padding: 0 16px;
}
.hero-title {
  font-size: 36px; font-weight: 700; line-height: 1.3; margin-bottom: 14px;
  text-shadow: 0 2px 14px rgba(8,18,32,.45);
}
.hero-sub {
  font-size: 16px; line-height: 1.6; color: rgba(255,255,255,.94);
  text-shadow: 0 1px 8px rgba(8,18,32,.45);
}
/* 无缝轮播：4屏=屏1屏2屏3+复制屏1，位移0→-300%循环 */
@keyframes heroSlide {
  0%, 28%   { transform: translateX(0); }
  33%, 61%  { transform: translateX(-100%); }
  66%, 94%  { transform: translateX(-200%); }
  100%      { transform: translateX(-300%); }
}
/* 指示点（可点击，当前点高亮为胶囊） */
.hero-dots {
  position: absolute; left: 0; right: 0; bottom: 26px; z-index: 3;
  display: flex; gap: 10px; justify-content: center;
}
.hero-dot {
  width: 12px; height: 12px; padding: 0; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.95);
  background: transparent; cursor: pointer;
  transition: background-color .25s ease, width .25s ease, border-radius .25s ease;
}
.hero-dot:hover { background: rgba(255,255,255,.5); }
.hero-dot.active { background: var(--white); width: 28px; border-radius: 7px; }
/* 左右切换箭头 */
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 46px; height: 46px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(255,255,255,.22); color: #fff;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
  transition: background-color .2s ease;
}
.hero-arrow:hover { background: var(--brand); }
.hero-prev { left: 24px; }
.hero-next { right: 24px; }
.hero-arrow svg { width: 22px; height: 22px; }
@media (max-width: 767px) {
  .hero { min-height: 400px; height: 100vw; }
  .hero-title { font-size: 24px; margin-bottom: 10px; }
  .hero-sub { font-size: 16px; margin-bottom: 22px; }
  .hero-arrow { display: none; }   /* 手机端隐藏箭头，避免遮挡文案；保留自动轮播与圆点 */
  .hero-arrow svg { width: 18px; height: 18px; }
}

/* ---------- 2. 关于我们（左4数据 + 右大图，参照"关于迦南"） ---------- */
.stats { padding: 80px 0; }
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;   /* 左：数据  右：大图 */
  gap: 56px;
  align-items: center;
}
.about-left { display: flex; flex-direction: column; }
.about-head { text-align: left; margin-bottom: 48px; }
.about-head .h2 { margin-bottom: 10px; }
.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);  /* 4 个数字 2×2，共享边框连成一个整体面板 */
  border: 1px solid #C5E1FB;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.stat {
  text-align: center;
  background: #fff;
  border-right: 1px solid #C5E1FB;
  border-bottom: 1px solid #C5E1FB;
  padding: 26px 24px;
  transition: background-color .2s ease;
}
/* 右列去右边框、底行去下边框：外框由父容器提供，内部仅保留十字分隔线 */
.stat:nth-child(2n) { border-right: none; }
.stat:nth-child(n+3) { border-bottom: none; }
.stat:hover { background: var(--brand-light); }
.stat-num { font-size: 34px; font-weight: 700; color: var(--brand); line-height: 1.2; transition: color .2s ease; }
.stat:hover .stat-num { color: var(--brand-mid); }
.stat-label { font-size: 14px; color: #6B7280; margin-top: 6px; }
.about-right { }
.about-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  background-image: url("../img/about-company.webp");
  background-size: cover; background-position: center;
  transition: transform .25s, box-shadow .25s;
}
.about-img:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(30,134,232,.18); }
@media (max-width: 1023px) {
  .about-split { grid-template-columns: 1fr; gap: 32px; }
  .stat-num { font-size: 30px; }
}
@media (max-width: 767px) {
  .stats { padding: 44px 0; }
  .about-head { margin-bottom: 24px; }
  .about-stats { gap: 0; }
  .stat-num { font-size: 26px; }
}

/* ---------- 3. 核心产品矩阵（图片为底图 + 文字叠加 + 悬浮放大，对标 Hoshizaki） ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.prod-card {
  position: relative; display: block;
  aspect-ratio: 4 / 5;                 /* 竖图卡片，产品大片感 */
  border-radius: 14px; overflow: hidden;
  background: var(--brand-light);
  box-shadow: 0 4px 14px rgba(30,134,232,.10);
  transition: box-shadow .35s ease;
}
.prod-card:hover { box-shadow: 0 16px 34px rgba(30,134,232,.26); }
/* 底图：占满卡片，悬浮放大 */
.prod-media {
  position: absolute; inset: 0; z-index: 1;
  border: none; border-radius: 0;
  background-size: cover; background-position: center;
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
}
/* 4 个系列底图映射 */
.prod-card:nth-child(1) .prod-media { background-image: url("../img/prod-cube.webp"); }
.prod-card:nth-child(2) .prod-media { background-image: url("../img/prod-crushed.webp"); }
.prod-card:nth-child(3) .prod-media { background-image: url("../img/prod-snow.webp"); }
.prod-card:nth-child(4) .prod-media { background-image: url("../img/prod-dispenser.webp"); }
.prod-card:hover .prod-media { transform: scale(1.08); }
/* 文字叠加层（底部渐变遮罩 + 白字；内容贴底排列） */
.prod-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end;   /* 内容更靠下 */
  padding: 48px 18px 14px;
  background: linear-gradient(to top, rgba(8,18,32,.86) 0%, rgba(8,18,32,.5) 42%, rgba(8,18,32,0) 100%);
  color: #fff;
}
/* 名称与「查看详情」同一行：两端对齐 */
.prod-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.prod-overlay .h4 { color: #fff; margin-bottom: 0; }
.prod-overlay .text-sub {
  margin-top: 6px;
  color: rgba(255,255,255,.86);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;   /* 单行显示 */
}
/* 悬浮才出现的「查看详情」（与名称同行，靠右） */
.prod-cta {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: #fff;
  opacity: 0; transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease;
}
.prod-card:hover .prod-cta { opacity: 1; transform: translateY(0); }
@media (max-width: 1023px) { .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 480px) { .prod-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .prod-overlay { padding: 36px 14px 12px; } .prod-cta { font-size: 12px; } }

/* ---------- 4. 行业场景（对标 Hoshizaki「我要开店」：上图标文字 + 下实景图） ---------- */
.sol-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.sol-card {
  display: flex; flex-direction: column;
  position: relative;
  background: var(--white);
  border-radius: 12px; overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.sol-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(30,134,232,.14);
}
/* 上半部：图标 + 标题 + 副标题 */
.sol-info {
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 20px 22px; text-align: center;
  border-bottom: 1px solid var(--border);
}
.sol-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--brand);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  transition: transform .3s ease, background-color .3s ease;
}
.sol-icon svg { width: 28px; height: 28px; }
.sol-card:hover .sol-icon { transform: scale(1.08); background: var(--brand-light); }
.sol-info .h4 { font-size: 16px; margin-bottom: 4px; }
.sol-info .text-sub { font-size: 14px; color: var(--text-muted); }
/* 下半部：实景图 */
.sol-img {
  aspect-ratio: 4 / 5;
  background-size: cover; background-position: center;
  transition: transform .5s ease;
}
.sol-card:hover .sol-img { transform: scale(1.04); }
/* 4 个场景底图映射 */
.sol-card:nth-child(1) .sol-img { background-image: url("../img/sol-tea.webp"); }
.sol-card:nth-child(2) .sol-img { background-image: url("../img/sol-restaurant.webp"); }
.sol-card:nth-child(3) .sol-img { background-image: url("../img/sol-supermarket.webp"); }
.sol-card:nth-child(4) .sol-img { background-image: url("../img/sol-seafood.webp"); }
/* 底部 CTA 按钮（悬浮时在图片底部浮现，叠于图上） */
.sol-cta {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  text-align: center;
  padding: 12px 20px;
  font-size: 14px; font-weight: 600; color: #fff;
  background: var(--brand);
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
}
.sol-card:hover .sol-cta { opacity: 1; transform: translateY(0); }

@media (max-width: 1023px) { .sol-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 480px) { .sol-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .sol-info { padding: 20px 14px 16px; } .sol-icon { width: 46px; height: 46px; } .sol-icon svg { width: 23px; height: 23px; } .sol-info .h4 { font-size: 15px; } .sol-cta { font-size: 13px; padding: 10px 14px; } }

/* ---------- 5. 核心卖点（整宽工厂背景图 + 深色遮罩 + 白字） ---------- */
.feat {
  position: relative;
  background-image: url("../img/feat-bg.webp");
  background-size: cover; background-position: center;
}
.feat::before {
  content: "";
  position: absolute; inset: 0;
  /* 浅遮罩：露出工厂底图气势，中段最透、底部略深保白字可读 */
  background: linear-gradient(180deg, rgba(8,18,32,.55) 0%, rgba(8,18,32,.45) 50%, rgba(8,18,32,.6) 100%);
}
.feat .container { position: relative; z-index: 1; }
.feat .section-head .h2 { color: var(--white); }
/* 标题居中（加大撑气势） */
.feat-head { justify-content: center; }
.feat-head .sh-title { text-align: center; }
.feat-head .h2 { font-size: 28px; letter-spacing: 3px; }
/* 卖点悬浮：图标 + 标题直接浮在背景图上（无卡片无边框，图完全露出） */
.feat-band {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  max-width: 1200px; margin: 0 auto;
}
.feat-item { display: flex; flex-direction: column; align-items: center; padding: 0; }
.feat-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  margin-bottom: 16px;
  transition: background-color .25s ease, border-color .25s ease;
}
.feat-icon svg { width: 34px; height: 34px; stroke-width: 2.2; }
.feat-item:hover .feat-icon { background: var(--brand); border-color: var(--brand); }
.feat-item .h4 {
  color: var(--white); margin: 0; font-size: 17px; letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(0,0,0,.4);
}
@media (max-width: 1023px) { .feat-band { grid-template-columns: repeat(2, 1fr); gap: 30px 16px; max-width: 640px; } }
@media (max-width: 480px) {
  .feat-icon { width: 60px; height: 60px; margin-bottom: 12px; }
  .feat-icon svg { width: 29px; height: 29px; }
  .feat-item .h4 { font-size: 15px; }
}

/* ---------- 6. 合作案例 ---------- */
/* 精选合作案例（一行4个：上图片 + 下文字行（左标题 + 右箭头）） */
.case-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.case-card {
  display: block;
  background: var(--white);
  border-radius: 12px; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.case-card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(30,134,232,.14); }
.case-img { aspect-ratio: 4 / 3; border: none; border-radius: 0; background-size: cover; background-position: center; }
/* 4 个案例底图映射 */
.case-card:nth-child(1) .case-img { background-image: url("../img/case-tea.webp"); }
.case-card:nth-child(2) .case-img { background-image: url("../img/case-supermarket.webp"); }
.case-card:nth-child(3) .case-img { background-image: url("../img/case-hotel.webp"); }
.case-card:nth-child(4) .case-img { background-image: url("../img/case-coffee.webp"); }
/* 下文字行：左标题 + 右箭头 */
.case-cap {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 16px 16px;
}
.case-cap .h4 { margin: 0; font-size: 16px; line-height: 1.4; flex: 1; min-width: 0; }
.case-arrow {
  flex: none;
  color: var(--brand);
  font-size: 16px; line-height: 1;
  transition: color .2s ease;
}
.case-card:hover .case-arrow { color: var(--brand-mid); }
@media (max-width: 1023px) { .case-cards { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 480px) { .case-cards { grid-template-columns: 1fr 1fr; gap: 12px; } .case-cap { padding: 10px 12px 12px; } .case-cap .h4 { font-size: 14px; } }
/* ---------- 7. 新闻动态（图文搭配，整卡可点击） ---------- */
.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
.news-card {
  display: flex; align-items: stretch; gap: 18px;
  background: var(--white);
  border-radius: 12px; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.news-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(30,134,232,.12); }
.news-thumb { flex: none; width: 180px; min-height: 128px; border: none; border-radius: 0; background-size: cover; background-position: center; }
.news-card-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 16px 18px 16px 0;
}
.news-card-body .h4 {
  margin-bottom: 10px; font-size: 16px; line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-date { font-size: 13px; color: var(--text-muted); margin: 0; }
@media (max-width: 1023px) { .news-grid { grid-template-columns: 1fr; gap: 16px; } }
@media (max-width: 480px) { .news-card { gap: 12px; } .news-thumb { width: 130px; min-height: 96px; } .news-card-body { padding: 12px 14px 12px 0; } }
