/* ── Gallery: photo grid ──────────────────────────────────────────────────
   Reuses the Mac System 7 chrome tokens (tokens.css) plus .welcome-card/
   .card-header banner. Only the photo grid tiles are new here — the
   lightbox modal is global, see css/image-modal.css. No new breakpoints,
   same fixed 820px desktop layout.
*/

/* ── Banner (list page) ────────────────────────────────────────────────── */

.gallery-banner-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gallery-banner-intro {
    font-size: 10.5px;
    line-height: 1.4;
    color: var(--mac-black);
}

/* ── Photo grid ─────────────────────────────────────────────────────────── */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 12px;
}

.gallery-item {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    border: 1px solid var(--mac-black);
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    background: var(--mac-grey-6);
}

.gallery-item-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.gallery-item:hover .gallery-item-thumb {
    transform: scale(1.06);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 6px 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 55%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gallery-item:hover .gallery-item-overlay,
.gallery-item:focus-visible .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-title {
    font-size: 9.5px;
    font-weight: bold;
    color: var(--mac-white);
    line-height: 1.3;
    text-align: left;
}

/* ── Empty state ───────────────────────────────────────────────────────── */

.gallery-empty {
    padding: 12px;
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
