/* Gallery Page Specific Styles */

.gallery-filters {
    padding: 40px 0;
    background: var(--bg-light);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.gallery-section {
    padding: 48px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* === Gallery item entrance animation === */
.gallery-item {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.gallery-item.card-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.gallery-item.hidden {
    display: none;
}

@media (max-width: 768px) {
    .gallery-filters {
        padding: 20px 0;
    }

    .gallery-section {
        padding: 28px 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .gallery-info {
        padding: 28px 0;
    }

    .info-content h2 {
        font-size: 1.6rem;
    }

    .info-content p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .gallery-overlay {
        padding: 1rem 0.75rem 0.75rem;
    }
    
    .gallery-overlay h3 {
        font-size: 0.95rem;
    }
    
    .gallery-overlay p {
        font-size: 0.85rem;
    }
}

.gallery-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-image svg {
    width: 80px;
    height: 80px;
    color: white;
    opacity: 0.5;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.gallery-overlay p {
    font-size: 0.95rem;
    opacity: 0.9;
}

.gallery-info {
    padding: 48px 0;
    background: var(--bg-light);
}

.info-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.info-content h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.info-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: lightboxZoom 0.3s ease;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 40px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
}

.lightbox-close:hover {
    transform: scale(1.2);
}

.lightbox-caption {
    text-align: center;
    color: white;
    margin-top: 15px;
    font-size: 1.1rem;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30%;
    background: none;
    color: white;
    border: none;
    font-size: 36px;
    cursor: pointer;
    transition: opacity 0.3s;
    z-index: 10;
    opacity: 0;
    display: flex;
    align-items: center;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
    left: 0;
    justify-content: flex-start;
    padding-left: 5px;
}

.lightbox-next {
    right: 0;
    justify-content: flex-end;
    padding-right: 5px;
}

.lightbox:hover .lightbox-prev,
.lightbox:hover .lightbox-next {
    opacity: 0.5;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.8;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        font-size: 28px;
        width: 35%;
    }
    
    .lightbox-prev {
        padding-left: 3px;
    }
    
    .lightbox-next {
        padding-right: 3px;
    }
}
