/* ============================================================
   FOOTER (qmt_footer shortcode)
   ============================================================ */
.qmt-footer {
  width: 100%;
  background: var(--qmt-bg);
  border-top: none;
}

/* ---- Top gold pip rule ---- */
.qmt-footer__rule {
  display: flex;
  align-items: center;
  height: 1px;
}

.qmt-footer__rule-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.qmt-footer__rule-pip {
  width: 48px;
  height: 1px;
  background: var(--qmt-gold);
  flex-shrink: 0;
  position: relative;
}

.qmt-footer__rule-pip::before,
.qmt-footer__rule-pip::after {
  content: '';
  position: absolute;
  top: 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--qmt-gold);
  transform: translateY(-1px);
}
.qmt-footer__rule-pip::before { left: 0; }
.qmt-footer__rule-pip::after  { right: 0; }

/* ---- Main row ---- */
.qmt-footer__inner {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) auto;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 40px;
  gap: 32px;
}

/* Brand: logo + statement */
.qmt-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-self: start;
  align-items: flex-start;
}

.qmt-footer__logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.qmt-footer__logo--full {
  height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.25s;
}

.qmt-footer__logo--icon {
  height: 28px;
  width: auto;
  display: none;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.25s;
}

.qmt-footer__logo-link:hover .qmt-footer__logo--full,
.qmt-footer__logo-link:hover .qmt-footer__logo--icon {
  opacity: 1;
}

.qmt-footer__logo-link:focus-visible {
  outline: 2px solid #D4B060;
  outline-offset: 3px;
}

.qmt-footer__statement {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.5;
  color: var(--qmt-text-muted);
  margin: 0;
  max-width: 240px;
}

/* Nav */
.qmt-footer__nav {
  justify-self: center;
  min-width: 0;
  width: 100%;
}

.qmt-footer__nav-list {
  /* Even rows: 10 links = 2 balanced rows of 5, never a lone orphan */
  display: grid;
  grid-template-columns: repeat(5, max-content);
  justify-content: center;
  justify-items: start;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px 32px;
}

.qmt-footer__nav-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--qmt-text-dim);
  text-decoration: none;
  padding: 6px 0;
  position: relative;
  transition: color 0.25s;
  white-space: nowrap;
}

.qmt-footer__nav-link:hover,
.qmt-footer__nav-link:focus-visible {
  color: var(--qmt-text);
}

.qmt-footer__nav-link:focus-visible {
  outline: 2px solid #D4B060;
  outline-offset: 3px;
}

/* Right: socials + CTA */
.qmt-footer__right {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-self: end;
}

/* Socials row */
.qmt-footer__socials {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qmt-footer__social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--qmt-text-dim);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: color 0.25s, border-color 0.25s;
}

.qmt-footer__social:hover,
.qmt-footer__social:focus-visible {
  color: var(--qmt-gold);
  border-color: rgba(184, 150, 46, 0.2);
}

.qmt-footer__social:focus-visible {
  outline: 2px solid #D4B060;
  outline-offset: 3px;
}

/* Divider between socials and CTA */
.qmt-footer__right::before {
  content: '';
  display: block;
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

/* Footer CTA */
.qmt-footer__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--qmt-bg);
  background: var(--qmt-gold);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 2px;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: color 0.25s;
}

.qmt-footer__cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--qmt-gold-light);
  transform: translateX(-101%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.qmt-footer__cta:hover::after {
  transform: translateX(0);
}

.qmt-footer__cta:focus-visible {
  outline: 2px solid #D4B060;
  outline-offset: 3px;
}

.qmt-footer__cta span,
.qmt-footer__cta svg {
  position: relative;
  z-index: 1;
}

.qmt-footer__cta svg {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
}

.qmt-footer__cta:hover svg {
  transform: translate(2px, -2px);
}

/* ---- Bottom bar ---- */
.qmt-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.qmt-footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 40px;
  gap: 16px;
}

.qmt-footer__copyright {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--qmt-text-faint);
}

.qmt-footer__legal {
  display: flex;
  align-items: center;
  gap: 0;
}

.qmt-footer__legal-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--qmt-text-faint);
  text-decoration: none;
  padding: 0 12px;
  transition: color 0.25s;
}

.qmt-footer__legal-link:hover,
.qmt-footer__legal-link:focus-visible {
  color: var(--qmt-gold);
}

.qmt-footer__legal-link:focus-visible {
  outline: 2px solid #D4B060;
  outline-offset: 3px;
}

.qmt-footer__legal-sep {
  display: block;
  width: 1px;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
}

/* ---- Footer responsive ---- */
@media (max-width: 1080px) {
  .qmt-footer__inner {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    padding: 28px 24px;
    gap: 24px;
  }

  .qmt-footer__brand {
    grid-column: 1;
    grid-row: 1;
  }

  .qmt-footer__right {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
  }

  .qmt-footer__right::before {
    display: none;
  }

  .qmt-footer__nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    margin-left: 0;
  }

  .qmt-footer__nav-list {
    justify-content: flex-start;
  }

  .qmt-footer__bottom-inner {
    padding: 14px 24px;
  }
}

@media (max-width: 720px) {
  .qmt-footer__nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
  }
  .qmt-footer__nav-link {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
}

@media (max-width: 560px) {
  .qmt-footer__inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: 28px 20px;
    gap: 24px;
  }

  .qmt-footer__brand {
    grid-column: 1;
    grid-row: 1;
  }

  .qmt-footer__statement {
    display: block;
  }

  .qmt-footer__nav {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    margin-left: 0;
  }

  .qmt-footer__nav-list {
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 0;
  }

  .qmt-footer__nav-link {
    display: block;
    padding: 12px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .qmt-footer__right {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
    flex-wrap: wrap;
    gap: 16px;
  }

  .qmt-footer__right::before {
    display: none;
  }

  /* Enlarge social icons on mobile */
  .qmt-footer__social {
    width: 40px;
    height: 40px;
  }

  /* Switch to icon logo on small screens */
  .qmt-footer__logo--full { display: none; }
  .qmt-footer__logo--icon { display: block; }

  .qmt-footer__legal-link {
    padding: 10px 12px 10px 0;
  }

  .qmt-footer__legal-link:first-child {
    padding-left: 0;
  }

  .qmt-footer__bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 8px;
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .qmt-footer__logo--full,
  .qmt-footer__logo--icon,
  .qmt-footer__nav-link,
  .qmt-footer__social,
  .qmt-footer__cta {
    transition: none;
  }

  .qmt-footer__cta::after {
    transition: none;
  }

  .qmt-footer__cta svg {
    transition: none;
  }
}
