/* =========================================
   SPACE1993
   ART GALLERY
   ========================================= */


/* DESCRIPTION */

.art-description {
    position: absolute;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    width: 72%;
    max-width: 1100px;
    color: #080908;
    font-family: "Blue Screen", monospace;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: .4px;
    z-index: 5;
}

.art-description p {
    margin: 0;
}


/* GALLERY */

.art-gallery {
    position: absolute;
    top: 145px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    height: calc(100% - 165px);
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 180px;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #080908 transparent;
    z-index: 5;
}


/* ARTWORK */

.art-piece {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    overflow: hidden;
    cursor: pointer;
    z-index: 6;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.art-piece img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    filter: none;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.art-piece:hover img {
    transform: scale(1.025);
}


/* LIGHTBOX */

.art-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
    background: rgba(8, 9, 8, 0.96);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.art-lightbox.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.art-lightbox-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90vw;
    height: 90vh;
    overflow: hidden;
    touch-action: none;
    cursor: zoom-in;
}

.art-lightbox-image {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    transform: translate3d(0, 0, 0) scale(1);
    transform-origin: center center;
    transition: none;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    will-change: transform;
    backface-visibility: hidden;
}

.art-lightbox button {
    position: absolute;
    border: none;
    background: none;
    color: #d0d0cc;
    font-family: "Courier New", Courier, monospace;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
}

.art-lightbox button:hover {
    color: white;
}

.art-lightbox-close {
    top: 25px;
    right: 30px;
    font-size: 34px !important;
}

.art-lightbox-previous {
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
}

.art-lightbox-next {
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
}


/* MOBILE */

@media screen and (max-width: 600px) {

    .art-description {
        top: 60px;
        width: 88%;
        font-size: 14px;
        line-height: 1.6;
    }

    .art-gallery {
        top: 145px;
        width: 94%;
        height: calc(100% - 163px);
        padding: 5px;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 145px;
        gap: 7px;
    }

    .art-lightbox {
        padding: 25px;
    }

    .art-lightbox-image-container {
        width: 94vw;
        height: 84vh;
    }

    .art-lightbox-image {
        max-width: 94vw;
        max-height: 82vh;
    }

    .art-lightbox-close {
        top: 18px;
        right: 20px;
    }

    .art-lightbox-previous {
        left: 12px;
    }

    .art-lightbox-next {
        right: 12px;
    }
}


/* VERY SMALL */

@media screen and (max-width: 380px) {

    .art-description {
        top: 56px;
        width: 90%;
        font-size: 13px;
    }

    .art-gallery {
        top: 135px;
        height: calc(100% - 153px);
        width: 96%;
        padding: 4px;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 145px;
        gap: 6px;
    }

    .art-lightbox button {
        font-size: 22px;
    }

    .art-lightbox-close {
        font-size: 30px !important;
    }
}