/*==============================
GALLERY SHOWCASE
===============================*/

.gallery-showcase{

    background:#0B2C52;
    color:#fff;
    padding:120px 0;

}

.gallery-header{

    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    gap:50px;
    margin-bottom:70px;

}

.gallery-title{

    max-width:700px;

}

.gallery-badge{

    display:inline-flex;
    align-items:center;
    gap:8px;

    padding:8px 18px;

    border-radius:40px;

    background:rgba(255,255,255,.08);

    border:1px solid rgba(255,255,255,.2);

    text-transform:uppercase;
    letter-spacing:2px;
    font-size:.8rem;
    font-weight:600;

}

.gallery-title h1{

    font-size:3.5rem;
    line-height:1.15;
    margin-top:25px;

}

.gallery-title span{

    font-style:italic;
    color:#D4AF37;

}

.gallery-header p{

    max-width:360px;
    line-height:1.8;
    opacity:.8;

}

/*========================*/

.gallery-grid{

    display:grid;

    grid-template-columns:repeat(4,1fr);

    grid-auto-rows:240px;

    gap:18px;

}

.gallery-item{

    position:relative;

    overflow:hidden;

    border-radius:22px;

    cursor:pointer;

}

.gallery-item.large{

    grid-column:span 2;
    grid-row:span 2;

}

.gallery-item.wide{

    grid-column:span 2;

}

.gallery-item img{

    width:100%;
    height:100%;

    object-fit:cover;

    transition:transform .7s ease;

}

.gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;

    background: linear-gradient(
        to top,
        rgba(11,44,82,.95),
        rgba(11,44,82,.25),
        transparent
    );

    opacity: 0;
    transition: .5s;

    pointer-events: none;   /* <-- This is the fix */
}

.gallery-item figcaption{

    position:absolute;

    left:25px;
    bottom:25px;

    display:flex;
    align-items:center;
    gap:10px;

    font-weight:600;

    opacity:0;

    transform:translateY(25px);

    transition:.5s;

    z-index:5;

}

.gallery-item:hover img{

    transform:scale(1.12);

}

.gallery-item:hover::after{

    opacity:1;

}

.gallery-item:hover figcaption{

    opacity:1;
    transform:translateY(0);

}
@media(max-width:900px){

.gallery-header{

    flex-direction:column;
    align-items:flex-start;

}

.gallery-title h1{

    font-size:2.8rem;

}

.gallery-grid{

    grid-template-columns:repeat(2,1fr);
    grid-auto-rows:320px;
}

.gallery-item.large{

    grid-column:span 2;
    grid-row:span 1;
    height:auto;
   
}

.gallery-item.wide{

    grid-column:span 2;

}

}

@media(max-width:410px){

.gallery-showcase{

    padding:80px 0;

}

.gallery-title h1{

    font-size:2.2rem;

}

.gallery-header{

    margin-bottom:40px;

}

.gallery-grid{

    grid-template-columns:1fr;

    grid-auto-rows:260px;

}

.gallery-item,
.gallery-item.large,
.gallery-item.wide{

    grid-column:span 1;
    grid-row:span 1;
    height:260px;

}

.gallery-header p{

    max-width:100%;

}

}
/* Extra Small Phones */
@media (max-width: 398px) {

    .gallery-grid{
        grid-template-columns: 1fr;
        grid-auto-rows: 240px;
    }

    .gallery-item,
    .gallery-item.large,
    .gallery-item.wide{
        grid-column: span 1;
        grid-row: span 1;
        height: 240px;
    }

}

@media (max-width: 1000px) {

    .gallery-item::after{
        opacity: 1;
    }

    .gallery-item figcaption{
        opacity: 1;
        transform: translateY(0);
    }

}

/* light box */
/*======================================
            LIGHTBOX
======================================*/

.lightbox{
    position:fixed;
    inset:0;

    display:flex;
    justify-content:center;
    align-items:center;

    background:rgba(0,0,0,.85);
    backdrop-filter:blur(8px);

    opacity:0;
    visibility:hidden;

    transition:.4s ease;

    z-index:9999;
}

.lightbox.show{
    opacity:1;
    visibility:visible;
}

/* Image Container */

.lightbox-content{
    width:90%;
    max-width:900px;

    display:flex;
    justify-content:center;
    align-items:center;

    overflow:hidden;
     flex-direction:column;
}

/* Image */

.lightbox-content img{
    width:100%;
    max-height:85vh;

    object-fit:contain;

    border-radius:15px;

    transform:scale(.85);
    transition:.4s ease;

    box-shadow:0 30px 60px rgba(0,0,0,.45);

    cursor:zoom-in;
}

.lightbox.show img{
    transform:scale(1);
}

/* Close Button */

.lightbox-close{
    position:absolute;
    top:25px;
    right:35px;

    font-size:42px;
    color:white;

    cursor:pointer;

    transition:.3s;
    user-select:none;
}

.lightbox-close:hover{
    color:#D4AF37;
    transform:rotate(90deg);
}

/* Navigation Buttons */

.lightbox-prev,
.lightbox-next{
    position:absolute;
    top:50%;
    transform:translateY(-50%);

    width:55px;
    height:55px;

    border:none;
    border-radius:50%;

    background:rgba(255,255,255,.12);
    backdrop-filter:blur(8px);

    color:white;
    font-size:20px;

    cursor:pointer;

    transition:.3s;

    display:flex;
    justify-content:center;
    align-items:center;
    z-index: 10001;
}

.lightbox-prev{
    left:35px;
}

.lightbox-next{
    right:35px;
}

.lightbox-prev:hover,
.lightbox-next:hover{
    background:#D4AF37;
    transform:translateY(-50%) scale(1.1);
}

/* Prevent Image Selection */

.lightbox img{
    user-select:none;
    -webkit-user-drag:none;
}

/*======================================
        IMAGE ANIMATION
======================================*/

.lightbox-content img{
    transition:
        transform .35s ease,
        opacity .35s ease;
}

.lightbox-img-changing{
    opacity:0;
}

.lightbox-content img.zoomed{
    transform:scale(1.8);
    cursor:zoom-out;
}
/*======================================
        MOBILE
======================================*/

@media(max-width:768px){

    .lightbox-content{
        width:95%;
    }

    .lightbox-prev,
    .lightbox-next{
        width:45px;
        height:45px;
        font-size:16px;
    }

    .lightbox-prev{
        left:12px;
    }

    .lightbox-next{
        right:12px;
    }

    .lightbox-close{
        top:15px;
        right:20px;
        font-size:34px;
    }
}

@media(max-width:480px){

    .lightbox-prev,
    .lightbox-next{
        width:40px;
        height:40px;
    }

    .lightbox-content img{
        max-height:75vh;
    }
}

.lightbox-caption{
    margin-top:20px;

    color:#fff;
    font-size:1.1rem;
    font-weight:600;

    text-align:center;

    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
}

/* modal */
.gallery-modal{

    position:fixed;
    inset:0;

    background:rgba(0,0,0,.75);

    display:flex;
    justify-content:center;
    align-items:center;

    opacity:0;
    visibility:hidden;

    transition:.35s;

    z-index:99999;

}

.gallery-modal.show{

    opacity:1;
    visibility:visible;

}

.gallery-modal-box{

    width:min(1000px,90%);
    max-height:85vh;

    overflow-y:auto;

    background:white;

    border-radius:20px;

    padding:35px;

}

.gallery-modal-grid{

    margin-top:25px;

    display:grid;

    grid-template-columns:repeat(auto-fill,minmax(230px,1fr));

    gap:18px;

}

.gallery-modal-grid img{

    width:100%;
    height:220px;

    object-fit:cover;

    border-radius:12px;

    cursor:pointer;

    transition:.35s;

}

.gallery-modal-grid img:hover{

    transform:scale(1.05);

}

.gallery-modal-close{

    float:right;

    font-size:38px;

    cursor:pointer;

}

.gallery-caption{

    cursor:pointer;

}