html,body {height: 100%;}

.home {width: 100%;height: calc(100% - 0px);background-position: center;-webkit-background-size: cover;-moz-background-size: cover;background-size: cover;-o-background-size: cover;position:relative;}

/* Link intera slide */
.carousel .slide-link {display: block;width: 100%;height: 100%;position: absolute;top: 0;left: 0;right: 0;bottom: 0;text-decoration: none;color: inherit;}
.carousel .item {position: relative;}
.carousel .item .home1,.carousel .item .home2,.carousel .item .home3 {position: relative;}

/* Indicator e frecce prev/next visibili solo sul carousel home */
.carousel.home .carousel-indicators {display: none !important; bottom: 15px; z-index: 101;}
.carousel.home .carousel-indicators li {width: 12px; height: 12px; margin: 0 5px; border: 2px solid #fff; border-radius: 50%; background: transparent;}
.carousel.home .carousel-indicators li.active {background: #fff;}
.carousel.home .carousel-indicators li:hover {background: rgba(255,255,255,0.6);}
.carousel.home .carousel-control.left,
.carousel.home .carousel-control.right {display: block !important; width: 50px; background: none; z-index: 101; opacity: 0.8;}
.carousel.home .carousel-control.left {left: 15px;}
.carousel.home .carousel-control.right {right: 15px;}
.carousel.home .carousel-control .glyphicon {font-size: 28px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.5);}
.carousel.home .carousel-control:hover {opacity: 1;}
.carousel.home .carousel-control:hover .glyphicon {color: #fff;}

.home1, .home2, .home3, .home4, .home5, .home6 {width: 100%;height: 100%;background-position: center;-webkit-background-size: cover;-moz-background-size: cover;background-size: cover;-o-background-size: cover;position:relative;}
.home1 {background-image: url(/tema/01.jpg);}
.home2 {background-image: url(/tema/02.jpg);}
.home3 {background-image: url(/tema/03.jpg);}
.home4 {background-image: url(/tema/04.jpg);}
.home5 {background-image: url(/tema/05.jpg);}
.home6 {background-image: url(/tema/06.jpg);}
	.carousel {}
	.carousel.fade {opacity: 1;}
		.carousel.fade .item {transition: opacity ease-out .7s;left: 0;opacity: 0; /* hide all slides */top: 0;position: absolute;width: 100%;display: block;pointer-events: none;}
		.carousel.fade .item:first-child {top: auto;opacity: 1; /* show first slide */position: relative;}
		.carousel.fade .item.active {opacity: 1;pointer-events: auto;}

.containerhome{position: absolute;width:100%;z-index: 100;padding:0;margin:0;left: 50%;}
/* z-index sopra il carousel così il menu è cliccabile anche prima dello scroll */
.containerhome2{z-index: 200;padding:0 15px;margin:0;position: absolute;left: 50%;top: 0;}
/* Non dare position:relative all'header: il menu è nel DOM dopo il carousel, deve posizionarsi rispetto al viewport per stare sopra le slide */

/* Su mobile (≤767px) il menu resta nascosto fino allo scroll (classe .sticky su .menuhome) */
@media (max-width: 767px) {
	.containerhome2:has(.menuhome:not(.sticky)) {
		height: 0;
		min-height: 0;
		overflow: hidden;
		padding: 0;
		visibility: hidden;
		pointer-events: none;
	}
	.menuhome:not(.sticky) {
		visibility: hidden;
		opacity: 0;
		pointer-events: none;
		height: 0;
		min-height: 0;
		overflow: hidden;
		margin: 0;
		padding: 0;
	}
	.menuhome.sticky {
		visibility: visible;
		opacity: 1;
		pointer-events: auto;
		height: auto;
		min-height: auto;
		overflow: visible;
	}
}

/* Menu home prima dello scroll: su mobile/tablet contenitore a tutta larghezza e bottone a destra */
@media (max-width: 991px) {
	.containerhome2 {
		width: 100% !important;
		left: 0 !important;
		right: 0 !important;
		margin-left: 0 !important;
		padding-left: 15px;
		padding-right: 15px;
		box-sizing: border-box;
		max-width: 100vw;
	}
	.containerhome2 .navbar-header {
		/*width: 100%;*/
		max-width: 100%;
		text-align: right;
		box-sizing: border-box;
	}
	.containerhome2 .navbar-toggle {
		margin-right: 0;
		margin-left: auto;
	}
	.containerhome2 .navbar-collapse {
		width: 100%;
		min-width: 100%;
	}
}

.arrow {background: rgba(0, 0, 0, 0) url("/tema/arrow.png") no-repeat scroll 0 0 / 50px 26px;bottom: 5%;display: block;height: 26px;left: 50%;margin-left: -25px;position: absolute;text-indent: -9999px;width: 50px;z-index: 100;}
.arrow:active{position:absolute;bottom:10%;top:auto; outline:none;}
.arrow:hover{bottom:5.5%}
.arrow:focus{outline:none;}
.bounce {display: none;}
		
.navbar-fixed-bottom {margin-bottom: 100px;}

.menu-padding {padding-top:0px;}

/*MENU DOPO LO SCROLL*/
.sticky .navbar .navbar-collapse {text-align: center;padding-left: 0;padding-right: 0;}
.sticky {background: #6d3689;position:fixed;top:0;z-index:100;border-bottom: 1px solid #aaaaaa;margin-right: 0px;}   
.sticky .navbar-nav > li > a {color: #ffffff;} /*COLORE VOCI PRINCIPALI*/
.sticky .navbar-nav > li > a:focus {color: #ffffff; background:none; border-bottom: none} /*COLORE VOCI PRINCIPALI SU SECONDO CLICK*/
.sticky .navbar-nav > li > a:hover {color: #45a9c2; background:none; } /*COLORE VOCI PRINCIPALI SU HOVER*/
.sticky .navbar-nav > .open > a, .sticky .navbar-nav > .open > a:hover, .sticky .navbar-nav > .open > a:focus {color: #d12a3e; background:none;} /*COLORE VOCI PRINCIPALI SU PRIMO CLICK*/

/*ORIENTAMENTO SCHERMO*/
@media screen and (orientation: portrait) {
	.home {height: 560px;}
}


/*RESPONSIVE*/
@media (max-width: 767px) {
	.home1 {background-image: url(/tema/01b.jpg);}
	.home2 {background-image: url(/tema/02b.jpg);}
	.home3 {background-image: url(/tema/03b.jpg);}
	.home4 {background-image: url(/tema/04b.jpg);}
	.home5 {background-image: url(/tema/05b.jpg);}
	.home6 {background-image: url(/tema/06b.jpg);}
}

@media (min-width: 992px) {
	.containerhome {width: 970px;margin-left: -485px;}
	.containerhome2{width: 970px;margin-left: -485px;}
	.sticky{top:0;}
}

@media (min-width: 1200px) {
	.containerhome {width: 1170px;margin-left: -585px;}
	.containerhome2{width: 1170px;margin-left: -585px;}
	.sticky{top:0;}
}

@media (min-width: 1600px) {
	.containerhome .immagine  img {height:75px;margin:0;float:left;margin: 16px auto 0;padding: 0 0 0 16px;}
	.sticky{top:0;}
}

@media (min-width: 1920px) {
}
