/* ============================================================
   gallery.css — Gallery page specific styles
   Shared base lives in styles.css (load this file AFTER it).
   ============================================================ */

/* ---------- Navigation tweaks ---------- */
.site-title {
    max-width: none;
}
.site-title h3 {
    padding-left: 0;
}
.site-nav {
    width: 100%;
    box-sizing: border-box;
}
nav {
    background-color: rgba(10, 10, 10, 0.96);
}

/* ---------- Image grids ---------- */
.image-grid {
    gap: clamp(0.8rem, 2vw, 1.2rem);
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}
#stills .image-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: clamp(1rem, 2.5vw, 1.4rem);
}
#posters .image-grid img {
    height: auto;
    object-fit: contain;
    max-width: 330px;
    width: 100%;
}
#posters .image-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 330px));
    justify-content: start;
    gap: clamp(1rem, 2.5vw, 1.4rem);
}

/* ---------- Section padding ---------- */
section {
    padding-left: clamp(1rem, 4vw, 3rem);
    padding-right: clamp(1rem, 4vw, 3rem);
    box-sizing: border-box;
}

/* ---------- Lightbox tweaks ---------- */
.lightbox {
    box-sizing: border-box;
}
.lightbox-close {
    border: none;
    outline: none;
}
.lightbox-close:focus {
    outline: none;
}
@media (max-width: 820px), (max-height: 500px) {
    .lightbox {
        padding-top: 10px;
        justify-content: center;
    }
    .lightbox-content {
        width: fit-content;
        max-width: 100%;
        max-height: 100%;
        padding: 10px 12px 6px;
        box-sizing: border-box;
    }
    .lightbox-img {
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 44px);
        max-height: calc(100svh - 44px); /* reserve only 44px for caption/padding */
    }
    .lightbox-close {
        top: 8px;
        right: 12px;
        font-size: 28px;
    }
    .lightbox-caption {
        font-size: 0.9rem;
        margin-top: 8px;
    }
}
