.top-btn {
    position: fixed;
    bottom: 2vw;
    right: 3%;
    opacity: 0;
    transition: opacity 0.5s ease, bottom 0.5s ease;
    width: fit-content;
    height: var(--ROUNDPADDING);
    width: var(--ROUNDPADDING);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 100px;
    background-color: var(--BG03);
}

.top-btn svg{
    height: var(--SVG02);
    transform: rotate(-90deg);
}

.-WORKS-SECTION{
    position: relative;
    background-color: var(--BG02);
    width: 72%;
    margin: calc(var(--GAP)*2) 7%;
    padding: calc(var(--GAP)*1.2) 7%;
    border-radius: var(--RADIUS01);
    scroll-margin-top: var(--SCROLLOFFSET);
    overflow: clip;
}

.-WORKS-SECTION.top-section{
    margin-top: calc(var(--HEADERHEIGHT) + 40px);
}

.back-btn{
    gap: calc(var(--GAP) / 3);
    margin-bottom: calc(var(--GAP)*1.2);
}

.back-btn svg{
    transition: ease 0.2s;
    width: var(--SVG02);
    rotate: 180deg;
}

.back-btn:hover svg{
    transform: translateX(5px);
}

.separation-line{
    height: 13px;
    width: 58vw;
    position: relative;
    left: 50%;
    translate: -50%;
    margin: var(--GAP) 0px;
}

.gallery-main .separation-line{
    left: initial;
    translate: initial;
    margin: 0;
}

.film-card{
    position: relative;
    background-color: var(--BG01);
    width: 100%;
    padding: calc(var(--NAVPADDING)*1.5);
    box-sizing: border-box;
    border-radius: var(--RADIUS02);
}

.film-infos-wrapper{
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: calc(var(--GAP)*3);
    justify-content: space-between;
}

.film-infos{
    display: flex;
    flex-direction: column;
    gap: calc(var(--GAP)/2);
    height: fit-content;
}

.film-card:has(.film-poster) .film-infos-layout{
    width: 60%;
}

.film-infos-layout{
    width: 100%;
}

.film-award{
    width: 100%;
    display: flex;
    justify-content: center;
    gap: calc(var(--GAP)/2);
    flex-wrap: wrap;
}

.award{
    max-height: 4vw;
}

.film-button{
    display: flex;
    gap: calc(var(--GAP)/2);
    position: relative;
    top: 5px;
}

.film-title h2{
    margin-bottom: 0px;
}

.film-title-layout{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--GAP);
}

.film-poster{
    height: 200px;
    max-height: 500px;
    border-radius: calc((var(--NAVPADDING)*1.5) - var(--RADIUS02));
}

.img-with-caption{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(var(--GAP)/4);
}

#FILM{
    scroll-margin-top: var(--SCROLLOFFSET);
}

.project-infos{
    display: flex;
    flex-direction: column;
    gap: calc(var(--GAP));
}

.gallery-main{
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--GAP);
}

.gallery-subsection{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(var(--GAP)/1.5);
    width: 100%;
}

.gallery-title{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(var(--GAP)/8);
}

.gallery-block{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(var(--GAP)/2);
    width: 100%;
}

.gallery-grid{
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: calc(var(--GAP)/2);
    padding: 0px;
    margin: 0px;
}

.grid-half{
    width: calc(50% - (var(--GAP)/4));
}

.grid-quarter{
    width: calc(25% - (3/8)*var(--GAP));
}

.gallery-grid li{
    border-radius: var(--RADIUS02-5);
    overflow: hidden;
    padding: 0px;
    margin: 0px;
    list-style-type: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-ratio li{
    aspect-ratio: 16/9;
}

ul li.quarter, .quarter li{
    width: calc(25% - (3/8)*var(--GAP));
}

ul li.third, .third li{
    width: calc(33.3333% - (var(--GAP)/3));
}

ul li.half, .half li{
    width: calc(50% - (var(--GAP)/4));
}

ul li.large, .large li{
    width: 58vw;
}

ul li.full, .full li{
    width: 100%;
}

.video-player.full, .video-wrapper:has(> p){
    width: 100%;
}

ul .video-wrapper{
    width: 100%;
}

.video-wrapper{
    border-radius: var(--RADIUS02-5);
}

#FILM{
    border-radius: var(--RADIUS02);
}

.-WORKS-SECTION .video-player{
    width: 100%;
}

.gallery-grid img{
    display: block;
    width: 100%;
    max-width: 200%;
}

.adapt-height img{
    width: initial;
    height: 100%;
    aspect-ratio: auto;
}

li[onclick], img[onclick]{
    cursor: pointer;
}

#MODAL{
    display: none;
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(40px);
    background-color: hsla(270, 24%, 11%, 0.6);
    z-index: 5;
    padding: 3vw;
    box-sizing: border-box;
}

[id^=WRAPPER]{
    display: none;
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    padding: 3vw;
    box-sizing: border-box;
    pointer-events: none;
}

.modal-content{
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}

.modal-close-btn{
    height: var(--SVG02);
    position: absolute;
    top: 0px;
    right: 0px;
}

.modal-slide-dots{
    position: absolute;
    left: 0;
    bottom: 3vw;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    z-index: 8;
}

.modal-slide-dots svg{
    height: var(--SVG03);
    cursor: pointer;
}

.modal-prev-btn{
    height: var(--SVG02);
    transform: rotate(90deg);
    transition: ease 0.2s;
}

.modal-prev-btn:hover{
    translate: -5px;
}

.modal-next-btn{
    height: var(--SVG02);
    transform: rotate(-90deg);
    transition: ease 0.2s;
}

.modal-next-btn:hover{
    translate: 5px;
}

.modal-svg{
    height: var(--SVG02);
}

.slide{
    display: none;
    max-width: calc(88vw - 2 * var(--SVG02));
    max-height: 100%;
    border-radius: var(--RADIUS03);
}

.slide.active{
    display: block;
}

li:has(.before-after-wrapper){
    border-radius: var(--RADIUS02-5);
}

.before-after-wrapper{
    overflow: hidden;
    position: relative;
    height: 100%;
}

.before-image-wrapper{
    bottom: 0;
    left: 0;
    overflow: hidden;
    position: absolute;
    top: 0;
    z-index: 1;
    width: 50%;
}

.before-after-wrapper p, .video-wrapper p{
    position: absolute;
    top: 0;
    right: 0;
    background-color: hsla(270, 24%, 11%, 0.3);
    border-radius: 100px;
    margin: calc(var(--GAP)/2.5);
    padding: 5px 10px;
    backdrop-filter: blur(25px);
    opacity: 0;
    transition: 0.5s ease;
}

.video-wrapper p{
    z-index: 1;
    opacity: 1;
    transition: 0.3s ease;
}

.before-image-wrapper p, .video-wrapper p:first-of-type{
    z-index: 1;
    right: auto;
    left: 0;
}

.before-image{
    background-size: cover;
    height: 100%;
    width: 100%;
}

.after-image{
    background-size: cover;
    inset: 0;
    position: absolute;
}

.handle{
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: calc(50% - (var(--ROUNDPADDING)/2));
    top: 0;
    bottom: 0;
    width: var(--ROUNDPADDING);
    z-index: 2;
}

.handle-line{
    position: absolute;
    left: calc(50% - 2px);
    background: var(--BG02);
    width: 4px;
    height: 100%;
}

.handle button{
    position: relative;
    background-color: var(--BG02);
    cursor: col-resize;
}

.handle button:hover{
    background-color: var(--BG02);
}

.handle svg{
    height: var(--SVG02);
}

@media only screen and (hover: none) {
    .back-btn:hover svg{
        transform: initial;
    }

    .modal-prev-btn, .modal-next-btn{
        translate: initial;
    }
}

@media only screen and (pointer: coarse) {
    .top-btn{
        display: none;
    }
}

@media only screen and (min-width: 2000px) {
    .film-infos-wrapper{
        gap: 20vw;
    }

    .film-card:has(.film-poster) .film-infos-layout{
        width: 50%;
    }
}

@media only screen and (max-width: 1600px) {
    .film-infos-wrapper{
        gap: calc(var(--GAP)*2);
    }

    .film-card:has(.film-poster) .film-infos-layout{
        width: 70%;
    }
}

@media only screen and (max-width: 1400px) {
    .film-card:has(.film-poster) .film-infos-layout{
        width: 100%;
    }

    .award{
        max-height: 6vw;
    }
}

@media only screen and (max-width: 1200px) {
    .film-title-layout{
        flex-direction: column;
        align-items: flex-start;
        gap: calc(var(--GAP)/2);
    }

    .film-button{
        flex-wrap: wrap;
    }

    .film-infos-wrapper{
        flex-direction: column;
        gap: var(--GAP);
        align-items: center;
    }

    .film-poster{
        max-width: 100%;
        max-height: 40vh;
        height: initial;
        border-radius: var(--RADIUS03);
    }

    .award{
        max-height: 7vw;
    }
}

@media only screen and (max-width: 1024px) {
    .-WORKS-SECTION{
        margin: var(--GAP) 7%;
    }

    .film-button{
        gap: calc(var(--GAP)/3);
    }

    .award{
        max-height: 11vw;
    }

    .gallery-grid{
        gap: calc(var(--GAP)/3);
    }

    .grid-half{
        width: calc(50% - (var(--GAP)/6));
    }
    
    .grid-quarter{
        width: calc(25% - var(--GAP)/4);
    }

    ul li.quarter, .quarter li{
        width: calc(25% - var(--GAP)/4);
    }

    ul li.third, .third li{
        width: calc(33.3333% - (2/9)*(var(--GAP)));
    }
    
    ul li.half, .half li{
        width: calc(50% - (var(--GAP)/6));
    }

    .before-after-wrapper p, .video-wrapper p{
    margin: calc(var(--GAP)/4);
    }
}

@media only screen and (max-width: 768px) {
    .film-award{
        justify-content: center;
    }

    .award{
        max-height: 14vw;
    }

    .grid-half{
        width: 100%;
    }

    ul li.quarter, .quarter li{
        width: calc(50% - (var(--GAP)/6));
    }

    ul li.half{
        width: 100%;
    }
}

@media only screen and (max-width: 525px) {
    .-WORKS-SECTION.top-section{
        margin-top: calc(var(--HEADERHEIGHT)*2 + 50px);
    }

    .film-title-layout{
        align-items: center;
    }

    .film-button{
        justify-content: center;
    }

    h4, h5{
        text-align: center;
    }

    ul li.quarter, .quarter li{
        width: 100%;
    }

    ul li.third, .third li{
        width: 100%;
    }

    ul li.half, .half li{
        width: 100%;
    }

    .modal-prev-btn{
        display: none;
    }
    
    .modal-next-btn{
        display: none;
    }

    .slide{
        max-width: 100%;
    }

    #MODAL {
        padding: 5vw;
    }
    
}

@media only screen and (max-width: 500px) {
    
    .film-button{
        flex-direction: column;
        align-items: center;
    }

}

@media only screen and (max-width: 425px) {
    
    .film-poster{
        border-radius: 4.5px;
        max-height: initial;
    }

    .video-wrapper p{
        display: none;
    }

}
