/* AIIA v50 FOOTER HARD RESTORE
   Fixes the v47 mistake: footer columns stay columns; ONLY social icons are inline.
   This file intentionally overwrites assets/css/aiia-public-v47-social-inline.css because current pages already load that file. */

/* Footer container */
.site-footer,
footer.site-footer,
footer.aiia-footer,
.aiia-footer {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  min-height: unset !important;
  overflow: hidden !important;
  padding: clamp(48px, 6vw, 78px) 0 clamp(24px, 3vw, 36px) !important;
  background-color: rgba(3, 12, 24, .92) !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-position: center !important;
  border-top: 1px solid rgba(255,255,255,.08) !important;
  color: rgba(255,255,255,.78) !important;
}

/* Main footer columns: force proper grid again */
.site-footer .footer-grid,
footer.site-footer .footer-grid,
.aiia-footer .footer-grid,
footer .footer-grid {
  display: grid !important;
  grid-template-columns: minmax(280px, 1.45fr) minmax(140px,.7fr) minmax(190px,.85fr) minmax(250px,1fr) !important;
  align-items: start !important;
  justify-content: center !important;
  gap: clamp(28px, 4vw, 64px) !important;
  width: min(1180px, calc(100% - 48px)) !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
}

/* Each footer column must be vertical */
.site-footer .footer-grid > *,
footer.site-footer .footer-grid > *,
.aiia-footer .footer-grid > *,
footer .footer-grid > * {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  white-space: normal !important;
  text-align: left !important;
}

/* Footer text and links: not inline row */
.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer p,
.site-footer a,
.site-footer span,
footer.site-footer h1,
footer.site-footer h2,
footer.site-footer h3,
footer.site-footer h4,
footer.site-footer p,
footer.site-footer a,
footer.site-footer span {
  white-space: normal !important;
}

.site-footer h4,
footer.site-footer h4,
.aiia-footer h4,
footer h4 {
  display: block !important;
  margin: 0 0 14px !important;
  color: #fff !important;
  font-size: 16px !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
}

.site-footer .footer-grid > div:not(.footer-brand) > a,
footer.site-footer .footer-grid > div:not(.footer-brand) > a,
.aiia-footer .footer-grid > div:not(.footer-brand) > a,
footer .footer-grid > div:not(.footer-brand) > a {
  display: block !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
  color: rgba(255,255,255,.72) !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
  text-decoration: none !important;
  flex: none !important;
}

.site-footer .footer-brand,
footer.site-footer .footer-brand {
  max-width: 380px !important;
}
.site-footer .footer-brand .brand,
.site-footer .footer-brand .brand-logo,
footer.site-footer .footer-brand .brand,
footer.site-footer .footer-brand .brand-logo {
  display: inline-flex !important;
  align-items: flex-start !important;
  width: fit-content !important;
  max-width: 190px !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
}
.site-footer .footer-brand img,
footer.site-footer .footer-brand img {
  display: block !important;
  width: min(180px, 100%) !important;
  height: auto !important;
  object-fit: contain !important;
}
.site-footer .footer-brand p,
footer.site-footer .footer-brand p {
  max-width: 430px !important;
  margin: 0 !important;
  font-size: 15px !important;
  line-height: 1.8 !important;
  color: rgba(255,255,255,.68) !important;
}

/* ONLY the social row is horizontal */
.site-footer .aiia-social-row-v15,
footer.site-footer .aiia-social-row-v15,
.aiia-footer .aiia-social-row-v15,
footer .aiia-social-row-v15,
.site-footer [aria-label*="social" i].aiia-social-row-v15,
footer [aria-label*="social" i].aiia-social-row-v15 {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 14px 0 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}

.site-footer .aiia-social-row-v15 a,
footer.site-footer .aiia-social-row-v15 a,
.aiia-footer .aiia-social-row-v15 a,
footer .aiia-social-row-v15 a,
.site-footer a.aiia-social-link-v15,
footer.site-footer a.aiia-social-link-v15 {
  display: inline-grid !important;
  place-items: center !important;
  flex: 0 0 44px !important;
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,.26) !important;
  background: rgba(255,255,255,.08) !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
}

/* Footer bottom stays on its own row */
.site-footer .footer-bottom,
footer.site-footer .footer-bottom,
.aiia-footer .footer-bottom,
footer .footer-bottom {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  width: min(1180px, calc(100% - 48px)) !important;
  max-width: 1180px !important;
  margin: 38px auto 0 !important;
  padding-top: 22px !important;
  border-top: 1px solid rgba(255,255,255,.08) !important;
  color: rgba(255,255,255,.58) !important;
  white-space: normal !important;
  text-align: left !important;
}
.site-footer .footer-bottom > *,
footer.site-footer .footer-bottom > * {
  display: block !important;
  flex: none !important;
  min-width: 0 !important;
  white-space: normal !important;
}
.site-footer .footer-bottom a,
footer.site-footer .footer-bottom a {
  display: inline-block !important;
  white-space: nowrap !important;
  color: rgba(255,255,255,.72) !important;
}

/* Make the old broad v47 rules harmless */
.site-footer [class*="social"]:not(.aiia-social-row-v15):not(.aiia-social-link-v15),
footer.site-footer [class*="social"]:not(.aiia-social-row-v15):not(.aiia-social-link-v15) {
  max-width: 100% !important;
}

@media (max-width: 1000px) {
  .site-footer .footer-grid,
  footer.site-footer .footer-grid,
  .aiia-footer .footer-grid,
  footer .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .site-footer,
  footer.site-footer,
  .aiia-footer {
    padding-top: 42px !important;
  }
  .site-footer .footer-grid,
  footer.site-footer .footer-grid,
  .aiia-footer .footer-grid,
  footer .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 26px !important;
    width: min(100% - 32px, 520px) !important;
  }
  .site-footer .footer-bottom,
  footer.site-footer .footer-bottom,
  .aiia-footer .footer-bottom,
  footer .footer-bottom {
    flex-direction: column !important;
    align-items: flex-start !important;
    width: min(100% - 32px, 520px) !important;
    margin-top: 30px !important;
  }
  .site-footer .aiia-social-row-v15,
  footer.site-footer .aiia-social-row-v15 {
    gap: 10px !important;
  }
  .site-footer .aiia-social-row-v15 a,
  footer.site-footer .aiia-social-row-v15 a,
  .site-footer a.aiia-social-link-v15,
  footer.site-footer a.aiia-social-link-v15 {
    flex-basis: 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
  }
}
