.text-media {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.28rem;
}
@media (min-width: 960px) {
    .text-media {
        flex-direction: row;
        gap: var(--container-gutter-sm);
    }
    .text-media[data-direction='invert'] {
        flex-direction: row-reverse;
    }
}

.text-media__text {
    z-index: 2;
}
@media (min-width: 960px) {
    .text-media__text {
        flex: 1 1 55%;
    }
}
.text-media.with-rectangle.block-is-align-top .text-media__text {
    margin-top: 1.92rem;
}

@media (min-width: 960px) {
    .text-media__media {
        flex: 1 1 45%;
    }
}

.text-media__frame {
    position: relative;
}
.text-media__frame img,
.text-media__frame video {
    position: relative;
    z-index: 2;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
}
@media (min-width: 960px) {
    .text-media.with-rectangle .text-media__frame img,
    .text-media.with-rectangle .text-media__frame video {
        margin-top: 1.92rem;
        margin-right: 1.92rem;
    }
}

.text-media__rectangle {
    position: absolute;
    right: -1.92rem;
    bottom: -1.92rem;
    z-index: 1;
    width: 100%;
    height: 100%;
    background-color: var(--wp--preset--color--bg-brand-light);
}
@media (min-width: 960px) {
    .text-media__rectangle {
        top: -1.92rem;
    }
}

.text-media__triangle {
    width: 20%;
    margin-top: 0.64rem;
    margin-left: auto;
    color: var(--wp--preset--color--brand-primary);
}
@media (min-width: 960px) {
    .text-media__triangle {
        margin-top: 0.85rem;
    }
}
@media (min-width: 1280px) {
    .text-media__triangle {
        margin-top: 1.28rem;
    }
}
.text-media__triangle svg {
    height: auto;
}

.text-media__splash {
    position: absolute;
    z-index: -1;
    pointer-events: none;
    max-width: none;
    height: auto;
    transform-origin: center center;
    bottom: -10%;
    left: calc(-65vw + 50%);
    width: 125vw;
    transform: rotate(15deg);
}
@media (min-width: 960px) {
    .text-media__splash {
        bottom: 0;
        left: calc(-52.5vw + 50%);
        width: 50vw;
        transform: rotate(-5deg);
    }
}
@media (min-width: 1280px) {
    .text-media__splash {
        left: calc(-67.5vw + 50%);
        width: 45vw;
        transform: rotate(-25deg);
    }
}
