.dx-image-container {
  position: relative;
  overflow: hidden;
}

.dx-image-container__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  z-index: 0;
}

.dx-image-container__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.dx-image-container__content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center; /* vertical center */
  justify-content: center; /* horizontal center default */
    /* bottom padding variable, default 4rem; top padding is bottom + var(--space-md) */
    --dx-image-padding-bottom: 4rem;
    --dx-image-padding-top: calc(var(--dx-image-padding-bottom) + var(--space-md, 2rem));
    padding-top: var(--dx-image-padding-top);
    padding-bottom: var(--dx-image-padding-bottom);
    color: #ffffff;
}

.dx-image-container__inner {
  width: 100%;
  max-width: 1200px;
}

/* Ensure headings and text inside the block are white */
.dx-image-container__inner h1,
.dx-image-container__inner h2,
.dx-image-container__inner h3,
.dx-image-container__inner h4,
.dx-image-container__inner h5,
.dx-image-container__inner h6,
.dx-image-container__inner p,
.dx-image-container__inner a,
.dx-image-container__inner span,
.dx-image-container__inner li {
  color: #ffffff;
}
.dx-image-container--align-left .dx-image-container__content {
  justify-content: flex-start;
  text-align: left;
}
.dx-image-container--align-center .dx-image-container__content {
  justify-content: center;
  text-align: center;
}
.dx-image-container--align-right .dx-image-container__content {
  justify-content: flex-end;
  text-align: right;
}

/* small screens: reduce padding */
@media (max-width: 768px) {
    .dx-image-container__content {
      --dx-image-padding-bottom: 2.5rem;
      --dx-image-padding-top: calc(var(--dx-image-padding-bottom) + var(--space-md, 1.25rem));
    }
}
