/*=====================================================
            GALLERY PAGE
======================================================*/

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

.gallery-header{

    width:100%;
    height:350px;

    background:linear-gradient(rgba(0,0,0,.55),
               rgba(0,0,0,.55)),
               url("../images/banners/gallery-banner.jpg");

    background-size:cover;
    background-position:center;

    display:flex;
    justify-content:center;
    align-items:center;

    text-align:center;

}

.gallery-overlay{

    color:#fff;

}

.gallery-overlay h1{

    font-size:52px;

    font-weight:700;

    margin-bottom:20px;

}

.gallery-overlay p{

    font-size:20px;

    width:70%;

    margin:auto;

    line-height:1.7;

}


/*=============================
      FILTER BUTTONS
==============================*/

.gallery-filter-section{

    width:100%;

    padding:40px 0;

    background:#ffffff;

}

.gallery-filter{

    width:90%;

    margin:auto;

    display:flex;

    justify-content:center;

    flex-wrap:wrap;

    gap:15px;

}

.filter-btn{

    padding:12px 25px;

    border:none;

    background:#f2f2f2;

    border-radius:40px;

    cursor:pointer;

    font-size:16px;

    transition:.3s;

    font-weight:600;

}

.filter-btn:hover{

    background:#0B7A28;

    color:white;

}

.filter-btn.active{

    background:#0B7A28;

    color:white;

}


/*=============================
        GALLERY
==============================*/

.gallery-container{

    width:92%;

    margin:50px auto;

}

.gallery-category{

    margin-bottom:70px;

}

.gallery-category h2{

    text-align:center;

    color:#0B7A28;

    margin-bottom:35px;

    font-size:36px;

    position:relative;

}

.gallery-category h2::after{

    content:"";

    width:90px;

    height:4px;

    background:#0B7A28;

    display:block;

    margin:12px auto;

    border-radius:20px;

}

/*=====================================================
                GALLERY GRID
======================================================*/

.gallery-grid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));

    gap:30px;

}

.gallery-card{

    background:#fff;

    border-radius:15px;

    overflow:hidden;
    padding:10px;

    box-shadow:0 10px 25px rgba(0,0,0,.12);

    transition:.35s ease;

    position:relative;

}

.gallery-card:hover{

    transform:translateY(-8px);

    box-shadow:0 18px 35px rgba(0,0,0,.18);

}


.gallery-image {
  width: 100%;
  height: 400px; /* Set a fixed height or use aspect-ratio */
  object-fit: cover;
  object-position: top center; /* Forces focus on face and upper body */
  display: block;
  cursor: pointer;
  transition: transform .4s ease;
}




.gallery-image{

    width:100%;

    height:auto;

    object-fit:contain;

    display:block;

    cursor:pointer;

    transition:transform .4s ease;

}

.gallery-card:hover .gallery-image{

    transform:scale(1.08);

}

/*=====================================================
                CAPTION
======================================================*/

.gallery-caption{

    padding:18px;

    text-align:center;

}

.gallery-caption h3{

    font-size:20px;

    color:#222;

    margin-bottom:8px;

}

.gallery-caption p{

    color:#666;

    font-size:15px;

    line-height:1.6;

}

/*=====================================================
            EMPTY FOLDER MESSAGE
======================================================*/

.gallery-empty{

    width:100%;

    padding:40px;

    text-align:center;

    background:#fafafa;

    border:2px dashed #d5d5d5;

    border-radius:12px;

}

.gallery-empty p{

    color:#666;

    font-size:18px;

}

/*=====================================================
            IMAGE ANIMATION
======================================================*/

.gallery-card{

    animation:fadeUp .6s ease;

}

@keyframes fadeUp{

    from{

        opacity:0;

        transform:translateY(30px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/*=====================================================
                IMAGE POPUP (LIGHTBOX)
======================================================*/

.image-popup{

    position:fixed;

    top:0;
    left:0;

    width:100%;
    height:100%;

    background:rgba(0,0,0,.92);

    display:none;

    justify-content:center;
    align-items:center;

    z-index:99999;

    padding:20px;

}

.image-popup img{

    width:auto;

    height:auto;

    max-width:95vw;

    max-height:95vh;

    object-fit:contain;

    border-radius:12px;

}

@keyframes zoomImage{

    from{

        opacity:0;

        transform:scale(.8);

    }

    to{

        opacity:1;

        transform:scale(1);

    }

}

/* Close Button */

.close-popup{

    position:absolute;

    top:20px;

    right:35px;

    color:#fff;

    font-size:45px;

    font-weight:bold;

    cursor:pointer;

    transition:.3s;

}

.close-popup:hover{

    color:#0B7A28;

}

/* Previous / Next */

.popup-prev,
.popup-next{

    position:absolute;

    top:50%;

    transform:translateY(-50%);

    color:#fff;

    font-size:60px;

    font-weight:bold;

    cursor:pointer;

    padding:15px;

    user-select:none;

    transition:.3s;

}

.popup-prev{

    left:30px;

}

.popup-next{

    right:30px;

}

.popup-prev:hover,
.popup-next:hover{

    color:#0B7A28;

}

/* Caption */

.popup-caption{

    position:absolute;

    bottom:25px;

    width:100%;

    text-align:center;

    color:#fff;

    font-size:20px;

    font-weight:500;

    padding:10px;

}

/*=====================================================
                RESPONSIVE
======================================================*/

@media(max-width:992px){

.gallery-overlay h1{

    font-size:40px;

}

.gallery-overlay p{

    width:90%;

    font-size:18px;

}

.gallery-category h2{

    font-size:30px;

}

}

@media(max-width:768px){

.gallery-header{

    height:260px;

}

.gallery-overlay h1{

    font-size:32px;

}

.gallery-overlay p{

    font-size:16px;

}

.gallery-grid{

    grid-template-columns:1fr;

}

.gallery-image{

    height:220px;

}

.popup-prev,
.popup-next{

    font-size:42px;

}

.close-popup{

    font-size:36px;

    right:20px;

}

.popup-caption{

    font-size:16px;

}

}

@media(max-width:480px){

.filter-btn{

    width:100%;

}

.gallery-container{

    width:95%;

}

.gallery-image{

    height:200px;

}

}


.gallery-card{
    position:relative;
}


.gallery-caption{
    position:absolute;
    left:0;
    bottom:0;
    width:100%;
    padding:20px;
    background:linear-gradient(transparent,rgba(0,0,0,.85));
    color:#fff;
    opacity:0;
    transition:.3s;
}

.gallery-card:hover .gallery-caption{
    opacity:1;
}



