/*=========================================================
    PROJECT : Hope & Harmony Spectrum Inc.
    FILE    : gallery.css
    PURPOSE : Gallery Section
=========================================================*/
/*=========================================================
                GALLERY PREVIEW
=========================================================*/

.gallery-preview{

    background:var(--white);

}

.gallery-header{

    text-align:center;

    max-width:700px;

    margin:0 auto 60px;

}

.gallery-grid{

    display:grid;

    grid-template-columns:repeat(3,1fr);

    gap:20px;

    margin-bottom:50px;

}

.gallery-item{

    position:relative;

    overflow:hidden;

    border-radius:20px;

    cursor:pointer;

    box-shadow:0 10px 30px rgba(0,0,0,.08);

}

.gallery-item img{

    width:100%;

    height:100%;

    object-fit:cover;

    display:block;

    transition:.5s ease;

}

.gallery-item:hover img{

    transform:scale(1.08);

}

.gallery-large{

    grid-column:span 2;

}

.gallery-btn{

    text-align:center;

}
.gallery-overlay{

    position:absolute;

    inset:0;

    background:rgba(39,93,169,.65);

    display:flex;

    justify-content:center;

    align-items:center;

    opacity:0;

    transition:.4s ease;

}

.gallery-overlay i{

    color:#fff;

    font-size:2rem;

    transform:scale(.7);

    transition:.4s ease;

}

.gallery-item:hover .gallery-overlay{

    opacity:1;

}

.gallery-item:hover .gallery-overlay i{

    transform:scale(1);

}

/*=========================================================
                PHOTO GALLERY
=========================================================*/

.photo-gallery{

    padding:120px 0;

    background:#fff;

}

/*=========================
        FILTERS
=========================*/

.gallery-filter{

    display:flex;

    justify-content:center;

    align-items:center;

    flex-wrap:wrap;

    gap:15px;

    margin:60px 0;

}

.filter-btn{

    border:none;

    outline:none;

    cursor:pointer;

    padding:14px 28px;

    border-radius:50px;

    background:#f3f6fa;

    color:var(--text-color);

    font-weight:600;

    transition:.35s;

}

.filter-btn:hover{

    background:var(--primary-color);

    color:#fff;

}

.filter-btn.active{

    background:var(--primary-color);

    color:#fff;

}

/*=========================
        MASONRY
=========================*/

.gallery-masonry{

    display:grid;

    grid-template-columns:repeat(4,1fr);

    grid-auto-rows:260px;

    gap:22px;

}
/*=========================================================
                PHOTO GALLERY – MASTER STYLES
=========================================================*/

/* ----- Section & Container ----- */
.photo-gallery {
    background: #ffffff;
    padding: 80px 0;
}

.section-heading {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}
.section-subtitle {
    display: block;
    font-weight: 600;
    color: var(--primary-color, #275da9);
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.section-heading h2 {
    font-size: 2.8rem;
    margin-bottom: 16px;
}
.section-heading p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
}

/* ----- Filters ----- */
.gallery-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 50px;
}

.filter-btn {
    border: none;
    outline: none;
    padding: 12px 28px;
    border-radius: 50px;
    background: #f3f6fa;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, transform 0.2s;
}
.filter-btn:hover {
    background: var(--primary-color, #275da9);
    color: #fff;
    transform: translateY(-2px);
}
.filter-btn.active {
    background: var(--primary-color, #275da9);
    color: #fff;
    box-shadow: 0 4px 12px rgba(39, 93, 169, 0.3);
}

/* ----- Masonry Grid ----- */
.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 260px;
    gap: 22px;
}

/* ----- Gallery Item ----- */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    cursor: pointer;
    background: #f5f7fb;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
    transition: transform 0.45s ease, box-shadow 0.45s ease, opacity 0.7s ease;
}

/* Masonry Sizes */
.gallery-item.tall {
    grid-row: span 2;
}
.gallery-item.wide {
    grid-column: span 2;
}
.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

/* Images inside item */
.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.8s ease, filter 0.5s ease;
}

/* Hover – lift & shadow */
.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.18);
}
.gallery-item:hover img {
    transform: scale(1.08);
    filter: brightness(0.78);
}

/* ----- Overlay (shown on hover) ----- */
.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.82) 5%,
        rgba(0, 0, 0, 0.45) 40%,
        rgba(0, 0, 0, 0.08) 75%,
        transparent
    );
    opacity: 0;
    pointer-events: none;  /* so clicks pass through to the image */
    transition: opacity 0.45s ease;
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Category badge */
.gallery-category {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin-bottom: 15px;
    padding: 8px 18px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.4px;
}

/* Title */
.gallery-overlay h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 18px;
    line-height: 1.3;
}

/* Expand icon */
.gallery-overlay i {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    color: #fff;
    font-size: 1.25rem;
    transition: transform 0.35s ease, background 0.35s ease;
}
.gallery-item:hover .gallery-overlay i {
    transform: rotate(12deg) scale(1.08);
    background: var(--accent-color, #ffb347);
    color: var(--primary-color, #275da9);
}

/* ----- HIDDEN (filtering) ----- */
.gallery-item.hidden {
    display: none !important;
}

/*=========================================================
                LIGHTBOX
=========================================================*/

.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    padding: 20px;
}

.gallery-lightbox .lightbox-img {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.gallery-lightbox .lightbox-caption {
    color: #fff;
    margin-top: 20px;
    font-size: 1.2rem;
    text-align: center;
    max-width: 80%;
}

/* Navigation controls */
.gallery-lightbox .lightbox-close,
.gallery-lightbox .lightbox-prev,
.gallery-lightbox .lightbox-next {
    position: absolute;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    user-select: none;
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.2s;
    background: none;
    border: none;
    line-height: 1;
}
.gallery-lightbox .lightbox-close:hover,
.gallery-lightbox .lightbox-prev:hover,
.gallery-lightbox .lightbox-next:hover {
    opacity: 1;
    transform: scale(1.1);
}

.gallery-lightbox .lightbox-close {
    top: 20px;
    right: 30px;
    font-size: 3.5rem;
}
.gallery-lightbox .lightbox-prev {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
}
.gallery-lightbox .lightbox-next {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .gallery-masonry {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 220px;
    }
    .gallery-item.wide,
    .gallery-item.large {
        grid-column: span 1;
        grid-row: span 1;
    }
    .gallery-item.tall {
        grid-row: span 1;
    }
}

@media (max-width: 576px) {
    .gallery-masonry {
        grid-template-columns: 1fr;
        grid-auto-rows: 240px;
    }
    .gallery-overlay h3 {
        font-size: 1.2rem;
    }
    .gallery-filter {
        gap: 8px;
    }
    .filter-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
    .gallery-lightbox .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 2.5rem;
    }
    .gallery-lightbox .lightbox-prev,
    .gallery-lightbox .lightbox-next {
        font-size: 2rem;
    }
}/* ----- Lightbox ----- */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    padding: 20px;
}
.gallery-lightbox.active {
    display: flex;   /* <-- THIS LINE WAS MISSING */
}
/* ... rest of lightbox styles ... */

/*=========================================================
                GALLERY HERO
=========================================================*/

.gallery-hero{
    padding:150px 0;
    background:#f8fbff;
}

.gallery-hero-grid{
    display:grid;
    grid-template-columns:1.05fr 1.2fr;
    gap:80px;
    align-items:center;
}

.gallery-content h1{
    font-size:3.5rem;
    line-height:1.15;
    margin:20px 0;
    color:var(--dark-color);
}

.gallery-content p{
    font-size:1.1rem;
    line-height:1.9;
    color:#666;
    margin-bottom:40px;
}

.hero-buttons{
    display:flex;
    gap:18px;
    flex-wrap:wrap;
}

.gallery-image img{
    width:100%;
    height:650px;          /* Bigger than other pages */
    object-fit:cover;
    display:block;
    border-radius:30px;
    box-shadow:0 30px 80px rgba(0,0,0,.15);
}

@media(max-width:991px){

.gallery-hero{
    padding:100px 0;
}

.gallery-hero-grid{
    grid-template-columns:1fr;
    text-align:center;
}

.gallery-image{
    order:1;
}

.gallery-content{
    order:2;
}

.gallery-image img{
    height:450px;
}

.gallery-content h1{
    font-size:2.6rem;
}

.hero-buttons{
    justify-content:center;
}

}