.igm-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

.igm-image-container {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.igm-image-container img {
    width: 100%;
    height: 100%;
    object-fit:cover;
    transition: filter 0.3s ease-in-out;
}


.igm-image-container img.igm-grayscale {
    filter: grayscale(100%);
}

.igm-image-container:hover img.igm-grayscale {
    filter: grayscale(0%);
}

/* Modal styles */
.igm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.igm-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.3);
}

.igm-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.igm-close:hover {
    color: #ff4c4c;
}

.igm-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    padding: 10px 20px;
    border-radius: 50%;
    transition: 0.3s;
    z-index: 1001;
}

.igm-nav-btn:hover {
    background: rgba(255, 255, 255, 0.7);
    color: black;
}

.igm-prev {
    left: 20px;
}

.igm-next {
    right: 20px;
}

#igm-gallery-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.igm-gallery-item {
    position: relative;
    overflow: hidden;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.igm-gallery-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
}

.igm-delete-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.8);
    color: #ff0000;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    width: 24px;
    height: 24px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}

.igm-delete-button:hover {
    background: #fff;
    color: #000;
}