/* =========================================================
   mobile.css — 仅移动端生效的改版样式（2026-11-28）
   规则：桌面端零影响。除底部导航/电话按钮的 display:none 基础规则外，
   所有规则均包裹在 @media (max-width:768px) 内。
   ========================================================= */

/* ---- 桌面端隐藏的移动端专用元素 ---- */
.hero-slogan { display: none; }
.mobile-tabbar { display: none; }
.m-tel { display: none; }

@media (max-width: 768px) {

  /* ---- 顶栏：欢迎条隐藏，电话并入主头部 ---- */
  .topbar { display: none; }

  .site-header { padding: 10px 14px; }
  .header-inner { gap: 10px; }

  /* logo：沿用原蓝色渐变徽章，RAINSTIN 与云闪测分行居中 */
  .header-inner .logo { display: flex; align-items: center; }
  .header-inner .logo a { display: block; line-height: 0; }
  .header-inner .logo-lock {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 11px;
    border-radius: 9px;
    width: auto;
  }
  .header-inner .logo-tm { height: 11px; }
  .header-inner .logo-div { display: none; }
  .header-inner .logo-name {
    font-size: 12px;
    letter-spacing: 2px;
    text-indent: 2px;
    line-height: 1.1;
    white-space: nowrap;
  }

  /* 头部电话直达按钮（单行不折行） */
  .m-tel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-left: auto;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(37, 99, 235, .25);
    transition: transform .15s ease;
  }
  .m-tel:active { transform: scale(.94); }

  /* ---- 产品分类：横滑改为单列横向宽卡 ---- */
  .cat-scroll { overflow: visible; padding: 0; }
  .cat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .cat-card {
    flex: auto;
    width: auto;
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-areas: "icon name" "icon desc" "icon more";
    column-gap: 13px; row-gap: 3px;
    align-items: center;
    padding: 15px 14px;
  }
  .cat-card .cat-icon { grid-area: icon; width: 44px; height: 44px; margin-bottom: 0; }
  .cat-card .cat-name { grid-area: name; text-align: left; margin-bottom: 0; font-size: 14.5px; }
  .cat-card .cat-desc {
    grid-area: desc;
    margin-bottom: 0;
    font-size: 11.5px;
    color: var(--text-light);
    line-height: 1.5;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .cat-card .cat-more { grid-area: more; justify-self: start; margin-top: 0; font-size: 12px; }

  /* ---- 分类卡：禁用桌面悬停装饰条（触摸屏 hover 粘滞会残留蓝线） ---- */
  .cat-card:before { display: none; }
  .cat-card:hover { transform: none; box-shadow: 0 1px 3px rgba(15, 23, 42, .07); }

  /* ---- 推荐产品：手机端精简为6张（隐藏重复度高的第3/5张） ---- */
  .product-grid .product-card:nth-child(3),
  .product-grid .product-card:nth-child(5) { display: none; }

  /* ---- 首页四优势卡：一行两个紧凑排布 ---- */
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .feature-card {
    padding: 16px 12px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .feature-card .feature-icon {
    width: 44px; height: 44px; border-radius: 12px; margin-bottom: 10px;
  }
  .feature-card .feature-icon svg { width: 22px; height: 22px; }
  .feature-card h3 { font-size: 14px; margin-bottom: 5px; }
  .feature-card p {
    font-size: 11px; line-height: 1.55; color: var(--text-mute);
    text-align: left;
  }

  /* ---- 推荐产品：两列网格（覆盖后段单列规则），图片区域统一高度，完整展示 ---- */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card .thumb { height: 138px; }
  .product-card .info { padding: 12px 12px 14px; }
  .product-card .p-desc {
    font-size: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* ---- 页脚精简：隐藏与底部导航重复的「产品分类/快速导航」，保留关于我们+联系方式+版权备案 ---- */
  .footer-inner .footer-col:nth-child(2),
  .footer-inner .footer-col:nth-child(3) { display: none; }
  .footer-inner { grid-template-columns: 1fr !important; gap: 18px !important; }
  .footer-col p { font-size: 12px; line-height: 1.65; }

  /* ---- 底部 CTA：左对齐、标题单行 ---- */
  .cta-inner { flex-direction: column; align-items: stretch; text-align: left; }
  .cta-text h3 {
    font-size: clamp(11px, 3.7vw, 14.5px);
    white-space: nowrap;
    letter-spacing: 0;
    margin-bottom: 6px;
  }
  .cta-text p { font-size: 12px; text-align: left; }
  .cta-actions { width: 100%; }
  .cta-actions .btn { flex: 1; }

  /* ---- 底部导航（微信式，5 栏 + 中间凸起询报价） ---- */
  .mobile-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    display: flex;
    align-items: stretch;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(15, 23, 42, .08);
  }
  .mobile-tabbar .mtab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
    color: var(--text-mute);
    text-decoration: none;
    padding: 5px 0;
    white-space: nowrap;
    letter-spacing: 0;
    transition: color .2s ease;
  }
  .mobile-tabbar .mtab svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .mobile-tabbar .mtab.active { color: var(--primary); }
  .mobile-tabbar .mtab.hot { color: var(--primary); font-weight: 600; position: relative; top: -6px; }
  .mobile-tabbar .mtab.hot .mtab-bubble {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--grad-main);
    box-shadow: 0 5px 14px rgba(37, 99, 235, .4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: -4px;
  }
  .mobile-tabbar .mtab.hot .mtab-bubble svg { width: 22px; height: 22px; stroke: #fff; }

  /* 给固定底栏留出空间 */
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

  /* 悬浮按钮与底栏的共存 */
  .float-consult { display: none; }
  .back-to-top { bottom: calc(74px + env(safe-area-inset-bottom)); right: 12px; }

  /* 区块间距压缩 */
  .section { padding: 34px 0; }
  /* ---- 首屏大标题（人看得见的卖点行） ---- */
  .hero-slogan {
    display: block;
    padding: 14px 16px 2px;
    text-align: left;
  }
  .hero-slogan h2 {
    font-size: 21px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: .5px;
    line-height: 1.3;
  }
  .hero-slogan p { font-size: 12px; color: var(--text-light); margin-top: 5px; letter-spacing: .3px; }

  /* ---- 首屏数据条：数字放大、列分隔线 ---- */
  .hero-stats { width: 100%; justify-content: space-between; gap: 0; padding: 0 4px; }
  .hero-stats li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; }
  .hero-stats li:not(:last-child)::after {
    content: ""; position: absolute; right: 0; top: 18%; height: 64%; width: 1px;
    background: var(--border);
  }
  .hero-stats b { font-size: 21px; font-weight: 800; color: var(--primary); }
  .hero-stats span { font-size: 10px; color: var(--text-light); }

  /* ---- 板块标题：左对齐大标题 ---- */
  .section-head { text-align: left; max-width: none; margin: 0 0 18px; }
  .section-title { display: block; font-size: 20px; padding-bottom: 10px; }
  .section-title:after { left: 0; transform: none; width: 40px; height: 3px; }
  .section-sub {
    font-size: 12px; margin-top: 8px; line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }

  /* ---- 技术资料卡片：摘要2行截断、阅读全文右对齐 ---- */
  .tech-card .t-excerpt {
    font-size: 12px; line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .tech-card .t-meta { width: 100%; justify-content: space-between; }

  /* ---- 分类宫格：五条产品线五色图标 ---- */
  .cat-card:nth-child(1) .cat-icon { background: #eff6ff; color: #2563eb; }
  .cat-card:nth-child(2) .cat-icon { background: #fff7ed; color: #ea580c; }
  .cat-card:nth-child(3) .cat-icon { background: #ecfeff; color: #0891b2; }
  .cat-card:nth-child(4) .cat-icon { background: #f5f3ff; color: #7c3aed; }
  .cat-card:nth-child(5) .cat-icon { background: #f0fdf4; color: #16a34a; }

  /* ---- 底部导航：选中态顶部胶囊指示条 ---- */
  .mtab { position: relative; }
  .mtab.active::before {
    content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 22px; height: 3px; border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
  }

  /* ---- 常见问题：去边框圆角卡片 + 展开态美化 ---- */
  .faq-item {
    border: 0; border-radius: 12px; margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .07);
  }
  .faq-item summary {
    padding: 14px 46px 14px 16px;
    font-size: 15.5px; line-height: 1.5;
  }
  .faq-item summary:after {
    right: 14px; top: 50%; transform: translateY(-50%);
    width: 24px; height: 24px; line-height: 24px; text-align: center;
    font-size: 17px; font-weight: 500;
    background: #eff6ff; border-radius: 50%;
  }
  .faq-item details[open] summary:after { transform: translateY(-50%) rotate(45deg); background: #dbeafe; }
  .faq-item details[open] { box-shadow: 0 4px 14px rgba(37, 99, 235, .12); }
  .faq-item .faq-a {
    margin: 0 12px 14px; padding: 11px 13px 11px 14px;
    background: #f8fafc; border-left: 3px solid #2563eb;
    border-radius: 0 8px 8px 0;
    font-size: 13.5px; line-height: 1.8; color: #475569;
  }

  /* ---- 常见问题：底部入口按钮整行居中 ---- */
  .faq-more { flex-direction: column; align-items: center; gap: 10px; margin-top: 18px; }
  .faq-more .btn { width: 100%; justify-content: center; }

  /* ---- FAQ 独立页：分组标题左竖条 + 组间距强化 ---- */
  .faq-page .page-title-h2 {
    position: relative; padding-left: 13px;
    font-size: 19px; line-height: 1.4;
    margin-top: 26px; margin-bottom: 12px;
  }
  .faq-page .page-title-h2::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 4px; height: 17px; border-radius: 2px;
    background: linear-gradient(180deg, #2563eb, #3b82f6);
  }
  .faq-page .faq-intro { font-size: 13.5px; line-height: 1.75; color: #64748b; }
  .faq-page .page-title-h1 { font-size: 24px; }

  /* ---- 新闻动态：首条大图头条 + 其余横向紧凑卡 ---- */
  .news-grid { gap: 12px; }
  .news-card .n-body { padding: 13px 16px 12px; gap: 7px; }
  .news-card h3 { font-size: 15px; min-height: auto; }
  .news-card .n-excerpt {
    font-size: 12px; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .news-card .n-meta { width: 100%; justify-content: space-between; }
  .news-card:not(:first-child) .n-thumb { flex: 0 0 118px; aspect-ratio: 4 / 3; }
  .news-card:not(:first-child) .news-card-link { flex-direction: row; align-items: stretch; }
  .news-card:not(:first-child) .n-body { padding: 10px 12px; gap: 5px; }
  .news-card:not(:first-child) h3 { font-size: 13.5px; }
  .news-card:not(:first-child) .n-excerpt { display: none; }
  .news-card:not(:first-child) .n-cat { font-size: 10px; padding: 1px 6px; align-self: flex-start; }
  .news-card:not(:first-child) .n-meta { position: static; margin-top: auto; font-size: 11px; }
}

@media (max-width: 480px) {
  .mobile-tabbar .mtab { font-size: 9.5px; }
  .m-tel { font-size: 11px; padding: 8px 8px; }
}
