/*
====================================
GALLERY PAGE
====================================
*/
.gallery-page-content {
    padding: 40px 0 60px;
}

.gallery-page-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
}

.gallery-page-item {
    position: relative;
    display: block;
    height: 240px;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    overflow: hidden;
    cursor: pointer;
    line-height: 0;
}

.gallery-page-item img {
    height: 100%;
    width: auto;
    max-width: 100%;
    display: block;
    transition: transform .3s;
}

.gallery-page-item:hover img,
.gallery-page-item:focus-visible img {
    transform: scale(1.04);
}

.gallery-page-item:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 2px;
}

.gallery-page-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .75) 100%);
    color: var(--white);
    font-size: 13px;
    text-align: left;
}

@media (max-width: 900px) {
    .gallery-page-item {
        height: 180px;
    }
}

@media (max-width: 600px) {
    .gallery-page-grid {
        gap: 8px;
    }

    .gallery-page-item {
        height: 130px;
    }
}

/*
====================================
LIGHTBOX POPUP
====================================
*/
.nctf-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.nctf-lightbox.is-open {
    display: flex;
}

.nctf-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .85);
}

.nctf-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: min(92vw, 1100px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nctf-lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 80vh; /* or 85vh */
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}

.nctf-lightbox-caption {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    color: var(--white);
    text-align: center;
}

.nctf-lightbox-caption-text {
    font-size: 14px;
}

.nctf-lightbox-caption-text:empty {
    display: none;
}

.nctf-lightbox-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--white);
    background: var(--teal);
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    display: none;
}

.nctf-lightbox-link.is-visible {
    display: inline-block;
}

@media (max-width: 600px) {
    .nctf-lightbox-close {
        top: 8px;
        right: 8px;
    }
}
