/* ==========================================================================
   首页专用 · 集团站页脚样式
   --------------------------------------------------------------------------
   首页（index.html）用的是单页官网那一套视觉，不引入 main.css，
   因此把 main.css 里页脚相关的规则原样抽到这里单独提供。

   关键点：所有颜色变量都定义在 .site-footer / .to-top 这两个作用域内，
   没有写进 :root。这样即使 home.css 里也有同名变量（例如 --line、--bg），
   两边各用各的，不会互相覆盖，首页主体的浅灰科技风与页脚的深海军蓝
   可以同时保持原样。

   与 main.css 的页脚保持一致，改动请两边同步。
   ========================================================================== */

.site-footer,
.to-top {
  --brand: #0f3d75;
  --brand-deep: #0a2647;
  --accent: #9c1d2e;
  --brand-red: #9c1d2e;
  --surface-2: #eef3f9;
  --muted: #64748b;
  --line: #dde5ee;
  --wrap: 1360px;
  --shadow-sm: 0 2px 10px rgba(13, 27, 42, .06);
}

/* 页脚内部恢复集团站的正文字体与行高，不受首页字体影响 */
.site-footer {
  margin-top: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Hiragino Sans GB", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  text-align: left;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer img { max-width: 100%; display: block; }
.site-footer h4 { margin: 0; line-height: 1.25; font-weight: 700; }
.site-footer p { margin: 0; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }

/* main.css 里的通用容器，这里限定在页脚内使用 */
.site-footer .wrap { width: min(100% - 48px, var(--wrap)); margin: 0 auto; }

/* ---- 上部：浅色信息区 ---- */
.footer-main {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.footer-top {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  padding: 44px 0 38px;
}

/* 左侧：Logo + 联系电话 + 品牌图标入口 */
.footer-brand img { height: 40px; }
.footer-phone {
  display: block;
  margin-top: 22px;
  color: var(--brand-deep);
}
.footer-phone__label {
  display: block;
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--muted);
}
.footer-phone strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: .01em;
  color: var(--brand-deep);
}
.footer-phone:hover strong { color: var(--accent); }

/* 右侧：与顶部导航一致的一级 / 二级栏目 */
.footer-nav {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 24px;
}
.footer-col h4 {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 12px;
  color: var(--brand-deep);
}
.footer-col h4 a { color: inherit; }
.footer-col h4 a:hover { color: var(--accent); }
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li { margin-bottom: 7px; }
.footer-col a {
  font-size: 13px;
  line-height: 1.6;
  color: #5a6a7d;
  transition: color .2s;
}
.footer-col a:hover { color: var(--brand); }

/* ---- 页脚杭可仪器入口：ATIS Logo + 杭可仪器文字 ---- */
.footer-brands { margin-top: 12px; max-width: 94px; }
.footer-brands__label {
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 8px;
}
.footer-brands__list { display: flex; gap: 6px; flex-wrap: wrap; max-width: 94px; }
.footer-brand-item {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  width: fit-content;
  max-width: 94px;
  min-height: 28px;
  padding: 3px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--brand-deep);
  font-size: 11.5px;
  line-height: 1.2;
  transition: opacity .25s, transform .25s;
}
 .footer-brand-item__mark { display: inline-flex; align-items: center; flex: 0 0 auto; }
/* ATIS Logo 始终按原比例完整显示，不拉伸、不裁切。 */
.footer-brand-item img { width: auto; height: auto; max-height: 16px; max-width: 36px; object-fit: contain; }
.footer-brand-item__name { font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.footer-brand-item:hover { opacity: .82; transform: translateY(-1px); }
/* 尚未维护跳转地址时的静态占位形态 */
.footer-brand-item.is-plain { color: var(--muted); cursor: default; }
.footer-brand-item.is-plain:hover { opacity: 1; transform: none; }

/* ---- 底部：深蓝版权栏 ---- */
.footer-bottom { background: var(--brand-deep); color: rgba(255, 255, 255, .7); }
.footer-bottom__inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 0;
  font-size: 12.5px;
}
.footer-bottom a { color: rgba(255, 255, 255, .7); }
.footer-bottom a:hover { color: #fff; }

/* ---- 返回顶部（common.js 的 bindToTop 会插入这个按钮） ---- */
.to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 150;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--brand); cursor: pointer; box-shadow: var(--shadow-sm);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s, transform .25s;
}
.to-top.is-show { opacity: 1; visibility: visible; }
.to-top:hover { transform: translateY(-3px); }

/* ---- 响应式：与 main.css 保持一致 ---- */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 18px; }
}

@media (max-width: 767px) {
  .site-footer .wrap { width: calc(100% - 32px); }
  .footer-top { grid-template-columns: 1fr; gap: 26px; padding: 32px 0 26px; }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
  .footer-bottom__inner { flex-direction: column; gap: 6px; text-align: center; justify-content: center; }
}
