.rich-text {
  position: relative;
  background-color: rgb(var(--color-background));
}

.rich-text .block-button-group .button {
  white-space: normal;
}

.rich-text__background-image {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  user-select: none;
}

.rich-text__background-image img,
.rich-text__background-image svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a.rich-text__link {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
}

.rich-text__content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: calc(var(--page-padding) * 2 + 1120px);
  margin-inline: auto;
  pointer-events: none;
}

.rich-text__content > * {
  max-width: 100%;
  pointer-events: auto;
}

.rich-text__content > .rte,
.rich-text__content > .block-rich-text {
  max-width: 860px;
  margin-inline: auto;
}

.rich-text__content > .block-rich-text {
  padding-inline-start: 0;
  padding-inline-end: 0;
}

@media (max-width: 767px) {
  .rich-text__content {
    max-width: 100%;
    padding-block: clamp(36px, 10vw, 52px);
    padding-inline: var(--page-padding);
    overflow-x: hidden;
  }

  .rich-text__content > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .rich-text__content .block-heading,
  .rich-text__content h1 {
    font-size: 32px;
    line-height: 1.16;
  }

  .rich-text__content h2,
  .rich-text__content .title2 {
    font-size: 28px;
    line-height: 1.2;
  }

  .rich-text__content h3,
  .rich-text__content .title3 {
    font-size: 24px;
    line-height: 1.25;
  }

  .rich-text__content .rte,
  .rich-text__content .body3,
  .rich-text__content .body4 {
    font-size: 15px;
    line-height: 1.6;
  }

  .rich-text .block-button-group {
    flex-wrap: wrap;
    gap: 12px;
  }
}
