/**
 * Site footer — scoped classes so mega-menu.css header rules never collide (Issue #23).
 */

.site-footer-columns.footer-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr);
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--spacing-3xl-lg);
  box-sizing: border-box;
  align-items: flex-start;
  gap: 30px;
}

.site-footer-columns .footer-5 {
  grid-column: auto;
}

.site-footer-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  max-width: var(--max-width);
  margin: var(--spacing-lg) auto 0;
  padding: 0 var(--spacing-3xl-lg);
  box-sizing: border-box;
}

.site-footer-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  line-height: 1;
  border-radius: 50%;
  background: var(--background-color-gray-light, #eee);
  color: var(--text-color-gray-darker, #333);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-footer-social__link i {
  display: block;
  line-height: 1;
  font-size: 16px;
}

.site-footer-social__link:hover {
  background: var(--primary-color);
  color: var(--white);
}

/* Issue #9 — black social bar that sits above the main footer columns. */
.site-footer-social-bar {
  background-color: #000;
  color: #fff;
  padding: 14px 0;
  display: flex;
}

.site-footer-social-bar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--spacing-3xl-lg);
  box-sizing: border-box;
}

.site-footer-social-bar__label {
  color: #fff;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-strong);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Variant of .site-footer-social used when nested in the black bar:
   override the gray bubble + dark icon so the bar reads as one cohesive
   strip with white icons. */
.site-footer-social.site-footer-social--bar {
  margin: 0;
  padding: 0;
  max-width: none;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer-social.site-footer-social--bar .site-footer-social__link {
  background: transparent;
  color: #fff;
  width: 32px;
  height: 32px;
}

.site-footer-social.site-footer-social--bar .site-footer-social__link:hover {
  background: var(--primary-color);
  color: #fff;
}

@media only screen and (max-width: 600px) {
  .site-footer-social-bar__inner {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media only screen and (max-width: 1024px) {
  .site-footer-columns.footer-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer-columns .footer-5 {
    grid-column: 1 / -1;
  }
}

@media only screen and (max-width: 600px) {
  .site-footer-columns.footer-wrap {
    grid-template-columns: 1fr;
  }

  .site-footer-social {
    justify-content: flex-start;
  }
}
