/* Scope all styles under parent ID to prevent leakages */
#gallery-page {
    font-family: 'Raleway', 'Roboto', sans-serif;
    background-color: #ffffff;
    color: #333333;
    padding-bottom: 0;
    overflow-x: hidden;
}

/* ==========================================================================
   1. Hero Banner
   ========================================================================== */
#gallery-page .gallery-hero {
    position: relative;
    background-image: linear-gradient(rgba(10, 48, 20, 0.85), rgba(10, 48, 20, 0.85)), url('../../images/about/about_hero_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 90px 0 80px;
    text-align: center;
    color: #ffffff;
}

#gallery-page .gallery-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

#gallery-page .gallery-hero .hero-underline {
    width: 90px;
    height: 4px;
    background-color: #ffcc00;
    margin: 0 auto 22px;
    border-radius: 2px;
}

#gallery-page .gallery-hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.8;
}

/* ==========================================================================
   2. Filter Navigation Tabs
   ========================================================================== */
#gallery-page .tabs-section {
    padding: 50px 0 30px;
}

#gallery-page .gallery-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

#gallery-page .tab-btn {
    background-color: #ffffff;
    color: #555555;
    border: 1px solid #e1e9e3;
    padding: 10px 22px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

#gallery-page .tab-btn i {
    font-size: 1rem;
    color: #0b3c16;
}

#gallery-page .tab-btn:hover {
    border-color: #0b3c16;
    color: #0b3c16;
    background-color: #f7faf8;
}

/* Active tab style */
#gallery-page .tab-btn.active {
    background-color: #ED1C24;
    color: #ffffff;
    border-color: #ED1C24;
    box-shadow: 0 4px 10px rgba(11, 60, 22, 0.2);
}

#gallery-page .tab-btn.active i {
    color: #ffcc00;
    /* Star icon highlighted in gold */
}

/* ==========================================================================
   3. Image Grid Section
   ========================================================================== */
#gallery-page .gallery-grid-section {
    padding-bottom: 70px;
}

#gallery-page .gallery-grid {
    transition: all 0.3s ease;
}

#gallery-page .gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f7faf8;
    border: 1px solid #edf2ee;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.02);
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#gallery-page .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

/* Hover Zoom and Overlay Magnifying icon styling */
#gallery-page .gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 60, 22, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 2;
}

#gallery-page .zoom-icon {
    font-size: 2rem;
    color: #ffffff;
    transform: scale(0.8);
    transition: transform 0.25s ease;
}

#gallery-page .gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(11, 60, 22, 0.12);
    border-color: #a7cfb4;
}

#gallery-page .gallery-item:hover img {
    transform: scale(1.08);
}

#gallery-page .gallery-item:hover .gallery-overlay {
    opacity: 1;
}

#gallery-page .gallery-item:hover .zoom-icon {
    transform: scale(1);
}

/* Load More Section Button */
#gallery-page .load-more-container {
    text-align: center;
    margin-top: 50px;
}

#gallery-page .load-more-btn {
    background-color: #0b3c16;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(11, 60, 22, 0.2);
    transition: all 0.2s ease;
}

#gallery-page .load-more-btn:hover {
    background-color: #ffffff;
    color: #0b3c16;
    box-shadow: 0 6px 15px rgba(11, 60, 22, 0.25);
    outline: 2px solid #0b3c16;
}

#gallery-page .load-more-btn i {
    font-size: 0.9rem;
}

/* ==========================================================================
   4. Vanilla JS Lightbox Overlay Modal
   ========================================================================== */
#gallery-page .lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#gallery-page .lightbox-modal.active {
    display: flex;
    opacity: 1;
}

#gallery-page .lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#gallery-page .lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.25s ease;
}

#gallery-page .lightbox-modal.active .lightbox-img {
    transform: scale(1);
}

/* Lightbox Controls Buttons */
#gallery-page .lightbox-close {
    position: absolute;
    top: 30px;
    right: 35px;
    font-size: 2.2rem;
    color: #dddddd;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 100;
}

#gallery-page .lightbox-close:hover {
    color: #ffffff;
    transform: scale(1.1);
}

#gallery-page .lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
    z-index: 100;
}

#gallery-page .lightbox-arrow:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.05);
}

#gallery-page .lightbox-prev {
    left: 40px;
}

#gallery-page .lightbox-next {
    right: 40px;
}

/* Hide navigation arrows on smaller mobile viewports for clean layout */
@media (max-width: 767px) {
    #gallery-page .lightbox-prev {
        left: 10px;
    }

    #gallery-page .lightbox-next {
        right: 10px;
    }

    #gallery-page .lightbox-arrow {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    #gallery-page .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 1.8rem;
    }
}

/* ==========================================================================
   5. CTA Banner
   ========================================================================== */
#gallery-page .cta-banner {
    background-color: #ffdf7a;
    padding: 35px 0;
    border-top: 1px solid #ffd452;
}

#gallery-page .cta-text {
    font-size: 1.45rem;
    font-weight: 700;
    color: #2b2b2b;
    margin: 0;
}

#gallery-page .cta-btn {
    background-color: #0b3c16;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    padding: 11px 32px;
    border-radius: 30px;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 8px rgba(11, 60, 22, 0.15);
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

#gallery-page .cta-btn:hover {
    background-color: #ffffff;
    color: #0b3c16;
    border-color: #0b3c16;
    box-shadow: 0 5px 12px rgba(11, 60, 22, 0.2);
}

@media (max-width: 767px) {
    #gallery-page .cta-text {
        font-size: 1.25rem;
        margin-bottom: 15px;
    }
}