/* ===========================
   LIGHTBOX PARA GALERÍA DE FOTOS
   =========================== */

.photo-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-lightbox.active {
    opacity: 1;
}

/* Overlay oscuro de fondo */
.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

/* Contenedor del contenido */
.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 20px;
}

/* Imagen principal */
.lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s cubic-bezier(0.22, 0.9, 0.35, 1);
    user-select: none;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Botón de cerrar */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg) scale(1.1);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
}

/* Botones de navegación */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    backdrop-filter: blur(10px);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev svg,
.lightbox-next svg {
    width: 24px;
    height: 24px;
}

/* Contador de imágenes */
.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10001;
}

/* Responsive */
@media (max-width: 768px) {
    .lightbox-content {
        padding: 80px 10px 10px;
    }

    .lightbox-image {
        max-width: 95%;
        max-height: 85vh;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-counter {
        bottom: 20px;
        font-size: 12px;
        padding: 8px 16px;
    }
}

@media (max-width: 480px) {

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev svg,
    .lightbox-next svg {
        width: 20px;
        height: 20px;
    }

    .lightbox-close {
        width: 40px;
        height: 40px;
    }

    .lightbox-close svg {
        width: 20px;
        height: 20px;
    }
}

/* Animación de pulsación para indicar que es clickeable */
.gallery-thumbnail {
    position: relative;
}

.gallery-thumbnail::before {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    pointer-events: none;
}

.gallery-thumbnail:hover::before {
    opacity: 1;
}