/* Overlay del popup */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

/* Contenido del popup */
.popup-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

/* Imagen del popup */
#popup-image {
    max-width: 100%;
    max-height: 80vh;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Botón de cerrar */
.popup-close {
    position: absolute;
    top: -40px;
    right: -40px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.popup-close:hover {
    background: rgba(255, 0, 0, 0.7);
}

/* Captión de la imagen */
.popup-caption {
    color: white;
    margin-top: 15px;
    font-size: 16px;
    text-align: center;
}

/* Efecto hover para las imágenes enlazadas */
.popup-image-link {
    cursor: zoom-in;
    transition: opacity 0.3s ease;
}

.popup-image-link:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .popup-close {
        top: -50px;
        right: 10px;
        font-size: 24px;
        width: 35px;
        height: 35px;
    }
    
    .popup-content {
        max-width: 95%;
    }
}