/* ========================================
   GALLERY ENHANCEMENTS
   B&W to Color + Enhanced Lightbox
   ======================================== */

/* Black & White effect on gallery images */
.gallery-item img,
.foto img {
    filter: grayscale(100%);
    transition: filter 0.6s ease, transform 0.6s ease;
}

.gallery-item:hover img,
.foto:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Gallery grid improvements */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
    border: 2px solid rgba(0, 217, 255, 0.1);
    transition: border-color 0.3s ease;
}

.gallery-item:hover {
    border-color: rgba(0, 217, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

/* Image info overlay */
.gallery-item::after {
    content: attr(data-title);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: var(--color-primary);
    font-family: var(--font-body);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

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

/* Enhanced Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: zoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 80px rgba(0, 217, 255, 0.3);
    border: 2px solid rgba(0, 217, 255, 0.5);
}

/* Lightbox navigation */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 217, 255, 0.1);
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--color-primary);
    font-size: 1.5rem;
}

.lightbox-nav:hover {
    background: var(--color-primary);
    color: #000;
    box-shadow: 0 0 20px var(--color-primary);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Close button */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 0, 0, 0.2);
    border: 2px solid #ff0066;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ff0066;
    font-size: 1.8rem;
    transition: all 0.3s ease;
    z-index: 1;
}

.lightbox-close:hover {
    background: #ff0066;
    color: #fff;
    transform: rotate(90deg);
    box-shadow: 0 0 20px #ff0066;
}

/* Image caption */
.lightbox-caption {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--color-primary);
    font-family: var(--font-body);
    font-size: 1.1rem;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

/* Zoom feature */
.lightbox-image {
    cursor: zoom-in;
}

.lightbox-image.zoomed {
    cursor: zoom-out;
    transform: scale(1.5);
    transition: transform 0.3s ease;
}

/* Category filters */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    background: rgba(0, 217, 255, 0.1);
    border: 2px solid rgba(0, 217, 255, 0.3);
    border-radius: 25px;
    color: var(--color-primary);
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-primary);
    color: #000;
    box-shadow: 0 0 20px var(--color-primary);
}

/* Hidden items (for filtering) */
.gallery-item.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
}
