/* ============================================================
   页脚重构（全站统一）
   解决：1) .footnav 被 inline height:140px 裁切
         2) .footer 固定 417px 导致留白怪异
         3) 版权文字居中长句过散
         4) 站点地图列宽固定 111px 导致换行拥挤
         5) 语言切换与站点地图混排、无视觉层次
   加载顺序置于 legacy.css / responsive.css 之后，确保生效。
   ============================================================ */

.footer {
  height: auto !important;
  min-height: 0 !important;
  padding: 52px 24px 76px !important;
  background: #1e1c1b !important;
  border-top: 3px solid #cc9966;
  color: #a9a4a0;
  font-size: 13px;
  box-sizing: border-box !important;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 1. 版权 / 备案区 ---------- */
.footer .copy {
  display: block;
  max-width: 690px;
  margin: 0 auto 30px;
  padding: 0 0 26px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  color: #8b8580;
  font-size: 12px;
  line-height: 2.05;
  text-align: center;
  letter-spacing: .015em;
  word-break: normal;
  overflow-wrap: break-word;
}

/* 公安备案图标行：收紧留白 */
.footer .copy > div {
  width: auto !important;
  margin: 0 auto 14px !important;
  padding: 0 !important;
  line-height: 20px;
}
.footer .copy img {
  vertical-align: middle;
  opacity: .85;
}
.footer .copy a {
  color: #918b87;
  text-decoration: none;
}
.footer .copy a:hover {
  color: #cc9966;
}

/* 说明段：拉开与备案号的距离，读起来不挤 */
.footer .copy br {
  line-height: 1.95;
}

/* ---------- 2. 页脚导航容器 ---------- */
.footer .foot_nav_w {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 26px;
  width: 100% !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

/* ---------- 3. 站点地图（上） ---------- */
.footer .footnav {
  order: 1;
  display: flex !important;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 24px 16px;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  align-content: flex-start !important;
  flex: 0 0 auto !important;
  flex-basis: auto !important;
  overflow: visible !important;
  float: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0;
  list-style: none;
}

.footer .footnav > li {
  flex: 1 1 108px;
  min-width: 108px;
  max-width: 200px;
  width: auto !important;
  min-height: 0 !important;
  height: auto !important;
  float: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-left: 0 !important;
  border-top: 0 !important;
  box-sizing: border-box;
}

/* 一级：栏目名 */
.footer .footnav > li > a {
  display: block;
  padding-bottom: 9px;
  margin-bottom: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  color: #d8d2cc !important;
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: .02em;
  text-decoration: none;
}
.footer .footnav > li > a:hover {
  color: #cc9966 !important;
}

/* 二级：子栏目 */
.footer .footnav .sub_menu {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  position: static;
  width: auto;
}
.footer .footnav .sub_menu > li {
  display: block;
  width: auto;
  height: auto;
  line-height: 1.65;
  padding: 3px 0;
  border: 0;
  margin: 0;
}
.footer .footnav .sub_menu > li > a {
  color: #8c8681 !important;
  font-size: 12px;
  text-decoration: none;
  display: block;
  transition: color .15s ease, transform .15s ease;
}
.footer .footnav .sub_menu > li > a:hover {
  color: #e8e2da !important;
  transform: translateX(2px);
}

/* ---------- 4. 语言切换（下） ---------- */
.footer .foot_nav {
  order: 2;
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 22px 0 0 !important;
  margin: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, .09);
  border-left: 0 !important;
  float: none !important;
  list-style: none;
}

.footer .foot_nav > li {
  width: auto !important;
  height: auto !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  float: none !important;
}

.footer .foot_nav > li > a {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  color: #9c9691 !important;
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: all .18s ease;
}
.footer .foot_nav > li > a:hover {
  border-color: rgba(204, 153, 102, .6);
  color: #e8e2da !important;
  background: rgba(204, 153, 102, .08);
}

/* 当前语言高亮 */
.footer .foot_nav > li > a.focus {
  border-color: #cc9966;
  color: #f0e7dc !important;
  background: rgba(204, 153, 102, .14);
  font-weight: 600;
}

/* 清掉旧的分隔竖线与多余高度 */
.footer .foot_nav br,
.footer .footnav br {
  display: none;
}

/* 关键：旧样式给 .footnav li 设了 min-height:165px，会把每个子项撑成 165px 高 */
.footer .footnav li,
.footer .foot_nav li {
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
}

/* ---------- 5. 响应式 ---------- */
@media (max-width: 900px) {
  .footer {
    padding: 40px 18px 26px !important;
  }
  .footer .copy {
    max-width: 100%;
    margin-bottom: 26px;
    padding-bottom: 22px;
  }
  .footer .footnav {
    gap: 20px 14px;
  }
  .footer .footnav > li {
    flex: 1 1 96px;
    min-width: 0;
    max-width: none;
  }
  .footer .foot_nav_w {
    gap: 22px;
  }
}

@media (max-width: 560px) {
  .footer {
    padding: 32px 14px 92px !important;
    overflow-x: hidden;
  }
  .footer .copy {
    font-size: 11.5px;
    line-height: 1.9;
  }
  .footer .footnav {
    gap: 18px 16px;
  }
  .footer .footnav > li {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    max-width: none;
  }
  /* 最后一项横跨整行，避免单独落单 */
  .footer .footnav > li:last-child {
    flex: 1 1 100%;
    padding-top: 4px !important;
    border-top: 1px solid rgba(255, 255, 255, .06) !important;
  }
  .footer .footnav > li:last-child .sub_menu {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
  }
  .footer .footnav > li > a {
    font-size: 12px;
  }
  .footer .foot_nav {
    gap: 7px;
    padding-top: 18px !important;
    justify-content: flex-start;
  }
  .footer .foot_nav > li > a {
    padding: 6px 11px;
    font-size: 11.5px;
  }
}
