#main-footer .gov-footer-top {
  background: #0a2d5a;
  color: var(--wp--preset--color--branco);
}

body.gov-contrast #main-footer .gov-footer-top {
  background: #000 !important;
  color: #ff0 !important;
}

#main-footer .gov-footer-map {
  width: 100%;
  border-top: 1px solid var(--wp--preset--color--cinza-medio);
  border-bottom: 1px solid var(--wp--preset--color--cinza-medio);
  background: var(--wp--preset--color--branco);
}

body.gov-contrast #main-footer .gov-footer-map {
  background: #000 !important;
  border-top-color: #ff0 !important;
  border-bottom-color: #ff0 !important;
}

#main-footer .gov-footer-map-iframe {
  display: block;
  width: 100%;
  height: 150px;
  border: 0;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 0;
  background: var(--wp--preset--color--azul);
  color: var(--wp--preset--color--branco);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  z-index: 9999;
}

body.gov-contrast .back-to-top {
  background: #ff0;
  color: #000;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

#main-footer .gov-footer-container {
  max-width: none;
  margin: 0 auto;
  padding: 16px 90px 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

#main-footer .gov-footer-endereco {
  width: 100%;
}

#main-footer .gov-footer-endereco p {
  margin: 0;
}

#main-footer .gov-footer-col {
  display: flex;
  align-items: center;
  gap: 16px;
}

#main-footer .gov-footer-social {
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
}

#main-footer .gov-footer-title {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--wp--preset--color--branco);
}

#main-footer .gov-footer-social .social-medias {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

#main-footer .gov-footer-social .social-medias a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--wp--preset--color--branco);
}

#main-footer .gov-footer-social .social-medias a:hover {
  background: rgba(255, 255, 255, 0.12);
}

#main-footer .gov-footer-social .social-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

#main-footer .gov-footer-app-link {
  color: var(--wp--preset--color--branco);
  text-decoration: none;
  font-weight: 500;
}

#main-footer .gov-footer-app-link:hover {
  text-decoration: underline;
}

#main-footer .gov-footer-brands {
  flex: 1;
  justify-content: flex-end;
}

#main-footer a.logo-govbr {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

#main-footer img.logo-govbr {
  display: block;
  height: 32px;
  width: auto;
}

#main-footer .gov-footer-govbr {
  color: var(--wp--preset--color--branco);
  text-decoration: none;
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
}

#main-footer .gov-footer-info {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--wp--preset--color--branco);
  text-decoration: none;
  font-weight: 500;
}

#main-footer .gov-footer-info-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

@media (max-width: 768px) {
  #main-footer .gov-footer-container {
    flex-wrap: wrap;
    justify-content: center;
    padding: 16px 20px;
    gap: 16px;
  }

  #main-footer .gov-footer-endereco {
    text-align: left;
  }

  #main-footer .gov-footer-col {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;
  }

  #main-footer .gov-footer-social {
    order: 2;
    align-items: center;
    flex: 0 0 100%;
    max-width: 100%;
  }

  #main-footer .gov-footer-social .social-medias {
    justify-content: center;
  }

  #main-footer .gov-footer-title {
    width: 100%;
  }

  #main-footer .gov-footer-brands {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 16px;
  }
}
