/* ============================================================
   融宏实业官网 · 打印样式（@media print）
   目的：打印 / 另存为 PDF / 转 Word 时，页面正文必须完整可读。
   背景色与背景图在打印时会被浏览器默认丢弃，
   本站大量 hero / 数据条 / CTA 区在深底上排白字 ⇒ 打印成白纸。
   本文件把这些区域的文字改为深色、去底图、补分隔线，
   屏幕态（screen）完全不受影响。
   ============================================================ */

@media print {

  /* ---------- 1. 基础：白纸黑字 + 隐藏装饰 ---------- */
  html, body {
    background: #fff !important;
    color: #000 !important;
  }
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    text-shadow: none !important;
    box-shadow: none !important;
  }

  /* 打印时无意义的交互/装饰元素 */
  .top,            /* 顶部导航（纸面无需，且会遮住首段） */
  .rhn-burger,     /* 手机汉堡 */
  #rhLang,         /* 语言切换器 */
  .rice-skip,      /* 跳过导航（若存在） */
  .lang-wrap,
  .fab, .backtop,
  .skip-link,
  video, iframe {
    display: none !important;
  }

  /* ---------- 2. 浅色文字所在容器：全部压成深色字 ---------- */
  .hero, .hero *,           /* 首页大图横幅 */
  .page-hero, .page-hero *, /* 内页横幅 */
  .pd-hero, .pd-hero *,     /* 产品详情页头 */
  .sd-hero, .sd-hero *,     /* 方案详情页头 */
  .datas, .datas *,         /* 数据条 */
  .slog, .slog *,           /* 标语条 */
  .s-top, .s-top *,         /* 储能页顶部 */
  .arch, .arch *,           /* 架构图区 */
  .cta, .cta *,             /* 转化条 */
  .sto-banner, .sto-banner *,
  .flow-sec, .flow-sec *,
  .ask, .ask *,
  .dtb, .dtb *,
  .ph, .ph *,
  .s-bg, .s-bg *,
  .case-hero, .case-hero *,
  .pending, .pending *,
  .footer, .footer * {
    color: #000 !important;
    background-color: #fff !important;
    background-image: none !important;
    border-color: #999 !important;
  }

  /* 这些区域打印时补一条分隔线，避免内容挤成一片 */
  .hero, .page-hero, .pd-hero, .sd-hero, .case-hero,
  .datas, .slog, .s-top, .arch, .cta, .sto-banner, .flow-sec,
  .ask, .dtb, .ph, .s-bg, .pending {
    border-bottom: 1px solid #ccc !important;
  }

  /* ---------- 3. 横幅类不再撑满整屏（否则第一页只剩横幅） ---------- */
  .hero, .page-hero, .pd-hero, .sd-hero, .case-hero {
    min-height: 0 !important;
    height: auto !important;
    padding: 14px 0 !important;
    position: static !important;
    overflow: visible !important;
  }
  .hero img.bg, .page-hero img.bg, .hero .bg, .page-hero .bg,
  .s-bg, .s-bg img {
    display: none !important;   /* 装饰底图不打印，省墨且不影响信息 */
  }
  .hero .con, .page-hero .con { position: static !important; }

  /* ---------- 4. 图片与表格的可打印化 ---------- */
  img {
    max-width: 100% !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  table { width: 100% !important; border-collapse: collapse !important; }
  th, td {
    border: 1px solid #999 !important;
    color: #000 !important;
    background: #fff !important;
  }
  thead { display: table-header-group; }   /* 跨页时重复表头 */
  tr, .card, .dl-row, .pd-sec li { page-break-inside: avoid !important; break-inside: avoid !important; }

  /* ---------- 5. 分页控制 ---------- */
  h1, h2, h3, h4 { page-break-after: avoid !important; break-after: avoid !important; }
  .footer, .cta { page-break-inside: avoid !important; }

  /* ---------- 6. 链接与纯装饰图标 ---------- */
  a { color: #000 !important; text-decoration: none !important; }
  /* 站内链接在纸上无法点击，但保留原文即可，不追加 URL 以免版面杂乱 */
  svg { max-width: 100% !important; }
  .crumb-sep, .crumbs .sep { color: #666 !important; }

  /* ---------- 7. 图片叠加说明文字（.wk/.ac 卡片：白色字压在图片上） ----------
     这类卡片的文字不是"深底白字"，而是把白字压在实拍图上，靠一层渐变遮罩保证可读。
     打印时背景图/遮罩都被丢弃 ⇒ 白字直接落到白纸上（实测对比度 1.00~1.08，等于没字）。
     处理：遮罩不打印，文字改深色，并补一条浅色底与左边线，保持卡片辨识度。 */
  .wk, .ac {
    background: #fff !important;
    border: 1px solid #999 !important;
  }
  .wk:after, .ac:after { display: none !important; }   /* 渐变遮罩不打印 */
  .wk img, .ac img { display: none !important; }        /* 装饰实拍图不打印（省墨，信息由文字承载） */
  .wk .wb, .wk .wb *, .ac .ab, .ac .ab * {
    position: static !important;
    color: #000 !important;
    background: #fff !important;
    background-image: none !important;
    text-shadow: none !important;
  }
  .wk .wb span, .ac .ab span { color: #333 !important; }

  /* ---------- 8. 首页分屏入口（index.html）：右半幅白字压深绿渐变 ---------- */
  .split { display: block !important; height: auto !important; }
  .side, .side-r, .side-l {
    display: block !important;
    padding: 16px 0 !important;
    background: #fff !important;
    background-image: none !important;
    border-bottom: 1px solid #ccc !important;
    min-height: 0 !important;
  }
  .side::before, .side::after, .s-bg, .s-bg::after, .illus { display: none !important; }
  .side-r .s-title, .side-r .s-title em,
  .side-r .s-desc, .side-r .s-tag, .side-r .s-hint,
  .side-l .s-title, .side-l .s-title em,
  .side-l .s-desc, .side-l .s-tag, .side-l .s-hint {
    color: #000 !important;
    text-shadow: none !important;
  }
  .s-feats, .s-feats span {
    color: #000 !important;
    background: #fff !important;
    border-color: #999 !important;
    text-shadow: none !important;
  }
  .s-btn, .side-r .s-btn, .side-l .s-btn {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #999 !important;
    box-shadow: none !important;
  }

  /* ---------- 9. 打印页眉信息（可选，浏览器自带页眉已含 URL/日期） ---------- */
  @page { margin: 12mm 10mm; }
}
