/* ── Gallery wall: titolo posizionato come gli altri .r-title ── */
.gallery-wall-title {
    position: absolute;
    top: 18vh;
    left: 8vw;
}

/* ── Gallery wall: griglia assoluta nel resto della scena ── */
.phil-gallery-grid {
    position: absolute;
    top: 12vh;
    left: 32vw;
    right: 8vw;
    bottom: 8vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    align-content: start;
}

.phil-gallery-grid figure {
    margin: 0;
    position: relative;
    overflow: hidden;
    background: #111;
    aspect-ratio: 1 / 1;
    cursor: pointer;
}

.phil-gallery-grid figure img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0.8;
}

.phil-gallery-grid figure:hover img {
    transform: scale(1.05);
    opacity: 1;
}

.phil-gallery-grid figcaption {
    position: absolute;
    bottom: 6px;
    left: 8px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-family: monospace;
    letter-spacing: 0.05em;
    pointer-events: none;
}
