/* =====================================================================
   QA Madness — site-wide footer (redesign)
   Scoped under .qm-footer so it doesn't touch other components. Loaded on
   every page (see functions.php). Uses literal colors because this renders
   outside the homepage's `body.home` token scope.
   ===================================================================== */
.qm-footer {
  background: #08080d;
  color: #ffffff;
  font-family: "Aktiv Grotesk QA", "Helvetica Neue", Arial, sans-serif;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding: 72px 0 28px;
}
.qm-footer *,
.qm-footer *::before,
.qm-footer *::after { box-sizing: border-box; }
.qm-footer__inner { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }

.qm-footer__cols {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

/* Brand column */
.qm-footer__logo { display: inline-block; }
.qm-footer__logo img { height: 30px; width: auto; }
.qm-footer__text { margin-top: 22px; max-width: 340px; color: #9a9aab; font-size: 14px; line-height: 1.7; }
.qm-footer__text a { color: #cbbcff; text-decoration: underline; }
.qm-footer__certs { margin: 14px 0 0; padding-bottom: 10px; color: #6f6f80; font-size: 12px; letter-spacing: 0.02em; }
.qm-footer__socials { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.qm-footer__socials a {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #9170ff 0%, #6a47f0 100%);
  display: grid;
  place-items: center;
  color: #ffffff;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.qm-footer__socials a:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(106, 71, 240, 0.4); }
.qm-footer__social-txt { font-size: 12px; font-weight: 700; }

/* Title + link columns */
.qm-footer__title {
  margin: 0 0 22px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.qm-footer__nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.qm-footer__nav a { color: #9a9aab; text-decoration: none; font-size: 14px; transition: color 0.15s ease; }
.qm-footer__nav a:hover { color: #ffffff; }

/* Reviews column */
.qm-footer__reviews { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.qm-footer__reviews img { height: 30px; width: auto; max-width: 150px; object-fit: contain; }

/* Bottom bar */
.qm-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.qm-footer__copy { margin: 0; color: #6f6f80; font-size: 13px; }
.qm-footer__policy { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.qm-footer__policy a { color: #9a9aab; text-decoration: none; font-size: 13px; }
.qm-footer__policy a:hover { color: #ffffff; }

/* Responsive */
@media (max-width: 900px) {
  .qm-footer__cols { grid-template-columns: 1fr 1fr; gap: 36px; }
  .qm-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .qm-footer { padding-top: 56px; }
  .qm-footer__cols { grid-template-columns: 1fr; gap: 32px; }
  .qm-footer__bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* Mobile layout per the design: logo, text, socials and the reviews block are
   centred and span full width; MENU + INFORMATION sit side by side as two
   columns; the bottom bar is a centred stack with the back-to-top button last. */
@media (max-width: 768px) {
  .qm-footer__cols {
    grid-template-columns: 1fr 1fr;
    gap: 34px 24px;
    text-align: center;
  }
  .qm-footer__brand,
  .qm-footer__col--reviews { grid-column: 1 / -1; }
  .qm-footer__text { margin-inline: auto; }
  .qm-footer__socials { justify-content: center; }
  .qm-footer__reviews {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 18px 28px;
  }
  /* MENU + INFORMATION keep their own left-aligned headings and links. */
  .qm-footer__col:not(.qm-footer__col--reviews) { text-align: left; }
  .qm-footer__bottom {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
  }
}
