/* Go3 Footer */
.go3-footer {
  background-color: var(--wp--preset--color--deep-black);
}

/* Keep content aligned with theme container */
.go3-footer__inner {
  margin: auto;
  padding: 48px 0 24px 0;
  max-width: var(--wp--style--global--content-size) !important;
}

.go3-footer__logo img,
.go3-footer__logo svg {
  display: block;
  width: 73px;
  height: 32px;
}

.go3-footer__back {
  margin: 0;
}
.go3-footer__back-link {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--wp--preset--color--white);
}
.go3-footer__back-link:hover {
  text-decoration: none;
  color: var(--wp--preset--color--accent);
}

/* Hover states for menu items */
.go3-footer .menu-item:hover {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
}

/* Bottom row container */
.go3-footer__bottom {
  padding-top: 80px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap-reverse;
  gap: 16px; /* breathing room when it wraps */
}

/* Left block */
.go3-footer__copy {
  color: var(--wp--preset--color--white);
  font-size: 1rem;
  white-space: nowrap;
  margin: 0;
  flex: 0 0 auto;
}

/* Right block: Legal menu — GRID, single row */
.go3-footer__legal {
  list-style: none;
  margin: 0;
  padding-inline-start: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  justify-content: end;
  align-items: center;
  column-gap: clamp(12px, 2vw, 44px);
  font-size: 1rem;
}

.go3-footer__legal li a {
  white-space: nowrap;
  color: var(--wp--preset--color--white);
  text-decoration: none;
}
.go3-footer__legal li a:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* Sticky footer only on search template wrapper */
.go3-sticky-search {
  min-height: 100svh; /* use small-viewport height to avoid mobile UI jumps */
  display: flex;
  flex-direction: column;
}
.go3-sticky-search > main {
  flex: 1 0 auto;
}
.go3-sticky-search .go3-footer {
  margin-top: auto;
}

/* Responsiveness */
@media (max-width: 1024px) {
  .go3-footer__inner {
    padding: 40px 0 16px 0;
  }

  .go3-footer__top {
    min-height: 48px;
  }

  .go3-footer__bottom {
    flex-wrap: wrap;
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .go3-footer__legal {
    display: grid;
    grid-auto-flow: row;
    justify-content: start;
    align-items: start;
    row-gap: 12px;
    column-gap: 0;
  }

  .go3-footer__copy {
    margin-top: 64px !important;
    white-space: unset;
  }
}
