/**
 * 片段：footer.template.html（全站页脚）
 */

/* ========== 1200px 以下：容器收窄 ========== */
@media screen and (max-width: 1200px) {
  #footer .footer-container {
    width: 100% !important;
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }
}

/* ========== 1024px 以下：平板 / 移动主布局入口 ========== */
@media screen and (max-width: 1024px) {
  #footer {
    overflow: hidden;
    background-color: #f5f5f5;
  }

  #footer .footer-container {
    position: relative;
    width: 100% !important;
    min-height: 0 !important;
    height: auto;
    padding-top: 12px;
    padding-bottom: 72px;
    padding-left: 16px;
    padding-right: 16px;
    display: block;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }

  #footer .footer-qr {
    display: block;
    width: 100% !important;
    height: auto !important;
    margin: 0 auto;
    padding: 8px 0 16px 0;
    text-align: center;
  }

  #footer .footer-qr img {
    display: block;
    width: 88px;
    height: 88px;
    max-width: 88px;
    margin-left: auto;
    margin-right: auto;
  }

  #footer .footer-content {
    display: block;
    width: 100% !important;
    padding: 4px 12px 16px 12px;
    text-align: center;
    word-break: break-all;
    word-wrap: break-word;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }

  #footer .footer-content br:first-of-type {
    display: none;
  }

  #footer .footer-content > a:first-of-type {
    position: absolute;
    left: 16.67%;
    bottom: 12px;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    z-index: 2;
  }

  #footer .footer-content > a:first-of-type img,
  #footer .footer-content > a:first-of-type img[src*="red.png"] {
    display: block;
    width: auto;
    height: 52px;
    max-width: 52px;
    margin: 0;
  }

  #footer .footer-container > .footer-cert:nth-child(3) {
    position: absolute;
    left: 50%;
    bottom: 12px;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    z-index: 2;
  }

  #footer .footer-container > .footer-cert:nth-child(4) {
    position: absolute;
    left: 83.33%;
    bottom: 12px;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    z-index: 2;
  }

  #footer .footer-cert a {
    display: block;
    text-align: center;
    line-height: 0;
  }

  #footer .footer-cert img {
    display: block;
    width: auto;
    height: 48px;
    max-width: 96px;
    margin-left: auto;
    margin-right: auto;
  }

  #footer .footer-cert img[width="110"] {
    max-width: 96px;
    height: 48px;
  }

  #footer .footer-cert img[src*="footer01"] {
    max-width: 76px;
    height: 48px;
  }
}

/* ========== 768px 以下：手机布局 ========== */
@media screen and (max-width: 768px) {
  #footer {
    overflow: hidden;
    background-color: #f5f5f5;
    font-size: 0.8125rem;
  }

  #footer .footer-container {
    position: relative;
    width: 100% !important;
    min-height: 0 !important;
    height: auto;
    padding-top: 8px;
    padding-bottom: 62px;
    padding-left: 8px;
    padding-right: 8px;
    display: block;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }

  /* ---------- ① 二维码：顶部，居中 ---------- */
  #footer .footer-qr {
    display: block;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 auto;
    padding: 8px 0 14px 0;
    text-align: center;
  }

  #footer .footer-qr img {
    display: block;
    width: 76px;
    height: 76px;
    max-width: 76px;
    margin-left: auto;
    margin-right: auto;
  }

  /* ---------- ② 版权文案：二维码下方 ---------- */
  #footer .footer-content {
    display: block;
    width: 100% !important;
    padding: 4px 8px 12px 8px;
    font-size: 0.8125rem;
    line-height: 1.6;
    text-align: center;
    word-break: break-all;
    word-wrap: break-word;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }

  #footer .footer-content br:first-of-type {
    display: none;
  }

  #footer .footer-content a {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #333333;
  }

  #footer .footer-content a img[alt="备案图标"] {
    width: 14px;
    height: 14px;
    max-width: 14px;
    vertical-align: middle;
  }

  #footer .footer-content a[href*="beian.gov.cn"],
  #footer .footer-content a[href*="miit.gov.cn"] {
    display: inline-block;
    min-height: 32px;
    line-height: 32px;
    padding-top: 2px;
    padding-bottom: 2px;
  }

  /* ---------- ③ 底部图标栏：3 项横排（党政机关 | 找错 | 无障碍） ---------- */
  #footer .footer-content > a:first-of-type {
    position: absolute;
    left: 16.67%;
    bottom: 8px;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    z-index: 2;
  }

  #footer .footer-content > a:first-of-type img,
  #footer .footer-content > a:first-of-type img[src*="red.png"] {
    display: block;
    width: auto;
    height: 48px;
    max-width: 48px;
    margin: 0;
  }

  #footer .footer-container > .footer-cert:nth-child(3) {
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    z-index: 2;
  }

  #footer .footer-container > .footer-cert:nth-child(4) {
    position: absolute;
    left: 83.33%;
    bottom: 8px;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    z-index: 2;
  }

  #footer .footer-cert a {
    display: block;
    text-align: center;
    line-height: 0;
  }

  #footer .footer-cert img {
    display: block;
    width: auto;
    height: 44px;
    max-width: 88px;
    margin-left: auto;
    margin-right: auto;
  }

  #footer .footer-cert img[width="110"] {
    max-width: 88px;
    height: 44px;
  }

  #footer .footer-cert img[src*="footer01"] {
    max-width: 68px;
    height: 44px;
  }
}

/* ========== 480px 以下：小屏手机（字号/图标高度继承 768px 档） ========== */
@media screen and (max-width: 480px) {
  #footer .footer-container {
    padding-bottom: 54px;
    padding-left: 4px;
    padding-right: 4px;
  }

  #footer .footer-qr img {
    width: 64px;
    height: 64px;
    max-width: 64px;
  }

  #footer .footer-content > a:first-of-type,
  #footer .footer-container > .footer-cert:nth-child(3),
  #footer .footer-container > .footer-cert:nth-child(4) {
    bottom: 6px;
  }
}
