/* JDiag 页脚布局；现有组件仍可在 WordPress 中编辑。 */
body #footer-outer {
  background: #0b0f13;
  color: #aeb8c2;
}

body #footer-outer #footer-widgets,
body #footer-outer #copyright {
  background: #0b0f13;
}

body #footer-outer #footer-widgets {
  padding: 32px 0 28px;
}

body #footer-outer #footer-widgets > .container,
body #footer-outer #copyright > .container {
  width: min(100% - 24px, 1680px);
  max-width: 1680px;
}

body #footer-outer #footer-widgets .container > .row {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 1vw, 16px);
  margin: 0;
  padding: 0;
}

body #footer-outer #footer-widgets .container > .row > .col {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  min-width: 0;
}

/* 将可编辑的公司简介保留在页脚左上方。 */
body #footer-outer #footer-widgets .container > .row > .col:first-child {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  text-align: left;
}

body #footer-outer #footer-widgets .container > .row > .col:first-child .widget {
  margin-top: 0;
}

body #footer-outer #footer-widgets .container > .row > .col:first-child p {
  color: #949698 !important;
  text-align: left;
  margin-top: 0;
}

@media (min-width: 691px) {
  body #footer-outer #footer-widgets .container > .row {
    grid-template-columns: minmax(0, 1.8fr) repeat(4, minmax(0, 1fr)) !important;
  }

  body #footer-outer #footer-widgets .container > .row > .col {
    grid-row: 1 !important;
    width: 100% !important;
  }

  body #footer-outer #footer-widgets .container > .row > .col:nth-child(1) { grid-column: 1 !important; }
  body #footer-outer #footer-widgets .container > .row > .col:nth-child(2) { grid-column: 2 !important; }
  body #footer-outer #footer-widgets .container > .row > .col:nth-child(3) { grid-column: 3 !important; }
  body #footer-outer #footer-widgets .container > .row > .col:nth-child(4) { grid-column: 4 !important; }
  body #footer-outer #footer-widgets .container > .row > .col:nth-child(5) { grid-column: 5 !important; }
}

body #footer-outer #footer-widgets .widget {
  margin: 0 0 22px;
}

body #footer-outer #footer-widgets .widget h4 {
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
  margin: 0 0 16px;
}

body #footer-outer #footer-widgets .widget p,
body #footer-outer #footer-widgets .widget li,
body #footer-outer #copyright p,
body #footer-outer #copyright li {
  color: #aeb8c2;
  font-size: 14px;
  line-height: 1.7;
}

body #footer-outer #footer-widgets .widget_nav_menu li {
  padding: 0 0 7px;
  margin: 0;
}

body #footer-outer #footer-widgets a,
body #footer-outer #copyright a {
  color: #aeb8c2;
}

body #footer-outer #footer-widgets .widget_nav_menu li a {
  color: #949698 !important;
}

body #footer-outer #footer-widgets .widget_nav_menu li a:hover,
body #footer-outer #footer-widgets .widget_nav_menu li a:focus-visible {
  color: #fff !important;
}

body #footer-outer #footer-widgets a:hover,
body #footer-outer #copyright a:hover {
  color: #fff;
}

body #footer-outer #copyright {
  border-top: 1px solid #2b3035;
  padding: 24px 0 20px;
}

body #footer-outer #copyright > .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, auto) minmax(190px, auto);
  gap: clamp(20px, 3vw, 54px);
  align-items: end;
}

body #footer-outer #copyright .col {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
}

body #footer-outer #copyright .col.span_5 { grid-column: 1; }
body #footer-outer #copyright .col.span_5 p { margin: 0; }
body #footer-outer #copyright .col.span_7 { display: none; }
body #footer-outer #copyright .col.span_7:has(.social li) {
  display: block;
  grid-column: 1 / -1;
}

body #footer-outer #copyright .jdiag-footer-qr {
  grid-column: 2;
  align-self: end;
  margin: 0;
}

body #footer-outer #copyright .jdiag-footer-qr > .wp-block-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

body #footer-outer #copyright .jdiag-footer-qr .wp-block-group {
  min-width: 0;
}

body #footer-outer #copyright .jdiag-footer-qr figure,
body #footer-outer #copyright .jdiag-footer-qr p {
  margin: 0 0 5px;
  text-align: center;
}

body #footer-outer #copyright .jdiag-footer-qr img {
  display: block;
  width: 76px !important;
  height: auto !important;
  margin: 0 auto;
}

body #footer-outer #copyright .jdiag-footer-qr p {
  font-size: 11px;
  line-height: 1.45;
  margin-bottom: 0;
  padding-bottom: 0 !important;
}

body #footer-outer #copyright .jdiag-footer-filings {
  grid-column: 3;
  align-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  list-style: none;
  margin: 0;
  padding: 0;
}

body #footer-outer #copyright .jdiag-footer-filings li {
  display: flex;
  align-items: center;
  float: none;
  clear: both;
  width: 100%;
  margin: 3px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}

body #footer-outer #copyright .jdiag-footer-filings li:last-child {
  margin-bottom: 0;
}

body #footer-outer #copyright .jdiag-footer-filings li a {
  display: block;
  height: auto;
  line-height: 1.5;
  padding-left: 22px;
  position: relative;
}

body #footer-outer #copyright .jdiag-footer-filings .jdiag-filing-icon {
  display: block;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  object-fit: contain;
}

@media (max-width: 1000px) {
  body #footer-outer #copyright > .container {
    grid-template-columns: minmax(0, 1fr) minmax(190px, auto);
  }
  body #footer-outer #copyright .jdiag-footer-qr { grid-column: 2; }
  body #footer-outer #copyright .jdiag-footer-filings { grid-column: 1 / -1; }
}

@media (max-width: 690px) {
  body #footer-outer #footer-widgets { padding: 28px 0 24px; }
  body #footer-outer #footer-widgets .container > .row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px 12px;
  }
  body #footer-outer #footer-widgets .container > .row > .col {
    width: 100% !important;
  }
  body #footer-outer #footer-widgets .container > .row > .col:nth-child(1) { grid-column: 1 / -1 !important; grid-row: 1 !important; }
  body #footer-outer #footer-widgets .container > .row > .col:nth-child(2) { grid-column: 1 !important; grid-row: 2 !important; }
  body #footer-outer #footer-widgets .container > .row > .col:nth-child(3) { grid-column: 2 !important; grid-row: 2 !important; }
  body #footer-outer #footer-widgets .container > .row > .col:nth-child(4) { grid-column: 1 !important; grid-row: 3 !important; }
  body #footer-outer #footer-widgets .container > .row > .col:nth-child(5) { grid-column: 2 !important; grid-row: 3 !important; }
}

@media (max-width: 600px) {
  body #footer-outer #footer-widgets > .container,
  body #footer-outer #copyright > .container { width: min(100% - 32px, 1440px); }
  body #footer-outer #copyright > .container {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  body #footer-outer #copyright .col.span_5,
  body #footer-outer #copyright .jdiag-footer-qr,
  body #footer-outer #copyright .jdiag-footer-filings { grid-column: 1; }
  body #footer-outer #copyright { padding: 24px 0 20px; }
  body #footer-outer #copyright .jdiag-footer-qr { justify-self: start; }
}
