.block.home_levels {
    max-width: var(--max-container-width);
    position: relative;
    height: var(--home_levels-height);
    max-height: var(--home_levels-height);
    display: flex;
    flex-direction: var(--home_levels-flex-direction);
    margin: 100px auto;
    justify-content: space-between;
}

.block.home_levels .level {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: var(--home_levels-height);
    max-width: 100vw;
    height: 100%;
}

section.home_levels .level .title {
    color: white;
    width: 210px;
    padding: 6px 2px;
    display: inline-block;
    text-align: center;
    transform-origin: center;
    transform: rotate(-90deg) translate(-85px, 178px);
}

/** lg (for large screens - screens greater than 1200px wide) **/
@media(min-width: 1200px) {
    :root {
        --max-container-width: 1140px;
        --home_levels-height: 300px;
        --home_levels-flex-direction: row;
    } 
}
/** md (for small laptops - screens equal to or greater than 992px wide) **/
@media (min-width: 991px) and (max-width: 1199px) {
    :root {
        --max-container-width: 900px;
        --home_levels-height: 280px;
        --home_levels-flex-direction: row;
    }        
    section.home_levels .level .title {
        transform: rotate(-90deg) translate(-87px, 158px);
    }
}
/** sm (for tablets - screens equal to or greater than 768px wide) **/
@media (min-width: 768px) and (max-width: 990px) {
    :root {
        --max-container-width: 740px;
        --home_levels-height: 220px;
        --home_levels-flex-direction: row;
    }      
    section.home_levels .level .title {
        transform: rotate(-90deg) translate(-87px, 97px);
    }
}

/** xs (for phones - screens less than 768px wide) **/
@media (max-width: 767px) {
    :root {
        --max-container-width: 100vw;
        --home_levels-height: auto;
        --home_levels-flex-direction: column;
    }  
    .block.home_levels {
        margin: auto;
    }

    .block.home_levels .level {
        width: calc(100vw - 40px);
        height: 90vw;
        margin: 10px auto;
        overflow: hidden;
    }
    section.home_levels .level .title {
        color: white;
        font-size: var(--font-size-h3);
        font-weight: bolder;
        height: 20vw;
        line-height: 20vw;
        width: 95vw;
        padding: 0 2px;
        display: inline-block;
        text-align: center;
        transform-origin: right;
        transform: rotate(-90deg) translate(10vw, -14vw);
    }
}