.gallery-overlay{
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}
.gallery-overlay.active{
    display: block;
}

.gallery{
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50vw;
    height: calc(100vh - 4px);
    position: fixed;
    top: 0;
    left: 25%;
    margin: 0;
    padding: 0;
    transform: scale(0);
    background-color: #fff;
    transition: transform 0.3s ease-in-out;
    border: 2px solid #ffde21;
    overflow-x: hidden;
}

.gallery.active{
    transform: scale(1);
    transform-origin: center;
    transition: transform 0.3s ease-in-out;
    background-color: #fff;

}

.gallery.hidden{
    display: none;
}

.gallery-header{
    display: flex;
    justify-content: space-between;
    position: relative;
    border-bottom: 1px solid #ffde21;
    width: 100%;
    height: 4em;
}

#gallery-title{
   font-size: 1.5em;
    font-weight: 700;
    font-family: Lora, serif;
    margin-left: 0.5em;
}

.gallery-close{
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 2em;
    cursor: pointer;
    color: #333;
    background-color: transparent;
    border: none;
    outline: none;
}

.galery-content{
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
}

.gallery-category{
    display: none;
    grid-template-columns: repeat(3, 0fr);
    gap: 1em;
    width: 100%;
    max-height: 100%;
    padding: 1em;
}

.gallery-category.active{
    display: grid;
}

.gallery-thumb{
    cursor: pointer;
    border-radius: 5px;
    width: 150px;
    height: 150px;
    border: 1px solid #ffde21;
    transition: transform 0.2s ease-in-out;
    object-fit: cover;
    object-position: center;
}
.gallery-thumb:hover{
    transform: scale(1.05);
}

.gallery-img-box{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.8);
    .gallery-lg-img{
        width: 80%;
        height: 80%;
        object-fit: contain;
        object-position: center;
    }
    img{
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
    }
    .gallery-img-close{
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 2em;
        cursor: pointer;
        color: #ffde21;
    }
}

@media screen and (max-width: 991.98px) {
    .gallery{
        width: calc(100vw - 4px);
        left: 0;
    }
    .gallery-category{
        grid-template-columns: repeat(3, 0fr);
    }
    .gallery-img-next{
        right: 0 !important;
    }
    .gallery-img-prev{
        left: 0 !important;
    }
}

@media screen and (max-width: 575.98px) {
    .gallery-category{
        grid-template-columns: repeat(2, 0fr);
    }

    .gallery-img-close{
        top: 5px;
        right: 5px;
    }
    .gallery-img-next{
        font-size: 2em !important;
        right: 3px !important;
    }
    .gallery-img-prev{
        left: 3px !important;
        font-size: 2em !important;
    }
}

.gallery-img-next,
.gallery-img-prev{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 5em;
    cursor: pointer;
    color: #ffde21;
    background-color: transparent;
    border: none;
    outline: none;
}

.gallery-img-next{
    right: 0.8em;
}

.gallery-img-prev{
    left: 0.8em;
}