#app{
    width: 100vw;
    height: calc(100vh - 5em);
    
    overflow: hidden;
    overflow-y: auto;
    color: var(--defFontColor);
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: repeat(3, repeat);
    grid-template-areas: 
    "a a"
    "b c"
    "d c";
}

.ADS {
    --rightADHeight: calc((100vh - 5em) / 2);
    --rightADWidth: calc(var(--rightADHeight) * 1.2);
    width: var(--rightADWidth);
    height: calc(100vh - 5em);
    grid-area: c;
    position: sticky;
    top: 0;
}

.page_top {
    width: 100vw;
    height: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(180deg, #409eff, #409eff88, #ffffff);
    box-sizing: border-box;
    padding: 1em 0;
    color: #fff;
}

.page_top h1 {
    font-size: 5em;
    text-align: center;
}

.projects {
    --ADWidth: calc((100vh - 5em) / 2* 1.2);
    width: calc(100vw - var(--ADWidth));
    min-height: calc((100vw - 4em) / 4 * .95 / 1.5);
    position: relative;
    box-sizing: border-box;
    padding: 0 2em;
    display: grid;
    grid-template-columns: repeat(4, 25%); 
    justify-items: center;
    margin-top: 5em;
}

.project {
    width: 95%;
    margin-bottom: 1em;

    .project_top {
        width: 100%;
        position: relative;
        overflow: hidden;
        box-shadow: 0 0 10px var(--el-border-color-darker);

        .project_detials {
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-sizing: border-box;
            padding: 1em 0.5em;
    
            .project_name {
                width: 100%;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }
    
            .project_info {
                display: flex;
                align-items: center;
    
                .project_info_item {
                    display: flex;
                    align-items: center;
                    margin-left: 1.5em;
                    color: var(--el-text-color-regular);
    
                    svg {
                        width: 1.5em;
                        height: 1.5em;
                        margin-right: 0.5em;
                        
                        path{
                            fill: var(--el-text-color-regular);
                        }
                    }
                }
            }
        }
    }

    .project_tags {
        padding: 0.5em 0;

        .project_tag {
            background: var(--el-border-color-lighter);
            padding: 0.5em;
            margin-right: 1em;
            margin-bottom: 1em;
            border-radius: 0.25em;
        }

        .project_tag:empty {
            display: none;
        }
    }
}

.project img {
    width: 100%;
    height: calc((100vw - var(--ADWidth) - 4em) / 4 * .95 / 1.5);
    display: block;
    object-fit: contain !important;
}

.rotation_image {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 1500% !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    object-fit: unset !important;
}

.image-progress {
    position: absolute;
    top: calc((100vw - var(--ADWidth) - 4em) / 4 * .95 / 1.5);
    height: 0.5em;
    transform: translateY(-100%);
    background: var(--el-color-primary);
    transition: width .2s;
    z-index: 1;
}

.pages_con {
    display: none;
    place-items: center;
    margin-top: 7em;
    margin-bottom: 1em;
}

.pages_con:has( a) {
    display: grid;
}

.page_nums {
    width: fit-content;
    display: flex;
    align-items: center;
}

.page_item {
    width: 4em;
    height: 4em;
    background: var(--backgroungColor);
    margin: 0 0.5em;
    display: grid;
    place-items: center;
    border-radius: 0.5em;
    cursor: pointer;
}

.page_item:hover{
    color: var(--primaryColor);
    background-color: var(--hoverBackgroungColor);
}

.page_item_focus {
    color: #fff !important;
    background: var(--primaryColor) !important;
}

.page_pre {
    background-image: url(/pages/mockups/img/prev.svg);
    background-size: 30% 30%;
    background-repeat: no-repeat;
    background-position: 50% 50%;
}

.page_pre:hover{
    background-image: url(/pages/mockups/img/prev_focus.svg);
}

.page_next {
    background-image: url(/pages/mockups/img/next.svg);
    background-size: 30% 30%;
    background-repeat: no-repeat;
    background-position: 100% 50%;
    width: fit-content;
    padding: 0 3.5em 0 2em;
}

.page_next:hover{
    background-image: url(/pages/mockups/img/next_focus.svg);
}

.advertisement_block{
    width: 300px;
    height: 250px;
    position: relative;
    container-name: size-queries;
    container-type:size;
    overflow: hidden;
}

.advertisement_block>ins{
    display: block;
    position: relative;
}

.advertisement_block>ins::after {
    content: "Ad";
    position: absolute;
    left: 50%;
    top: 50%; 
    transform: translate(-50%, -50%);
    font-size: 2em;
    font-weight: 700;
    border-radius: 10em;
    border: 3px solid;
    padding: 0.5em;
    z-index: -1;
}

.load_more_project {
    width: fit-content;
    margin: 0 auto;
    background: var(--el-color-primary);
    color: #fff;
    padding: 0.5em 1em;
    font-size: 1.5em;
    border-radius: 0.25em;
    cursor: pointer;
}

@container size-queries (max-height: 10px) {
    .advertisement_block>ins{
        height: 250px !important;
    }
}

@media screen and (max-width: 1024px) {
    #app{
        display: block;
    }

    main{
        display: block;
    }

    .categorys {
        display: none !important;
    }

    .category_h5 {
        position: sticky;
        top: -1px;
        display: block;
        height: 4em;
        transition: height .2s;
        background: #fff;
        overflow: hidden;
        z-index: 2;
    }

    .category_h5_show {
        height: 50vh !important;
        overflow-y: auto;
        border-bottom: 1px solid var(--el-border-color);
    }

    .category_h5::-webkit-scrollbar {
        width: 0;
        height: 0;
    }
    
    .category_h5_title {
        width: 100%;
        height: 4em;
        display: flex;
        align-items: center;
        justify-content: center;
        position: sticky;
        top: 0;
        background-color: #fff;
        z-index: 1;
        font-weight: 700;
    }

    .category_h5_title svg {
        width: 1.5em;
        height: 1.5em;
        margin-left: 1em;
    }

    .category_h5 .categorys {
        display: block !important;
        width: 100%;
        border: none;
        padding: 0;
    }

    .category_item_title:hover {
        color: unset !important;
        background-color: unset !important;
    }

    .category_item_title svg:hover path {
        fill: unset;
    }

    .project_type {
        margin-bottom: 1em;
    }

    .projects {
        padding: 0 1em;
        width: 100vw;
    }

    .project {
        width: 100%;
    }

    .project img {
        height: calc(((100vw - 2em) / 2 - 1em) / 1.5);
    }

    .pages_con {
        margin: 2em 0 !important;
    }

    .page_top .advertisement_block {
        --adwidth: calc(100vw - 2em);
        --adheight: calc((100vw - 2em) / 8.08889);
    }

    .ADS {
        display: none;
    }

    .page_top {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .theme_cover {
        height: auto;
        z-index: -1;
        position: relative;
        overflow: hidden;
    }

    .theme_cover>img {
        position: relative;
        object-fit: cover;
    }

    .pagr_top_right {
        width: 100%;
        min-height: unset;
        padding: 2em 1em;
    }

    .page_top h1 {
        font-size: 3em;    
        width: calc(100vw - 2em);
    }

    .projects {
        display: block !important;
        padding: 0 1em;
    }

    .project {
        width: 100%;
    }
    
    .project img {
        height: calc((100vw - 2em) * .95 / 1.5);
    }

    .pages_con {
        margin: 1em 0 2em;
    }

    div:has( .page_footer) {
        margin: 0 !important;
    }

    .advertisement_block {
        width: calc((100vw - 2em)) !important;
        height: calc((100vw - 2em) / 1.5) !important;
        margin-bottom: 4em;
    }
}

@media screen and (max-width: 600px) {
    .page_top .advertisement_block {
        --adwidth: calc(100vw - 2em);
        --adheight: calc((100vw - 2em) / 1.985);
    }

    .category_projects {
        display: block !important;
    }

    .project img {
        height: calc((100vw - 2em) / 1.5);
    }
}