.subfooter-top__container > .row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 2rem 16rem; /* 2rem vertical gap on mobile, 16rem horizontal gap on desktop */
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.subfooter-top__container > .row > div {
  flex: 0 1 auto !important;
  width: auto !important;
  max-width: 100% !important;
  margin-right: 0 !important; /* Overrides any leftover margin */
}

/* Mobile adjustments */
@media (max-width: 991.98px) {
  .subfooter-top__container > .row {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 2rem !important;
  }
}

/* Keep your existing empty footer & underwater shell rules below */
#footer:not(:has(h1)):not(:has(h2)):not(:has(h3)):not(:has(p)):not(:has(a)),
.footer_section.footer-second:not(:has(h1)):not(:has(h2)):not(:has(h3)):not(:has(p)):not(:has(a)) {
  display: block !important;
  height: 4rem !important;
  max-height: 4rem !important;
  overflow: hidden !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.footers-container.ifc-underwater-shell {
  margin-top: auto;
}