.custom-newsletter-banner {
  width: 100%;
  position: relative;

  .custom-newsletter-banner__container {
    position: relative;

    @media screen and (max-width: 1023px) {
      display: flex;
      flex-direction: column;
    }
  }

  .custom-newsletter-banner__image {
    position: relative;
    width: 100%;
    z-index: 1;

    @media screen and (max-width: 1023px) {
      align-self: stretch;
      aspect-ratio: 390/319;
    }

    .custom-newsletter-banner__img {
      width: 100%;
      height: auto;
      display: block;
      margin-bottom: -1px;
    }
  }

  .custom-newsletter-banner__image--desktop {
    display: none;

    @media screen and (min-width: 1024px) {
      display: block;
    }
  }

  .custom-newsletter-banner__image--mobile {
    display: block;

    @media screen and (min-width: 1024px) {
      display: none;
    }
  }
}

.newsletter-section {
  background: var(--color-blue-dark-tertiary);
  padding: 3.2rem 2rem;
  text-align: center;

  @media screen and (min-width: 1024px) {
    position: absolute;
    top: 50%;
    left: clamp(8rem, 4.167vw, 11rem);
    transform: translateY(-50%);
    width: auto;
    height: auto;
    z-index: 2;
    background: transparent;
    padding: 4rem 0 0 0;
  }

  .newsletter-section__container {
    max-width: clamp(40rem, 35.67709vw, 68.5rem);

    @media screen and (max-width: 1023px) {
      max-width: clamp(60rem, 35.67709vw, 68.5rem);
      margin: 0 auto;
    }
  }

  .newsletter-section__content {
    text-align: left;
  }

  .newsletter-section__icon {
    display: none;

    @media screen and (min-width: 1024px) {
      display: inline-block;
      vertical-align: middle;
      margin-right: 1.6rem;
    }
  }

  .newsletter-section__title {
    color: var(--color-white);
    font-size: 2rem;
    font-weight: bold;
    font-family: var(--font-family-primary);
    letter-spacing: 0;
    margin: 0;
    margin-bottom: clamp(3.2rem, 2.5vw, 4.8rem);
    display: inline-block;
    position: relative;
    line-height: 1;
    height: fit-content;

    @media screen and (min-width: 768px) {
      font-size: clamp(2.8rem, 2.08333vw, 4rem);
    }

    &::before {
      content: '';
      position: absolute;
      bottom: -12px;
      left: 0;
      transform: translateY(-50%);
      border-radius: 0.8rem;
      width: 4rem;
      height: 0.4rem;
      background-color: var(--color-cyan);
    }
  }

  .newsletter-section__form {
    margin-bottom: 2rem;

    @media screen and (min-width: 1024px) {
      margin-bottom: clamp(3.2rem, 2.5vw, 4.8rem);
    }

    .newsletter-section__field-wrapper {
      width: 100%;
    }

    .field {
      display: flex;
      flex-direction: column;
      align-items: center;
      overflow: hidden;
      width: 100%;
      margin: 0 auto;
      --border-radius: clamp(0.2rem, 0.208333vw,0.4rem);

      @media screen and (min-width: 1024px) {
        flex-direction: row;
        background: rgba(255,255,255,0.3);
        border-radius: var(--border-radius);
        border: 0.1rem solid var(--color-white);
      }

      .field__input {
        flex: 1;
        padding: 1.6rem;
        border: none;
        outline: none;
        font-size: 1.6rem;
        font-weight: 400;
        background: transparent;
        margin: 0;
        color: var(--color-white);

        @media screen and (max-width: 1023px) {
          background: rgba(255,255,255,0.3);
          border-radius: var(--border-radius);
          overflow: hidden;
          border: 0.1rem solid var(--color-white);
        }

        &:focus {
          outline: none;
          border: none;
          box-shadow: none;
        }

        &::placeholder {
          color: var(--color-white);
          opacity: 1;
        }
      }

      .newsletter-form__button {
        height: auto;
        color: var(--color-white);
        background: var(--color-cyan);
        font-size: 1.6rem;
        border: none;
        padding: 1.6rem clamp(2.8rem, 2.1875vw, 4.2rem);
        border-radius: var(--border-radius);
        overflow: hidden;
        font-weight: 500;
        cursor: pointer;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: opacity 0.3s ease;
        width: 100%;
        text-transform: none;
        margin-top: 2rem;

        @media screen and (min-width: 1024px) {
          margin-top: 0;
          margin: 0.3rem;
          padding: 1.3rem clamp(2.8rem, 2.1875vw, 4.2rem);
          width: fit-content;
        }

        &:hover {
          opacity: 0.9;
        }

        :is(svg) {
          width: 20px;
          height: 20px;
        }
      }
    }

    .newsletter-form__message {
      margin-top: 1rem;
      font-size: clamp(1.2rem, 0.833vw, 1.6rem);
    }
  }

  .newsletter-section__text {
    color: var(--color-white);
    font-size: clamp(1.2rem, 0.833vw, 1.6rem);
    line-height: 1.8rem;
    margin: 0 auto;
    font-family: var(--font-family-primary);

    :is(a) {
      color: var(--color-blue);
      text-decoration: underline;
      text-underline-offset: 2px;
    }
  }
}