/* Lightbox Styles */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    z-index: 10000;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    max-height: 100%;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: white;
    padding: 1rem;
    text-align: center;
    font-size: 1rem;
    margin-top: 1rem;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 0.25rem;
}

.lightbox-counter {
    position: absolute;
    bottom: -3rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.875rem;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    padding: 1rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: white;
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.lightbox-close {
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.75rem;
    border-radius: 0.25rem;
}

.lightbox-prev {
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.15);
}

.lightbox-next {
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.15);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }

    .lightbox-image {
        max-height: 70vh;
    }

    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        padding: 0.5rem;
    }

    .lightbox-close {
        top: 0.5rem;
        right: 0.5rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }

    .lightbox-caption {
        font-size: 0.875rem;
        padding: 0.75rem;
    }
}

/* Gallery trigger styles */
[data-lightbox] {
    cursor: pointer;
}

.gallery-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 0.25rem;
}

.gallery-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
    pointer-events: none;
}

.gallery-image-wrapper:hover::after {
    background-color: rgba(0, 0, 0, 0.3);
}

.gallery-zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 3rem;
    height: 3rem;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.gallery-image-wrapper:hover .gallery-zoom-icon {
    transform: translate(-50%, -50%) scale(1);
}
