/* =====================================================================
   Footer (Figma "Footer")
   Columns wrap: three across on desktop, Site Map + Old site with Social under them on tablets,
   one under the other on phones. --sf-footer-text comes from the footer settings (footer.php).
   ===================================================================== */

footer.site-footer {
  --sf-footer-text-color: var(--sf-footer-text, var(--sf-on-dark));

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sf-gap-xl);
  padding: 56px var(--sf-gutter) 28px;
  color: var(--sf-footer-text-color);
  background-color: var(--sf-brand);
}

footer.site-footer a {
  color: var(--sf-footer-text-color);
  font-size: var(--sf-fs-sm);
  line-height: var(--sf-lh-small);
  text-decoration: none;
}

footer.site-footer a:hover {
  color: var(--sf-footer-text-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

footer.site-footer a:focus-visible {
  outline: 3px solid var(--sf-footer-text-color);
  outline-offset: 2px;
  border-radius: var(--sf-radius-xs);
}

/* ----- Columns ----- */
footer.site-footer .footer-columns {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--sf-gap-xl);
}

footer.site-footer .footer-column {
  display: flex;
  flex: 1 1 240px;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-width: 240px;
}

footer.site-footer .footer-title {
  margin: 0;
  color: var(--sf-footer-text-color);
  font-size: var(--sf-fs-h3);
  font-weight: 700;
  line-height: var(--sf-lh-card);
}

/* Site map: groups of links, each with a thin line on its left */
/* Each group's line is its own left border: as tall as its own links, not the tallest group */
footer.site-footer .sitemap-groups {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--sf-gap-sm) 40px;
}

footer.site-footer .sitemap-group {
  display: flex;
  flex-direction: column;
  gap: var(--sf-gap-xs);
  margin: 0;
  padding: 0 0 0 12px;
  list-style: none;
  border-left: 1px solid rgba(255, 255, 255, 0.5);
}

/* Social media: round buttons */
footer.site-footer .footer-social-icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

footer.site-footer .footer-social-icons a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  text-decoration: none;
  transition: background-color var(--sf-transition);
}

footer.site-footer .footer-social-icons a i {
  color: var(--sf-footer-text-color);
  font-size: 18px;
  transition: color var(--sf-transition);
}

footer.site-footer .footer-social-icons a:hover {
  background-color: var(--sf-surface);
}

footer.site-footer .footer-social-icons a:hover i {
  color: var(--sf-brand);
}

footer.site-footer .footer-social-icons a:hover i.fa-facebook-f {
  color: #2d64f6;
}

footer.site-footer .footer-social-icons a:hover i.fa-x-twitter {
  color: #000000;
}

footer.site-footer .footer-social-icons a:hover i.fa-youtube {
  color: #e9333e;
}

footer.site-footer .footer-social-icons a:hover i.fa-instagram {
  background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d, #f56040, #fcaf45, #ffdc80);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ----- Divider + bottom bar ----- */
footer.site-footer .footer-divider {
  width: 100%;
  margin: 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  opacity: 1;
}

footer.site-footer .terms-design {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 16px;
  width: 100%;
  color: var(--sf-footer-text-color);
  font-size: var(--sf-fs-sm);
  line-height: var(--sf-lh-small);
  text-align: center;
}

footer.site-footer #design {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 16px;
}

footer.site-footer .footer-brand-logo {
  display: inline-flex;
  line-height: 0;
}

footer.site-footer .footer-brand-logo svg {
  height: auto;
}

footer.site-footer .footer-crowdapps-logo svg {
  width: 64px;
}

footer.site-footer .footer-crowdpolicy-logo svg {
  width: 28px;
}

footer.site-footer .footer-brand-logo path {
  fill: var(--sf-footer-text-color);
}

@media (max-width: 575.98px) {
  footer.site-footer .footer-column {
    flex-basis: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  footer.site-footer .footer-social-icons a,
  footer.site-footer .footer-social-icons a i {
    transition: none;
  }
}
