/* General gallery grid styling */
.gallery {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    padding: 10px;
}

/* Each gallery item (the image container) */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

/* Styling the images inside the grid */
.gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease-in-out;
    background-color: #63866d;
}

/* Hover effect: Zoom the image */
.gallery-item:hover img {
    transform: scale(1.1);
}

/* Overlay to mimic Instagram's post interaction */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* When hovering over the item, show the overlay */
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Add smooth fade-in and fade-out effects */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.fadeIn {
    animation: fadeIn 0.4s ease forwards;
}

.fadeOut {
    animation: fadeOut 0.4s ease forwards;
}

/* Ensure smooth transitions */
.gallery-item {
    transition: all 0.4s ease;
}



/*MODAL*/
/*MODAL*/