/* ============================================
   GALLERY PAGE - GREENFAJ SOLUTIONS
   ============================================ */

/* Sticky Back Button - After Filter Section, Top Right */
.sticky-back-btn {
    position: sticky;
    top: 100px;
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.back-btn {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--accent-gold);
    color: var(--primary-green);
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-btn:hover {
    background-color: var(--accent-dark);
    transform: scale(1.05);
}

.back-btn i {
    font-size: 0.9rem;
}

/* Hero Section */
.page-hero {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-light));
    color: white;
    text-align: center;
    padding: 4rem 10%;
}

.page-hero h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Gallery Filter Section */
.gallery-filter-section {
    padding: 2rem 10%;
    background-color: var(--bg-soft);
    text-align: center;
}

.gallery-filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.gallery-filter-btn {
    padding: 8px 20px;
    background: var(--white);
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-filter-btn:hover,
.gallery-filter-btn.active {
    background-color: var(--primary-green);
    color: white;
    transform: translateY(-2px);
}

/* Gallery Main Grid */
.gallery-main {
    padding: 4rem 10%;
    background-color: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.8rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Gallery Card */
.gallery-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.gallery-card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-card-image img {
    transform: scale(1.08);
}

.gallery-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card-image:hover .gallery-card-overlay {
    opacity: 1;
}

.gallery-card-overlay i {
    color: white;
    font-size: 2rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 50%;
}

.gallery-card-info {
    padding: 1.2rem;
    text-align: center;
}

.gallery-card-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--primary-green);
}

.gallery-card-info p {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-image {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-caption {
    text-align: center;
    margin-top: 1rem;
    color: white;
}

.lightbox-caption h3 {
    color: var(--accent-gold);
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.lightbox-caption p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    color: var(--accent-gold);
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 1200px) {
    .sticky-back-btn {
        max-width: 95%;
    }
}

@media (max-width: 992px) {
    .page-hero {
        padding: 3rem 5%;
    }
    
    .page-hero h1 {
        font-size: 2rem;
    }
    
    .gallery-filter-section {
        padding: 1.5rem 5%;
    }
    
    .gallery-main {
        padding: 3rem 5%;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .sticky-back-btn {
        top: 80px;
        padding: 0 1.5rem;
    }
    
    .back-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .page-hero h1 {
        font-size: 1.8rem;
    }
    
    .gallery-filter-btn {
        padding: 6px 16px;
        font-size: 0.75rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .gallery-card-image {
        height: 220px;
    }
    
    .sticky-back-btn {
        top: 70px;
        padding: 0 1rem;
    }
    
    .back-btn {
        padding: 6px 12px;
        font-size: 0.7rem;
    }
    
    .back-btn i {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .gallery-card-image {
        height: 200px;
    }
    
    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 2rem;
    }
    
    .sticky-back-btn {
        top: 65px;
    }
}