/* Gallery Grid Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background: var(--card-bg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    aspect-ratio: 1 / 1; /* Forces perfectly square thumbnails */
}

.gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images are beautifully cropped without stretching */
    display: block;
    transition: transform 0.5s ease;
}

/* Desktop Hover Effects */
@media (min-width: 769px) {
    .gallery-item:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-hover);
    }
    .gallery-item:hover img {
        transform: scale(1.05); /* Gentle zoom effect */
    }
}

/* Mobile Layout: Force 2 columns so thumbnails are small and expandable */
@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .gallery-item {
        border-radius: 8px;
    }
}