/* LAYOUT BASE */

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fff;
  color: #fff;
  scroll-behavior: smooth;
}

body:not(.hero) {
  background: url('/folder/bg-page.jpg') no-repeat center center fixed;
  background-size: cover;
}

h1 {
  color:#fff;
  font-size: 2rem;
  margin-bottom: 2rem;
  border-left: 5px solid #e63946;
  padding-left: 0.6rem;
}

h2 {
	font-weight:bold;
	font-size: 1.05rem;
	color:#fff;}


section h2 {
  color:#fff;
  font-size: 2rem;
  margin-bottom: 2rem;
  border-left: 5px solid #e63946;
  padding-left: 0.6rem;
}

section {
	background-color: rgba(0, 0, 0, 0.7);
    min-width: 900px;
	max-width: 1200px;
    margin: 30px auto;
    padding: 30px;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	box-sizing: border-box;
	border-radius: 20px;
}

.wrapper {
    display: flex;
	gap: 20px;
    flex-wrap: wrap; /* utile anche per responsive */
	box-sizing: border-box;
}

.wrapper-sx {
    flex: 0 0 calc(40% - 10px); /* metà del gap */
	background-color: rgba(255, 255, 255, 0.8);
	border-left: 4px solid #e63946;
	padding: 1.5rem 1rem;
	border-radius: 6px;
	box-sizing: border-box;
	color:#000;
}

.wrapper-sx p {
  margin: 0.5rem 0;
  font-size: 1.05rem;
}

.wrapper-sx a {
  color: #e63946;
  text-decoration: none;
}

.wrapper-sx a:hover {
  text-decoration: underline;
}

.wrapper-dx {
    flex: 0 0 calc(60% - 10px); /* metà del gap */
	box-sizing: border-box;
}

.wrapper-pg {
	color:#FFF;
    flex: 0 0 calc(60% - 10px); /* metà del gap */
	box-sizing: border-box;
}

.wrapper-hiro {
	width: 40%;
	min-width:400px;
	box-sizing: border-box;
}

.wrapper-img {
    flex: 0 0 calc(40% - 10px); /* metà del gap */
	box-sizing: border-box;
}

.wrapper-img img {
	width:calc(100% - 10px); /* metà del gap */
	}


/* FORM STYLING BASE */
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

form label {
display: block;
font-weight:bold;
margin-bottom: 0.3rem;
color:#fff;
font-size: 1rem;
}


form input,
form textarea {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
margin-bottom: 1.2rem;
border: 1px solid #ccc;
border-radius: 4px;
transition: border 0.3s ease, box-shadow 0.3s ease;
font-size: 1rem;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: #e63946;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.2);
}

form button {
    align-self: start;
    padding: 10px 20px;
    cursor: pointer;

background-color: #e63946;
color: white;
border: none;
border-radius: 4px;
font-weight: bold;
font-size: 1rem;
transition: background-color 0.3s ease;
}

form button:hover {background-color: #cc2f3b;}


.esito {
	background-color: rgba(255, 255, 255, 0.8);
	padding: 1.5rem 1rem;
	border-radius: 6px;
	box-sizing: border-box;	
	color:#000;
	font-size:20px;
	text-align:center;
}

.esito_ok {border-left: 8px solid #0F0;}
.esito_ko {border-left: 8px solid #F00;}

.esito_ok i {color:#0C0; font-size:56px;}
.esito_ko i {color:#C30; font-size:56px;}

/* MAPPA */
.mappa {
    width: 100%;
    margin-top: 30px;
}

.mappa iframe {
  width: 100%;
  height: 500px;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

footer {
  background-color: #111;
  color: #ccc;
  text-align: center;
  padding: 1.5rem 0;
}

.hero {
  background: url('/folder/sfondo-hiro.png') no-repeat left center/cover;
  height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  color: white;
  padding: 0 5%;
}

.cta-button {
  background-color: #e63946;
  color: white;
  padding: 0.9rem 2rem;
  text-decoration: none;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.cta-button:hover {
  background-color: #c92c3a;
}

.cta-button:hover {
  background-color: #c92c3a;
}





.galleria {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 colonne */
  gap: 15px;
  max-width: 800px;
  margin: auto;
}
.galleria img {
  width: 100%;
  height: auto;
  border: 2px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}
.galleria img:hover {
  transform: scale(1.05);
}
#lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox-container {
  position: relative;
  display: inline-block;
}

#lightbox-overlay img {
  max-width: calc(100vw - 60px);   /* 30px per lato */
  max-height: calc(100vh - 60px);  /* 30px sopra e sotto */
  width: auto;
  height: auto;
  object-fit: contain;
  border: 5px solid white;
  border-radius: 10px;
  display: block;
}


.close-lightbox {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 28px;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  padding: 5px 10px;
  cursor: pointer;
  z-index: 1001;
  transition: background 0.2s, transform 0.2s;
}

.close-lightbox:hover {
  background: rgba(255, 255, 255, 0.9);
  color: black;
  transform: scale(1.2);
}





/* footer */
footer {
	width:100% auto;
	padding:30px;
	background-color:#333333;
	color:#FFF;
	}
	
.footer_inc a {
	color:#fff;
	text-decoration:underline;
	}

.footer_inc a:hover {
	color:#C30;
	text-decoration:underline;
	}



/* Mobile responsive */
@media (max-width: 768px) {

section {
		min-width: 300px;
		max-width: 769px;
		margin: 0 auto;
		padding: 20px;
		box-sizing: border-box;
		border-radius: 0;
	}
	
.wrapper {
		flex-direction: column;
		box-sizing: border-box;
}

.wrapper-pg {flex-direction: column-reverse; /* L'immagine va sopra */}

.wrapper-img img {max-width:80%;}


.wrapper-sx,
.wrapper-dx {
		flex: 0 0 100%;
		box-sizing: border-box;
}
	
.hero {
	position:relative;
	background: url('/folder/sfondo-hiro_mb.png') no-repeat left center/cover;
	justify-content: center;
	background-position: center;
	text-align: center;
	}

.wrapper-hiro {
	width:100%;
	min-width:290px;
	padding:0 20px;	
	box-sizing: border-box;
	text-align:left;
}


.wrapper-hiro h1 {font-size: 1.5rem;}
section h2 {font-size: 1.5rem;}

form {
		display: block;
		width: 100%;
		margin-top: 20px;
		box-sizing: border-box;
}
	
form input,
form textarea {
		width: 100%;
		padding: 10px;
		box-sizing: border-box;
}

}
