/* GALLERY STYLES */

/* Gallery Section */
.gallery-section {
    padding: 80px 20px;
    background-color: var(--white);
}

.gallery-section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s ease;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.view-btn {
    padding: 12px 30px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.view-btn:hover {
    background-color: #c0392b;
    transform: scale(1.05);
}

/* Lightbox Styles */
.lightbox {
    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;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    gap: 2rem;
}

#lightbox-image {
    max-width: 70vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 10px;
}

.facebook-comments {
    width: 25vw;
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 85vh;
}

.facebook-comments h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.fb-comments-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fb-comment {
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.fb-comment-author {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.fb-comment-text {
    color: var(--text-color);
}

/* Lightbox Controls */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 3rem;
    cursor: pointer;
    z-index: 2001;
    transition: all 0.3s ease;
    padding: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    color: var(--secondary-color);
    transform: scale(1.2);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    font-size: 2.5rem;
    cursor: pointer;
    padding: 15px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
    z-index: 2001;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .lightbox-content {
        flex-direction: column;
        gap: 1rem;
    }

    #lightbox-image {
        max-width: 100%;
        max-height: 50vh;
    }

    .facebook-comments {
        width: 100%;
        max-height: 30vh;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .gallery-section h2 {
        font-size: 2rem;
    }

    .lightbox-content {
        flex-direction: column;
    }

    #lightbox-image {
        max-width: 95vw;
        max-height: 50vh;
    }

    .facebook-comments {
        width: 95vw;
        max-height: 35vh;
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 10px 15px;
        font-size: 1.5rem;
    }

    .lightbox-close {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .lightbox-content {
        width: 100%;
    }

    #lightbox-image {
        max-width: 100%;
    }

    .facebook-comments {
        width: 100%;
        max-height: 30vh;
        padding: 1rem;
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 8px 12px;
        font-size: 1.2rem;
    }
}

/* Loading state */
.loading {
    text-align: center;
    padding: 3rem;
    font-size: 1.1rem;
    color: var(--primary-color);
    grid-column: 1 / -1;
}

/* Error message */
.error {
    text-align: center;
    padding: 2rem;
    color: #e74c3c;
    grid-column: 1 / -1;
}

/* No images message */
.no-images {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
    grid-column: 1 / -1;
    font-size: 1.1rem;
}
