/* --- Gallery Section (Homepage Teaser) --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.gallery-item img {
    width: 100%;
    height: 120px; /* Adjust size for teaser */
    object-fit: cover;
    transition: transform 0.3s ease, opacity 1s ease-in-out; /* Increased opacity transition to 1s */
    border-radius: 4px; /* Slight rounding */
    opacity: 1; /* Ensure initial opacity is 1 */
}

/* Class to trigger fade out */
.gallery-item img.fading-out {
    opacity: 0;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

/* Responsive adjustments for gallery grid */
@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .gallery-item img {
        height: auto; /* Maintain aspect ratio */
        object-fit: contain; /* Scale down to fit, don't crop */
    }
}