/*Editor (admin panel)*/
#boxFotoEditor{
	margin:0px 0px 50px 0px;
}

#boxFotoEditor .foto{
	float:left;
	box-sizing:border-box;
	width:24%;
	margin:1% 0.5%;
	padding:0.5% 0.5% 2% 0.5%;
	text-align:center;
	border:1px solid gray;
	overflow:hidden;
}

#boxFotoEditor .foto:nth-of-type(4n + 1){
	clear:left;
}

#boxFotoEditor .foto img{
	display:block;
	max-width:100%;
	margin:0 auto;
}

#boxFotoEditor .foto .button{
	display:inline-block;
	margin:2% auto;
}

#boxFotoEditor .foto p{
	margin:6px 0px 0px 0px;
	line-height:1.20em;
	text-align:left;
}

#boxFotoEditor .foto .inline-text-editor{
	display:block;
	font-size:1em;
	text-align:left;
}

#boxFotoEditor .foto .inline-text-editor form{
	text-align:center;
}

#boxFotoEditor .foto .inline-text-editor form textarea{
	min-height:2em;
	line-height:1em;
	margin:0.5em 0;
	padding:0.4em;
	font-family:inherit;
	font-size:1rem;
}

#boxFotoEditor .foto .inline-text-editor form button{
	min-width:5em;
	margin:0 0.5em;
}

/*Share buttons*/
.shareButtons{
	position:absolute;
	bottom:10px;
	left:10px;
	width:100px;
	padding:4px;
}

.shareButtons img{
	display:inline;
}

.shareButtons .shareButtonPinterest,
.shareButtons .shareButtonTwitter,
.shareButtons .shareButtonFacebook{
	width:100px;
	height:20px;
	margin:0px 0px 2px 0px;
}

/* Versione 4 (inizio) */
.gallery.v4 .box.photo{
	position:relative;
	width:100%;
	height:0;
	padding-top:50%;
	background-color:#dbdbdb;
	overflow:hidden;
}

.gallery.v4 .box.photo .slide{
	position:absolute;
	top:0;
	left:0;
	right:0;
	bottom:0;
	background-color:inherit;
}

.gallery.v4 .box.photo .slide.photoAsBackground{
	background-position:center;
	background-repeat:no-repeat;
	background-size:contain;
}

.gallery.v4 .box.photo .slide img{
	display:block;
	width:100%;
	height:100%;
	object-fit:contain;
	-o-object-fit:contain;
	object-position:50% 50%;
	-o-object-position:50% 50%;
}

.gallery.v4 .box.photo .slide.no-object-fit-support img{
	opacity:0;
}

.gallery.v4 .box.photo .slide .caption{
	position:absolute;
	bottom:0;
	left:0;
	box-sizing:border-box;
	width:100%;
	margin:0;
	padding:0.2em 0.5em;
	background-color:rgba(255,255,255,0.6);
	color:#000;
}

.gallery.v4 .box.photo .btn{
	position:absolute;
	top:50%;
	transform:translateY(-50%);
	width:20px;
	height:60px;
	background-position:50%;
	background-repeat:no-repeat;
	background-size:contain;
	cursor:pointer;
}

.gallery.v4 .box.photo .btn.prev{
	left:0;
	background-image:url(../media/site/img/gallery/box-photo-left.gif);
}

.gallery.v4 .box.photo .btn.next{
	right:0;
	background-image:url(../media/site/img/gallery/box-photo-right.gif);
}

.gallery.v4 .box.index.horizontal{
	position:relative;
	margin-top:1em;
	white-space:nowrap;
	overflow:hidden;
}

.gallery.v4 .box.index.horizontal .thumb{
	position:relative;
	display:inline-block;
	margin:0 0.5em 0 0;
	background-color:#000;
}

.gallery.v4 .box.index.horizontal .thumb img{
	display:block;
	opacity:0.70;
	cursor:pointer;
	transition:opacity 0.4s ease-in-out;
	will-change:opacity;
}

.gallery.v4 .box.index.horizontal .thumb.on img{
	opacity:1.00;
	cursor:default;
}

.gallery.v4 .box.index.horizontal .thumb img:hover{
	opacity:1.00;
}

.gallery.v4 .box.index.horizontal .thumb .number{
	position:absolute;
	bottom:0;
	right:0;
	padding:1px 3px;
	background-color:#99999A;
	font-family:Arial;
	font-size:10px;
	font-weight:400;
	color:#fff;
}

.gallery.v4 .box.index.horizontal .btn{
	position:absolute;
	top:0;
	width:20px;
	height:100%;
	background-position:center;
	background-repeat:no-repeat;
	background-size:50% auto;
	cursor:pointer;
}

.gallery.v4 .box.index.horizontal .btn.inactive{
	cursor:default;
	opacity:0.40;
}

.gallery.v4 .box.index.horizontal .btn.left{
	left:0;
	background-image:url(../media/site/img/gallery/index-left.gif);
}

.gallery.v4 .box.index.horizontal .btn.right{
	right:0;
	background-image:url(../media/site/img/gallery/index-right.gif);
}

.gallery.v4 .box.index.horizontal .mask{
	position:relative;
	margin:0 20px;
	overflow:hidden;
}

.gallery.v4 .box.index.horizontal .mask .content{
	position:relative;
}

.gallery.v4 .box.index.horizontal.dots{
	text-align:center;
}

.gallery.v4 .box.index.horizontal.dots .dot{
	display:inline-block;
	width:1em;
	height:1em;
	margin:0 0.5em;
	border-radius:50%;
	background-color:#fff;
	cursor:pointer;
}

.gallery.v4 .box.index.horizontal.dots .dot.on{
	background-color:#dbdbdb;
	cursor:default;
}

/*Orientamento verticale*/
.gallery.v4 .box.index.thumbs.vertical{
	float:right;
	width:187px;
	height:417px;
	overflow:hidden;
}

.gallery.v4 .box.index.thumbs.vertical .thumb{
	float:left;
	margin-bottom:5px;
}

.gallery.v4 .box.index.thumbs.vertical .thumb:nth-of-type(2n + 1){
	clear:both;
	margin-right:5px;
}

.gallery.v4 .box.index.thumbs.vertical .mask{
	position:relative;
	width:inherit;
	height:inherit;
	overflow:hidden;
}

.gallery.v4 .box.index.thumbs.vertical .mask .content{
	position:absolute;
	top:0px;
	left:0px;
	width:inherit;
}

.gallery.v4 .box.index.thumbs.vertical .mask .content span{
	clear:both;
}

.gallery.v4 .box.index.thumbs.vertical .btn{
	width:inherit;
	height:14px;
}

.gallery.v4 .box.index.thumbs.vertical .btn.up{
	background-image:url(../media/site/img/gallery/index-up.gif);
	background-position:50% 0%;
}

.gallery.v4 .box.index.thumbs.vertical .btn.down{
	background-image:url(../media/site/img/gallery/index-down.gif);
	background-position:50% 100%;
}

.overlay.v4{
	position:fixed;
	top:0;
	bottom:0;
	left:0;
	right:0;
	background-color:rgba(0,0,0,0.7);
}

.popup.v4{
	position:absolute;
	top:-100%;
	left:-100%;
	box-sizing:border-box;
	max-width:90vw;
	min-width:200px;
	min-height:200px;
	border:2px solid #fff;
	background-color:#fff;
	background-image:url("../media/site/img/gallery/waiting.gif");
	background-position:50% 50%;
	background-repeat:no-repeat;
	background-size:62px 62px;
	transition:width 0.4s;
	color:#000;
}

.popup.v4 .content{
	position:relative;
	width:100%;
	overflow:hidden;
}

.popup.v4 .content img{
	display:block;
	max-width:90vw;
	max-height:90vh;
	min-height:200px;
}

.popup.v4 .content p{
	margin:4px 0px 0px 0px;
	padding:0px;
	line-height:1.20em;
	color:#000000;
}

.popup.v4 .btn{
	position:absolute;
	top:50%;
	transform:translateY(-50%);
	width:35px;
	height:50px;
	background-position:50% 50%;
	background-repeat:no-repeat;
	background-size:contain;
	cursor:pointer;
}

.popup.v4 .btn.prev{
	left:5px;
	background-image:url("../media/site/img/gallery/zoom-left.png");
}

.popup.v4 .btn.next{
	right:5px;
	background-image:url("../media/site/img/gallery/zoom-right.png");
}

.popup.v4 .close{
	position:absolute;
	top:-19px;
	right:-19px;
	width:33px;
	height:33px;
	margin:0px;
	padding:0px;
	background:url(../media/site/img/gallery/close.png);
	cursor:pointer;
}

.gallery.v4 .zoom,
.placeholder.zoom{
	cursor:url(../media/site/img/gallery/cursor-zoom.png), pointer;
}
/* Versione 4 (fine) */

@media (max-width: 1023px) {
}

@media (min-width: 1200px) {
	#boxFotoEditor .foto{
		width:15.666%;
	}
	
	#boxFotoEditor .foto:nth-of-type(4n + 1){
		clear:none;
	}
	
	#boxFotoEditor .foto:nth-of-type(6n + 1){
		clear:left;
	}
}