/*
====================
    GALLERY HERO
====================
*/
.gallery-hero {
    max-width: 900px;
    margin: 80px auto 40px;
    padding: 0 20px;
    text-align: center;
}

.gallery-hero h1 {
    font-size: 2.4rem;
    color: #6B4F3B;
    margin-bottom: 14px;
    font-weight: 700;
}

.gallery-hero p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #5A4636;
}

/*
====================
    GALLERY GRID
====================
*/
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(107,79,59,0.75);
    color: #fff;
    text-align: center;
    padding: 6px 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

/*
=======================
    LIGHTBOX MODULE
=======================
*/
#galleryModal {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
}

#galleryModal img {
    max-width: 90%;
    max-height: 70%;
    margin-bottom: 12px;
    border-radius: 8px;
}

#modalCaption {
    text-align: center;
    color: #FFF;
    max-width: 90%;
}

#modalCaption h3 {
    margin: 0 0 6px;
    font-size: 1.3rem;
}

#modalCaption p {
    margin: 0;
    font-size: 1rem;
}

#closeModal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: #FFF;
    cursor: pointer;
}


/*
======================================
    RESPONSIVE CODE (SMALL MOBILE)
======================================
*/
@media (max-width: 480px) {
    .gallery-hero h1 {
        font-size: 1.6rem;
    }

    .gallery-hero p {
        font-size: 0.9rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gallery-item img {
        height: 180px;
    }

    .overlay {
        font-size: 0.9rem;
    }

    #galleryModal img {
        max-width: 100%;
        max-height: 55%;
    }

    #modalCaption {
        max-width: 95%;
    }

    #modalCaption h3 {
        font-size: 1rem;
    }

    #modalCaption p {
        font-size: 0.9rem;
    }
}

/*
================================
    RESPONSIVE CODE (MOBILE)
================================
*/
@media (max-width: 767px) {
    .gallery-hero {
        margin: 60px auto 30px;
    }

    .gallery-hero h1 {
        font-size: 1.9rem;
    }

    .gallery-hero p {
        font-size: 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin: 30px auto;
    }

    .gallery-item img {
        height: 140px;
    }

    .overlay {
        opacity: 1;
        font-size: 0.85rem;
        padding: 5px 0;
    }

    #galleryModal img {
        max-width: 95%;
        max-height: 60%;
    }

    #modalCaption h3 {
        font-size: 1.1rem;
    }

    #modalCaption p {
        font-size: 0.95rem;
    }

    #closeModal {
        font-size: 1.8rem;
        top: 15px;
        right: 20px;
    }
}

/*
================================
    RESPONSIVE CODE (TABLET)
================================
*/
@media (max-width: 1199px) {
    .gallery-hero {
        margin: 70px auto 35px;
    }

    .gallery-hero h1 {
        font-size: 2.1rem;
    }

    .gallery-hero p {
        font-size: 1.05rem;
    }

    .gallery-grid {
        max-width: 800px;
        gap: 12px;
    }

    .gallery-item img {
        height: 160px;
    }

    #galleryModal img {
        max-width: 85%;
        max-height: 65%;
    }
}