/* 中航科电主站 · 移动端 H5 样式 */
:root {
  --bl: #1b6ef3;
  --dk: #0f2544;
  --tx: #17263d;
  --mu: #61728c;
  --ln: #e4eaf2;
  --gy: #f5f8fc;
  --bg: #fff;
  --warn: #d97706;
  --ok: #16a34a;
  --danger: #dc2626;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 12px rgba(15, 23, 42, .06);
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  --tab-h: 60px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--gy); color: var(--tx); font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif; }
body { padding-bottom: calc(var(--tab-h) + var(--safe-bottom)); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }

.m-boot { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
.m-boot-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--mu); }
.m-spin { width: 28px; height: 28px; border: 3px solid var(--ln); border-top-color: var(--bl); border-radius: 50%; animation: m-spin 0.8s linear infinite; }
@keyframes m-spin { to { transform: rotate(360deg); } }

/* 顶部导航 */
.m-top {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--ln);
  padding: calc(8px + var(--safe-top)) 12px 8px;
  display: flex; align-items: center; gap: 10px;
  min-height: 44px;
}
.m-top .back { font-size: 18px; padding: 4px 6px; color: var(--mu); }
.m-top .title { font-size: 17px; font-weight: 600; flex: 1; text-align: center; color: var(--dk); }
.m-top .act { font-size: 14px; color: var(--bl); padding: 4px 8px; }
/* 电话按钮：微信/手机浏览器里需要足够大的点击热区，避免点不准 */
.m-top .act.phone { font-size: 20px; padding: 8px 12px; margin: -4px -6px; line-height: 1; }
.m-top-logo { display: flex; align-items: center; gap: 8px; }
.m-top-logo img { width: 28px; height: 28px; }
.m-top-logo span { font-size: 16px; font-weight: 600; color: var(--dk); }

/* 通用容器 */
.m-page { padding: 12px; }
.m-section { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.m-section-h { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: var(--dk); margin-bottom: 12px; }
.m-section-h::before { content: ''; width: 3px; height: 14px; background: var(--bl); border-radius: 2px; }
.m-section-h .more { margin-left: auto; font-size: 13px; color: var(--mu); font-weight: 400; }

/* Hero 轮播 */
.m-hero { position: relative; width: 100%; aspect-ratio: 16/9; background: linear-gradient(135deg, #0f2544 0%, #1b6ef3 100%); border-radius: 0 0 20px 20px; overflow: hidden; }
.m-hero-track { display: flex; width: 100%; height: 100%; transition: transform .4s ease; }
.m-hero-slide { flex: 0 0 100%; height: 100%; position: relative; }
.m-hero-slide img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.m-hero-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(15,23,42,.65), rgba(15,23,42,0)); }
.m-hero-cap { position: absolute; left: 16px; right: 16px; bottom: 16px; color: #fff; font-size: 14px; font-weight: 600; z-index: 2; }
.m-hero-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.m-hero-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.4); }
.m-hero-dots span.on { background: #fff; width: 16px; border-radius: 3px; }

.m-hero-tag { padding: 14px 16px 0; color: var(--mu); font-size: 12px; }
.m-hero-h1 { padding: 4px 16px 6px; color: #fff; font-size: 22px; font-weight: 700; line-height: 1.3; }
.m-hero-sub { padding: 0 16px 14px; color: rgba(255,255,255,.85); font-size: 13px; }
/* 企业理念：与产品列表分层，弱化显示 */
.m-hero-motto { margin: -4px 0 0; padding: 0 16px 14px; color: rgba(255,255,255,.62); font-size: 11px; letter-spacing: 2px; }
.m-hero-cta { padding: 0 16px 18px; display: flex; gap: 8px; }
.m-btn { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 14px; border-radius: 18px; font-size: 14px; font-weight: 500; border: 0; cursor: pointer; }
.m-btn.primary { background: #fff; color: var(--bl); }
.m-btn.ghost { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.4); }

/* 能力宫格 */
.m-caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.m-cap { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 6px; background: #fff; border: 1px solid var(--ln); border-radius: 10px; }
.m-cap .e { font-size: 24px; }
.m-cap .n { font-size: 13px; font-weight: 600; color: var(--dk); margin-top: 4px; }
.m-cap .d { font-size: 11px; color: var(--mu); margin-top: 2px; }

/* 产品卡 */
.m-prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-prod-card { background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid var(--ln); display: flex; flex-direction: column; }
.m-prod-card .cover { aspect-ratio: 4/3; background: #f0f4fa; background-size: cover; background-position: center; }
.m-prod-card .body { padding: 10px 12px 12px; }
.m-prod-card .name { font-size: 14px; font-weight: 600; color: var(--dk); }
.m-prod-card .desc { font-size: 12px; color: var(--mu); margin-top: 4px; line-height: 1.4; max-height: 3em; overflow: hidden; }

/* 优势 4 列 */
.m-adv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-adv { display: flex; gap: 10px; background: #fff; border: 1px solid var(--ln); border-radius: 10px; padding: 12px; }
.m-adv .n { font-size: 18px; font-weight: 700; color: var(--bl); line-height: 1; }
.m-adv .b { flex: 1; }
.m-adv .h { font-size: 14px; font-weight: 600; color: var(--dk); margin-bottom: 4px; }
.m-adv .d { font-size: 12px; color: var(--mu); line-height: 1.5; }

/* 核心业务 */
.m-biz { display: flex; flex-direction: column; gap: 12px; }
.m-biz-card { background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid var(--ln); display: flex; gap: 12px; padding: 12px; align-items: center; }
.m-biz-card img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; }
.m-biz-card .b { flex: 1; }
.m-biz-card .n { font-size: 14px; font-weight: 600; color: var(--dk); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.m-biz-card .n .tag { font-size: 10px; font-weight: 400; color: var(--bl); background: #eef4ff; padding: 1px 6px; border-radius: 8px; }
.m-biz-card .d { font-size: 12px; color: var(--mu); margin-top: 4px; line-height: 1.5; }

/* 合作伙伴（logo 多为扁长形，用扁格压缩上下留白） */
.m-partners { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.m-partners .p { height: 46px; background: #fff; border: 1px solid var(--ln); border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 4px 6px; overflow: hidden; }
.m-partners .p img { max-width: 100%; max-height: 100%; object-fit: contain; filter: grayscale(.2); }
.m-partners .p .fallback { font-size: 10px; color: var(--mu); line-height: 1.25; text-align: center; }
/* 院校 / 研究院伙伴（同一行两列，带说明文字） */
.m-partner-orgs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.m-partner-orgs figure { margin: 0; background: #fff; border: 1px solid var(--ln); border-radius: 8px; padding: 8px 6px; display: flex; flex-direction: column; }
.m-partner-orgs img { width: 100%; height: 52px; object-fit: contain; filter: grayscale(.2); }
.m-partner-orgs figcaption { margin-top: 4px; font-size: 10px; line-height: 1.3; color: var(--mu); text-align: center; }
/* 超窄屏（≤359px）改为 3 列，避免 logo 过小 */
@media (max-width: 359px) {
  .m-partners { grid-template-columns: repeat(3, 1fr); }
}

/* 底栏 */
.m-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff; border-top: 1px solid var(--ln); display: flex; padding-bottom: var(--safe-bottom); }
.m-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; font-size: 11px; color: var(--mu); }
.m-tabbar a.on { color: var(--bl); }
.m-tabbar a .e { font-size: 20px; line-height: 1; }
.m-tabbar .quotify { background: var(--bl); color: #fff; margin: 4px 6px; border-radius: 10px; padding: 6px 0; }
.m-tabbar .quotify .e { font-size: 18px; }
.m-tabbar .quotify .n { color: #fff; font-weight: 600; }

/* 切回电脑版浮标：默认贴左下角；有底栏的页面（body.m-has-tabbar）上移到底栏之上，
   避免压住 TabBar 最左侧的「首页」图标 */
.m-topc { position: fixed; left: 10px; bottom: 10px; z-index: 9998; font-size: 11px; color: #94a3b8;
  background: rgba(255,255,255,.9); border: 1px solid #e4eaf2; border-radius: 12px; padding: 2px 8px; }
body.m-has-tabbar .m-topc { bottom: calc(var(--tab-h) + var(--safe-bottom) + 6px); }

/* 产品体系列表 */
.m-stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.m-stat > div { background: var(--gy); border-radius: 8px; padding: 10px 4px; text-align: center; }
.m-stat b { display: block; font-size: 18px; color: var(--bl); line-height: 1.2; }
.m-stat span { font-size: 11px; color: var(--mu); }

.m-pline { display: block; background: #fff; border: 1px solid var(--ln); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.m-pline .cover { position: relative; width: 100%; aspect-ratio: 16/7; background: #f0f4fa; background-size: cover; background-position: center; }
.m-pline .cover .badge {
  position: absolute; left: 0; bottom: 0; right: 0; padding: 10px 12px; color: #fff; font-size: 16px; font-weight: 700;
  background: linear-gradient(0deg, rgba(15,23,42,.78), rgba(15,23,42,0));
}
.m-pline .b { padding: 12px; }
.m-pline .lead { font-size: 13px; color: var(--mu); line-height: 1.6; }
.m-pline .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.m-pline .tags span { font-size: 11px; color: var(--bl); background: #eef4ff; padding: 3px 8px; border-radius: 10px; }
.m-pline .subs { margin-top: 8px; font-size: 12px; color: var(--mu); line-height: 1.7; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.m-pline .subs i { font-style: normal; color: var(--bl); }
.m-pline .subs span { background: var(--gy); border: 1px solid var(--ln); border-radius: 6px; padding: 2px 7px; }
.m-pline .go { margin-top: 10px; font-size: 13px; color: var(--bl); font-weight: 600; }
.m-pline .go em { font-style: normal; }

/* 首页产品卡子产品名 */
.m-prod-card .subs { margin-top: 6px; font-size: 11px; color: var(--mu); line-height: 1.5; max-height: 3em; overflow: hidden; }
.m-prod-card .subs span { margin-right: 6px; }

/* 产品详情 */
.m-pd-cover { width: 100%; aspect-ratio: 16/9; background: #f0f4fa; background-size: cover; background-position: center; }
.m-pd-hero { background: linear-gradient(180deg, #0f2544, #1b6ef3); padding: 24px 16px 28px; color: #fff; }
.m-pd-hero h1 { font-size: 22px; line-height: 1.3; }
.m-pd-hero p { font-size: 13px; color: rgba(255,255,255,.85); margin-top: 8px; }
.m-pd-keys { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; background: #fff; }
.m-pd-keys span { background: #eef4ff; color: var(--bl); padding: 6px 10px; border-radius: 14px; font-size: 12px; }
.m-pd-cta { display: flex; gap: 8px; padding: 12px 0; background: transparent; }
.m-pd-cta .m-btn { flex: 1; height: 44px; font-size: 15px; }
.m-pd-cta .m-btn.primary { background: var(--bl); color: #fff; }
.m-pd-cta .m-btn.ghost { background: #fff; color: var(--bl); border: 1px solid var(--bl); }

/* 本页内容锚点 */
.m-pd-anchors { display: flex; gap: 8px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--ln); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.m-pd-anchors::-webkit-scrollbar { display: none; }
.m-pd-anchors a {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; max-width: 72vw;
  padding: 6px 12px; border-radius: 15px; font-size: 12px; color: var(--mu);
  background: var(--gy); border: 1px solid var(--ln); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.m-pd-anchors a b { color: var(--bl); font-size: 11px; }

/* 子产品明细 */
.m-slide { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; scroll-margin-top: 56px; }
.m-slide-h { display: flex; gap: 10px; align-items: flex-start; }
.m-slide-h .no { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: #fff; background: var(--bl); border-radius: 6px; padding: 2px 8px; line-height: 1.5; }
.m-slide-h h3 { font-size: 16px; color: var(--dk); line-height: 1.4; }
.m-slide-h p { font-size: 12px; color: var(--mu); margin-top: 4px; line-height: 1.5; }
.m-slide-img { width: 100%; height: auto; border-radius: 8px; background: #f0f4fa; margin-top: 12px; }
.m-slide-desc { font-size: 13px; color: var(--tx); line-height: 1.75; margin-top: 10px; text-align: justify; }
.m-points { display: grid; gap: 8px; margin-top: 12px; }
.m-point { background: var(--gy); border-radius: 8px; padding: 10px 12px; }
.m-point h4 { font-size: 13px; color: var(--dk); margin-bottom: 4px; }
.m-point p { font-size: 12px; color: var(--mu); line-height: 1.6; white-space: pre-line; }
.m-slide-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.m-slide-chips span { font-size: 11px; color: var(--dk); background: #f1f5fb; border: 1px solid var(--ln); border-radius: 6px; padding: 4px 8px; line-height: 1.4; }
.m-slide-foot { font-size: 12px; color: var(--bl); background: #eef4ff; border-radius: 8px; padding: 10px 12px; line-height: 1.6; margin-top: 10px; }

/* 其他产品线 */
.m-others { display: flex; flex-direction: column; }
.m-others a { display: flex; align-items: center; gap: 8px; padding: 11px 2px; border-bottom: 1px solid var(--ln); font-size: 14px; color: var(--tx); }
.m-others a:last-child { border-bottom: 0; }
.m-others .e { font-size: 16px; }
.m-others .t { flex: 1; }
.m-others .g { color: var(--mu); }

/* 新闻列表 */
.m-news-list { display: flex; flex-direction: column; gap: 10px; }
.m-news-item { display: flex; gap: 12px; background: #fff; border-radius: 10px; padding: 12px; border: 1px solid var(--ln); }
.m-news-item .img { width: 96px; height: 72px; border-radius: 6px; background: #f0f4fa; background-size: cover; background-position: center; flex-shrink: 0; }
.m-news-item .b { flex: 1; min-width: 0; }
.m-news-item .t { font-size: 14px; font-weight: 600; color: var(--dk); line-height: 1.4; max-height: 2.8em; overflow: hidden; }
.m-news-item .m { font-size: 12px; color: var(--mu); margin-top: 6px; display: flex; gap: 8px; }
.m-news-item .cat { background: #eef4ff; color: var(--bl); padding: 2px 6px; border-radius: 3px; font-size: 11px; }

.m-news-detail .m-content { background: #fff; padding: 16px; line-height: 1.8; font-size: 15px; }
.m-news-detail .m-content p { margin-bottom: 12px; }
.m-news-detail h1 { font-size: 20px; line-height: 1.4; padding: 16px 16px 0; background: #fff; }
.m-news-detail .meta { font-size: 12px; color: var(--mu); padding: 8px 16px 14px; background: #fff; border-bottom: 1px solid var(--ln); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* 筛选 chips */
.m-chips { display: flex; gap: 8px; padding: 10px 12px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.m-chips::-webkit-scrollbar { display: none; }
.m-chips .chip {
  flex: 0 0 auto; padding: 6px 14px; border-radius: 16px; font-size: 13px;
  background: #fff; border: 1px solid var(--ln); color: var(--mu);
}
.m-chips .chip.on { background: var(--bl); border-color: var(--bl); color: #fff; font-weight: 600; }

/* 列表项摘要 */
.m-news-item .s {
  font-size: 12px; color: var(--mu); line-height: 1.45; margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* 内容区通用：图片/表格在窄屏不溢出 */
.m-news-detail .m-content img { max-width: 100%; height: auto; margin: 8px 0; border-radius: 6px; }
.m-news-detail .m-content table { width: 100%; display: block; overflow-x: auto; }
.m-news-detail .m-content div, .m-news-detail .m-content span { max-width: 100%; }

/* 关于 */
.m-about-hero { background: linear-gradient(135deg, #0f2544 0%, #1b6ef3 100%); color: #fff; padding: 30px 16px 26px; text-align: center; }
.m-about-hero .logo { width: 56px; height: 56px; margin: 0 auto 10px; }
.m-about-hero h1 { font-size: 18px; }
.m-about-hero p { font-size: 12px; color: rgba(255,255,255,.8); margin-top: 4px; }
.m-about-metrics { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; padding: 12px 8px; gap: 8px; border-bottom: 1px solid var(--ln); }
.m-about-metrics .m { text-align: center; }
.m-about-metrics .v { font-size: 16px; font-weight: 700; color: var(--bl); }
.m-about-metrics .l { font-size: 11px; color: var(--mu); margin-top: 2px; }

/* 空态 / 错误 */
.m-empty { text-align: center; padding: 60px 16px; color: var(--mu); }
.m-empty .e { font-size: 36px; }
.m-empty .t { margin-top: 8px; font-size: 14px; }
.m-empty.err .e { color: var(--danger); }

/* 加载占位 */
.m-skel { background: linear-gradient(90deg, #f0f4fa 25%, #e4eaf2 50%, #f0f4fa 75%); background-size: 200% 100%; animation: m-skel 1.2s infinite; border-radius: 6px; }
@keyframes m-skel { to { background-position: -200% 0; } }

/* 搜索栏 */
.m-search { display: flex; align-items: center; gap: 8px; background: #fff; margin: 10px 12px 0; padding: 8px 12px; border-radius: 20px; border: 1px solid var(--ln); }
.m-search input { flex: 1; border: 0; outline: 0; font: inherit; padding: 4px 0; background: transparent; }
.m-search .e { color: var(--mu); }

/* 联系卡片 */
.m-contact { display: flex; flex-direction: column; gap: 8px; }
.m-contact .row { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.m-contact .row .e { font-size: 18px; color: var(--bl); }

/* 业务咨询电话卡：区分本站与自动化事业部两个电话 */
.m-split { margin-top: 10px; padding: 12px 14px; background: #eef4ff; border: 1px solid #d6e4fb;
  border-radius: 10px; font-size: 13px; line-height: 1.9; color: var(--tx); }
.m-split .t { font-weight: 600; color: var(--bl); margin-bottom: 4px; }
.m-split p { margin: 0; }
.m-split b { color: var(--dk); }
.m-split a { color: var(--bl); }