/* Verbatim <style> block of templates/home/index.html.twig (Symfony app). */

    .glightbox-container img {
        max-height: 90vh;
        width: auto;
        object-fit: contain;
    }

    /* ===== 4-column masonry (homepage only), mirrors of3dcreative.com ===== */
    /* base.html.twig defines #image-grid .grid as a CSS multi-column container
       (used by other pages that reuse .grid); cancel it here since Masonry.js
       absolutely-positions its own items. */
    #image-grid .grid.grid-h {
        column-count: unset;
        overflow: visible;
        position: relative;
    }

    /* Column width lives on both the sizer (which Masonry measures) and the
       items. 4 columns share three 10px gutters => (100% - 30px) / 4. */
    .grid-h .grid-sizer,
    .grid-h .grid-item {
        width: calc((100% - 30px) / 4);
    }

    /* Vertical gap between stacked tiles (horizontal gap is Masonry's gutter). */
    .grid-h .grid-item {
        margin-bottom: 10px;
    }

    /* Tablet & mobile: 2 columns => one 10px gutter => (100% - 10px) / 2. */
    @media (max-width: 1024px) {
        .grid-h .grid-sizer,
        .grid-h .grid-item {
            width: calc((100% - 10px) / 2);
        }
    }

    /* The <a> is the framing box: it clips the zoom and anchors the overlay. */
    .grid-h .grid-item > a {
        display: block;
        position: relative;
        overflow: hidden;
    }

    .grid-h .grid-item > a > img {
        width: 100%;
        height: auto;
        display: block;
        /* Slowed-down zoom for a more elegant feel. Scoped here because this
           page's images sit directly under <a> (no .img-wrap), so
           base.html.twig's .img-wrap transition rule doesn't reach them. */
        transition: transform 0.9s ease, filter 0.9s ease;
    }

    /* Dark overlay that fades in on hover, matching the reference gallery. */
    .grid-h .grid-item .grid-overlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        opacity: 0;
        transition: opacity 0.5s ease;
        pointer-events: none;
    }

    .grid-h .grid-item:hover .grid-overlay {
        opacity: 1;
    }

