.image-with-text-section {
    word-break: break-word;
    background-color: rgb(var(--color-background));
}

.image-with-text-section .block-group {
    position: relative;
    color: rgb(var(--color-text));
    background-color: rgb(var(--color-background));
}

.image-with-text-section .block-group>.url {
    position: absolute;
    inset: 0;
    display: block;
}

.image-with-text-section .block-image .empty-image-class {
    display: block;
    width: 473px;
    max-width: 100%;
    background-color: rgb(var(--color-image-background));
}

.image-with-text-section .subheading {
    text-transform: uppercase;
    letter-spacing: 0.3em;
}

.image-with-text__image {
    position: relative;
    display: flex;
}

.image-with-text__image>img {
    max-width: 100%;
    height: auto;
    aspect-ratio: var(--aspect-ratio);
    object-fit: cover;
}

.image-with-text__image .hover-scale__image {
    width: 100%;
}

.image-with-text__group {
    flex: 1;
    min-width: 0;
    min-height: 0;
}

.image-with-text-section .image-with-text__group > .subheading {
    color: var(--iwt-subheading-color) !important;
    font-size: var(--iwt-subheading-size) !important;
    font-weight: var(--iwt-subheading-weight) !important;
    text-align: var(--iwt-text-align) !important;
}

.image-with-text-section .image-with-text__group > .block-heading {
    color: var(--iwt-heading-color) !important;
    font-size: var(--iwt-heading-size) !important;
    font-weight: var(--iwt-heading-weight) !important;
    text-align: var(--iwt-text-align) !important;
}

.image-with-text-section .image-with-text__group > .rte {
    color: var(--iwt-body-color) !important;
    font-size: var(--iwt-body-size) !important;
    font-weight: var(--iwt-body-weight) !important;
    text-align: var(--iwt-text-align) !important;
}

.image-with-text-section .image-with-text__group.has-custom-button-style > .button:not(.button--secondary, .button--link) {
    --button-border-radius: var(--iwt-ordinary-button-radius);
    background-color: var(--iwt-ordinary-button-bg);
    color: var(--iwt-ordinary-button-text);
}

.image-with-text-section .image-with-text__group.has-custom-button-style > .button:not(.button--secondary, .button--link)::after {
    box-shadow: 0 0 0 var(--button-border-thickness, 1px) var(--iwt-ordinary-button-bg);
}

.image-with-text-section .image-with-text__group.has-custom-button-style > theme-dialog.block-popup .block-popup__trigger.button:not(.button--secondary, .button--link) {
    --button-border-radius: var(--iwt-popup-button-radius);
    background-color: var(--iwt-popup-button-bg);
    color: var(--iwt-popup-button-text);
}

.image-with-text-section .image-with-text__group.has-custom-button-style > theme-dialog.block-popup .block-popup__trigger.button:not(.button--secondary, .button--link)::after {
    box-shadow: 0 0 0 var(--button-border-thickness, 1px) var(--iwt-popup-button-bg);
}

.image-with-text-section .image-with-text__group.buttons-inline {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    column-gap: 8px !important;
}

.image-with-text-section .image-with-text__group.buttons-inline > :not(.button):not(.block-popup) {
    flex: 0 0 100%;
    min-width: 0;
}

.image-with-text-section .image-with-text__group.buttons-inline > .button,
.image-with-text-section .image-with-text__group.buttons-inline > .block-popup {
    flex: 0 0 auto;
}

.image-with-text-section .image-with-text__group.buttons-inline > .button,
.image-with-text-section .image-with-text__group.buttons-inline > .block-popup .block-popup__trigger {
    padding-inline: 12px !important;
}

.image-with-text-section.overlap .image-with-text__group {
    width: unset;
    height: unset;
    background-color: rgb(var(--color-background));
}

@media (min-width: 960px) {
    .image-with-text-section.overlap .image-with-text__group {
        transform: translateX(-36px);
    }
}

@media (max-width: 959px) {
    .image-with-text-section .image-with-text__group > .subheading {
        font-size: var(--iwt-subheading-mobile-size) !important;
        text-align: var(--iwt-text-align-mobile) !important;
    }

    .image-with-text-section .image-with-text__group > .block-heading {
        font-size: var(--iwt-heading-mobile-size) !important;
        text-align: var(--iwt-text-align-mobile) !important;
    }

    .image-with-text-section .image-with-text__group > .rte {
        font-size: var(--iwt-body-mobile-size) !important;
        text-align: var(--iwt-text-align-mobile) !important;
    }

    .image-with-text-section.overlap .image-with-text__group {
        width: auto;
        margin-inline: 10.5px;
        transform: translateY(-36px);
    }
}
