/*
 * RoboMecs P4B.3E — Footer Visual Rebalance
 * Version: V6.4.9
 *
 * Goals:
 * - remove residual viewport/min-height driven vertical stretch
 * - create a compact, balanced CTA-to-footer transition
 * - keep desktop columns aligned and visually even
 * - prevent mobile gaps from expanding
 * - preserve existing footer content, social links, RTL, and Contact-page CTA suppression
 */

.footer,
.footer > .container,
.footer .footer-cta,
.footer .footer-main,
.footer .footer-brand,
.footer .footer-col,
.footer .footer-contact,
.footer .footer-actions,
.footer .footer-bottom {
  min-height: 0 !important;
  height: auto !important;
}

.footer > .container {
  display: block !important;
}

/* Compact CTA: strong but no longer visually dominates the footer. */
.footer .footer-cta {
  display: grid !important;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr) !important;
  align-items: center !important;
  align-content: center !important;
  column-gap: clamp(36px, 5vw, 76px) !important;
  row-gap: 22px !important;
  padding-top: 42px !important;
  padding-bottom: 38px !important;
  margin: 0 !important;
}

.footer .footer-cta > div:first-child {
  min-width: 0 !important;
  align-self: center !important;
}

.footer .footer-cta .eyebrow {
  margin-bottom: 14px !important;
}

.footer .footer-cta h2 {
  max-width: 900px !important;
  margin: 0 0 14px !important;
  font-size: clamp(36px, 2.7vw, 48px) !important;
  line-height: 1.04 !important;
  letter-spacing: -0.035em !important;
}

.footer .footer-cta p {
  max-width: 760px !important;
  margin: 0 !important;
  line-height: 1.55 !important;
}

.footer .footer-actions {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  align-items: center !important;
  align-content: center !important;
  align-self: center !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.footer .footer-actions .btn {
  margin: 0 !important;
  white-space: nowrap !important;
}

/* Main footer grid: tighter vertical rhythm and better column balance. */
.footer .footer-main {
  display: grid !important;
  grid-template-columns: minmax(300px, 1.3fr) minmax(145px, .62fr) minmax(235px, .92fr) minmax(180px, .68fr) !important;
  align-items: start !important;
  align-content: start !important;
  column-gap: clamp(34px, 4vw, 68px) !important;
  row-gap: 24px !important;
  padding-top: 34px !important;
  padding-bottom: 28px !important;
  margin: 0 !important;
}

.footer .footer-brand {
  display: block !important;
  align-self: start !important;
  justify-content: flex-start !important;
  padding: 0 !important;
  margin: 0 !important;
}

.footer .footer-brand .footer-logo {
  display: block !important;
  width: auto !important;
  max-width: 205px !important;
  height: auto !important;
  margin: 0 0 20px !important;
}

.footer .footer-brand .slogan {
  margin: 0 0 8px !important;
}

.footer .footer-brand > p:not(.slogan) {
  max-width: 390px !important;
  margin: 0 0 16px !important;
  line-height: 1.55 !important;
}

.footer .footer-social {
  margin: 16px 0 0 !important;
  padding: 0 !important;
}

.footer .footer-social-title,
.footer .footer-col h3 {
  margin-top: 0 !important;
}

.footer .footer-col {
  align-self: start !important;
  justify-self: stretch !important;
  padding: 0 !important;
  margin: 0 !important;
}

.footer .footer-col h3 {
  margin-bottom: 16px !important;
}

.footer .footer-col a,
.footer .footer-contact address,
.footer .footer-contact strong {
  margin-top: 0 !important;
}

.footer .footer-bottom {
  margin: 0 !important;
  padding-top: 16px !important;
  padding-bottom: 18px !important;
}

html[dir="rtl"] .footer .footer-actions {
  justify-content: flex-start !important;
}

/* Tablet/mobile: explicit sizing prevents the growing blank-space defect. */
@media (max-width: 899px) {
  .footer .footer-cta {
    display: block !important;
    padding-top: 34px !important;
    padding-bottom: 30px !important;
  }

  .footer .footer-cta h2 {
    max-width: 720px !important;
    margin-bottom: 12px !important;
    font-size: clamp(32px, 7.2vw, 44px) !important;
    line-height: 1.04 !important;
  }

  .footer .footer-cta p {
    max-width: 680px !important;
  }

  .footer .footer-actions,
  html[dir="rtl"] .footer .footer-actions {
    display: flex !important;
    justify-content: flex-start !important;
    margin-top: 22px !important;
    gap: 10px !important;
  }

  .footer .footer-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    column-gap: 26px !important;
    row-gap: 28px !important;
    padding-top: 30px !important;
    padding-bottom: 24px !important;
  }

  .footer .footer-brand {
    grid-column: 1 / -1 !important;
  }

  .footer .footer-brand > p:not(.slogan) {
    max-width: 560px !important;
  }

  .footer .footer-contact {
    grid-column: 1 / -1 !important;
  }

  .footer .footer-bottom {
    padding-top: 15px !important;
    padding-bottom: 18px !important;
  }
}

@media (max-width: 560px) {
  .footer .footer-cta {
    padding-top: 30px !important;
    padding-bottom: 26px !important;
  }

  .footer .footer-cta .eyebrow {
    margin-bottom: 12px !important;
  }

  .footer .footer-cta h2 {
    font-size: clamp(30px, 9vw, 38px) !important;
    line-height: 1.05 !important;
  }

  .footer .footer-actions,
  html[dir="rtl"] .footer .footer-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    margin-top: 20px !important;
  }

  .footer .footer-actions .btn {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .footer .footer-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    column-gap: 20px !important;
    row-gap: 24px !important;
    padding-top: 26px !important;
    padding-bottom: 20px !important;
  }

  .footer .footer-brand .footer-logo {
    max-width: 184px !important;
    margin-bottom: 17px !important;
  }

  .footer .footer-col h3 {
    margin-bottom: 13px !important;
  }
}

@media (max-width: 390px) {
  .footer .footer-main {
    grid-template-columns: 1fr !important;
    row-gap: 22px !important;
  }

  .footer .footer-brand,
  .footer .footer-contact {
    grid-column: auto !important;
  }
}
