.text-img-container {
    margin-left: calc(-1 * var(--paperMargin));
    width: calc(100% + 2 * var(--paperMargin));
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.text-img-container img, .text-img-container .text-container {
    margin-top: auto;
    margin-bottom: auto;
}

.text-img-container img {
    width: calc(50% - 1rem);
    height: 100%;
}

.text-img-container.img-left .text-container {
    width: calc(50% - 1rem - var(--paperMargin));
    padding-right: var(--paperMargin);
}

.text-img-container.img-right .text-container {
    width: calc(50% - 1rem - var(--paperMargin));
    padding-left: var(--paperMargin);
}

@media screen and (max-width: 1150px) {
    .text-img-container {
        margin-left: 0;
        width: 100%;
    }
    
    .text-img-container img {
        width: 100%;
        max-width: 15cm;
        margin: auto;
        height: 100%;
    }

    .text-img-container.img-left .text-container, .text-img-container.img-right .text-container {
        width: 100%;
        padding-right: 0;
        padding-left: 0;
    }
    
    .text-img-container.img-left .text-container {margin-top: 1.5rem;}
    .text-img-container.img-right .text-container {margin-bottom: 1.5rem;}
}


/* YT Video */

.txt-content-yt-container {
    position: relative;
    --width: calc(50% - 1rem);
    width: var(--width);
}

.txt-content-yt-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
} 

.txt-content-yt-container.aspect_ration_1-1 {
    padding-bottom: var(--width);
}
.txt-content-yt-container.aspect_ration_16-9 {
    padding-bottom: calc(var(--width) / 16 * 9);
}
.txt-content-yt-container.aspect_ration_4-3 {
    padding-bottom: calc(var(--width) / 4 * 3);
}

@media screen and (max-width: 1150px) {
    .txt-content-yt-container {
        --width: 100%;
        margin: auto;
    }
}