.site-footer {
  background: #111;
  color: #fff;
}

.site-footer__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}

.site-footer__dynamic > .region,
.site-footer__dynamic > .region-footer,
.site-footer__dynamic > div:not([class]) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid #333;
}

.site-footer__dynamic .block {
  min-width: 0;
}

.site-footer__dynamic .block__title,
.site-footer__dynamic h2,
.site-footer__dynamic h3 {
  margin: 0 0 18px;
  color: #bbb;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.2em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* The menu block contains the first two columns from the CMS menu. */
.site-footer__dynamic > div:not([class]) > nav {
  grid-column: span 2;
  min-width: 0;
}

.site-footer__dynamic > div:not([class]) > nav > h2 {
  display: none;
}

.site-footer__dynamic > div:not([class]) > nav > ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 32px;
}

/* The live menu template renders nav > .site-footer__column > ul. */
#block-sjm-website-footer-nav
  > .site-footer__column
  > ul.site-footer__links:not(.site-footer__links--sub) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 32px;
}

#block-sjm-website-footer-nav
  > .site-footer__column
  > ul.site-footer__links:not(.site-footer__links--sub)
  > li {
  min-width: 0;
  margin: 0;
}

/* In the Drupal menu, the group label is the direct link of each top-level item. */
#block-sjm-website-footer-nav
  > .site-footer__column
  > ul.site-footer__links:not(.site-footer__links--sub)
  > li
  > a.site-footer__link {
  display: block;
  margin: 0 0 18px;
  color: #bbb;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.2em;
  line-height: 1.2;
  text-transform: uppercase;
}

.site-footer__dynamic > div:not([class]) > nav > ul > li {
  min-width: 0;
}

.site-footer__dynamic > div:not([class]) > nav > ul > li > a {
  display: block;
  margin-bottom: 18px;
  color: #bbb;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.2em;
  line-height: 1.2;
  text-transform: uppercase;
}

.site-footer__wechat,
.site-footer__brand {
  min-width: 0;
}

.site-footer__brand {
  grid-column: 1 / -1;
  order: 1;
}

.site-footer__qr {
  width: fit-content;
  border: 1px solid #fff;
  background: #fff;
  /* padding: px; */
  padding: 0;
}

.site-footer__qr img {
  display: block;
  width: 110px;
  height: 110px;
  object-fit: cover;
}

.site-footer__brand img {
  width: auto;
  max-height: 126px;
}

.site-footer__dynamic ul,
.site-footer__dynamic .menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__dynamic a {
  color: #fff;
  text-decoration: none;
}

.site-footer__dynamic a {
  font-size: 14.5px;
  line-height: 1.55;
}

.site-footer__dynamic a:hover,
.site-footer__dynamic a:focus-visible {
  color: #a8996e;
}

.site-footer__dynamic img {
  display: block;
  max-width: 100%;
  height: auto;
}

.site-footer__dynamic [id*="copyright"],
.site-footer__dynamic [class*="copyright"],
.site-footer__dynamic [id*="legal"],
.site-footer__dynamic [class*="legal"] {
  grid-column: 1 / -1;
}

.site-footer__dynamic [id*="copyright"],
.site-footer__dynamic [class*="copyright"] {
  padding-top: 26px;
  color: #bbb;
  font-size: 13px;
  line-height: 1.4;
}

.site-footer__dynamic [id*="legal"] ul,
.site-footer__dynamic [class*="legal"] ul {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
}

.site-footer__dynamic [id*="legal"] a,
.site-footer__dynamic [class*="legal"] a {
  color: #eee;
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 48rem) {
  .site-footer__dynamic > .region,
  .site-footer__dynamic > .region-footer,
  .site-footer__dynamic > div:not([class]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__dynamic .block__title,
  .site-footer__dynamic h2,
  .site-footer__dynamic h3,
  #block-sjm-website-footer-nav
    > .site-footer__column
    > ul.site-footer__links:not(.site-footer__links--sub)
    > li
    > a.site-footer__link,
  .site-footer__dynamic > div:not([class]) > nav > ul > li > a {
    font-size: var(--sjm-mobile-label) !important;
  }

  .site-footer__dynamic .site-footer__links--sub a {
    font-size: 0.90625rem;
  }

  .site-footer__qr {
    /* padding: 0.5rem; */
  }
}
