.rich-text {
  z-index: 1;
}

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

.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%;
}

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

.rich-text-blocks > * {
  margin-top: 0;
  margin-bottom: 0;
}

.rich-text-blocks > * + * {
  margin-top: 1rem;
}

.rich-text-blocks > * + a {
  margin-top: 2rem;
}

.rich-text-buttons {
  display: inline-flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  width: 100%;
  max-width: 45rem;
  word-break: break-word;
}

.rich-text-buttons--multiple > * {
  flex-grow: 1;
  min-width: 22rem;
}

.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;
}

.rich-text-image img {
    margin: 0 auto;
    margin-bottom: 30px;
}

.rich-text-blocks svg.placeholder-svg {
  height: 200px;
  width: 200px;
}

.rich-text .rich-text-heading em {
  font-style: normal;
  position: relative;
  opacity: 0;
  animation: fadeInText 1s ease forwards;
  animation-delay: 0.3s;
}

.rich-text .rich-text-heading.highlight-italic em {
  font-style: italic;
}

.rich-text .rich-text-heading em:hover::after {
  animation: underlineGrow 0.5s ease forwards;
}

.rich-text .rich-text-heading p {
  margin: 0;
  z-index: 1;
}

@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;
  }

  .rich-text-blocks {
    max-width: 50rem;
  }
}

@media screen and (min-width: 990px) {
  .rich-text-blocks {
    max-width: 78rem;
  }
}

@media screen and (max-width: 990px) {
  .rich-text-wrapper {
    width: calc(100% - 1.5rem / var(--font-body-scale));
  }
  .mobile-left {
    text-align: left;
  }
  .mobile-right {
    text-align: right;
  }
  .mobile-center {
    text-align: center;
  }
  .mobile-center .rich-text-image img{
    margin-bottom: 10px;
  }
  .mobile-left .rich-text-buttons {
    justify-content: flex-start;
  }
  .mobile-left .rich-text-image img{
    margin: 0 0 10px 0;
  }
  .mobile-right .rich-text-buttons {
    justify-content: flex-end;
  }
  .mobile-right .rich-text-image img{
    margin: 0 0 10px auto;
  }
}