/**
 * Premium Theme
 * @license MIT, https://opensource.org/license/MIT
 */

.image-text .r1-3 { --ratio: 25%; }
.image-text .r1-2 { --ratio: 33.333%; }
.image-text .r1-1 { --ratio: 50%; }
.image-text .r2-1 { --ratio: 66.666%; }
.image-text .r3-1 { --ratio: 75%; }

.image-text .start::after,
.image-text .end::after {
    content: "";
    display: table;
    clear: both;
}

.image-text .start .image,
.image-text .end .image {
    max-width: var(--ratio);
    margin-bottom: 1.5rem;
}

.image-text .start .image {
    float: inline-start;
    margin-inline-end: 2rem;
}

.image-text .end .image {
    float: inline-end;
    margin-inline-start: 2rem;
}

.image-text .grid-start,
.image-text .grid-end {
    display: flex;
    gap: 0;
    align-items: stretch;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: calc(var(--pico-border-radius) * 4);
    overflow: hidden;
}

.image-text .grid-end {
    flex-direction: row-reverse;
}

.image-text .grid-start .text,
.image-text .grid-end .text {
    flex: 1;
    min-width: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--pico-contrast-background);
}

.image-text .grid-start .image,
.image-text .grid-end .image {
    flex: 0 0 var(--ratio);
    max-width: var(--ratio);
    background-color: transparent;
    display: flex;
    align-items: center;
}

.image-text .grid-start picture,
.image-text .grid-end picture {
    border-radius: 0;
}

@media (max-width: 767px) {
    .image-text .grid-start,
    .image-text .grid-end {
        flex-direction: column;
    }

    .image-text .grid-start .image,
    .image-text .grid-end .image {
        max-width: 100%;
        flex: 0 0 auto;
        padding: 0;
    }

    .image-text .grid-start img,
    .image-text .grid-end img {
        border-radius: 0;
        width: 100%;
    }
}
