/*
Regole generali che servono a tutti i template
le definisco qui per non ripetere lo stesso codice in tanti css
questo file viene incluso per primo
in questo modo le regole possono venire sovrascitte, se necessario
*/




/* resetto alcune regole non volute di bootstrap
/* per non doverlo fare per ogni singolo tema 
--------------------------------------------- */
header .navbar {
	border: none;
	background-color: transparent;
	background-image: none;	
	-webkit-box-shadow: none;
	   -moz-box-shadow: none;
	        box-shadow: none;
	margin-bottom:0;
	border-radius: 0px;
}
header .navbar .navbar-brand {	
	padding:0;
	height:	auto;
}
header .navbar .navbar-brand:hover, 
header .navbar .navbar-brand:focus {
	color: inherit;
}
header .navbar .navbar-nav > li.active > a, 
header .navbar .navbar-nav > li.active > a:hover, 
header .navbar .navbar-nav > li.active > a:focus {
	border: none;
	background-color: transparent;
	background-image: none;	
	-webkit-box-shadow: none;
	   -moz-box-shadow: none;
	        box-shadow: none;
}
header .navbar .navbar-nav > li.open > a, 
header .navbar .navbar-nav > li.open > a:hover, 
header .navbar .navbar-nav > li.open > a:focus {
	border: none;
	background-color: transparent;
	background-image: none;	
	-webkit-box-shadow: none;
	   -moz-box-shadow: none;
	        box-shadow: none;
}
header .navbar .navbar-nav > li > a .caret {
    margin-left:6px;
}
header .navbar .dropdown-menu {
	left:0px;
	right:auto;
	border-radius:0;
}
header .navbar .dropdown-menu > li > a:hover, 
header .navbar .dropdown-menu > li > a:focus {
	border: none;
	background-color: transparent;
	background-image: none;	
	-webkit-box-shadow: none;
	   -moz-box-shadow: none;
	        box-shadow: none;	
}
p a:not(.btn) {
	text-decoration:underline;
}


/* header default 
--------------------------------------------- */
header .navbar .navbar-brand img {
	max-width:320px;
	max-height:120px;
}
@media (min-width:768px) {
	header .navbar .navbar-collapse {
		padding-left: 0;
	}
}
@media (min-width:768px) and (max-width: 992px) {
	header .navbar .navbar-brand img {
		max-width:240px;
		max-height:90px;
	}
}
@media (max-width: 767px) {
	header .navbar .navbar-brand {
		padding-right: 60px;
		width:100%;
		float:none;
		overflow:hidden;
	}
	header .navbar .navbar-brand img {
		max-width:100%;
		max-height:90px;
	}
	header .navbar .navbar-toggle {
		position:absolute;
		top:4px;
		right:0;
		margin: 0;
		background-color: #FFF;
	}
}
/* header optimize per migliorare nei casi di menu lunghi
--------------------------------------------- */
@media (min-width:992px) and (max-width: 1199px) {
	header.header-optimize .navbar .navbar-brand,
	header.header-optimize .navbar .navbar-brand img {
		max-width:220px;
	}
}
@media (min-width:768px) and (max-width: 991px) {
	header.header-optimize .navbar .navbar-brand,
	header.header-optimize .navbar .navbar-brand img {
		max-width:120px;
	}
}


/* header two-row-center
--------------------------------------------- */
header.two-row-center .navbar {
	text-align:center;
}
header.two-row-center .navbar .navbar-header {
	float: none;
}
header.two-row-center .navbar .navbar-brand {
	width:100%;
}
header.two-row-center .navbar .navbar-brand a {
	display:block;
}
header.two-row-center .navbar .navbar-brand img {
	max-width:320px;
	max-height:120px;
}
@media (max-width: 767px) {
	header.two-row-center .navbar .navbar-header {
		text-align:left;
	}
	header.two-row-center .navbar .navbar-brand img {
		max-width:100%;
	}
}
header.two-row-center .navbar .navbar-collapse {
	padding:0;
}
header.two-row-center .navbar .navbar-nav {
	width: 100%;
	margin: auto;
}
header.two-row-center .navbar .navbar-nav li {
	display: inline-block;
	float: none;
}
header.two-row-center .navbar .navbar-nav li li {
	display: block;
}
@media (max-width: 767px) {
	header.two-row-center .navbar .navbar-nav li {
		display: block;
	}
	header.two-row-center .navbar .dropdown-menu {
		text-align:center;
	}
}

/* header two-row-banner
--------------------------------------------- */
header.two-row-banner .navbar {
	text-align:center;
}
header.two-row-banner .navbar .navbar-header {
	float: none;
}
header.two-row-banner .navbar .navbar-brand {
	width:100%;
}
header.two-row-banner .navbar .navbar-brand a {
	display:block;
}
header.two-row-banner .navbar .navbar-brand img {
	max-width:100%;
	max-height:285px;
}
@media (max-width: 767px) {
	header.two-row-banner .navbar .navbar-brand {
		padding-right:0;
	}
	header.two-row-center .navbar .navbar-brand img {
		max-width:100%;
	}
	header.two-row-banner .navbar .navbar-toggle {
		right:4px;
	}
}
header.two-row-banner .navbar .navbar-collapse {
	padding:0;
}
header.two-row-banner .navbar .navbar-nav {
	width: 100%;
	margin: auto;
}
header.two-row-banner .navbar .navbar-nav li {
	display: inline-block;
	float: none;
}
header.two-row-banner .navbar .navbar-nav li li {
	display: block;
}
@media (max-width: 767px) {
	header.two-row-banner .navbar .navbar-nav li {
		display: block;
	}
	header.two-row-banner .navbar .dropdown-menu {
		text-align:center;
	}
}

/* header two-row-module
--------------------------------------------- */
header.two-row-module .navbar .navbar-header {
	width:100%;
}
header.two-row-module .navbar .navbar-brand,
header.two-row-module .navbar .navbar-brand img {
	max-height:100px;
}
@media (min-width: 768px) {
	header.two-row-module .navbar .navbar-nav {
		margin-left:-15px;
	}
}
header.two-row-module .navbar .header-module {
	float:right;
	max-width:500px;
	max-height:80px;
	margin:0;
	text-align:right;
	overflow:hidden;
	line-height:1.4;
}
header.two-row-module .navbar .header-module img {
	max-width:100%;
	max-height:80px;
}
@media (min-width:768px) and (max-width:992px) {
	header.two-row-module .navbar .header-module {
		max-width:420px;
	}
}
@media (max-width:767px) {
	header.two-row-module .navbar .header-module {
		float:none;
		width:100%;
		text-align:center;
		margin:10px 0;
		display: block;
	}
	header.two-row-module .navbar .header-module img {
		margin:auto;
	}
}

/* logo testuale
--------------------------------------------- */
header .navbar .navbar-brand h1 {
	margin-top: 0px;
}
header .navbar .navbar-brand a {
	text-decoration: none;
}
@media (max-width:480px) {
	header .navbar .navbar-brand h1 {
		font-size: 150% !important;
	}
}

/*
============================================================================ */





/* regole per i titoli
--------------------------------------------- */
.section-title {
	margin-top:0px;
}
/* titolo vuoto quando non ha testo // caso particolare */
.title.empty {
	display:none;
}


/* regole per i testi
--------------------------------------------- */
* p:last-child {
	margin-bottom: 0;
}
* table {
	margin-bottom: 10px;
}


/* titolo "vuoto" al variare della viewport (title-3)
/* quando ho una colonna sola lo nascondo
--------------------------------------------- */
@media (max-width: 1199px) {
	.col-lg-6 .title.title-3 {
		display:none;
	}
}
@media (max-width: 767px) {
	.col-md-4 .title.title-3 {
		display:none;
	}
}
@media (max-width: 479px) {
	.col-md-3 .title.title-3 {
		display:none;
	}
}




/* back to top
------------------------------------------------- */
#topcontrol {
    width: 50px;
    height: 50px;
    overflow: hidden;
    -webkit-border-radius: 3px 0 0 3px;
    -moz-border-radius: 3px 0 0 3px;
    border-radius: 3px 0 0 3px;
    background-color: #1b1b1b;
    color: #bebebe;
    text-align: center;
    z-index: 9999;
}
#topcontrol:hover {
    color: #FFFFFF;
}
#topcontrol,
#topcontrol:hover {
    -webkit-transition: all 0.3s ease-out;
    -moz-transition: all 0.3s ease-out;
    -ms-transition: all 0.3s ease-out;
    -o-transition: all 0.3s ease-out;
    transition: all 0.3s ease-out;
}
#topcontrol:before {
    font-family: fontawesome;
    content: "\f077";
    position: absolute;
    display: inline-block;
    width: 50px;
    height: 50px;
    font-size: 12px;
    line-height: 40px;
    top: 0;
    left: -1px;
    text-align: center;
}
#topcontrol span {
    display: inline-block;
    position: absolute;
    bottom: 12px;
    right: 0;
    width: 50px;
    text-align: center;
    font-size: 9px;
    line-height: 1;
}




/* footer 
------------------------------------------------- */
footer section > .container {
	padding-top: 35px;
	padding-bottom:25px;
}
@media (min-width: 1200px) {
	footer section > .container > .row > .col-lg-12,
	footer section > .container > .row > .col-lg-6,
	footer section > .container > .row > .col-lg-4,
	footer section > .container > .row > .col-lg-3 {
		margin-bottom:0;
	}
}




/* copyright (ultima riga dopo il footer)
------------------------------------------------- */
footer .copyright {
	position: relative;
    font-size: 10px;
    text-transform: uppercase;
	letter-spacing: 1px;
	color:#FFF;
}
footer .copyright > .container {
	position:relative;
    padding-top: 10px;
	padding-bottom:20px;
	z-index:100;
	overflow:hidden; 
}
footer .copyright > .container > .row { 
	position:relative;
	margin-top: 10px;
	z-index:100;
}
footer .copyright a,
footer .copyright a:focus,
footer .copyright a:hover,
footer .copyright a:active {
    color:#FFF;
	text-decoration: none;
}
footer .copyright .copyright-left {
	text-align: left;
}
footer .copyright .copyright-text,
footer .copyright .copyright-author {
	display: inline-block;
	line-height: 1.4em;
}
footer .copyright .copyright-text + .copyright-author {
	margin-top:10px;
}
footer .copyright .copyright-author img {
	margin-top: -12px;
}
footer .copyright .copyright-right {
	text-align: right;
}
footer .copyright .copyright-right .copyright-author {
	display:block;
}

footer .copyright .copyright-module {
	max-height:50px;
	overflow:hidden;
}
footer .copyright .copyright-module a {
	display: inline-block;
}
footer .copyright .copyright-module img {
	max-width:160px;
	max-height:50px;
}
@media (max-width: 991px) {
    footer .copyright .copyright-left {
        text-align: center;
		line-height: 16px;
    }
    footer .copyright .copyright-right {
        text-align: center;
        margin-top: 10px;
    }
	footer .copyright .copyright-right .copyright-author {
        margin-top: 15px;
	}
}
footer .copyright:after {
	content: '';
	position:absolute;
	top:0;
	width:100%;
	height:100%;
	background-color: #000;
	opacity:0.6;
	z-index:10;
}


/* regole per layout generale wide o boxed 
============================================================================ */


/* regole generali 
/* per sections e rows di default (wide)
--------------------------------------------- */
body > section > .container {
	padding-top:20px;
}
body > section:last-of-type > .container {
	padding-bottom:30px;
}
body > section > .container.container-full {
	width:100%;
	max-width:100%;
	padding-left: 0;
	padding-right: 0;	
}
body > section.section-collapsed > .container {
	margin-top: 0;
	padding-top: 0;
}
body > section > .container > .row:first-of-type,
body > section > .container.container-full > .container:first-of-type { /* caso del modulo mappa che ha altri container al suo interno */
	margin-top:15px;
}
body > section > .container > .row:last-of-type,
body > section > .container.container-full .container:last-child { /* caso del modulo mappa che ha altri container al suo interno */
	margin-bottom:15px;
}
body section > .container > .row > .col-lg-6,
body section > .container > .row > .col-lg-4,
body section > .container > .row > .col-lg-3 {
	margin-bottom:50px;
}
@media (max-width: 767px) {
	body section > .container > .row > .col-lg-6:last-of-type,
	body section > .container > .row > .col-lg-4:last-of-type,
	body section > .container > .row > .col-lg-3:last-of-type {
		margin-bottom:0px;
	}
}
@media (min-width: 480px) and (max-width: 991px) {
	body section > .container > .row > .col-lg-3:nth-child(3),
	body section > .container > .row > .col-lg-3:nth-child(4) {
		margin-bottom:0px;
	}
}
@media (min-width: 768px) and (max-width: 1199px) {
	body section > .container > .row > .col-lg-6:last-of-type {
		margin-bottom:0px;
	}
	body section > .container > .row > .col-lg-4 {
		margin-bottom:0px;
	}
}
@media (min-width: 992px) and (max-width: 1199px) {
	body section > .container > .row > .col-lg-3 {
		margin-bottom:0px;
	}
}
@media (min-width: 1200px) {
	body section > .container > .row > .col-lg-12,
	body section > .container > .row > .col-lg-6,
	body section > .container > .row > .col-lg-4,
	body section > .container > .row > .col-lg-3 {
		margin-bottom:0px;
	}	
}

/* regole per sezioni separate 
--------------------------------------------- */
body.section-row > section:not(.section-collapsed) {
    margin-top:30px;
}
body.section-row > section:not(.section-collapsed) > .container {
    padding-top: 0;
}
body.section-row > section:last-of-type {
    margin-bottom:30px;
}
body.section-row > section:last-of-type > .container {
	padding-bottom:0;
}

/* regole generali 
/* per larghezza versioni boxed
--------------------------------------------- */
body.boxed > section > .container .container {
	width:auto;
}
body.boxed:not(.section-row) > section:last-of-type > .container {
	padding-bottom:15px;
}

/* viewport
--------------------------------------------- */
@media (max-width: 479px) {
	body.boxed > section > .container,
	body.boxed.boxed-full > header > .container,
	body.boxed.boxed-full > footer > section > .container,
	body.boxed.boxed-full > footer > .copyright > .container {
		width: 92%;
	}
}
@media (min-width: 480px) and (max-width:767px) {
	body.boxed > section > .container,
	body.boxed.boxed-full > header > .container,
	body.boxed.boxed-full > footer > section > .container,
	body.boxed.boxed-full > footer > .copyright > .container {
		width: 96%;
		max-width: 490px;
	}
}
@media (min-width:768px) {
	body.boxed > section > .container,
	body.boxed.boxed-full > header > .container,
	body.boxed.boxed-full > footer > section > .container,
	body.boxed.boxed-full > footer > .copyright > .container {
		width: 724px;
	}
}
@media (min-width:992px) {
	body.boxed > section > .container,
	body.boxed.boxed-full > header > .container,
	body.boxed.boxed-full > footer > section > .container,
	body.boxed.boxed-full > footer > .copyright > .container {
		width: 944px;
	}
}
@media (min-width:1200px) {
	body.boxed > section > .container,
	body.boxed.boxed-full > header > .container,
	body.boxed.boxed-full > footer > section > .container,
	body.boxed.boxed-full > footer > .copyright > .container {
		width: 1144px;
	}
}


/* regole generali 
/* per padding col BS per versioni boxed
--------------------------------------------- */

body.boxed section > .container > .row {
	padding: 0 8px;
}
body.boxed section > .container > .row > .col-lg-1,
body.boxed section > .container > .row > .col-lg-2,
body.boxed section > .container > .row > .col-lg-3,
body.boxed section > .container > .row > .col-lg-4,
body.boxed section > .container > .row > .col-lg-5,
body.boxed section > .container > .row > .col-lg-6,
body.boxed section > .container > .row > .col-lg-7,
body.boxed section > .container > .row > .col-lg-8,
body.boxed section > .container > .row > .col-lg-9,
body.boxed section > .container > .row > .col-lg-10,
body.boxed section > .container > .row > .col-lg-11,
body.boxed section > .container > .row > .col-lg-12 {
	padding: 0 7px;
}

/* regole per versione boxed-main
--------------------------------------------- */
body.boxed-main > section:first-of-type {
	margin-top: 30px;
}
body.boxed-main > section:last-of-type {
	margin-bottom: 30px;
}
body.boxed-main > section:last-of-type > .container {
	padding-bottom:0px;
}
body.boxed-main section.section-collapsed > .container {
	padding-top:0px;
}


/* regole per versione boxed-full
--------------------------------------------- */
body.boxed.boxed-full header,
body.boxed.boxed-full footer,
body.boxed.boxed-full footer .copyright:after {
	background-color: transparent;
}
body.boxed-full header {
	margin-top:15px;
}
body.boxed-full footer {
	margin-bottom:15px;	
}
@media (min-width:1200px) {	
	body.boxed-full header {
		margin-top:30px;
	}
	body.boxed-full footer {
		margin-bottom:30px;	
	}
}
body.boxed-full > section {
	margin-top: 0;
	padding-top: 0;
}
body.boxed-full > section:last-of-type {
	padding-bottom: 0;
}
body.boxed-full > section > .container {
	padding-top: 20px;
}
body.boxed-full section.section-collapsed > .container {
	padding-top: 0;
}
body.boxed-full footer .copyright > .container:after {
	content: '';
	position:absolute;
	top:0;
	left:0;
	width:100%;
	height:160px; /* un valore abbastanza alto, la parte in eccesso non si vede grazie a oveflow:hidden */
	background-color: #000;
	opacity:0.6;
	z-index:10;
}


/*
============================================================================ */
