.custom-footer-block {
  margin-top: 150px;
  padding-block: 2rem;
  background-color: var(--wp--preset--color--lrdv-red);
  .footer-background-images {
    display: none;
  }

  .footer-content {
    position: relative;
    /* max-width: var(--wp--style--global--content-size); */
    margin-inline: auto;
    display: grid;
    color: white;
    a {
      color: inherit;
      text-decoration: none;
      &:hover {
        transition: 0.3s all;
        text-decoration: underline;
      }
    }

    .footer-scroll {
      display: none;
    }

    .footer-section-title {
      margin-top: 0;
      margin-bottom: 0;
    }
  }

  .footer-section {
    &.footer-link-section {
      font-size: var(--wp--preset--font-size--small);
      text-align: center;
      margin-top: 2rem;
      padding-top: 2rem;
      border-top: 1px solid var(--wp--preset--color--lrdv-cream);
      .footer-logo {
        margin-bottom: 1rem;
        img {
          max-height: 140px;
          width: auto;
        }
      }
      .footer-nav-1 {
        width: 100%;
        .footer-social-icons {
          display: flex;
          gap: 1rem;
          align-items: center;
          justify-content: center;
          padding-bottom: 2rem;
          border-bottom: 1px solid var(--wp--preset--color--lrdv-cream);
          margin-bottom: 2rem;
        }

        .footer-nav-1-links {
          .footer-section-title {
            margin-bottom: 0.5rem;
          }
          .footer-nav-links {
            list-style: none;
            padding: 0;
            li {
              margin-bottom: 0.5rem;
            }
          }
        }
      }

      .footer-nav-2 {
        .footer-nav-links {
          list-style: none;
          padding: 0;
          li {
            margin-bottom: 0.5rem;
          }
        }
      }
    }
    &.footer-newsletter-section {
      justify-self: center;
      justify-items: center;
      text-align: center;
      .footer-newsletter {
        .footer-brand-name {
          font-size: var(--wp--preset--font-size--large);
          margin-block: 0;
        }
        .footer-newsletter-text {
          margin-top: 0.125rem;
          font-size: var(--wp--preset--font-size--small);
        }

        .footer-form-group {
          margin-block: 2rem;
          input {
            padding: 0.5rem 1rem;
            border-radius: 6px;
            outline: none;
            border: none;
            margin-right: 0.5rem;
          }
          button {
            background-color: var(--wp--preset--color--lrdv-dark);
            color: white;
            height: 100%;
            padding: 0.5rem 0.5rem;
            border-radius: 6px;
            border: none;
          }
        }

        .footer-locations {
          display: flex;
          gap: 0.25rem 2rem;
          justify-content: space-between;
          align-items: center;
          flex-wrap: wrap;
          .footer-location {
            display: flex;
            align-items: center;
          }
        }
      }
    }
  }
}

@media (min-width: 768px) {
  .custom-footer-block {
    .footer-section {
      &.footer-link-section {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        place-content: center;
        justify-items: center;
        .footer-nav-1 {
          display: grid;
          .footer-social-icons {
            order: 10;
            border-bottom: initial;
          }
        }
      }
    }
  }
}

@media (min-width: 992px) {
  footer .footer-block {
    margin-top: 15rem;

    .custom-footer-block {
      .footer-content {
        grid-template-columns: 1fr 1fr;
        column-gap: 3rem;

        .footer-scroll {
          display: initial;
          position: absolute;
          bottom: 100%;
          z-index: 10;
          right: 3rem;
          img {
            width: 300px;
          }

          svg {
            position: absolute;
            bottom: 100%;
            display: none;
          }
        }
      }

      .footer-section {
        &.footer-link-section {
          order: -1;
          column-gap: 1.5rem;
          text-align: initial;
          margin-top: initial;
          padding-top: initial;
          border-top: initial;
          .footer-nav-1 {
            .footer-social-icons {
              justify-content: start;
            }
          }
        }

        &.footer-newsletter-section {
          text-align: initial;
          .footer-newsletter-form .wpcf7-form {
            display: grid;
            gap: 0.25rem;
            place-items: center;
          }

          .footer-newsletter-form .wpcf7-form p {
            padding: 0;
            margin: 0;
            &:has(input[type='submit']){
              /* background-color: black; */
              grid-row: 1;
              align-self: baseline;
            }
            &:has(input[type='email']){
              grid-row: 1;
            }
          }
          .footer-newsletter-form .wpcf7-form .wpcf7-response-output {
            grid-row: 2;
            grid-column: span 2;
          }
        }
      }
    }
  }
}


/* Contact Form 7 Integration Styles */
.footer-newsletter-form .wpcf7 {
  margin: 0;
  margin-bottom: 1rem;
}

.footer-newsletter-form .wpcf7-form {
  &[data-status="init"], &[data-status="invalid"]{
    .wpcf7-spinner{
      display: none;
      visibility: visible;
    }
  }
}

.footer-newsletter-form .wpcf7-form-control-wrap {
  flex: 1;
  display: block;
  .wpcf7-not-valid-tip{
    color: white;
  }
}

.footer-newsletter-form input[type="email"],
.footer-newsletter-form input[type="text"] {
  width: 100%;
  padding-block: 0.75rem;
  background: #FFF4E4;
  border: 1px solid rgba(52, 52, 52, 0.2);
  border-radius: 4px;
  font-size: 14px;
  color: #343434;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.footer-newsletter-form input[type="email"]::placeholder,
.footer-newsletter-form input[type="text"]::placeholder {
  color: #7f7f7f;
}

.footer-newsletter-form input[type="email"]:focus,
.footer-newsletter-form input[type="text"]:focus {
  outline: none;
  border-color: #343434;
}

.footer-newsletter-form input[type="submit"],
.footer-newsletter-form button[type="submit"] {
  padding: 12px 24px;
  background: #343434;
  color: #FFF0D9;
  border: none;
  border-radius: 4px;
  font-family: var(--wp--preset--font-family--lato);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.footer-newsletter-form input[type="submit"]:hover,
.footer-newsletter-form button[type="submit"]:hover {
  background-color: #2C2C2C;
  transform: translateY(-2px);
}

.footer-newsletter-form input[type="submit"]:active,
.footer-newsletter-form button[type="submit"]:active {
  transform: translateY(0);
}

.footer-newsletter-form .wpcf7-spinner {
  /* margin-left: 8px; */
}

.footer-newsletter-form .wpcf7-response-output {
  /* margin-top: 12px; */
  margin: 0.25rem 0 0.25rem 0 !important;
  padding: 10px 16px !important;
  border-radius: 4px;
  font-size: 14px;
}

.footer-newsletter-form .wpcf7-mail-sent-ok {
  background-color: rgba(34, 197, 94, 0.1);
  border: 1px solid #22c55e;
  color: #15803d;
}

.footer-newsletter-form .wpcf7-validation-errors,
.footer-newsletter-form .wpcf7-mail-sent-ng {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid #ef4444;
  color: #991b1b;
}

.footer-newsletter-form .wpcf7-not-valid-tip {
  font-size: 12px;
  color: #ef4444;
  margin-top: 4px;
}