/*
==========================================================
 GESTIONE FOTOGRAFIE CON LIGHTBOX
 a12newstt05.css
==========================================================

 Le immagini che devono utilizzare questa gestione
 devono avere:

     class="foto"

 Esempio:

     <img class="foto" ...>

 Il JavaScript gestirà automaticamente:
 - apertura della fotografia
 - chiusura della fotografia
 - fotografia precedente
 - fotografia successiva
 - tasto ESC
 - frecce sinistra/destra

==========================================================
*/


/*
----------------------------------------------------------
 IMMAGINE
----------------------------------------------------------
*/

.foto {
	width: 500px;
	height: 333px;
	object-fit: contain;
	max-width: 100%;
	margin: auto;
	cursor: pointer;
	border: 1px solid #333;
}

/*
----------------------------------------------------------
 EFFETTO AL PASSAGGIO DEL MOUSE
----------------------------------------------------------
*/

.foto:hover {
	opacity: 0.88;
}

.foto-container {
	position: relative;
	display: table;
	margin: auto;
}

.foto-box {
	position: relative;
	width: 500px;
	height: 333px;
	margin: auto;
}

.foto-box .foto {
	display: block;
	width: 500px;
	height: 333px;
}

.foto-galleria {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 10;
	color: #fff;
	background: rgba(0, 0, 0, 0.45);
	padding: 6px 8px;
	border-radius: 4px;
}


/*
----------------------------------------------------------
 DIDASCALIA DELLA FOTOGRAFIA
----------------------------------------------------------
*/

.didascalia {
	max-width: 500px;
	margin: 0px auto 25px auto;
	text-align: center;
}


/*
----------------------------------------------------------
 LIGHTBOX
----------------------------------------------------------
*/

#fotoLightbox {
	display: none;
	position: fixed;
	z-index: 99999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.94);
	padding: 20px;
	box-sizing: border-box;
	text-align: center;
	overflow: auto;
}


/*
----------------------------------------------------------
 IMMAGINE ALL'INTERNO DELLA LIGHTBOX
----------------------------------------------------------
*/

#fotoLightboxImg {
	display: block;
	max-width: 95%;
	max-height: 75vh;
	width: auto;
	height: auto;
	margin: 35px auto 0 auto;
}


/*
----------------------------------------------------------
 DIDASCALIA ALL'INTERNO DELLA LIGHTBOX
----------------------------------------------------------
*/

#fotoLightboxCaption {
	color: #fff;
	font-size: 17px;
	padding: 12px;
	max-width: 950px;
	margin: auto;
}


/*
----------------------------------------------------------
 PULSANTE CHIUSURA
----------------------------------------------------------
*/

.lightbox-close {
	position: absolute;
	right: 25px;
	top: 8px;
	color: #fff;
	font-size: 38px;
	cursor: pointer;
	z-index: 100000;
}


/*
----------------------------------------------------------
 PULSANTI PRECEDENTE / SUCCESSIVA
----------------------------------------------------------
*/

.lightbox-prev,
.lightbox-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	color: #fff;
	font-size: 38px;
	cursor: pointer;
	padding: 15px;
	z-index: 100000;
}


/*
----------------------------------------------------------
 PULSANTE PRECEDENTE
----------------------------------------------------------
*/

.lightbox-prev {
	left: 10px;
}


/*
----------------------------------------------------------
 PULSANTE SUCCESSIVA
----------------------------------------------------------
*/

.lightbox-next {
	right: 10px;
}


/*
----------------------------------------------------------
 VISUALIZZAZIONE SU SMARTPHONE
----------------------------------------------------------
*/

@media screen and (max-width: 600px) {

	#fotoLightbox {
		padding: 10px;
	}

	#fotoLightboxImg {
		max-width: 100%;
		max-height: 65vh;
		width: auto;
		height: auto;
		margin-top: 30px;
	}

	#fotoLightboxCaption {
		color: #fff;
		font-size: 15px;
		padding: 8px;
		max-width: 100%;
		margin: auto;
	}

	.lightbox-prev,
	.lightbox-next {
		font-size: 28px;
		padding: 10px;
	}

}