/* =====================================================
   site.css —— 官网结构样式(主题无关)+ classic 默认令牌
   主题 = themes/<id>/theme.css 在 body.theme-<id> 上覆盖变量/微调;
   本文件不写任何主题色魔数(一律走 var 令牌)。
   设计规格:容器≤1200px/字阶3级/正文15px·行高1.7/触控≥44px/
   断点 768px(平板)·480px(手机)。
   ===================================================== */

:root {
  /* 颜色令牌(classic 默认;主题覆盖点) */
  --c-primary: #1f2937;        /* 主色:标题/强调文字 */
  --c-accent: #2563eb;         /* 强调色:按钮/链接/点缀 */
  --c-accent-contrast: #ffffff;
  --bg: #ffffff;               /* 页面底 */
  --bg-alt: #f7f8fa;           /* 交替 section 底 */
  --text: #33383f;
  --text-muted: #7a828e;
  --line: #e7e9ee;             /* 1px 细线 */
  --card-bg: #ffffff;
  --header-bg: rgba(255, 255, 255, .92);
  --header-text: #1f2937;
  --footer-bg: #1b2330;
  --footer-text: #aab3bf;
  --banner-grad: linear-gradient(135deg, #e8edf5 0%, #d6e0f0 55%, #c4d2ea 100%);
  --banner-text: #1f2937;

  /* 令牌三档:阴影/圆角/间距 */
  --shadow-1: 0 1px 3px rgba(20, 30, 50, .06);
  --shadow-2: 0 6px 22px rgba(20, 30, 50, .10);
  --shadow-3: 0 14px 40px rgba(20, 30, 50, .16);
  --radius-1: 6px;
  --radius-2: 12px;
  --radius-3: 18px;

  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 40px;
  --sp-5: 64px;
  --sp-6: 96px;

  --container: 1200px;
  --header-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--c-accent); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .85; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-3); }

/* ===================== 头部导航(桌面吸顶) ===================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
/* 2026-10-30:去掉 space-between(Logo 极左+菜单极右,1200 容器内 Logo↔「首页」空出
   ~540px 不成比例)改左流式:Logo + 96px 间隔 + 菜单;汉堡钮 margin-left:auto 顶右 */
.header-inner { display: flex; align-items: center;justify-content: space-between; height: var(--header-h); }
.site-brand { display: flex; align-items: center; color: var(--header-text); font-weight: 600; font-size: 17px; }
.brand-logo { height: 36px; width: auto; }
.brand-text { letter-spacing: .5px; }
.site-nav { display: flex; gap: var(--sp-3); margin-right: var(--sp-6); }
.nav-link {
  color: var(--header-text); font-size: 15px; padding: 8px 2px;
  border-bottom: 2px solid transparent; transition: border-color .2s, opacity .2s;
}
.nav-link:hover, .nav-link.active { opacity: 1; border-bottom-color: var(--c-accent); }
.nav-burger {
  display: none; flex-direction: column; gap: 5px; justify-content: center;
  width: 44px; height: 44px; padding: 10px; background: none; border: 0; cursor: pointer;
  margin-left: auto;   /* header-inner 改左流式后,汉堡钮自行顶右(H5) */
}
.nav-burger span { display: block; height: 2px; width: 100%; background: var(--header-text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================== Banner 轮播 ===================== */
.banner { position: relative; height: min(72vh, 640px); min-height: 420px; overflow: hidden; }
.banner-track { position: relative; height: 100%; }
.banner-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease;
  background-size: cover; background-position: center; background-color: var(--bg-alt);
  display: flex; align-items: center;
}
.banner-slide.active { opacity: 1; }
.banner-slide.banner-plain { background-image: var(--banner-grad); }
/* 移动端竖版 Banner 图层:默认隐藏,H5 断点且已上传(has-m)时接管背景 */
.banner-bg-m { position: absolute; inset: 0; z-index: 0; display: none; background-size: cover; background-position: center; }
.banner-content { position: relative; z-index: 1; color: var(--banner-text); width: 100%; }
/* 文字块与头部 .container 同一坐标系(2026-10-30):左对齐=Logo 左缘、右对齐=内容区右缘。
   原模板 margin:8vw 硬编码脱容器,1600px 视口下与 Logo 差 ~96px;现容器吃 .container 的
   auto 边距(flex 主轴剩余空间被 auto 边距吸收,slide 的 justify-content 不再搬动它),
   对齐交给 text-align + 块级子元素 max-width 控制行宽。
   width:100% 必须有:slide 是 flex 容器,不铺满则容器按内容收缩、auto 边距恒居中,对齐失效 */
.banner-content.ta-left { text-align: left; }
.banner-content.ta-left > * { max-width: 640px; margin-right: auto; }
.banner-content.ta-right { text-align: right; }
.banner-content.ta-right > * { max-width: 640px; margin-left: auto; }
.banner-content.ta-center { text-align: center; }
.banner-content.ta-center > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.banner-title { font-size: clamp(28px, 4vw, 44px); line-height: 1.3; margin: 0 0 var(--sp-2); font-weight: 700; }
.banner-sub { font-size: clamp(15px, 1.6vw, 19px); margin: 0 0 var(--sp-4); opacity: .85; }
.banner-btn {
  display: inline-block; padding: 12px 34px; border-radius: var(--radius-1);
  background: var(--c-accent); color: var(--c-accent-contrast);
  font-size: 15px; font-weight: 500; transition: box-shadow .2s, transform .2s;
}
.banner-btn:hover { opacity: 1; box-shadow: var(--shadow-2); transform: translateY(-2px); }
.banner-dots {
  position: absolute; bottom: var(--sp-3); left: 0; right: 0;
  display: flex; justify-content: center; gap: 10px;
}
.banner-dots .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(128, 138, 152, .4); cursor: pointer; transition: background .2s, width .2s;
}
.banner-dots .dot.active { background: var(--c-accent); width: 24px; border-radius: 6px; }

/* ===================== Section 通用 ===================== */
.section { padding: var(--sp-6) 0; scroll-margin-top: var(--header-h); }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; margin-bottom: var(--sp-5); }
.section-title { font-size: clamp(24px, 2.6vw, 32px); color: var(--c-primary); margin: 0 0 var(--sp-2); font-weight: 700; }
.section-title::after {
  content: ""; display: block; width: 40px; height: 3px; margin: var(--sp-2) auto 0;
  border-radius: 2px; background: var(--c-accent);
}
.section-desc { color: var(--text-muted); margin: var(--sp-2) 0 0; font-size: 15px; }
.empty-tip { text-align: center; color: var(--text-muted); padding: var(--sp-5) 0; }
.btn-ghost {
  display: inline-block; padding: 10px 26px; border: 1px solid var(--line);
  border-radius: var(--radius-1); color: var(--text); font-size: 14px;
  transition: border-color .2s, color .2s;
}
.btn-ghost:hover { opacity: 1; border-color: var(--c-accent); color: var(--c-accent); }

/* ===================== 产品 ===================== */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-3); }
.product-card {
  background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius-2);
  overflow: hidden; box-shadow: var(--shadow-1);
  transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.product-img { aspect-ratio: 4 / 3; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-icon { padding: var(--sp-3) var(--sp-3) 0; }
.product-icon img { width: 72px; height: 72px; object-fit: contain; border-radius: var(--radius-1); }
.product-body { padding: var(--sp-3); }
.product-name { font-size: 18px; color: var(--c-primary); margin: 0 0 var(--sp-1); }
.product-summary { color: var(--text-muted); margin: 0 0 var(--sp-2); }
.product-link { font-size: 14px; font-weight: 500; }

/* ===================== 案例 ===================== */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-3); }
.case-card {
  display: block; color: var(--text);
  background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius-2);
  padding: var(--sp-3); box-shadow: var(--shadow-1);
  transition: transform .2s ease, box-shadow .2s ease;
}
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); opacity: 1; }
/* 案例详情页(2026-10-30):整卡 <a> 跳 /case/<id>(对齐 news-card 模式),
   客户外链移到详情页(卡片内不能嵌 <a>) */
.case-detail-head { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-2); }
.case-detail-head img { width: 56px; height: 56px; object-fit: contain; border-radius: var(--radius-1); }
.case-lead { color: var(--text-muted); font-size: 15px; margin: 0 0 var(--sp-3); }
.case-visit { margin: var(--sp-4) 0 0; padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.case-logo { margin-bottom: var(--sp-2); }
.case-logo img { width: 64px; height: 64px; object-fit: contain; border-radius: var(--radius-1); }
.case-name { font-size: 17px; color: var(--c-primary); margin: 0 0 6px; display: inline-block; }
.case-industry {
  display: inline-block; margin-left: var(--sp-1); padding: 2px 10px; font-size: 12px;
  border-radius: 999px; color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 10%, transparent);
}
.case-summary { color: var(--text-muted); margin: var(--sp-2) 0 0; font-size: 14px; }
.case-link { font-size: 14px; }

/* ===================== 新闻 ===================== */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-3); }
.news-card, .news-item {
  background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius-2);
  overflow: hidden; color: var(--text); display: block;
  box-shadow: var(--shadow-1); transition: transform .2s ease, box-shadow .2s ease;
}
.news-card:hover, .news-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); opacity: 1; }
.news-cover { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-alt); }
.news-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.news-card:hover .news-cover img, .news-item:hover .news-cover img { transform: scale(1.04); }
.news-cover-plain { background-image: var(--banner-grad); }
.news-body { padding: var(--sp-2) var(--sp-3) var(--sp-3); }
.news-date { font-size: 13px; color: var(--text-muted); }
.news-title { font-size: 16px; color: var(--c-primary); margin: 6px 0; line-height: 1.5; }
.news-summary { font-size: 14px; color: var(--text-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-more { text-align: center; margin-top: var(--sp-4); }

/* 新闻列表页(横排条目) */
.news-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.news-item { display: grid; grid-template-columns: 260px 1fr; }
.news-item .news-cover { aspect-ratio: 16 / 9; height: 100%; }
.pager { display: flex; align-items: center; justify-content: center; gap: var(--sp-3); margin-top: var(--sp-4); }
.pager-info { color: var(--text-muted); font-size: 14px; }

/* 新闻详情 */
.article-wrap { max-width: 860px; }
.article { background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius-2); padding: var(--sp-5) var(--sp-4); box-shadow: var(--shadow-1); }
.article-title { font-size: clamp(22px, 3vw, 30px); color: var(--c-primary); margin: 0 0 var(--sp-2); line-height: 1.4; }
.article-meta { display: flex; gap: var(--sp-2); color: var(--text-muted); font-size: 13px; padding-bottom: var(--sp-3); border-bottom: 1px solid var(--line); margin-bottom: var(--sp-3); }
.article-cover { margin-bottom: var(--sp-3); border-radius: var(--radius-1); overflow: hidden; }
.article-back { text-align: center; margin-top: var(--sp-4); }

/* ===================== 关于 ===================== */
/* 顶边对齐(2026-10-30):原 align-items:center 在正文长于图片时把图片垂直居中,
   图片上沿落到文字上沿之下;改顶边恒平 */
.about-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); align-items: flex-start; }
.about-wrap.about-text-only { grid-template-columns: 1fr; }
.about-image img { border-radius: var(--radius-2); box-shadow: var(--shadow-2); aspect-ratio: 8 / 5; object-fit: cover; width: 100%; }

/* 富文本注入隔离区:只做基础排版继承(防客户粘贴样式错乱) */
.rich > *:first-child { margin-top: 0; }
.rich p { margin: 0 0 var(--sp-2); }
.rich h2, .rich h3, .rich h4 { color: var(--c-primary); margin: var(--sp-3) 0 var(--sp-2); line-height: 1.4; }
.rich h2 { font-size: 20px; } .rich h3 { font-size: 17px; } .rich h4 { font-size: 15px; }
.rich img { max-width: 100%; height: auto; border-radius: var(--radius-1); margin: var(--sp-2) 0; }
.rich ul, .rich ol { margin: 0 0 var(--sp-2); padding-left: 22px; }
.rich a { word-break: break-all; }
.rich blockquote { margin: 0 0 var(--sp-2); padding: var(--sp-2) var(--sp-3); border-left: 3px solid var(--c-accent); background: var(--bg-alt); border-radius: 0 var(--radius-1) var(--radius-1) 0; }
.rich table { border-collapse: collapse; width: 100%; margin: var(--sp-2) 0; }
.rich td, .rich th { border: 1px solid var(--line); padding: 8px 12px; }
.product-brief.rich { font-size: 14px; color: var(--text-muted); max-height: 120px; overflow: hidden; position: relative; }
/* 底部渐隐带只在内容真被截断时显示(site.js 比对 scrollHeight 加 .is-clipped)——
   此前常驻渐隐把没超高的短说明最后一行也越压越淡(2026-10-29 官网实报"最后一行字越来越淡") */
.product-brief.rich::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: linear-gradient(transparent, var(--card-bg)); display: none; }
.product-brief.rich.is-clipped::after { display: block; }

/* ===================== 联系/留言 ===================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: var(--sp-5); align-items: start; }
.contact-item { display: flex; flex-direction: column; gap: 4px; padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.ci-label { font-size: 13px; color: var(--text-muted); }
.contact-item.wechat { align-items: flex-start; border-bottom: 0; padding-top: var(--sp-3); }
.contact-item.wechat img { width: 140px; height: 140px; object-fit: contain; border-radius: var(--radius-1); border: 1px solid var(--line); }
.contact-item.wechat span { font-size: 13px; color: var(--text-muted); margin-top: var(--sp-1); }
.contact-form { background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius-2); padding: var(--sp-4); box-shadow: var(--shadow-1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.contact-form input, .contact-form textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; font-size: 15px; font-family: inherit;
  color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-1);
  outline: none; transition: border-color .2s;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--c-accent); }
.contact-form textarea { min-height: 140px; resize: vertical; margin-bottom: var(--sp-2); }
.form-submit { border: 0; cursor: pointer; font-family: inherit; }
.form-tip { margin: var(--sp-2) 0 0; font-size: 14px; min-height: 22px; }
.form-tip.ok { color: #16a34a; } .form-tip.err { color: #dc2626; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* ===================== 页脚(四栏:联系/产品/关于/二维码 + 友链行 + 版权备案行) =====================
   友情链接并入页脚(2026-11-05,原独立 .friend-links 段已撤);深底全主题恒定,
   分隔线用白透(四主题 --footer-bg 均深色),标题白、正文走 --footer-text 令牌 */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: var(--sp-5) 0 var(--sp-4); margin-top: auto; }
.footer-cols { display: flex; gap: var(--sp-5); flex-wrap: wrap; }
.footer-col { min-width: 0; flex: 1; }
.footer-contact { flex: 1.6; }
.footer-col h4 { margin: 0 0 var(--sp-2); font-size: 15px; color: #fff; }
.fc-line { display: flex; gap: var(--sp-2); margin: 0 0 10px; font-size: 14px; line-height: 1.6; }
.fc-label { flex: none; }
.fc-line a { color: var(--footer-text); text-decoration: none; }
.fc-line a:hover { color: #fff; }
.f-link { display: block; margin: 0 0 10px; font-size: 14px; color: var(--footer-text); text-decoration: none; line-height: 1.6; }
.f-link:hover { color: #fff; }
.fc-qrs { display: flex; gap: var(--sp-3); }
.fc-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; }
.fc-qr img { width: 96px; height: 96px; border-radius: var(--radius-1); background: #fff; padding: 4px; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid rgba(255, 255, 255, .08); font-size: 13px; }
.fl-label { font-size: 13px; }
.fl-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--footer-text); }
.fl-item:hover { color: #fff; }
.fl-item img { height: 18px; width: auto; border-radius: 2px; }
.footer-text { margin: 0; font-size: 13px; }
.footer-icp { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--sp-3); font-size: 13px; margin-top: var(--sp-3); }
.footer-icp a { color: var(--footer-text); }
.footer-icp a:hover { color: #fff; opacity: 1; }

/* ===================== H5:移动端菜单 + 底部导航 ===================== */
.mobile-tabbar { display: none; }
@media (max-width: 768px) {
  /* 上传了移动端图的 slide:隐藏 PC 横图改显竖图层;banner 高度放宽给竖版构图 */
  .banner-slide.has-m { background-image: none !important; }
  .banner-slide.has-m .banner-bg-m { display: block; }
  .banner { height: min(88vh, 720px); min-height: 480px; }
  .site-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--header-bg);
    border-bottom: 1px solid var(--line); padding: var(--sp-1) var(--sp-3);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform .2s, opacity .2s;
  }
  .site-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-link { padding: 14px 4px; border-bottom: 0; }
  .nav-burger { display: flex; }
  .section { padding: var(--sp-5) 0; }
  .about-wrap, .contact-grid { grid-template-columns: 1fr; gap: var(--sp-3); }
  /* 页脚四栏折两栏;联系栏(最宽)独占一行 */
  .footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3) var(--sp-2); }
  .footer-contact { grid-column: 1 / -1; }
  .news-item { grid-template-columns: 132px 1fr; }
  .article { padding: var(--sp-3) var(--sp-2); }
  /* 底部固定导航条(Home/Products/Cases/Contact) */
  .mobile-tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed;
    left: 0; right: 0; bottom: 0; z-index: 99;
    background: var(--header-bg); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 50px; gap: 2px; font-size: 11px; color: var(--text-muted); padding: 4px 0;
  }
  .mobile-tabbar a.active { color: var(--c-accent); }
  .mobile-tabbar svg { width: 22px; height: 22px; }
  body { padding-bottom: 58px; }
  .site-footer { padding-bottom: var(--sp-5); }
}
@media (max-width: 480px) {
  .container { padding: 0 var(--sp-2); }
  .banner { min-height: 360px; }
  .form-row { grid-template-columns: 1fr; }
  .product-grid, .case-grid, .news-grid { grid-template-columns: 1fr; }
  /* 窄屏页脚单栏堆叠(96px 二维码 + 链接列并排太挤) */
  .footer-cols { grid-template-columns: 1fr; }
}

/* 智能客服挂件按钮:右侧垂直居中(2026-10-19 用户拍板,SDK 默认右下)。
   SDK 用内联 bottom/right 定位、样式表后注入,须 !important 压制;
   hover 自带 transform 会吃掉 -50% 居中导致按钮跳动,同步覆盖 */
.aics-sdk-trigger {
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%);
}
.aics-sdk-trigger:hover { transform: scale(1.06) translateY(calc(-50% - 2px)) !important; }
