/* Gallery Page Specific Styles */

.gallery-section {
    padding: 60px 0 80px;
}

/* Filter Buttons */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 40px 0;
}

.filter-btn {
    padding: 12px 30px;
    background: #fff;
    border: 2px solid var(--primary-light, #2c5f2d);
    color: var(--primary-light, #2c5f2d);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-btn:hover {
    background: var(--bg-light, #f8f6f3);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-light, #2c5f2d) 0%, #4a7c59 100%);
    color: #fff;
    border-color: var(--primary-light, #2c5f2d);
}

/* Masonry Layout */
.gallery-masonry {
    column-count: 4;
    column-gap: 20px;
    margin-top: 50px;
}

.gallery-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 20px;
    break-inside: avoid;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(26, 61, 27, 0.2);
}

.gallery-item:hover img {
    filter: brightness(1.05);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: filter 0.4s ease;
}

/* Filter transition */
.gallery-item.hidden {
    display: none;
}

.gallery-item.fade-out {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item.fade-in {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Stagger animation delays for initial load */
.gallery-item:nth-child(1) { animation-delay: 0.02s; }
.gallery-item:nth-child(2) { animation-delay: 0.04s; }
.gallery-item:nth-child(3) { animation-delay: 0.06s; }
.gallery-item:nth-child(4) { animation-delay: 0.08s; }
.gallery-item:nth-child(5) { animation-delay: 0.10s; }
.gallery-item:nth-child(6) { animation-delay: 0.12s; }
.gallery-item:nth-child(7) { animation-delay: 0.14s; }
.gallery-item:nth-child(8) { animation-delay: 0.16s; }
.gallery-item:nth-child(9) { animation-delay: 0.18s; }
.gallery-item:nth-child(10) { animation-delay: 0.20s; }
.gallery-item:nth-child(11) { animation-delay: 0.22s; }
.gallery-item:nth-child(12) { animation-delay: 0.24s; }

/* GLightbox Overrides */
.goverlay {
    background: rgba(26, 61, 27, 0.92) !important;
}

.glightbox-clean .gnext,
.glightbox-clean .gprev {
    background-color: rgba(200, 161, 101, 0.8) !important;
    border: none !important;
}

.glightbox-clean .gnext:hover,
.glightbox-clean .gprev:hover {
    background-color: rgba(212, 175, 55, 0.95) !important;
}

.glightbox-clean .gclose {
    background-color: rgba(200, 161, 101, 0.8) !important;
}

.glightbox-clean .gclose:hover {
    background-color: rgba(212, 175, 55, 0.95) !important;
}

.glightbox-clean .gslide-description {
    background: rgba(26, 61, 27, 0.9) !important;
}

/* Gallery count */
.gallery-count {
    text-align: center;
    color: var(--text-light, #666);
    font-size: 0.95rem;
    margin-top: 10px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .gallery-masonry {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .gallery-masonry {
        column-count: 2;
        column-gap: 15px;
    }

    .gallery-item {
        margin-bottom: 15px;
    }

    .filter-btn {
        padding: 12px 24px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .gallery-masonry {
        column-count: 2;
    }
}

@media (max-width: 320px) {
    .gallery-masonry {
        column-count: 1;
    }
}
