/* ============ 首页专属样式 ============ */

/* ---------- Hero（对齐群晖官网 banner：深底 + 产品实拍 + 光效） ---------- */
.hero {
  position: relative; padding: 108px 0 132px; overflow: hidden;
  background: var(--navy); color: #fff;
}
/* 右侧产品实拍层（取自群晖官网 banner 素材） */
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 26% center; display: block;
  filter: brightness(1.42) contrast(1.06) saturate(1.08);
}
/* 蓝色品牌光效 */
.hero::before {
  content: ""; position: absolute; width: 900px; height: 900px; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle, rgba(0,103,230,.34), transparent 64%);
  bottom: -420px; right: -120px; mix-blend-mode: screen;
}
/* 左侧压暗，保证文案可读 */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(4,7,13,.96) 0%, rgba(4,7,13,.9) 30%, rgba(4,7,13,.46) 58%, rgba(4,7,13,.06) 100%);
}
.hero-bg-grid {
  position: absolute; inset: 0; z-index: 1; opacity: .55;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 30% 45%, #000 0%, transparent 68%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 45%, #000 0%, transparent 68%);
}
.hero-inner { position: relative; z-index: 3; }
.hero-content { max-width: 640px; }
.hero-badge {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 1px;
  padding: 7px 18px; border-radius: 30px; background: rgba(0,103,230,.16);
  border: 1px solid rgba(90,160,255,.42); color: #cfe2ff; margin-bottom: 24px;
}
.hero-content h1 { font-size: clamp(34px, 4.4vw, 54px); line-height: 1.22; font-weight: 800; letter-spacing: -1px; margin-bottom: 20px; }
.hero-desc { font-size: 17px; color: #b9c8da; max-width: 540px; line-height: 1.85; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.hero-trust { display: flex; gap: 22px; margin-top: 30px; flex-wrap: wrap; }
.hero-trust span { display: inline-flex; align-items: center; font-size: 13px; color: #8ea3ba; }

/* 官网式数据看板：Hero 底部悬浮指标条 */
.hero-metrics { position: relative; z-index: 3; display: flex; gap: 40px; margin-top: 46px; flex-wrap: wrap; }
.hero-metric b { display: block; font-size: 26px; font-weight: 800; color: #fff; line-height: 1.2; }
.hero-metric span { font-size: 12.5px; color: #8ea3ba; }

/* ---------- 数据统计 ---------- */
.stats-band { padding: 0; background: #fff; border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-item { text-align: center; padding: 38px 10px; position: relative; }
.stat-item:not(:last-child)::after { content: ""; position: absolute; right: 0; top: 25%; height: 50%; width: 1px; background: var(--line); }
.stat-value { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; color: var(--blue); line-height: 1; }
.stat-label { font-size: 14px; color: var(--gray); margin-top: 10px; }

/* ---------- 应用场景 ---------- */
.scenarios { background: var(--bg-soft); }
.scenario-tabs { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 36px; }
.scenario-tab {
  padding: 11px 22px; border-radius: 30px; border: 1.5px solid var(--line); background: #fff;
  color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer; transition: all .22s;
}
.scenario-tab:hover { border-color: var(--blue); color: var(--blue); }
.scenario-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.scenario-panel {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 46px 48px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: center; min-height: 300px;
}
.scenario-info .scenario-icon {
  width: 56px; height: 56px; border-radius: 14px; background: var(--blue-light); color: var(--blue);
  display: grid; place-items: center; font-size: 26px; margin-bottom: 20px;
}
.scenario-info h3 { font-size: 26px; margin-bottom: 12px; }
.scenario-info > p { color: var(--gray); font-size: 15px; margin-bottom: 24px; }
.scenario-points { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.scenario-points li { display: flex; gap: 11px; font-size: 15px; color: var(--ink-2); }
.scenario-points li::before { content: "✓"; color: var(--blue); font-weight: 800; flex-shrink: 0; }
.scenario-points b { color: var(--ink); }
.scenario-points span { display: block; font-size: 13px; color: var(--gray); font-weight: 400; }
.scenario-visual {
  border-radius: 10px; position: relative; overflow: hidden;
  aspect-ratio: 16 / 10; background: #0a1626; color: #fff;
}
.scenario-visual > img.sv-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; display: block;
}
/* 无配图时的兜底样式 */
.scenario-visual .sv-pattern { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1px); background-size: 22px 22px; }
.scenario-visual > .sv-icon { font-size: 76px; position: relative; z-index: 1; color: #7fb3f0; opacity: .85; }
.scenario-visual > .sv-label { position: absolute; bottom: 20px; left: 22px; font-size: 13px; color: #93a9c2; z-index: 1; }

/* ---------- 产品预览 ---------- */
.products-preview { background: #fff; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; grid-auto-rows: 1fr; }
.product-card {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: #fff; transition: transform .25s, box-shadow .25s; position: relative;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.product-hot { position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--amber); color: var(--ink); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.product-img {
  height: 200px; background: #fff; position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 10px 14px; overflow: hidden;
}
.product-img img {
  width: 100%; height: 100%; object-fit: contain; object-position: center;
  transition: transform .35s ease; display: block;
}
.product-card:hover .product-img img { transform: scale(1.06); }
.product-body { padding: 18px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.product-name { font-size: 17px; font-weight: 800; margin: 5px 0 10px; }
.product-features { list-style: none; margin-bottom: 14px; }
.product-features li { font-size: 12.5px; color: var(--gray); padding: 2px 0 2px 14px; position: relative; }
.product-features li::before { content: "·"; position: absolute; left: 4px; color: var(--blue); font-weight: 900; }
.product-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 13px; }
.product-price { font-size: 13px; color: var(--blue); font-weight: 700; }
.product-quote { background: none; border: none; color: var(--blue); font-size: 13px; font-weight: 700; cursor: pointer; padding: 0; }
.product-quote:hover { text-decoration: underline; }
.center-cta { text-align: center; margin-top: 40px; }

/* ---------- 为什么选择我们 ---------- */
.why-us { background: var(--bg-soft); }
.advantage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.advantage-card { background: #fff; border-radius: var(--radius); padding: 32px 26px; box-shadow: var(--shadow-sm); transition: transform .25s; }
.advantage-card:hover { transform: translateY(-5px); }
.advantage-icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  font-size: 25px; margin-bottom: 20px; background: var(--blue-light); color: var(--blue);
}
.advantage-card:nth-child(2) .advantage-icon { background: #fdf3e3; color: #c8892a; }
.advantage-card:nth-child(3) .advantage-icon { background: #e6f9f1; color: #1a9c6b; }
.advantage-card:nth-child(4) .advantage-icon { background: #e8f6fa; color: #2b8fae; }
.advantage-card h4 { font-size: 17px; margin-bottom: 10px; }
.advantage-card p { font-size: 14px; color: var(--gray); }

/* ---------- 服务流程 ---------- */
.process { background: #fff; }
.process-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; position: relative; }
.process-grid::before { content: ""; position: absolute; top: 33px; left: 10%; right: 10%; height: 2px; background: linear-gradient(90deg, var(--blue-light), var(--blue), var(--blue-light)); z-index: 0; }
.process-item { text-align: center; position: relative; z-index: 1; }
.process-num {
  width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 18px;
  background: #fff; border: 2px solid var(--blue); color: var(--blue);
  display: grid; place-items: center; font-size: 18px; font-weight: 800;
  box-shadow: 0 0 0 6px var(--bg);
}
.process-item h4 { font-size: 16px; margin-bottom: 6px; }
.process-item p { font-size: 13px; color: var(--gray); }

/* ---------- 客户案例 ---------- */
.cases-preview { background: var(--bg-soft); }
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.case-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s; }
.case-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.case-top { height: 112px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 16px 24px; position: relative; overflow: hidden; }
.case-top-logo { max-height: 56px; max-width: 170px; width: auto; height: auto; object-fit: contain; transition: transform .3s ease; }
.case-card:hover .case-top-logo { transform: scale(1.04); }
.case-industry { position: absolute; top: 12px; left: 14px; font-size: 11.5px; font-weight: 700; color: var(--blue); background: var(--blue-light); padding: 4px 12px; border-radius: 20px; }
.case-body { padding: 24px; }
.case-company { font-size: 13px; color: var(--blue); font-weight: 700; margin-bottom: 8px; }
.case-body h4 { font-size: 17px; margin-bottom: 12px; line-height: 1.5; }
.case-body p { font-size: 13.5px; color: var(--gray); line-height: 1.75; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.case-result { font-size: 13px; color: #c8892a; font-weight: 700; }

/* ---------- 底部 CTA ---------- */
.bottom-cta { background: radial-gradient(circle at 88% 0%, rgba(0,103,230,.4), transparent 55%), linear-gradient(120deg, #04070d, #0b1a2b); color: #fff; padding: 58px 0; }
.bottom-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.bottom-cta h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 8px; }
.bottom-cta p { color: #9db2c9; font-size: 15px; }
.bottom-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 980px) {
  .hero-media { width: 100%; opacity: .38; }
  .hero-content { max-width: 100%; }
  .product-grid, .advantage-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .scenario-panel { grid-template-columns: 1fr; }
  .scenario-visual { aspect-ratio: 16 / 10; }
  .process-grid { grid-template-columns: repeat(3, 1fr); gap: 24px 12px; }
  .process-grid::before { display: none; }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .hero { padding: 44px 0 52px; }
  .hero-content h1 { font-size: 28px; line-height: 1.3; letter-spacing: -.4px; margin-bottom: 14px; }
  .hero-badge { font-size: 11.5px; padding: 5px 14px; margin-bottom: 16px; }
  .hero-desc { font-size: 14px; line-height: 1.8; margin-bottom: 24px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-trust { margin-top: 20px; }
  .hero-media { display: none; }
  .hero-trust { gap: 12px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item { padding: 26px 8px; }
  .product-grid, .advantage-grid, .case-grid { grid-template-columns: 1fr; }
  .product-grid { grid-auto-rows: auto; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .scenario-panel { padding: 28px 22px; }
  .bottom-cta { padding: 40px 0; }
  .bottom-cta-inner { flex-direction: column; align-items: stretch; gap: 20px; }
  .bottom-cta h2 { font-size: 21px; line-height: 1.35; margin-bottom: 6px; }
  .bottom-cta p { font-size: 13px; line-height: 1.7; }
  .bottom-cta-actions { flex-direction: column; gap: 10px; }
  .bottom-cta-actions .btn { width: 100%; }
}

/* ---------- 手机端产品卡：两列紧凑布局（型号 + 一条参数 + 报价） ---------- */
@media (max-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; grid-auto-rows: 1fr; }
  .product-img { height: 118px; padding: 8px 10px; }
  .product-body { padding: 12px 12px 13px; }
  .product-name { font-size: 14px; font-weight: 800; margin: 0 0 7px; line-height: 1.3; }
  /* 只保留一条参数，超出省略，避免卡片被撑高 */
  .product-features { margin-bottom: 10px; }
  .product-features li { font-size: 11.5px; padding: 0 0 0 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .product-features li:nth-child(n+2) { display: none; }
  .product-bottom { padding-top: 9px; gap: 6px; }
  .product-price { font-size: 11.5px; }
  .product-quote { font-size: 11.5px; }
  .product-hot { top: 8px; left: 8px; font-size: 10px; padding: 2px 7px; }
}

/* ---------- 手机端：优势卡两列、案例卡紧凑 ---------- */
@media (max-width: 640px) {
  .advantage-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .advantage-card { padding: 16px 14px; border-radius: 12px; }
  .advantage-icon { width: 38px; height: 38px; border-radius: 10px; margin-bottom: 10px; }
  .advantage-icon .ico { width: 19px; height: 19px; }
  .advantage-card h4 { font-size: 13.5px; margin-bottom: 6px; line-height: 1.4; }
  .advantage-card p { font-size: 11.5px; line-height: 1.65; }

  .case-top { height: 88px; padding: 12px 18px; }
  .case-top-logo { max-height: 44px; max-width: 130px; }
  .case-industry { top: 9px; left: 10px; font-size: 10.5px; padding: 3px 9px; }
  .case-body { padding: 16px 16px 18px; }
  .case-company { font-size: 11.5px; margin-bottom: 5px; }
  .case-body h4 { font-size: 14.5px; line-height: 1.45; margin-bottom: 8px; }
  .case-body p { font-size: 12px; line-height: 1.7; margin-bottom: 12px; -webkit-line-clamp: 2; }
  .case-result { font-size: 11.5px; }
}
