.up-next-section {
    overflow: hidden;
    margin-block-start: 0;

    .wrapper {
        margin-left: auto;
        margin-right: auto;
        display: flex;

        .col {
            flex: 0 0 50%;

            &:first-child {
                position: relative;
                z-index: 2;
            }

            &.img-col {
                display: flex;
                align-items: center;
            }
        }
    }

    .title,
    .section-title {
        padding-bottom: 0;
        font-weight: bold;
        text-transform: uppercase;
    }

    .description {
        color: var(--wp--preset--color--medium-grey);
        padding-bottom: 0;
    }

    img {
        position: relative;
        z-index: 1;
        display: block;
        border-radius: var(--wp--custom--image-border-radius--rounded);
    }

    .wp-block-button {
        a {
            padding: 10px 12px !important;
            font-size: 14px !important;
            text-transform: uppercase;
            border-radius: var(--wp--custom--button-border-radius--rounded);
            line-height: 1;
        }
    }
}

@media only screen and (max-width: 899px) {
    .up-next-section {
        margin-left: 20px;
        margin-right: 20px;

        .wrapper {
            padding: 20px 20px 40px 20px;
            border: 1px solid #EFEFEF;
            border-radius: 10px;
            flex-direction: column;
            max-width: 550px;
            margin-top: 40px;
            margin-bottom: 80px;

            .col:first-child {
                order: 1;
            }
        }

        .img-container {
            margin-bottom: 30px;
        }

        .section-title {
            font-size: 16px;
            line-height: 27px;
            margin-bottom: 0;
        }

        .title {
            font-size: 28px;
            line-height: 42px;
            margin-bottom: 8px;
        }

        .description {
            font-size: 16px;
            line-height: 24px;
            margin-bottom: 18px;
        }
    }
}

@media only screen and (min-width: 900px) {
    .up-next-section {
        .wrapper {
            max-width: 1276px;
            padding-left: 40px;
            padding-right: 40px;
            padding-top: 104px;
            padding-bottom: 114px;
            justify-content: space-between;

            .col.img-col {
                justify-content: end;
            }
        }

        .section-title {
            font-size: 24px;
            line-height: 36px;
            margin-bottom: 8px;
        }

        .title {
            font-size: 48px;
            line-height: 54px;
            margin-bottom: 18px;
        }

        .description {
            font-size: 18px;
            max-width: 415px;
            margin-bottom: 32px;
        }

        .img-container {
            position: relative;
    
            &::before {
                content: '';
                border: 1px solid #EFEFEF;
                position: absolute;
                top: -104px;
                bottom: -114px;
                width: 1000%;
                z-index: 0;
                border-radius: 0 10px 10px 0;
            }
        }

        .img-container::before {
            right: 130px;
        }

        img {
            max-width: 445px;
            width: 100%;
        }
    }
}

@media only screen and (min-width: 1200px) {
    .up-next-section {
        .section-title {
            font-size: 28px;
            line-height: 42px;
        }

        .description {
            font-size: 22px;
            max-width: 520px;
        }

        .wrapper {
            padding-left: 24px;
            padding-right: 24px;

            .col.img-col {
                justify-content: center;
            }
        }

        .img-container::before {
            right: 300px;
        }

        img {
            max-width: unset;
            max-width: 550px;
        }
    }
}