/* ==========================================================================
   Site Footer component.
   Unscoped: loaded via SDC on every page that includes qde:site-footer.
   ========================================================================== */

.footer {
  background: var(--bg-inverse);
  color: rgba(255, 255, 255, 0.72);
  padding: 80px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 24px;
  margin-bottom: 64px;
}

@media (min-width: 700px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1080px) {
  .footer-grid { grid-template-columns: 1.5fr repeat(4, 1fr); gap: 40px; }
}

/* Logo sits alone: its own row below 1080px, far-left column above. */
.footer-brand { grid-column: 1 / -1; }

@media (min-width: 1080px) {
  .footer-brand { grid-column: auto; }
}

.footer .footer-social {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

/* Round outlined buttons, as in the client mock-up. */
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  opacity: 0.72;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.footer-social a:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.42);
}

/* Uploaded icons are forced to white to match the footer links. */
.footer-social__icon {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* Privacy/Terms sit beside the copyright; the icons take the far end. */
.footer-bottom:has(.footer-social) { column-gap: 24px; }
.footer-bottom .footer-social { margin-inline-start: auto; }

.footer-logo {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  margin: 0 0 24px;
}

.footer-address-col p {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

.footer-address-col p + p {
  margin-top: 22px;
}

.footer-address-col a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 14px;
}

.footer-address-col a:hover { color: #fff; }

.footer h5 a,
.footer .footer-address-col h5 span {
  font-family: "Inter", "IBM Plex Sans Arabic", sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  margin: 0 0 16px;
  font-weight: 500;
}

.footer h5 a {
  /* color: inherit; */
  text-decoration: none;
}

.footer h5 a:hover { color: rgba(255, 255, 255, 0.7); }

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.42);
}

.footer-bottom a {
  color: inherit;
  font-size: 12px;
}

.footer-bottom__links {
  display: flex;
  gap: 24px;
}

.u-m-0 { margin: 0 !important; }

/* Mobile: divider under the logo; the bottom bar stacks with the icons on
   their own row first, start-aligned and clear of the reCAPTCHA badge. */
@media (max-width: 699px) {
  .footer-brand {
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .footer-brand .footer-logo { margin-bottom: 0; }

  /* Find us takes a full row, as in the mock-up. */
  .footer-address-col { grid-column: 1 / -1; }

  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-bottom .footer-social { order: -1; margin-inline-start: 0; }
}
