/* Footer v2 — prototype + footer-bg watermark */
.site-footer {
  position: relative;
  overflow: visible;
  background-color: #141414;
  background-image: url("/dist/images/footer-bg.jpg");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: cover;
  color: #e5e5e5;
  font-size: 14px;
  margin-top: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
.footer-deco { display: none; }
.footer-inner {
  position: relative;
  z-index: 1;
  max-width: var(--site-maxw);
  margin: 0 auto;
  padding: 0 0;
  box-sizing: border-box;
}
.footer-main {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 200px;
  gap: 32px 20px;
  padding: 48px 0 32px;
  align-items: start;
}
.footer-brand,
.footer-links,
.footer-aside,
.link-group {
  min-width: 0;
}
.footer-brand .footer-logo {
  font-size: 24px;
  font-weight: 400;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1.15;
}
.footer-brand .footer-logo img {
  display: block;
  height: 32px;
  width: auto;
  max-width: min(220px, 100%);
  object-fit: contain;
}
.footer-brand .footer-stock {
  color: #c30d23;
  font-size: 14px;
  font-weight: 700;
  margin: 12px 0 18px;
  letter-spacing: 0.02em;
}
.footer-contact,
.footer-hotline {
  font-style: normal;
}
.footer-honors {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-honors li {
  color: #fff;
  font-size: 14px;
  line-height: 2;
  font-weight: 400;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 28px;
  /* 四列等宽，整体居中；避免占满中间 1fr 后显得过宽 */
  width: min(100%, 640px);
  justify-self: center;
  justify-items: start;
}
.link-group h4 {
  font-size: 16px;
  color: #fff;
  margin: 0 0 14px;
  font-weight: 700;
  line-height: 1.35;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-group h4 a {
  color: #fff;
  text-decoration: none;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-group h4 a:hover { color: #c30d23; }
.link-group h4.is-follow { margin-top: 28px; }
.link-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.link-group ul.is-spaced { margin-top: 28px; }
.link-group li { margin-bottom: 6px; }
.link-group a {
  color: #555555;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
  transition: color 0.2s;
}
.link-group a:hover { color: #fff; }

a.nav-pending { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

.footer-aside {
  position: relative;
  z-index: 1;
  padding-top: 2px;
}
.footer-social {
  display: grid;
  grid-template-columns: repeat(4, 40px);
  gap: 12px 12px;
  justify-content: start;
  margin-bottom: 28px;
}
.social-ico {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 50%;
  display: block;
  color: #fff;
  text-decoration: none;
  box-sizing: border-box;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 62%;
  transition: border-color 0.15s;
}
.social-ico.ico-wechat { background-image: url(/dist/images/mswicon01.png); background-size: 82%; }
.social-ico.ico-shipinhao { background-image: url(/dist/images/shipinhao.png); background-size: 64%; }
.social-ico.ico-linkedin { background-image: url(/dist/images/linkedin.png); background-size: 68%; }
.social-ico.ico-youtube { background-image: url(/dist/images/Youtube.png); background-size: 68%; }
.social-ico.ico-toutiao { background-image: url(/dist/images/mswicon04.png); background-size: 82%; }
.social-ico.ico-sohu { background-image: url(/dist/images/mswicon05.png); background-size: 82%; }
.social-ico.ico-baidu { background-image: url(/dist/images/mswicon06.png); background-size: 82%; }
.social-ico.ico-douyin { background-image: url(/dist/images/mswicon07.png); background-size: 82%; }
.social-ico:hover { border-color: #c30d23; }
.social-qr {
  display: none;
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  width: 108px;
  margin: 0;
  padding: 6px;
  box-sizing: border-box;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
  z-index: 30;
  transform: translateX(-50%);
  pointer-events: none;
}
.social-qr::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -7px;
  border: 7px solid transparent;
  border-top-color: #fff;
}
.social-qr img {
  display: block;
  width: 96px !important;
  height: 96px !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain;
  background: #fff;
}
.social-ico.has-qr:hover .social-qr { display: block; }
.footer-aside,
.footer-social {
  overflow: visible;
}

.footer-hotline .label {
  font-size: 14px;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}
.footer-hotline .tel {
  display: inline-block;
  font-size: 24px;
  font-weight: 400;
  color: #c30d23;
  text-decoration: none;
  letter-spacing: 0.01em;
  line-height: 1.15;
  white-space: nowrap;
}
.footer-hotline .tel:hover { color: #ff3347; }

.footer-bottom {
  border-top: 1px solid #333;
  padding: 16px 0 22px;
  font-size: var(--av-fs-caption, 13px);
  color: #555555;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 14px;
  text-align: center;
  line-height: 1.8;
}
.footer-bottom a { color: #555555; text-decoration: none; }
.footer-bottom a:hover { color: #c30d23; }
.footer-ver {
  color: #555555;
  opacity: 0.4;
  font-size: 11px;
  letter-spacing: 0.02em;
  user-select: all;
  cursor: default;
}
.footer-ver:hover { opacity: 0.75; }

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(15,23,42,0.12);
  background: #ffffff;
  color: #282323;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.25s;
  box-shadow: 0 6px 20px rgba(15,23,42,0.12);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { border-color: #c30d23; color: #c30d23; box-shadow: 0 8px 24px rgba(195,13,35,0.18); }
.back-to-top svg { display: block; }

@media (max-width: 1280px) {
  .footer-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: 28px 24px;
  }
  .footer-aside {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px 32px;
    padding-top: 4px;
  }
  .footer-social {
    margin-bottom: 0;
  }
  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
    width: min(100%, 420px);
    justify-self: center;
  }
  .link-group a {
    /* 中屏仍单行省略，避免超长栏目名撑破页脚 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media (max-width: 1100px) {
  .footer-inner { padding: 0 32px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-aside {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 420px);
    justify-self: center;
  }
}
/* ===== 移动端专用页脚：品牌 → 分组横滑标签链 → 社媒/热线居中 ===== */
@media (max-width: 768px) {
  .footer-inner { padding: 0 16px; }
  .footer-main {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    padding: 32px 0 20px !important;
    gap: 22px !important;
    align-items: stretch !important;
  }
  .footer-brand {
    text-align: center;
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .footer-brand .footer-logo img { height: 26px; width: auto; }
  .footer-brand .footer-stock {
    font-size: 12px;
    margin: 0;
  }
  .footer-honors {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 10px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    max-width: 100%;
  }
  .footer-honors li {
    font-size: 11px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
    padding: 0;
  }
  .footer-honors li::before { display: none !important; }

  .footer-links {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    width: 100% !important;
    max-width: none !important;
    gap: 0 !important;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .footer-links::before { display: none !important; content: none !important; }
  .footer-links .link-group {
    grid-column: auto !important;
    grid-row: auto !important;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin: 0;
  }
  .footer-links .link-group:last-child { border-bottom: none; }
  .link-group h4,
  .link-group h4.is-follow {
    margin: 0 0 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #fff !important;
    white-space: normal;
    letter-spacing: 0.02em;
  }
  /* 分组标题链接：保持标题样式，勿做成胶囊 */
  .link-group h4 > a {
    display: inline !important;
    color: #fff !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
    max-width: none !important;
    white-space: normal !important;
  }
  .link-group h4 > a:hover,
  .link-group h4 > a:active {
    color: #ffb4bb !important;
    border: none !important;
    background: none !important;
  }
  .link-group ul,
  .link-group ul.is-spaced {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }
  .link-group li {
    margin: 0 !important;
    padding: 0 !important;
  }
  /* 仅子链接做成胶囊标签 */
  .link-group ul a {
    display: inline-block !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 12px !important;
    line-height: 1.3 !important;
    color: rgba(255, 255, 255, 0.62) !important;
    padding: 5px 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    box-sizing: border-box;
  }
  .link-group ul a:hover,
  .link-group ul a:active {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
    background: rgba(255, 255, 255, 0.08) !important;
  }

  .footer-aside {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    text-align: center;
    padding-top: 4px;
  }
  .footer-social {
    justify-content: center;
    margin: 0;
    gap: 12px;
  }
  .footer-hotline {
    align-items: center;
    text-align: center;
  }
  .footer-hotline .label {
    font-size: 11px;
    letter-spacing: 0.04em;
  }
  .footer-hotline .tel {
    font-size: 20px;
    line-height: 1.2;
  }
  .footer-bottom {
    padding: 14px 0 22px;
    text-align: center;
  }
  .footer-bottom .footer-copy,
  .footer-bottom p {
    font-size: 11px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.4);
  }
  .back-to-top { right: 14px; bottom: 14px; width: 40px; height: 40px; }
}
@media (max-width: 520px) {
  .footer-inner { padding: 0 14px; }
  .footer-main { padding: 28px 0 18px !important; gap: 18px !important; }
  .link-group h4 { font-size: 13px !important; }
  .link-group ul a { font-size: 11.5px !important; padding: 4px 9px !important; }
  .footer-hotline .tel { font-size: 18px; }
  .footer-social { gap: 10px; }
}

/* av-fold-mobile */
/* Dual/triple fold (Mate XT unfolded CSS size, or a hinge). Excludes 1920 desktop and 1440x900 laptop. */
@media (min-width: 1200px) and (max-width: 1650px) and (min-aspect-ratio: 4/3) and (max-aspect-ratio: 29/20),
       (min-width: 769px) and (max-width: 1199px) and (max-aspect-ratio: 3/2),
       (min-width: 769px) and (max-width: 1200px) and (max-aspect-ratio: 3/4),
       (spanning: single-fold-vertical),
       (spanning: single-fold-horizontal),
       (horizontal-viewport-segments: 2),
       (horizontal-viewport-segments: 3),
       (vertical-viewport-segments: 2),
       (vertical-viewport-segments: 3) {

  .footer-inner { padding: 0 20px; }
  .footer-main { grid-template-columns: 1fr; padding: 40px 0 24px; gap: 28px; }
  /* 两竖列：左产品/关于，右算法库+案例；中间淡灰竖线 */
  .footer-links {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 28px;
    row-gap: 28px;
    position: relative;
  }
  .footer-links::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.14);
    transform: translateX(-50%);
    pointer-events: none;
  }
  .footer-links .link-group:nth-child(1) { grid-column: 1; grid-row: 1; }
  .footer-links .link-group:nth-child(2) { grid-column: 2; grid-row: 1; }
  .footer-links .link-group:nth-child(3) { grid-column: 2; grid-row: 2; }
  .footer-links .link-group:nth-child(4) { grid-column: 1; grid-row: 2; }
  .footer-aside {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .link-group a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .footer-brand .footer-logo img { height: 28px; }
  .footer-bottom { padding: 16px 0 24px; }
  .back-to-top { right: 16px; bottom: 16px; width: 40px; height: 40px; }
}
