html {
    scrollbar-gutter: stable;
}



/* =========================
   PHOTO GRID
   ========================= */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;

    max-width: 1080px;
    margin: 0 auto;
}

.photo-section {
    max-width: 1080px;
    margin: 0 auto 80px;
}

.psectionheader {
    padding:4em;
    text-align: center;
    margin:0 0 2em;
}

.photo-section h2 {
    margin: 0 0 20px;
    font-size: 1.5em;
    font-weight: normal;
    text-align: left;
}

.photo-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.photo {
    display: block;
    width: 100%;
    cursor: pointer;
    overflow: hidden;
    background: #ddd;
}

.photo img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}


/* =========================
   LIGHTBOX
   ========================= */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;

    background: rgba(0, 0, 0, 0.92);

    opacity: 0;
    visibility: hidden;

    transition: opacity 0.25s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 95vw;
    max-height: 95vh;

    width: auto;
    height: auto;

    object-fit: contain;

    transform: scale(0.97);
    transition: transform 0.25s ease;
}

.lightbox.active img {
    transform: scale(1);
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;

    z-index: 1002;

    color: white;
    font-size: 40px;
    font-weight: 200;
    line-height: 1;

    cursor: pointer;
    user-select: none;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;

    top: 50%;
    transform: translateY(-50%);

    z-index: 1001;

    border: none;
    background: none;

    color: white;
    font-size: 40px;
    font-family: Arial, sans-serif;

    cursor: pointer;

    padding: 20px;

    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}


/* Make sure the image sits above the background
   but below the navigation controls */

.lightbox img {
    position: relative;
    z-index: 1000;

    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;

    transform: scale(0.97);
    transition: transform 0.25s ease;
}



/* =========================
   TABLET
   ========================= */

@media (max-width: 1200px) {

    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
        /*padding: 1em;*/
    }
    
    .photo-section {
        padding:0 5% 0 5%;
    }

}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 700px) {

    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .photo-column {
        gap: 10px;
    }

    .lightbox {
        padding: 15px;
    }

    .close {
        top: 15px;
        right: 20px;
        font-size: 32px;
    }
    
        .lightbox-prev,
    .lightbox-next {
        font-size: 28px;
        padding: 15px;
    }

    .lightbox-prev {
        left: 5px;
    }

    .lightbox-next {
        right: 5px;
    }

}


/* =========================
   SMALL MOBILE
   ========================= */

@media (max-width: 450px) {

    .photo-grid {
        grid-template-columns: 1fr;
    }

}