/* ==========================================
   Project Gallery Pro
========================================== */

.project-gallery{
    display:grid;
    grid-template-columns:2fr 1fr 2fr;
    grid-template-rows:320px 420px;
    gap:15px;
}

/* ==========================================
   Gallery Item
========================================== */

.gallery-item{
    position:relative;
    overflow:hidden;
    border-radius:0px;
    background:#f5f5f5;
}

.gallery-item a{
    display:block;
    width:100%;
    height:100%;
}

.gallery-item img,
.gallery-item video{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}


/* ==========================================
   Grey Hover Overlay
========================================== */

.gallery-item::before{
    content:"";
    position:absolute;
    inset:0;
    background:rgba(80,80,80,.5);
    opacity:0;
    transition:.35s ease;
    z-index:2;
    pointer-events:none;
}

.gallery-item:hover::before{
    opacity:1;
}

/* ==========================================
   Video Play Button
========================================== */

.gallery-item video + .play-icon{
    display:none;
}

.gallery-item.has-video::after{
    content:"▶";
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    width:70px;
    height:70px;
    border-radius:50%;
    background:rgba(255,255,255,.9);
    color:#000;
    font-size:28px;
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:3;
    transition:.3s;
}

.gallery-item.has-video:hover::after{
    transform:translate(-50%,-50%) scale(1.1);
}



/* ==========================================
   Grid Layout
========================================== */

.gallery-item:nth-child(1){
    grid-column:1;
    grid-row:1;
}

.gallery-item:nth-child(2){
    grid-column:2;
    grid-row:1;
}

.gallery-item:nth-child(3){
    grid-column:3;
    grid-row:1;
}

.gallery-item:nth-child(4){
    grid-column:1;
    grid-row:2;
}

.gallery-item:nth-child(5){
    grid-column:2 / span 2;
    grid-row:2;
}

/* ==========================================
   GLightbox
========================================== */

.glightbox-clean .gslide-media{
    border-radius:10px;
}

/* ==========================================
   Mobile
========================================== */

@media (max-width:1024px){

    .project-gallery{
        grid-template-columns:1fr 1fr;
        grid-template-rows:auto;
    }

    .gallery-item{
        grid-column:auto!important;
        grid-row:auto!important;
        height:280px;
    }

}

@media (max-width:767px){

    .project-gallery{
        grid-template-columns:1fr;
        gap:15px;
    }

    .gallery-item{
        height:250px;
    }

    .gallery-item:has(video)::after{
        width:55px;
        height:55px;
        font-size:22px;
    }

}
/* Infinite Scroll */

.gallery-item.hidden-item{
    display:none;
}

.gallery-loader{
    text-align:center;
    padding:40px 0;
    display:none;
}

.gallery-loader.active{
    display:block;
}

.gallery-loader:after{
    content:"";
    width:40px;
    height:40px;
    border:4px solid #ddd;
    border-top:4px solid #1F5E3B;
    border-radius:50%;
    display:inline-block;
    animation:pgpSpin 1s linear infinite;
}

@keyframes pgpSpin{
    from{transform:rotate(0deg);}
    to{transform:rotate(360deg);}
}