
.cgpg{
    --cgpg-gap:16px;
    width:100%;
}
.cgpg__grid{
    column-count:4;
    column-gap:var(--cgpg-gap);
}
.cgpg__item{
    display:inline-block;
    width:100%;
    margin:0 0 var(--cgpg-gap);
    break-inside:avoid;
    -webkit-column-break-inside:avoid;
    page-break-inside:avoid;
    vertical-align:top;
    opacity:1;
    transform:translateY(0);
    transition:opacity .28s ease, transform .28s ease;
}
.cgpg__item.is-hidden{
    display:none;
}
.cgpg__item.is-revealing{
    opacity:0;
    transform:translateY(12px);
}
.cgpg__open{
    display:block;
    width:100%;
    padding:0;
    border:0;
    background:transparent;
    cursor:zoom-in;
    border-radius:14px;
    overflow:hidden;
}
.cgpg__open img{
    width:100%;
    height:auto;
    display:block;
    transition:transform .3s ease, filter .3s ease;
}
.cgpg__open:hover img{
    transform:scale(1.015);
    filter:brightness(.96);
}
.cgpg__more-wrap{
    display:flex;
    justify-content:center;
    margin-top:26px;
}
.cgpg__more{
    border:0;
    border-radius:999px;
    padding:13px 24px;
    background:#111;
    color:#fff;
    font:inherit;
    font-weight:600;
    cursor:pointer;
    transition:transform .2s ease, opacity .2s ease;
}
.cgpg__more:hover{
    transform:translateY(-1px);
    opacity:.9;
}

/* LIGHTBOX */
.cgpg-lightbox{
    position:fixed;
    inset:0;
    z-index:999999;
    display:none;
    align-items:center;
    justify-content:center;
    background:rgba(0,0,0,.92);
    padding:30px 80px;
}
.cgpg-lightbox.is-open{
    display:flex;
}
.cgpg-lightbox__content{
    max-width:min(1200px, 88vw);
    max-height:90vh;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
}
.cgpg-lightbox__image{
    display:block;
    max-width:100%;
    max-height:82vh;
    width:auto;
    height:auto;
    object-fit:contain;
    box-shadow:0 20px 80px rgba(0,0,0,.35);
}
.cgpg-lightbox__caption{
    color:#fff;
    text-align:center;
    margin-top:12px;
    font-size:14px;
    line-height:1.45;
}
.cgpg-lightbox__caption:empty{
    display:none;
}
.cgpg-lightbox__close{
    position:absolute;
    top:18px;
    right:22px;
    width:46px;
    height:46px;
    border:0;
    background:transparent;
    color:#fff;
    font-size:42px;
    line-height:1;
    cursor:pointer;
}
.cgpg-lightbox__nav{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:52px;
    height:72px;
    border:0;
    background:rgba(255,255,255,.08);
    color:#fff;
    font-size:44px;
    line-height:1;
    cursor:pointer;
    border-radius:12px;
}
.cgpg-lightbox__nav--prev{ left:18px; }
.cgpg-lightbox__nav--next{ right:18px; }

body.cgpg-no-scroll{
    overflow:hidden!important;
}

@media (max-width:1100px){
    .cgpg__grid{ column-count:3; }
}
@media (max-width:760px){
    .cgpg__grid{ column-count:2; column-gap:10px; }
    .cgpg__item{ margin-bottom:10px; }
    .cgpg-lightbox{ padding:20px 48px; }
    .cgpg-lightbox__nav{
        width:40px;
        height:58px;
        font-size:34px;
    }
    .cgpg-lightbox__nav--prev{ left:4px; }
    .cgpg-lightbox__nav--next{ right:4px; }
}
@media (max-width:420px){
    .cgpg{
        --cgpg-gap:8px;
    }
    .cgpg__open{
        border-radius:10px;
    }
    .cgpg-lightbox{
        padding:16px 42px;
    }
}
