/* Component: site-footer */

.cbf-footer-container {
  background-color: #1a1a1a;
}

/* Width-capping wrapper only — kept separate from the flex layout/padding
   below so the max-width cap can't be thrown off by anything on the
   content element. Its own padding is a deliberate extra gutter. */
.cbf-footer-width {
  margin: 0 auto;
  max-width: 1100px;
  padding-left: 20px;
  padding-right: 20px;
  width: 100%;
}

.cbf-footer-inner {
  gap: 3rem;
  padding: 70px 0 50px;
}

/* Theme applies a legacy clearfix (content + display:table) to ::before/::after
   on this element; combined with d-flex it registers as extra flex items and
   breaks justify-content-between into evenly-thirded gaps. Neutralise it. */
.cbf-footer-inner::before,
.cbf-footer-inner::after,
.cbf-footer-bottom-bar::before,
.cbf-footer-bottom-bar::after {
  content: none;
}

.cbf-footer-col {
  flex: 0 1 auto;
}

.cbf-footer-logo {
  display: inline-block;
  margin-bottom: 1.5rem;
}

.cbf-footer-logo .fl-logo-img {
  filter: brightness(0) invert(1);
  height: auto;
  max-width: 180px;
}

.cbf-footer-address-lines {
  color: #ffffff;
  font-style: normal;
  margin-bottom: 1rem;
  opacity: 0.85;
}

.cbf-footer-contact-link {
  color: #ffffff;
  display: block;
  margin-bottom: 0.4rem;
  text-decoration: none;
}

.cbf-footer-contact-link:hover {
  color: #0cfea7;
}

.cbf-footer-newsletter {
  max-width: 500px;
  text-align: right;
}

/* Award badge: a Media Library image (the "Award Badge" field), shown as a
   rounded square. Three columns from 992px (address, badge, sign-up); from 768px
   to 991px it sits under the address, with the sign-up on the right; below 768px
   everything stacks in source order (address, badge, sign-up). */
.cbf-footer-award {
  flex: 0 0 auto;
}

.cbf-footer-award-img {
  border-radius: 8px;
  display: block;
  height: 150px;
  width: 150px;
}

@media (max-width: 991.98px) {
  .cbf-footer-award-img {
    height: 130px;
    width: 130px;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .cbf-footer-inner {
    display: grid !important; /* overrides Bootstrap's d-flex !important */
    grid-template-columns: auto auto;
    justify-content: space-between;
    row-gap: 1.5rem;
  }

  .cbf-footer-address {
    grid-column: 1;
    grid-row: 1;
  }

  .cbf-footer-award {
    grid-column: 1;
    grid-row: 2;
  }

  .cbf-footer-newsletter {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

.cbf-footer-newsletter-heading {
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.cbf-footer-newsletter-text {
  color: #ffffff;
  margin-bottom: 1.25rem;
  opacity: 0.85;
}

/* Sign-up form: a Toolset (CRED) form, `newsletter-signup-form`, saved as a
   private Website Contact. Email field and button on one row (stacked below
   576px), reCAPTCHA and messages underneath. */
.cbf-footer-newsletter-row {
  gap: 0.75rem;
}

.cbf-footer-newsletter-field {
  flex: 1;
  min-width: 0;
}

.cbf-footer-newsletter-form .cbf-footer-newsletter-input {
  background-color: #242940;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: #ffffff;
  font-size: 1rem;
  height: auto;
  line-height: 1.5;
  padding: 0.75rem 1rem;
  text-align: left;
  width: 100%;
}

.cbf-footer-newsletter-form .cbf-footer-newsletter-input::placeholder,
.cbf-footer-newsletter-form .cbf-footer-newsletter-input::-webkit-input-placeholder {
  color: #ffffff;
  opacity: 1;
}

.cbf-footer-newsletter-recaptcha .wpt-repetitive {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.cbf-footer-newsletter-recaptcha .g-recaptcha {
  margin-top: 0.75rem;
}

/* Toolset's own messages: the summary above the form, a line under the field. */
.cbf-footer-newsletter-form .alert {
  margin: 0 0 0.75rem;
  text-align: left;
}

/* Toolset writes the reCAPTCHA error's dark red inline; lighten it for the dark footer. */
.cbf-footer-newsletter-form .wpt-form-error,
.cbf-footer-newsletter-form .recaptcha_error {
  color: #ff8a8a !important;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.cbf-footer-newsletter-thanks {
  color: #ffffff;
  font-size: 1.15rem;
  margin: 0;
  padding: 1rem 0;
}

/* Stacked below 576px: the button spans the full width, as it did before. */
@media (max-width: 575.98px) {
  .cbf-footer-newsletter-submit .btn {
    width: 100%;
  }
}

/* The sign-up text runs edge to edge of the column (the email row's width), so
   its first word starts above the email box's left edge; the heading stays
   right-aligned. Relies on the text running to two or more lines. */
@media (min-width: 768px) {
  .cbf-footer-newsletter-text {
    text-align: justify;
    text-align-last: right;
  }
}

@media (max-width: 767.98px) {
  .cbf-footer-newsletter {
    text-align: left;
  }

  .cbf-footer-newsletter-recaptcha .wpt-repetitive {
    align-items: flex-start;
  }
}

.cbf-footer-bottom-bar-width {
  margin: 0 auto;
  max-width: 1100px;
  padding-bottom: 50px;
  padding-left: 20px;
  padding-right: 20px;
  width: 100%;
}

.cbf-footer-bottom-bar {
  background-color: #242940;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  gap: 0.5rem;
  padding: 1.25rem 2rem;
}

.cbf-footer-legal-links {
  display: flex;
  gap: 1.25rem;
}

.cbf-footer-legal-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.cbf-footer-legal-links a:hover {
  color: #0cfea7;
}
