.mgi-gallery {
    display: flex;
    flex-wrap: wrap;
    margin-left: -5px;
    margin-right: -5px;
    justify-content: center;
}

.mgi-gallery-item {
    max-width: 20%;
    width: 20%;
    padding-left: 5px;
    padding-right: 5px;
    margin-bottom: 10px;
    /* margin: 5px; */
}
/* Media query for tablets and smartphones */
@media (max-width: 768px) {
    .mgi-gallery-item {
        max-width: 50%;
        width: 50%;
    }
}

.mgi-gallery-thumbnail {
    width: 100%;
    cursor: pointer;
    border-radius: 10px;
}


/* Modal styles */
.mgi-modal {
    display: none;
    position: fixed;
    z-index: 100000000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    /* display: flex; */
    justify-content: center;
    align-items: center;
}

.mgi-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}
.mgi-close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.mgi-close:hover,
.mgi-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.img-fluid {
    width: 100%;
    height: auto;
}

/* Disable scroll when modal is active */
body.modal-open {
    overflow: hidden;
}
