.galerie .grid{
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 40px;
}

@media screen and (max-width: 1500px){
    .galerie .grid{
        grid-template-columns: repeat(6, 1fr);
    }
}

@media screen and (max-width: 1000px){
    .galerie .grid{
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 600px){
    .galerie .grid{
        grid-template-columns: repeat(2, 1fr);
    }
}

.galerie .grid .box{
    border-radius: 20px;
    overflow: hidden;
    transition: 400ms ease-in-out;
    cursor: pointer;
}

.galerie .grid .box:hover{
    transform: scale(120%);
}

.galerie .grid .box img{
    width: 100%;
}

.modalGalerieViewer{
    position: fixed;
    z-index: 300;
    background-color: rgba(33, 33, 33, 0.95);
    width: 100%;
    height: 100%;
    top: 0px;
    left: 0px;
    padding: 40px;
    display: none;
    align-items: center;
    justify-content: center;
}

.modalGalerieViewer.active{
    display: flex;
}

.modalGalerieViewer .img{
    max-width: calc( 100vw - ( 2 * 40px ) );
    max-height: calc( 100vw - 36px - var(--page-fixed-margin) - ( 2 * 40px ) );
    background-color: lightcyan;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden;
}

.modalGalerieViewer .img img{
    max-width: 100%;
    max-height: 100%;
}

.modalGalerieViewer .closeBtn{
    position: absolute;
    top: 40px;
    right: 40px;
}

.modalGalerieViewer .backBtn{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    user-select: none;
    transition: 0.3s; 
    left: 40px; 
}

.modalGalerieViewer .fowBtn{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    user-select: none;
    transition: 0.3s; 
    right: 40px;
}