/* ==========================================================================
   MLZ 页尾系统 v1 · 2026-11-04
   四段式：行动区 / 导航区 / 信任区 / 版权条
   桌面与移动端共用一套结构，靠 grid 列数与断点适配
   ========================================================================== */

/* ---- 0. 隔离旧版单行页尾规则（旧规则为 `footer .container{display:flex}`，
        会击穿 .foot-nav 的 grid 布局，这里用更高特异性收回） ---- */
footer.site-footer { padding: 0 !important; }
footer.site-footer .container {
  display: block;
  justify-content: normal;
  flex-wrap: nowrap;
  gap: 0;
}
footer.site-footer .foot-nav,
footer.site-footer .foot-trust { display: grid; }
footer.site-footer .foot-bottom-inner { display: flex; }
footer.site-footer .foot-cta-inner { display: flex; }

.site-footer {
  background: #071629;
  color: #8fa9bd;
  font-size: .875rem;
  line-height: 1.7;
  margin-top: 0;
}

/* ---------- 1. 行动区 ---------- */
.foot-cta {
  background: linear-gradient(118deg, #0a2a45 0%, #0d4a58 58%, #116e62 100%);
  border-top: 1px solid rgba(63, 214, 194, .28);
  padding: 56px 0;
  position: relative;
  overflow: hidden;
}
.foot-cta::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 48px; height: 2px;
  background: #3fd6c2;
}
.foot-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.foot-cta-copy { flex: 1 1 460px; min-width: 0; }
.foot-cta-copy h2 {
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.22;
  margin-bottom: 10px;
}
.foot-cta-copy p {
  color: #b9cddc;
  font-size: .9375rem;
  max-width: 560px;
  margin: 0;
}
.foot-cta-actions {
  display: flex;
  gap: 12px;
  flex: 0 0 auto;
}
.foot-cta-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 26px;
  border-radius: 3px;
  font-size: .9375rem;
  font-weight: 700;
  white-space: nowrap;
}
.btn-outline-light {
  border: 1px solid rgba(255, 255, 255, .40);
  color: #fff;
}
.btn-outline-light:hover { background: rgba(255, 255, 255, .10); border-color: rgba(255, 255, 255, .7); }

/* ---------- 2. 导航区 ---------- */
.foot-nav {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-top: 52px;
  padding-bottom: 44px;
}
.foot-brand { max-width: 320px; }
.foot-logo { display: inline-block; margin-bottom: 14px; }
.foot-logo img { height: 40px; width: auto; filter: brightness(0) invert(1); }
.foot-brand p {
  color: #7e9ab0;
  font-size: .8125rem;
  line-height: 1.72;
  margin-bottom: 14px;
}
.foot-contact { list-style: none; }
.foot-contact li { margin-bottom: 6px; }
.foot-contact a {
  color: #c9dbe8;
  font-weight: 500;
  font-size: .875rem;
  border-bottom: 1px solid rgba(63, 214, 194, .35);
  padding-bottom: 1px;
  display: inline-block;
}
.foot-contact a:hover { color: #3fd6c2; border-color: #3fd6c2; }

.foot-col h3 {
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.foot-col ul { list-style: none; }
.foot-col li { margin-bottom: 2px; }
.foot-col a {
  display: block;
  color: #9fb6c8;
  font-size: .875rem;
  padding: 6px 0;
  transition: color .18s;
}
.foot-col a:hover { color: #3fd6c2; }

/* ---------- 3. 信任区 ---------- */
.foot-trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, .10);
  border-top: 1px solid rgba(255, 255, 255, .10);
  border-bottom: 1px solid rgba(255, 255, 255, .10);
  padding: 0;
  overflow: hidden;
}
.foot-stat {
  background: #071629;
  padding: 20px 22px;
}
.foot-stat b {
  display: block;
  color: #3fd6c2;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 5px;
  white-space: nowrap;
}
.foot-stat span {
  display: block;
  color: #7e9ab0;
  font-size: .75rem;
  letter-spacing: .04em;
  line-height: 1.4;
}

/* ---------- 4. 版权条 ---------- */
.foot-bottom {
  padding: 20px 0 calc(20px + env(safe-area-inset-bottom));
}
.foot-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: .8125rem;
  color: #6b879b;
}
.foot-legal { list-style: none; display: flex; gap: 18px; }
.foot-legal a { color: #9fb6c8; }
.foot-legal a:hover { color: #3fd6c2; }

/* ==========================================================================
   移动端适配
   ========================================================================== */
@media (max-width: 860px) {
  /* 行动区：文字与按钮上下堆叠，按钮通栏 */
  .foot-cta { padding: 40px 0 36px !important; }
  .foot-cta-inner { flex-direction: column; align-items: stretch; gap: 22px; }
  .foot-cta-copy { flex: 1 1 auto; }
  .foot-cta-copy h2 { font-size: 1.375rem !important; line-height: 1.26 !important; margin-bottom: 10px !important; }
  .foot-cta-copy p { font-size: .9375rem !important; line-height: 1.68 !important; }
  .foot-cta-actions { flex-direction: column; gap: 10px; }
  .foot-cta-actions .btn { width: 100%; }

  /* 导航区：品牌区通栏，3 组链接分 2 列（末组通栏） */
  .foot-nav {
    grid-template-columns: 1fr 1fr !important;
    gap: 26px 20px !important;
    padding-top: 36px !important;
    padding-bottom: 32px !important;
  }
  .foot-brand { grid-column: 1 / -1; max-width: none; }
  .foot-logo img { height: 36px !important; }
  .foot-brand p { font-size: .8125rem !important; }
  .foot-col h3 { font-size: .6875rem !important; margin-bottom: 12px !important; padding-bottom: 8px !important; }
  /* 第 3 组（Resources）单独成行，避免 3 列挤压 */
  .foot-col:last-of-type { grid-column: 1 / -1; }
  .foot-col:last-of-type ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
  }
  .foot-col a {
    padding: 9px 0 !important;
    min-height: 40px;
    font-size: .875rem !important;
  }

  /* 信任区：2×2 */
  .foot-trust { grid-template-columns: 1fr 1fr !important; }
  .foot-stat { padding: 14px 14px 15px !important; }
  .foot-stat b { font-size: 1.25rem !important; }
  .foot-stat span { font-size: .6875rem !important; }

  /* 版权条：上下堆叠 */
  .foot-bottom { padding: 18px 0 calc(18px + env(safe-area-inset-bottom)) !important; }
  .foot-bottom-inner { flex-direction: column; align-items: flex-start; gap: 10px !important; font-size: .75rem !important; }
  .foot-legal { gap: 14px !important; flex-wrap: wrap; }
  .foot-legal a { font-size: .75rem !important; }
}

@media (max-width: 380px) {
  .foot-nav { grid-template-columns: 1fr !important; }
  .foot-col:last-of-type ul { grid-template-columns: 1fr; }
}
