/* Schizzi Page - Sparse Random Gallery */

body {
    overflow: hidden !important;
    background:
        linear-gradient(rgba(245, 245, 240, 0.7), rgba(245, 245, 240, 0.7)),
        url("../schizzi/images/bg-texture.jpg") center center / cover no-repeat;
    background-color: #f5f5f0;
}

.header,
.page-title {
    z-index: 10;
}

/* --- Gallery: sparse, one sketch per row scattered at random
   across a 4-column lattice (falls back to 2 columns on narrow screens —
   see the matching breakpoint check in the page's script).
   .schizzi-grid-container also carries .content-container from main.css,
   which fixes it below the header/title and gives it its own scroll region. */
.schizzi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8vh 3vw;
    margin: 0 3vw;
    padding-top: 2vh;
}

.grid-item {
    position: relative;
    cursor: pointer;
}

.grid-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.grid-item:hover .grid-image {
    transform: scale(1.02);
}

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

/* --- Lightbox modal --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    cursor: pointer;
}

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001;
}
