/* =============================================================
   Legacy Footer
   Visual design ported from liminalarc-legacy theme.
   ============================================================= */

.la-footer {
  background-color: #0e4d64 !important;
  background-image: url('../../images/footer-wave-texture-legacy.svg') !important;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  padding: 80px calc(clamp(1.5rem, 9.9vw, 9rem) + max(0px, 50vw - 750px)) 80px calc(clamp(1.5rem, 9.9vw, 9rem) + max(0px, 50vw - 750px)) !important;
  font-family: leo, sans-serif;
  color: #ffffff;
}

.la-footer-inner {
  display: flex;
  align-items: stretch;
  gap: 60px;
}

/* Left column */
.la-footer-left {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.la-footer-logo {
  width: 180px;
  height: auto;
  display: block;
  margin-bottom: 30px;
}
.la-footer-newsletter-heading {
  font-family: leo, sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: #ffffff;
  margin: 0 0 30px;
}
/* Push the form to the bottom of the stretched left column */
.la-footer-left .gform_wrapper {
  margin-top: auto;
}

/* Gravity Forms overrides */
.la-footer .gform_wrapper {
  width: 100% !important;
  max-width: 500px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
}
.la-footer .gform_wrapper form {
  display: flex !important;
  flex-direction: row !important;
}
.la-footer .gform_wrapper .gfield_label,
.la-footer .gform_wrapper .gfield_required { display: none !important; }
.la-footer .gform_wrapper .gform_body {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
.la-footer .gform_wrapper .gform_fields {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.la-footer .gform_wrapper .gfield {
  margin: 0 !important;
  padding: 0 !important;
}
.la-footer .gform_wrapper .ginput_container {
  margin: 0 !important;
}
.la-footer .gform_wrapper input[type="email"],
.la-footer .gform_wrapper input[type="text"] {
  width: 100% !important;
  height: 54px !important;
  padding: 10px 16px !important;
  border: none !important;
  border-radius: 0 !important;
  font-family: leo, sans-serif !important;
  font-size: 16px !important;
  background: #ffffff !important;
  color: #333333 !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}
.la-footer .gform_wrapper input[type="email"]::placeholder {
  color: #999999 !important;
  font-family: leo, sans-serif !important;
  font-size: 16px !important;
}
.la-footer .gform_wrapper .gform_footer {
  flex: none !important;
  width: 150px !important;
  position: relative !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}
.la-footer .gform_wrapper input[type="submit"],
.la-footer .gform_wrapper .gform_button {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: auto !important;
  height: auto !important;
  padding: 0 20px !important;
  text-align: center !important;
  line-height: 54px !important;
  background: #4abd92 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 0 !important;
  font-family: brandon-grotesque, sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 3px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  margin: 0 !important;
}
.la-footer .gform_wrapper input[type="submit"]:hover,
.la-footer .gform_wrapper .gform_button:hover {
  background: #259271 !important;
}

/* Validation errors — styled as red tooltip, no layout impact */
.la-footer .gform_wrapper .gform_validation_errors { display: none !important; }
.la-footer .gform_wrapper .gfield.gfield_error {
  position: relative !important;
  overflow: visible !important;
}
.la-footer .gform_wrapper .gfield_error input[type="email"],
.la-footer .gform_wrapper .gfield_error input[type="text"] {
  border: none !important;
  background: #ffffff !important;
}
.la-footer .gform_wrapper .validation_message,
.la-footer .gform_wrapper .gfield_validation_message {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  background: #c0392b !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-family: leo, sans-serif !important;
  font-weight: 400 !important;
  padding: 8px 12px !important;
  border-radius: 4px !important;
  white-space: nowrap !important;
  z-index: 100 !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}
.la-footer .gform_wrapper .validation_message::before,
.la-footer .gform_wrapper .gfield_validation_message::before {
  content: '' !important;
  position: absolute !important;
  bottom: 100% !important;
  left: 16px !important;
  border: 6px solid transparent !important;
  border-bottom-color: #c0392b !important;
}

/* Right column */
.la-footer-right {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 30px;
  padding-top: 20px;
}
.la-footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 30px;
}
.la-footer-link {
  font-family: brandon-grotesque, sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #ffffff;
  text-decoration: none;
  opacity: 1;
}
.la-footer-link:hover { color: #6ce0b5; text-decoration: none; }

.la-footer-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  justify-content: flex-end;
}
.la-footer-social a img {
  width: 18px;
  height: 18px;
  display: block;
  opacity: 0.9;
  transition: opacity 0.2s ease, filter 0.2s ease;
}
/* YouTube glyph sits smaller within its canvas; nudge it up to match the others */
.la-footer-social a img[alt="YouTube"] {
  width: 22px;
  height: 22px;
}
/* Tint icons to the brand green on hover (same filter as the hero service icons) */
.la-footer-social a:hover img {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(86%) sepia(18%) saturate(749%) hue-rotate(101deg) brightness(94%) contrast(91%);
}

.la-footer-copyright {
  font-family: leo, sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* Responsive */
@media (max-width: 781px) {
  .la-footer {
    padding-top: 36px;
    padding-bottom: 36px;
  }
  .la-footer-inner {
    flex-direction: column;
    gap: 28px;
  }
  .la-footer-left,
  .la-footer-right {
    flex: 0 0 100%;
    width: 100%;
  }
  .la-footer-logo {
    height: 38px;
    width: auto;
  }
  .la-footer-newsletter-heading { font-size: 22px; }
  .la-footer-right {
    align-items: flex-start;
    padding-top: 28px;
    border-top: 0.7px solid rgba(255, 255, 255, 0.3);
    gap: 28px;
  }
  .la-footer-links {
    align-items: flex-start;
    gap: 14px;
  }
  .la-footer-link { font-size: 14px; }
  .la-footer-social { justify-content: flex-start; gap: 18px; }
  .la-footer-social a img { width: 20px; height: 20px; }
  .la-footer-copyright { font-size: 12px; }
}

@media (max-width: 595px) {
  .la-footer .gform_wrapper {
    max-width: 100% !important;
  }
  .la-footer .gform_wrapper form {
    flex-direction: column !important;
    gap: 5px;
  }
  .la-footer .gform_wrapper .gform_footer {
    width: 100% !important;
    height: 54px !important;
  }
  .la-footer .gform_wrapper input[type="submit"],
  .la-footer .gform_wrapper .gform_button {
    left: 0 !important;
    transform: none !important;
    width: 100% !important;
  }
}
