/* Gallery specific styles */
.subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Toggle Buttons */
.toggle-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.toggle-btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid var(--green);
    background-color: var(--white);
    color: var(--green);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background-color: var(--light-gray);
}

.toggle-btn.active {
    background-color: var(--green);
    color: var(--white);
}

/* Loading Indicator */
.loading {
    text-align: center;
    padding: 2rem;
    font-size: 1.1rem;
    color: var(--green);
    display: none;
}

.loading.show {
    display: block;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background-color: var(--light-gray);
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.gallery-item img.loading {
    opacity: 0;
}

.gallery-item img.loaded {
    opacity: 1;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.load-more-btn {
    display: inline-block;
}

.load-more-btn.hidden {
    display: none;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: var(--white);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--gold);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    padding: 1rem 1.5rem;
    z-index: 10000;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--gold);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 1rem;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .toggle-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .toggle-btn {
        width: 100%;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 0.75rem 1rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
