* {
	box-sizing: border-box;
}

html{
	scroll-behavior:smooth;
}

/* --- BODY --- */
body {
	margin: 0;
	font-family: 'Poppins', sans-serif;
	min-height: 100vh;
}

/* --- HEADER STICKY --- */
header {
	position: sticky;
	top: 0;
	z-index: 1000;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px 40px;
	background-color: #fff;
	border-bottom: 1px solid #ddd;
}

.logo img { width: 65%; }

/* ----- MENU DESKTOP ----- */
nav ul {
	list-style: none;
	display: flex;
	gap: 25px;
}

nav ul li a {
	color: black;
	text-decoration: none;
	font-size: 15px;
	font-weight: 600;
	text-transform: uppercase;
}

nav ul li a:hover { text-decoration: underline; }

/* --- Dropdown Desktop --- */
.dropdown { position: relative; }

.dropdown-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: #fff;
	border: 1px solid #ddd;
	list-style: none;
	padding-left:0;
	margin-left:0;
	min-width: 250px;
	z-index: 1000;
}

.dropdown-menu li a {
	padding: 10px 20px;
	display: block;
	font-weight: 400;
	text-transform: none;
}

.dropdown-menu li a:hover { background: #f2f2f2; }

.dropdown:hover .dropdown-menu {
	display: block;
}

/* --- HAMBURGER MENU (MOBILE) --- */
.hamburger { display: none; font-size: 30px; cursor: pointer; user-select: none; }

/* --- MENU MOBILE --- */
.mobile-menu {
	display: none;
	flex-direction: column;
	background-color: #fff;
	width: 100%;
	position: fixed;
	top: 94px;
	left: 0;
	padding: 0;
	border-top: 1px solid #ddd;
	border-bottom: 1px solid #ddd;
	z-index: 100;
}

.mobile-menu a {
	padding: 15px 25px;
	color: #000;
	text-decoration: none;
	font-weight: 600;
	text-transform: uppercase;
}

/* --- Dropdown Mobile --- */
.mobile-dropdown {
	display: none;
	flex-direction: column;
	padding-left: 20px;
	transition: max-height 0.3s ease;
	overflow: hidden;
}

.mobile-dropdown a {
	padding: 12px 25px;
	font-weight: 400;
	text-transform: none;
}

.mobile-dropdown-btn {
	cursor: pointer;
}

.mobile-menu a:hover,

.mobile-dropdown a:hover { background: #f2f2f2; }

/* --- SLIDER --- */
.slider {
	position: relative;
	width: 100%;
	height: 40vh;
	overflow: hidden;
}

.slide {
	position: absolute;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	opacity: 0;
	transform: scale(1);
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 2rem;
	font-weight: 600;
	transition: opacity 1s ease-in-out, transform 8s ease-in-out;
	padding: 0 20px;
	text-align: center;
}

.slide::before {
	content: "";
	position: absolute;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.35);
	top: 0;
	left: 0;
	z-index: 1;
}

.slide.active {
	opacity: 1;
	z-index: 0;
	transform: scale(1.05);
}

.slide span { position: relative; z-index: 2; }

/* --- FRECCE SLIDER --- */
.slider .prev, .slider .next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	font-size: 2.5rem;
	color: white;
	background: rgba(0,0,0,0.3);
	padding: 10px 15px;
	cursor: pointer;
	user-select: none;
	border-radius: 5px;
	z-index: 3;
}

.slider .prev { left: 10px; }

.slider .next { right: 10px; }

.slider .prev:hover, .slider .next:hover { background: rgba(0,0,0,0.6); }

/* --- DOTS SLIDER --- */
.slider-dots {
	position: absolute;
	bottom: 15px;
	width: 100%;
	text-align: center;
	z-index: 3;
}

.slider-dots span {
	display: inline-block;
	width: 12px;
	height: 12px;
	margin: 0 6px;
	background: rgba(255,255,255,0.6);
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.3s;
}

.slider-dots span.active { background: rgba(255,255,255,1); }

/* --- SEZIONE CONTENUTI --- */
.content {
	max-width: 60%;
	margin: 50px auto;
	padding: 0 20px;
}

.content h1.title {
	text-align: center;
	font-size: 1.8rem;
	text-transform: uppercase;
	margin-bottom: 30px;
}

.content p {
	font-size: 1rem;
	line-height: 1.8;
	text-align: justify;
}

.content ul li {
    font-size: 1rem;
    line-height: 1.8;
    text-align: justify;
}

.home-btn {
	text-align: center;
	margin-top: 30px;
}

.home-btn a {
	display: inline-block;
	background-color: #111;
	color: #fff;
	padding: 12px 25px;
	text-decoration: none;
	font-weight: 600;
	border-radius: 5px;
	transition: background 0.3s;
}

.home-btn a:hover { background-color: #333; }

.images-row{
  display: flex;             /* mette gli elementi su una riga */
  justify-content: center;   /* centra orizzontalmente il gruppo */
  align-items: center;       /* centra verticalmente (utile se immagini hanno altezze diverse) */
  gap: 20px;                 /* spazio tra le immagini */
  flex-wrap: wrap;           /* va a capo su schermi piccoli */
  padding: 10px;
}

/* dimensione immagini: puoi usare percentuale o max-width per controllare la responsività */
.images-row img{
  width: 25%;          /* ognuna occupa il 30% del contenitore */
  max-width: 300px;    /* non crescerà oltre 300px */
  height: auto;
  display: block;
}

/* --- FOOTER --- */
footer {
	background-color: #111;
	color: #ccc;
	padding: 15px 40px;
	text-align: center;
	font-size: 14px;
	position: fixed;
	bottom:0;
	left:0;
	right:0;
	width: 100%;
	box-sizing: border-box; /* per centrare l'elemento */
}

section.myvh, .lightbox.myvh{
	margin-bottom: 10vh;
}

/* --- STATS --- */
.stats-section{
	display: flex;
	gap: 24px;
	justify-content: center;
	justify-items: center; /* centra i blocchi orizzontalmente */
	align-items: stretch;  /* tutti i blocchi avranno la stessa altezza */
	padding: 20px 20px;
	background: #e2e3e3;
	border-radius: 12px;
	margin: 40px auto;
	width: 90%;
	max-width: 1200px;
	box-sizing: border-box;

}

.stat-box{
	flex: 1 1 0;
	min-width: 160px;
	text-align: center;
	padding: 15px 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	background: #f9fafb;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	transition: transform 0.3s;
}

.stat-box:hover{
	transform: translateY(-8px);
}

.stat-icon{
	width: 50px;
	height: 50px;
	margin-bottom: 12px;
	fill: #5b8201;
}

.stat-box .number{
	font-size: 2.4rem;
	font-weight: 700;
	margin: 0;
	color: #5b8201;
}

.stat-box p{
	margin: 8px 0 0;
	font-size: 1rem;
	line-height: 1.3;
}

.stat-box:nth-child(3) .stat-icon {
	width: 70px;
	height: 40px;
	background-color: #5b8201; /* colore di esempio */
	clip-path: polygon(
		10% 0%, 100% 0%,   /* vertici superiori */
		90% 100%, 0% 100% /* vertici inferiori */
	);
	display: inline-block;
	margin-bottom: 15px;
}

/* --- SUN --- */
.sun-section {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 4 colonne su desktop, 1 su mobile */
	gap: 24px;
	justify-items: center; /* centra i blocchi orizzontalmente */
	align-items: stretch;  /* tutti i blocchi avranno la stessa altezza */
	padding: 20px;
	border-radius: 12px;
	margin: 40px auto;
	width: 90%;
	max-width: 1200px;
	box-sizing: border-box;
}

.sun-section a:link,
.sun-section a:visited,
.sun-section a:hover,
.sun-section a:active
{
	color: inherit;
	text-decoration: none;
	width:100%;
}


.sun-box {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center; /* centra contenuto verticalmente */
	padding: 15px 10px;
	background: #f9fafb;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	transition: transform 0.3s;
	width: 100%;
	height: 120px; /* altezza uniforme, puoi aggiustare */
	box-sizing: border-box;
}

.sun-box:hover {
	transform: translateY(-8px);
}

.sun-icon {
	width: 50px;
	height: 50px;
	margin-bottom: 12px;
	fill: #5b8201;
}

.sun-box p {
	margin: 8px 0 0;
	font-size: 1rem;
	line-height: 1.3;
	text-align: center;
}

/* --- GALLERY --- */
.gallery-container {
	margin-top: 60px;
}

.gallery-title {
	text-align: center;
	color: #fff;
	font-size: 2rem;
	margin-bottom: 30px;
	text-transform: uppercase;
	letter-spacing: 2px;
}

.gallery-item {
	overflow: hidden;
	border-radius: 8px;
	margin-bottom: 20px;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-item img {
	width: 100%;
	height: auto;
	cursor: pointer;
	transition: transform 0.4s ease;
}

.gallery-item:hover img {
	transform: scale(1.05);
	opacity: 0.9;
}

/* --- Lightbox --- */
.lightbox {
	display: none;
	position: fixed;
	z-index: 9999;
	top: 0; left: 0;
	width: 100%; height: 100%;
	background: rgba(0,0,0,0.9);
	justify-content: center;
	align-items: center;
}

.lightbox-img {
	max-width: 90%;
	max-height: 80%;
	border-radius: 8px;
}

.close {
	position: absolute;
	top: 20px; right: 30px;
	color: #fff;
	font-size: 40px;
	cursor: pointer;
}

.lightbox-nav span {
	position: absolute;
	top: 50%;
	font-size: 60px;
	color: #fff;
	padding: 10px;
	cursor: pointer;
	user-select: none;
	transform: translateY(-50%);
}

.prev { left: 20px; }
.next { right: 20px; }

.immagine{
	width:25%; 
	margin:0 auto; 
	display:flex; 
	margin-bottom: 40px;
}

.myrow{
	align-items:stretch;
	margin-bottom:30px;
}

.mytext{
	display: flex;
	flex-direction: column;
    justify-content: center;
}

.servizi_img{
	height:300px; 
	background-size: cover;
	background-position: center;
	margin-bottom: 10px;
}

.realizzazioni_img{
	height:250px; 
	background-size: cover;
	background-position: center;
	margin-bottom: 10px;
}

#servizi11{
	background-image: url("../images/servizi11.png");
}
#servizi12{
	background-image: url("../images/servizi12.png");
}
#servizi13{
	background-image: url("../images/servizi13.png");
}
#servizi14{
	background-image: url("../images/servizi14.png");
}
#servizi15{
	background-image: url("../images/servizi15.png");
}

#servizi21{
	background-image: url("../images/servizi21.png");
}
#servizi22{
	background-image: url("../images/servizi22.png");
}

#servizi31{
	background-image: url("../images/servizi31.png");
}
#servizi32{
	background-image: url("../images/servizi32.png");
}
#servizi33{
	background-image: url("../images/servizi33.png");
}

#servizi41{
	background-image: url("../images/servizi41.png");
}
#servizi42{
	background-image: url("../images/servizi42.png");
}

#realizzazioni11{
	background-image: url("../images/realizzazione1.jpg");
}
#realizzazioni12{
	background-image: url("../images/realizzazione2.jpg");
}
#realizzazioni13{
	background-image: url("../images/realizzazione3.jpg");
}
#realizzazioni14{
	background-image: url("../images/realizzazione4.jpg");
}
#realizzazioni15{
	background-image: url("../images/realizzazione5.jpg");
}

#div1, #div2, #div3, #div4 {
  display: none; /* tutti nascosti di default */
}

@media (max-width: 900px) {
	nav ul { display: none; }

	.hamburger { display: block; }

	footer {
		position: static;
	}

	section.myvh, .lightbox.myvh{
		margin-bottom: 50px;
	}

	.immagine{
		width:55%;
	}
}

@media (max-width: 600px){
	.slide {
		font-size: 1rem;
		padding: 0px;
	}

	.stats-section{
		flex-direction: column;
		gap: 18px;
	}

	.stat-box{
		flex: unset;         /* disabilita la flessibilità orizzontale */
		min-width: unset;    /* permette di occupare tutta la larghezza */
		width: 100%;         /* occupa tutta la colonna */
		height: 160px;       /* altezza uniforme per tutti i box */
		max-width: 100%;
	}
	.sun-section {
		grid-template-columns: 1fr; /* un blocco per riga */
		gap: 18px;
	}

	.sun-box {
		height: 180px; /* altezza mobile uniforme */
	}
}