/* Photos in rich-text bodies (posts, bike descriptions), regrouped into
   thumbnail grids by post-gallery.js */
.post-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.post-gallery__item {
    display: block;
    position: relative;
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-secondary);
    cursor: zoom-in;
}

/* Two classes so this beats a page's own "body img" rule */
.post-gallery .post-gallery__item img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.2s ease;
}

.post-gallery__item:hover img { transform: scale(1.05); }

.post-gallery__item:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .post-gallery {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.35rem;
    }
}
