.rich-text {
  z-index: 1;

  .rich-text__text {
    + .rich-text__buttons {
      margin-top: 3rem;
    }

    &.text_spacing {
      margin: 0 auto;
      max-width: 62rem;
    }
  }

  .rich-text__mobile-image {
    margin: 0 0 3rem;

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

  .slider-component.slider-extra-spacing {
    margin-bottom: 6rem;
    margin-top: 6rem;

    .card__media {
      justify-content: center;
      display: flex;

      .media {
        width: calc(100% - 4rem);
      }
    }
  }

  .slider-component.slider-mobile-gutter {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 4rem;

    @media screen and (max-width: 749px) {
      padding: 0;
    }

    .grid {
      column-gap: 4rem;
      justify-content: space-between;
      row-gap: 4rem;

      @media screen and (max-width: 749px) {
        .grid__item {
          min-width: unset;
          width: calc(50% - 7rem);
        }
      }
    }

    @media screen and (min-width: 990px) {
      .grid--5-col-desktop .grid__item {
        width: calc(20% - 4.2rem);
        max-width: calc(20% - 4.2rem);
      }
    }

    .card__inner {
      --ratio-percent: 100%;
      background-color: rgb(var(--color-lemongrass));
      border-radius: 50%;
      overflow: hidden;
    }

    .card__heading {
      font-size: 1.3rem;
      text-align: center;

      a {
        font-weight: 800;
      }

      span {
        font-size: 0.9rem;
        display: block;
      }

      strong {
        opacity: 1;
      }
    }
  }

  .slider-component:not(.slider-mobile-gutter) {
    @media screen and (max-width: 749px) {
      margin-left: -1.5rem;
      margin-right: -1.5rem;
    }

    .card__inner {
      --ratio-percent: 100%;
      background: none;

      .media {
        background: none;
      }
    }

    .card__heading {
      color: rgb(var(--color-sage));
      font-size: 1.2rem;
      text-align: center;
      font-weight: 300;

      @media (max-width: 749px) {
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        display: -webkit-box;
        font-size: 1rem;
        overflow: hidden;
        text-overflow: ellipsis;
        word-break: auto-phrase;
      }

      a {
        font-weight: 800;
      }

      span {
        font-size: 1rem;
        display: block;
        opacity: 0.5;
      }

      strong {
        font-weight: 300;
      }
    }
  }
}

.rich-text__wrapper {
  display: flex;
  justify-content: center;
  width: calc(100% - 4rem / var(--font-body-scale));

  &.product-image {
    gap: 2rem;
    justify-content: space-between;
    padding: 0 2rem 4rem;

    .product__image {
      flex: 1 1 50%;
    }

    .rich-text__blocks {
      flex: 0 0 50%;
    }

    .product__image {
      align-items: center;
      display: flex;
      justify-content: center;
    }
  }
}

.rich-text:not(.rich-text--full-width) .rich-text__wrapper {
  margin: auto;
  width: calc(100% - 8rem / var(--font-body-scale));
}

.rich-text__blocks {
  width: 100%;
}

@media screen and (min-width: 750px) {
  .rich-text__wrapper {
    width: 100%;
  }

  .rich-text__wrapper--left {
    justify-content: flex-start;
  }

  .rich-text__wrapper--right {
    justify-content: flex-end;
  }
}

@media screen and (min-width: 990px) {
  .rich-text__blocks {
    max-width: unset;
  }
}

.rich-text__blocks * {
  overflow-wrap: break-word;
}

.rich-text__blocks > * + a {
  margin-top: 3rem;
}

.rich-text__blocks > .subheading + * {
  margin-top: 0;
}

.rich-text__buttons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  word-break: break-word;

  &.left {
    justify-content: left;
  }

  &.center {
    justify-content: center;
  }

  &.right {
    justify-content: right;
  }
}

.rich-text__buttons--multiple > * {
  flex-grow: 1;
}

.rich-text__buttons + .rich-text__buttons {
  margin-top: 1rem;
}

.rich-text__blocks.left .rich-text__buttons {
  justify-content: flex-start;
}

.rich-text__blocks.right .rich-text__buttons {
  justify-content: flex-end;
}
