@charset "utf-8";
/* CSS Document */

/*--- GALERIA DE FOTOS --*/

       
.gallery-img {
            cursor: pointer;
            transition: transform 0.3s;
            margin-bottom: 15px;
        }
        
      
.gallery-img:hover {
            transform: scale(1.02);
        }
        
        /* Estilos para el lightbox */

.lightbox {
            display: none;
            position: fixed;
            z-index: 9999;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.9);
            text-align: center;
        }
        

.lightbox-content {
            max-width: 90%;
            max-height: 90%;
            margin: 5% auto;
        }
        
/*       
.lightbox-img {
            max-width: 100%;
            max-height: 80vh;
            border: 3px solid white;
            box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
	 transition: opacity 0.6s ease-in-out;
    opacity: 1;
        }
*/



.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    transform-origin: center center; /* Cambiado a centro */
    transition: transform 0.3s ease;
    will-change: transform;
    position: relative; /* Cambiado de absolute a relative */
    display: block;
    margin: auto;
}

.lightbox-img.fade-out {
    opacity: 0;
}
                
.close-lightbox {
            position: absolute;
            top: 20px;
            right: 30px;
            color: white;
            font-size: 40px;
            cursor: pointer;
        }
        
.lightbox-caption {
            color: white;
            margin-top: 15px;
            font-size: 1.2rem;
        }
	
.nav-btn {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
		background: rgba(0, 0, 0, 0.5);
		color: white;
		border: none;
		font-size: 2rem;
		width: 50px;
		height: 50px;
		border-radius: 50%;
		cursor: pointer;
		z-index: 10000;
		transition: all 0.4s;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

@media (max-width: 768px) {
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}

/* Spinner de carga */
.loading-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Mejoras para móviles */
@media (max-width: 768px) {
    .lightbox-content {
        touch-action: pan-y;
    }
    
    .nav-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
}


/* Contenedor de imagen para zoom */
.image-container {
    width: 100%;
    height: 80vh;
    overflow: hidden;
    position: relative;
    cursor: grab;
    user-select: none;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-img.zoomed {
    cursor: grab;
}

/* Controles de zoom */
.zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 5px;
    z-index: 10002;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.zoom-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Indicador de posición */
.image-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Para móviles */
@media (max-width: 768px) {
    .zoom-controls {
        bottom: 60px;
        right: 10px;
    }
    
    .zoom-btn {
        width: 35px;
        height: 35px;
    }
	
	.close-lightbox {
        top: 15px;
        right: 15px;
        font-size: 35px;
        padding: 10px; /* Área táctil más grande */
        z-index: 10003; /* Mayor que todo */
    }
	
	.close-lightbox:after {
        content: '';
        position: absolute;
        top: -15px;
        left: -15px;
        right: -15px;
        bottom: -15px;
    }
	
}

