/* Lightbox Styles */

.lightbox-trigger {
    cursor: pointer;
    position: relative;
    display: inline-block;
}

.zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-trigger:hover .zoom-icon {
    opacity: 1;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    animation: slideUp 0.3s ease;
}

.lightbox-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.lightbox-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
}

.lightbox-caption {
    position: absolute;
    bottom: -3rem;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 0.95rem;
}

/* Lightbox Controls */
.lightbox-close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

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

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

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(212, 165, 116, 0.8);
}

.lightbox-prev {
    left: -4rem;
}

.lightbox-next {
    right: -4rem;
}

.lightbox-counter {
    position: absolute;
    bottom: -2.5rem;
    left: 0;
    color: white;
    font-size: 0.9rem;
}

/* Lightbox Gallery Grid */
.gallery-grid.masonry {
    column-count: 3;
    column-gap: 1.5rem;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.gallery-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.gallery-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

@media (max-width: 768px) {
    .gallery-grid.masonry {
        column-count: 2;
    }
    
    .lightbox-prev,
    .lightbox-next {
        padding: 0.75rem 1rem;
        font-size: 1.5rem;
    }
    
    .lightbox-prev {
        left: -2.5rem;
    }
    
    .lightbox-next {
        right: -2.5rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid.masonry {
        column-count: 1;
    }
    
    .lightbox-close {
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .lightbox-prev,
    .lightbox-next {
        display: none;
    }
    
    .lightbox-content {
        width: 95%;
    }
}
