/* ═══════════════════════════════════════════
    GALLERY PAGE STYLES
═══════════════════════════════════════════ */

#gallery-hero {
    padding: 5rem 0 4rem;
    background: linear-gradient(135deg, var(--bg-offwhite) 0%, #FFFFFF 100%);
    position: relative;
    overflow: hidden;
}

#gallery-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(#E2E8F0 1px, transparent 1px),
        linear-gradient(90deg, #E2E8F0 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.3;
}

/* Filter Section */
#gallery-filter {
    background: var(--bg-white);
    border-top: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
    padding: 1rem 0;
    position: sticky;
    top: 72px;
    z-index: 99;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    background: transparent;
    border: 1px solid #E2E8F0;
    color: var(--text-muted);
    transition: all 0.2s;
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.15);
}

.gallery-item-image {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.gallery-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-item-image img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-info {
    color: white;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-item-info {
    transform: translateY(0);
}

.gallery-item-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.gallery-item-info p {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-bottom: 0;
}

.gallery-item-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--green);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 1;
}

/* Lightbox Modal */
.lightbox-modal .modal-content {
    background: transparent;
    border: none;
}

.lightbox-modal .modal-body {
    padding: 0;
}

.lightbox-image {
    max-height: 75vh;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 12px;
}

.lightbox-caption {
    background: rgba(0,0,0,0.5);
    padding: 1rem;
    border-radius: 12px;
    margin: 0 auto;
    margin-top: 0.5rem;
    color: white;
    width: 80%;
}

/* Counter */
.gallery-counter {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1rem;
    }
    
    .gallery-item-image {
        height: 220px;
    }
}