/* Sticky desktop navigation */
.top-nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 10;
	display: none;
	align-items: center;
	justify-content: center;
	gap: 24px;
	padding: 12px 24px;
	background: rgba(250, 250, 250, 0.96);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.top-nav a {
	font-family: 'Raleway';
	font-weight: bold;
	font-size: 13px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #222222;
	text-decoration: none;
}

.top-nav a:hover {
	color: #2C5364;
}

#menu-bar {
	z-index: 3;
}

#menu {
	width: 35px;
	height: 30px;
	margin: 30px 0px 20px 20px;
	cursor: pointer;
	padding: 5px;
	border-radius: 2px;
	background-color: #22222255;
	/*box-shadow: 0 4px 8px 0 rgba(0,0,0,0.1), 0 4px 8px 0 rgba(0,0,0,0.1);*/
}

#menu .bar {
	height: 3px;
	width: 100%;
	background-color: #FAFAFA;
	border-radius: 12px;
	transition: 0.3s ease;
}

#bar1 {
	transform: translateY(4px);
}

#bar2 {
	transform: translateY(8px);
}

#bar3 {
	transform: translateY(20px);
}

.menu-opened {
	display: block !important;
}

.menu-opened #bar1 {
	background-color: #222222 !important;
	transform: translateY(12px) rotateZ(-45deg) !important;
}

.menu-opened #bar2 {
	opacity: 0 !important;
}

.menu-opened #bar3 {
	background-color: #222222 !important;
	transform: translateY(12px) rotate(45deg) !important;
}

.menu-background {
	z-index: 2;
	width: 0;
	height: 0;
	background: radial-gradient(circle, #FAFAFA, #FAFAFA);
	margin: 30px 0 20px 20px;
	border-radius: 50%;
	transition: 0.5s ease;
}

.menu-background-opened {
	width: 500vh;
	height: 500vh;
	transform: translate(-30%, -30%);
}

.nav {
	display: none;
	max-height: 80vh;
	overflow-y: auto;
}

.nav li {
	padding: 0px 16px;
}

.nav a {
	display: inline-block;
	color: #222222;
	text-decoration: none;
	letter-spacing: 0.1em;
	font-family: 'Raleway';
	font-weight: bold;
	padding: 15px 30px;
	position: relative;
	text-align: center;
	transition-duration: 0.4s;
	font-size: 36px;
	transition: 0.5s ease;
}

.nav a:hover {
	color: #2C5364;
	transform: translate(10%, 0%);
}

.nav a.action {
	display: inline-block;
	color: #FAFAFA;
	text-decoration: none;
	letter-spacing: 0.05em;
	font-family: 'Raleway';
	font-weight: bold;
	padding: 15px 30px;
	position: relative;
	text-align: center;
	transition-duration: 0.4s;
	font-size: 50px;
	transition: all 0.5s ease;
    border-radius: 2px;
    background: linear-gradient(to left, #222222 50%, #2C5364 50%) right;
    background-size: 200% 100%;
    background-position: right bottom;
}

.nav a.action:hover {
	color: #FFFFFF;
    background-position: left bottom;
}

.menu-background, #menu-bar {
	position: fixed;
	top: 0;
	left: 0;
}

#header-logo {
	display: block;
	position: fixed;
	top: 0;
	left: 0;
	width: 80px;
	height: 60px;
	margin: 20px 0px 20px 60px;
	background-image: url("img/logo-v1.png");
	background-position: center;
	background-size: contain;
	background-repeat: no-repeat;
	transition: 0.5s ease;
}

#header-logo.m-opened {
	display: none;
}

.header-main .container-header-main {
	width: 100%;
	height: 100vh;
	position: relative;
	overflow: hidden;
}

.cb-slideshow, .cb-slideshow:after {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	z-index: 0;
}

.cb-slideshow:after {
	content: '';
	background: rgba(0, 0, 0, 0.7) repeat top left;
	/*background: linear-gradient(to right, rgba(231, 76, 60, 0.6), rgba(0, 0, 0, 1));*/
}

.cb-slideshow li span {
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	left: 0;
	color: transparent;
	background-size: cover;
	background-position: 50% 50%;
	background-repeat: no-repeat;
	opacity: 0;
	z-index: 0;
	animation: image-animation 62s linear infinite 0s;
}

.cb-slideshow li div {
	z-index: 1;
	position: absolute;
	top: 200px;
	left: 0;
	width: 100%;
	text-align: left;
	opacity: 0;
	color: #FFFFFF;
	animation: title-animation 62s linear infinite 0s;
}

.cb-slideshow li div h1 {
	padding-left: 10vh;
	padding-right: 10vh;
	color: #FFFFFF;
	font-weight: normal;
	font-size: 7.65em;
}

.cb-slideshow li:nth-child(1) span { 
    background-image: url("img/header-bg-1.jpg");
	background-position: 20% 50%;
}

.cb-slideshow li:nth-child(2) span { 
    background-image: url("img/header-bg-2.jpg");
	background-position: 80% 50%;
    animation-delay: 8s; 
}

.cb-slideshow li:nth-child(3) span { 
    background-image: url("img/header-bg-3.jpg");
	background-position: 100% 50%;
    animation-delay: 16s; 
}

.cb-slideshow li:nth-child(4) span { 
    background-image: url("img/header-bg-4.jpg");
	background-position: 60% 50%;
    animation-delay: 24s; 
}

.cb-slideshow li:nth-child(5) span { 
    background-image: url("img/header-bg-5.jpg");
    animation-delay: 32s; 
}

.cb-slideshow li:nth-child(6) span { 
    background-image: url("img/header-bg-6.jpg");
	background-position: 20% 50%;
    animation-delay: 40s; 
}

.cb-slideshow li:nth-child(7) span { 
    background-image: url("img/header-bg-7.jpg");
	background-position: 20% 50%;
    animation-delay: 48s; 
}

.cb-slideshow li:nth-child(8) span { 
    background-image: url("img/header-bg-8.jpg");
	background-position: 20% 50%;
    animation-delay: 56s; 
}

.cb-slideshow li:nth-child(2) div { 
    animation-delay: 8s; 
}

.cb-slideshow li:nth-child(3) div { 
    animation-delay: 16s; 
}

.cb-slideshow li:nth-child(4) div { 
    animation-delay: 24s; 
}

.cb-slideshow li:nth-child(5) div { 
    animation-delay: 32s; 
}

.cb-slideshow li:nth-child(6) div { 
    animation-delay: 40s; 
}

.cb-slideshow li:nth-child(7) div { 
    animation-delay: 48s; 
}

.cb-slideshow li:nth-child(8) div { 
    animation-delay: 56s; 
}

@keyframes image-animation { 
    0% {
		opacity: 0; 
		animation-timing-function: ease-in;
		/*transform: scale(1.05);*/
	}
    5% {
		opacity: 1;
		animation-timing-function: ease-out;
		/*transform: scale(1.1);*/
	}
	17% {
		opacity: 1;
	}
	25% {
		opacity: 0;
	}
	100% {
		opacity: 0;
	}
}

@keyframes title-animation { 
    0% { opacity: 0 }
    8% { opacity: 1 }
	15% { opacity: 0 }
	19% { opacity: 0 }
	100% { opacity: 0 }
}

/* Desktop: mostra barra sticky, nascondi hamburger */
@media screen and (min-width: 900px) {
	.top-nav {
		display: flex;
	}
	#menu-bar,
	.menu-background,
	.nav {
		display: none !important;
	}
}

/* Mobile / tablet: solo hamburger */
@media screen and (max-width: 899px) {
	.top-nav {
		display: none;
	}
}

@media screen and (max-width: 1366px) { 
    .cb-slideshow li div h1 { font-size: 5.65em; padding-left: 10vh; padding-right: 10vh; }
}
@media screen and (max-width: 1280px) { 
    .cb-slideshow li div h1 { font-size: 4.65em; padding-left: 5vh; padding-right: 5vh; }
}
@media screen and (max-width: 1140px) { 
    .cb-slideshow li div h1 { font-size: 5.15em; padding-left: 5vh; padding-right: 5vh; }
}
@media screen and (max-width: 600px) { 
    .cb-slideshow li div h1 { font-size: 4.15em; padding-left: 2vh; padding-right: 2vh; }
	.cb-slideshow li:nth-child(1) span { background-position: 50% 50%; }
	.cb-slideshow li:nth-child(2) span { background-position: 50% 50%; }
	.cb-slideshow li:nth-child(3) span { background-position: 50% 50%; }
	.cb-slideshow li:nth-child(4) span { background-position: 50% 50%; }
	.cb-slideshow li:nth-child(5) span { background-position: 50% 50%; }
	.cb-slideshow li:nth-child(6) span { background-position: 50% 50%; }
	.cb-slideshow li:nth-child(7) span { background-position: 50% 50%; }
	.cb-slideshow li:nth-child(8) span { background-position: 50% 50%; }
	.nav a { font-size: 25px; }
	.nav a.action { font-size: 25px; }
}