.image-gallery-popup-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
}

.image-gallery-popup-container img {
    width: 100%;
    height: 280px; /* Set a fixed height for all images */
    object-fit: cover; /* Maintain aspect ratio */
}

#image-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

#image-popup {
    position: relative;
    text-align: center;
}

#image-popup img {
    max-width: 90%;
    max-height: 90%;
}

#image-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
    background: #f00;
    padding: 5px;
    cursor: pointer;
    font-size: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50px;
}

#image-popup-prev,
#image-popup-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    background: #000;
    padding: 10px;
    cursor: pointer;
    font-size: 30px;
    user-select: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

#image-popup-prev {
    left: 10px;
}

#image-popup-next {
    right: 10px;
}

.cv-spinner {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;  
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px #ddd solid;
    border-top: 4px #2e93e6 solid;
    border-radius: 50%;
    animation: sp-anime 0.8s infinite linear;
}
@keyframes sp-anime {
    100% { 
        transform: rotate(360deg); 
    }
}
.gallery_loader{
    display:none;
}
.gallery_header{
    margin-bottom: 50px;
}
.gallery_header li a,
.gallery_header li a:before{
    overflow: hidden;
}
.gallery_header ul{
    text-align: center;
}
.gallery_header li{
    display: inline-block;
    position: relative;
	padding: 15px 0px;
    overflow: hidden;
}
.gallery_header li:not(:last-child){
    margin-right: 10px;
}
.gallery_header li a.active{
    background: #061757;
    border-color: #061757;
}