/**
 * Lightbox para la galería de recetas
 */

.alegra-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.alegra-lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alegra-lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.alegra-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10;
    padding: 8px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.alegra-lightbox-close:hover {
    opacity: 1;
}

.alegra-lightbox-prev,
.alegra-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.8rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 10;
}

.alegra-lightbox-prev { left: 20px; }
.alegra-lightbox-next { right: 20px; }

.alegra-lightbox-prev:hover,
.alegra-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}
