/* ==========================================================================
   portal-r37c.css — bug261022（1）移动端首页模块改造
   问题14 / 15 / 17 / 19 / 20 / 21 / 22

   约定：
   - 所有规则都锁在 @media (max-width:900px) 里，PC（≥901px）零影响；
   - 只覆盖首页（body.pg-home），不波及其它页面；
   - 每条需要压过 portal.css / portal-r36a.css / index.html 内联 <style> 的规则
     都用「多写一个同类选择器」的方式抬高特异性（如 .pg-home .biz.biz），
     这样即使本文件被别的 <link> 排到前面也不会被反向覆盖；
   - 问题21 的折叠面板 DOM 由 portal-r37d.js 在移动端生成（模板 lead-form.html
     是首页 / 联系我们 / 招聘页共用片段，不在这里改模板结构）。
   ========================================================================== */

@media (max-width: 900px) {

  /* ======================================================================
     问题17①：首页 section 上下留白整体收紧
     改前：.section 40px（r36a）/ .section--tight 32px —— 相邻两段之间 80px 空白；
     改后：22px / 18px —— 相邻两段之间 44px，且灰色块本身不再拖一长条尾巴。
     ====================================================================== */
  .pg-home .section.section { padding: 22px 0; }
  .pg-home .section.section--tight { padding: 18px 0; }
  .pg-home .section.section--navy { padding-bottom: 24px; }

  .pg-home .section .h2 { font-size: 23px; line-height: 1.32; margin-top: 10px; }
  .pg-home .section .eyebrow { font-size: 11.5px; letter-spacing: 1.8px; }
  .pg-home .section .eyebrow::before { width: 16px; }
  .pg-home .section .lead { font-size: 14px; line-height: 1.75; margin-top: 10px; }
  .pg-home .section .flex-between { gap: 12px; }
  .pg-home .mt-l { margin-top: 18px; }
  .pg-home .mt-xl { margin-top: 16px; }
  .pg-home .two-col { gap: 20px; }

  /* ======================================================================
     问题14①：核心业务四大分类 → 顶部横向可滑动 Tab 栏
     PC 的「左竖排 340px + 右面板」交互与 data-biz-tab / data-biz-panel 配对
     完全沿用（点击切换仍由 portal.js 处理），这里只把 .biz 从两列 grid 拉成一列、
     把 .biz__tabs 从纵向 grid 改成横向 flex + overflow-x:auto。
     ====================================================================== */
  .pg-home .biz.biz { display: block; min-width: 0; }
  .pg-home .biz > * { min-width: 0; }
  /* 核心业务区块顶部留白 52/64px → 24px，让 Tab 栏整体不再被上方大段空白推远 */
  .pg-home .biz-section { padding-top: 24px; }

  .pg-home .biz__tabs.biz__tabs {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    /* 给激活态阴影／滚动条留位置，两侧负外边距让 Tab 条贴到屏幕边（只在这种设计里才有意义） */
    padding: 4px 0 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-top: 20px;     /* 上方：与标题之间 ≈24px（含栏内 4px 顶部留白） */
    margin-bottom: 16px;  /* 下方：与面板之间 ≈24px（含栏内 8px 底部留白 + 面板 margin-top 10） */
  }
  .pg-home .biz__tabs.biz__tabs::-webkit-scrollbar { display: none; }

  .pg-home .biz .biz__tab {
    flex: 0 0 auto;
    width: auto;
    /* r31c 给左侧竖排卡定的 min-height:78px / 20px 内边距在横滑胶囊里必须清掉 */
    min-height: 0;
    height: auto;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border-radius: 999px;
    white-space: nowrap;
    scroll-snap-align: start;
    box-shadow: none;
  }
  .pg-home .biz .biz__tab b { font-size: 13.5px; line-height: 1.2; }
  /* 去掉 Tab 标签内的序号，只保留文字（本轮：H5 核心业务 Tab 精简） */
  .pg-home .biz .biz__idx { display: none; }
  .pg-home .biz .biz__tab.is-active { box-shadow: 0 6px 16px rgba(250,193,0,.22); }
  .pg-home .biz .biz__tab:hover { box-shadow: none; }

  /* 面板：压缩内边距与字号（原来 36px 内边距 + 24px 标题在 358px 宽里很浪费） */
  .pg-home .biz__panel.biz__panel {
    padding: 14px 13px 16px;
    border-radius: 16px;
    margin-top: 10px;
  }
  /* 兜底：任何 display 覆盖都不能让 hidden 面板漏出来 */
  .pg-home .biz__panel[hidden] { display: none !important; }
  .pg-home .biz__panel .badge { font-size: 10.5px; padding: 3px 9px; line-height: 1.5; }
  .pg-home .biz__panel h3 { font-size: 17px; line-height: 1.45; margin-top: 8px; }
  .pg-home .biz__panel > p { font-size: 13px; line-height: 1.7; margin-top: 7px; }
  .pg-home .biz__panel .notice {
    margin-top: 12px; padding: 10px 11px; border-radius: 10px;
    font-size: 11.5px; line-height: 1.65; gap: 8px;
  }
  .pg-home .biz__panel .notice svg { width: 14px; height: 14px; margin-top: 2px; }

  /* 问题14②：服务项单列 → 两列网格，并且整体缩小（原来单列 61px 高 × 6 行） */
  .pg-home .biz__panel .biz-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 11px;
  }
  .pg-home .biz__panel .biz-card { padding: 9px 10px; border-radius: 10px; }
  .pg-home .biz__panel .biz-card b { font-size: 12.5px; line-height: 1.4; font-weight: 700; }
  .pg-home .biz__panel .biz-card p {
    margin-top: 4px; font-size: 11.5px; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }

  /* 问题14③：「查看全部核心业务 →」周围留白压缩
     改前：标题底 → 按钮 22px、按钮底 → Tab 栏 26px（按钮本身 46px 高）；
     改后：12px / 12px，按钮 38px 高、圆角胶囊。 */
  .pg-home .sec-head-row { text-align: center; }
  .pg-home .sec-head-row .svc-all {
    margin-top: 12px;
    height: 38px;
    padding: 0 17px;
    font-size: 13.5px;
    border-radius: 999px;
  }
  .pg-home .biz.mt-xl { margin-top: 12px; }

  /* ======================================================================
     问题15：五步服务流程 → 时间轴（左侧竖线串圆点，右侧步骤名 + 说明）
     改前：5 张白卡（每张 189px，内边距 26/22，右侧连接线），整段 1271px ≈ 1.5 屏；
     改后：竖线 + 圆点 + 紧凑文字，整段约 560px。
     ====================================================================== */
  .pg-home .steps.steps {
    display: block;
    grid-template-columns: none;
    gap: 0;
    margin-top: 16px;
    counter-reset: none;
  }
  .pg-home .step.step {
    position: relative;
    display: block;
    padding: 0 0 0 26px;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 0;
  }
  .pg-home .step.step + .step { margin-top: 15px; }
  /* 竖线：贯穿到下一个圆点；最后一个不画 */
  .pg-home .step.step::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 15px;
    bottom: -15px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--gold-400), var(--gold-100));
  }
  .pg-home .step.step:last-child::before { display: none; }
  /* 圆点：替换原来的横向连接线 */
  .pg-home .step.step::after {
    content: "";
    position: absolute;
    left: 0;
    right: auto;
    top: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(250, 193, 0, .18);
  }
  .pg-home .step .step__no { font-size: 10.5px; letter-spacing: 1.2px; line-height: 1.2; }
  .pg-home .step h4 { font-size: 15px; line-height: 1.4; margin-top: 2px; }
  .pg-home .step p { font-size: 12.5px; line-height: 1.6; margin-top: 3px; }
  /* 时间轴自身已经表达进度，桌面端卡片底部的进度细条在这里只会像多出来的一条分隔线 */
  .pg-home .step .step__bar { display: none; }

  /* ======================================================================
     问题17②：次级操作按钮 → 统一「圆角实心」
     命中：查看四类业务的完整流程 / 查看更多案例 / 进入资讯中心（.btn--ghost）
     统一：深炭黑实心渐变 + 999px 圆角 + 38px 高 + 13.5px 字号。
     ====================================================================== */
  .pg-home .section .btn--ghost {
    background: linear-gradient(140deg, #3D3D3D, #1F1F1F);
    border-color: transparent;
    color: #fff;
    border-radius: 999px;
    height: 38px;
    padding: 0 18px;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(31, 31, 31, .16);
  }
  .pg-home .section .btn--ghost:hover {
    background: linear-gradient(140deg, #4C4C4C, #2A2A2A);
    color: #fff;
    box-shadow: 0 8px 20px rgba(31, 31, 31, .22);
    transform: translateY(-1px);
  }

  /* ======================================================================
     问题19：「我们服务的企业类型」卡片 → 左图标 + 右侧文字（原来图标在上、文字在下）
     用 grid 让图标跨两行、正文占右侧：
       [图标] 标题
       [图标] 说明
     ====================================================================== */
  .pg-home .grid.grid--3.m-aud { grid-template-columns: 1fr; gap: 9px; }
  .pg-home .grid.m-aud .card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 11px;
    row-gap: 1px;
    align-items: center;
    padding: 11px 13px;
    border-radius: 14px;
  }
  .pg-home .grid.m-aud .card__ico {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 40px;
    height: 40px;
    margin-bottom: 0;
    border-radius: 11px;
  }
  .pg-home .grid.m-aud .card__ico svg { width: 20px; height: 20px; }
  .pg-home .grid.m-aud .card h3 { grid-column: 2; grid-row: 1; font-size: 15px; line-height: 1.35; }
  .pg-home .grid.m-aud .card p {
    grid-column: 2; grid-row: 2;
    margin-top: 0;
    font-size: 12.5px;
    line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }

  /* ======================================================================
     问题20：CONTACT（联系我们）区域 —— 联系方式行间距收紧
     改前：每项 padding 18px 0（行距 90.8px / 118.8px）、图标 40px；
     改后：padding 9px 0、图标 34px（行距约 56px / 72px）。
     ====================================================================== */
  .pg-home .section--navy .mt-l { margin-top: 16px; }
  .pg-home .contact-item { padding: 9px 0; gap: 10px; }
  .pg-home .contact-item__ico { width: 34px; height: 34px; border-radius: 9px; }
  .pg-home .contact-item__ico svg { width: 17px; height: 17px; }
  .pg-home .contact-item b { font-size: 11.5px; letter-spacing: .4px; }
  .pg-home .contact-item span { font-size: 14.5px; margin-top: 1px; line-height: 1.5; }

  /* ======================================================================
     问题21：企业需求登记表单（首页）
     1) 首屏只留 3 个必填项，「选填补充信息」折叠在 portal-r37d.js 里生成；
     2) 字段组垂直间距 16/8 → 9/4，输入框 46px → 40px；
     3) 「1 个工作日内响应」胶囊 12.5px 两行 → 10.5px 一行。
     ====================================================================== */
  .pg-home .form-card { padding: 16px 14px 18px; border-radius: 16px; }
  .pg-home .form-card__head { margin-bottom: 12px; gap: 9px; align-items: flex-start; }
  .pg-home .form-card__head h3 { font-size: 16.5px; line-height: 1.35; }
  .pg-home .form-card__head p { font-size: 12px; line-height: 1.6; margin-top: 4px; }
  .pg-home .form-card__head .badge {
    flex: 0 0 auto;
    font-size: 10.5px;
    line-height: 1.6;
    padding: 2px 8px;
    white-space: nowrap;
  }
  .pg-home .form-grid { grid-template-columns: 1fr; gap: 9px; }
  .pg-home .field { gap: 4px; }
  .pg-home .field label { font-size: 12.5px; }
  .pg-home .field input,
  .pg-home .field select,
  .pg-home .field textarea {
    height: 40px;
    font-size: 13.5px;
    border-radius: 9px;
    padding: 0 11px;
  }
  .pg-home .field textarea { height: auto; min-height: 76px; padding: 9px 11px; line-height: 1.6; }
  .pg-home .field .btn.btn--navy { height: 42px; font-size: 14px; border-radius: 999px; }
  .pg-home .form-note { font-size: 11px; line-height: 1.6; margin-top: 9px; }

  /* 折叠面板（DOM 由 portal-r37d.js 生成，只在移动端存在） */
  .pg-home .lead-more { grid-column: 1 / -1; }
  .pg-home .lead-more__btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 9px 11px;
    border: 1px dashed #E3D3AE;
    border-radius: 10px;
    background: var(--bg-navy-soft);
    color: var(--navy-800);
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.5;
    cursor: pointer;
    text-align: left;
  }
  .pg-home .lead-more__btn .lead-more__hint { color: var(--ink-400); font-weight: 500; }
  .pg-home .lead-more__btn svg { width: 14px; height: 14px; flex: 0 0 auto; transition: transform .2s var(--ease); }
  .pg-home .lead-more__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
  .pg-home .lead-more__body[hidden] { display: none !important; }
  .pg-home .lead-more__body { margin-top: 9px; padding-top: 10px; border-top: 1px dashed #EBD9A6; }
  /* 折叠区与上方必填项保持同一列宽，避免三个 select 摆成 2 列时「经营规模」独占一行留空洞 */
  .pg-home .lead-more__grid { display: grid; grid-template-columns: 1fr; gap: 9px; }
  .pg-home .lead-more__grid .field--full { grid-column: 1 / -1; }

  /* ======================================================================
     问题22：页脚 Footer 间距
     改前：表单卡片底 → 页脚导航 = 40（section 内边距）+ 64（footer padding-top）= 104px；
           法律声明排下方 = 22（footer__bottom padding）+ 86（悬浮按钮避让）= 108px；
     改后：52px 与 98px（其中 78px 是必须留给底部悬浮操作条的避让高度）。
     ====================================================================== */
  .pg-home .footer {
    padding-top: 22px;
    /* 底部悬浮操作条（.fab 高 48 + 距底 14 = 62）必须留出来，78 → 72 仍留 10px 余量 */
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    font-size: 13px;
  }
  .pg-home .footer__mainnav { padding: 10px 0; margin-bottom: 10px; }
  .pg-home .footer__mainnav a { padding: 3px 8px; font-size: 12.5px; }
  .pg-home .footer__bottom { padding: 10px 0; gap: 6px; }
  .pg-home .footer__legal { font-size: 11px; line-height: 1.7; }
  .pg-home .footer__disclaimer { font-size: 11px; line-height: 1.65; }
  .pg-home .footer__row { gap: 6px; }
  .pg-home .footer__navlinks a { margin: 0 8px; font-size: 11.5px; }

  /* ======================================================================
     本轮：核心业务分类 Tab —— 去掉白卡边框，直接悬浮在页面背景上
     （参考资讯中心筛选胶囊 .badge：浅暖底 + 极淡描边，激活态金色渐变）
     原 .biz__tab 在横滑条里仍是 white 背景 + 1px 边，像一排小方框；
     改成浅暖底 + 极淡描边后，激活态金色渐变，与资讯中心 .badge 同一套视觉。
     ====================================================================== */
  /* 未选中标签：白色背景 + 浅灰边框，强化按钮视觉属性（本轮：覆盖此前「透明悬浮」） */
  .pg-home .biz .biz__tab {
    background: #fff;
    border: 1px solid var(--line, #ECECEC);
    color: var(--navy-900, #3A2A00);
  }
  .pg-home .biz .biz__tab.is-active {
    background: linear-gradient(135deg, var(--gold-500, #FAC100), var(--gold-400, #FFD54A));
    border-color: transparent;
    color: #3A2A00;
    /* 激活态悬浮投影沿用上方 .is-active 的 0 6px 16px rgba(250,193,0,.22) */
  }

  /* ======================================================================
     本轮：首屏 Banner 内部垂直间距统一（文字 / 按钮 / 数据指标 紧凑且均匀）
     原间距：tag→h1 26、h1→sub 22、sub→cta 38、cta→facts 52+30(padding-top)，
     叠加在 hero__in 顶部 64px 上，首屏被拉得很松。统一收紧到 ~18/16/22/26。
     ====================================================================== */
  .pg-home .hero__in { padding: 44px 24px 56px; } /* 左右恢复 24px 留白，避免内容贴边 */
  .pg-home .hero h1 { margin-top: 18px; }
  .pg-home .hero__sub { margin-top: 16px; }
  .pg-home .hero__cta { margin-top: 22px; }
  .pg-home .hero__facts { margin-top: 26px; padding-top: 20px; gap: 20px 26px; }

  /* ======================================================================
     本轮：多年沉淀的渠道与资源网络（首页资源区）
     · 四宫格数据：数字与说明文字均水平居中；
     · 「查看合作伙伴」从标题右侧移到底部四宫格正下方并居中（桌面端保留原 outline 按钮）。
     ====================================================================== */
  .pg-home .section--navy .stat-band__num,
  .pg-home .section--navy .stat-band__label { text-align: center; }
  .pg-home .resource-btn--desktop { display: none; }
  .pg-home .resource-btn--mobile {
    display: flex;
    width: max-content;
    max-width: 100%;
    margin: 16px auto 0;
  }
}
