body {
  font-family: "Zilla Slab", serif;
  font-weight: 400;
  font-style: normal;
}
.testa {
  width: 100%;
  height: 900px;
  margin-top: -20px;
  background-image: url(https://images.unsplash.com/photo-1622542796157-af7cb80b5a62?q=80&w=2671&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D);
  background-attachment: fixed;
  background-size: cover;
}
.home-icon {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: #333;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 999;
  transition: background-color 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.7);
  transition: 
    opacity 0.3s ease,
    transform 0.3s ease,
    background-color 0.3s ease;
}

.home-icon.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.home-icon:hover {
  background-color: black;
}

.home-icon i {
  font-size: 20px;
}
.menu {
  position: sticky; /* Rende il menù "appiccicoso" */
  top: 0; /* Fa in modo che il menù resti in cima alla pagina */
  z-index: 1000;
}
.menu > h1 {
  position: absolute;
  text-align: left;
  margin-left: 20px;
  margin-top: 40px;
  font-family: "Bodoni Moda", serif;
  font-weight: bold;
  font-style: normal;
  font-size: 40px;
  color: white;
  letter-spacing: 2px;
}
.menu > h2 {
  position: absolute;
  text-align: left;
  margin-left: 20px;
  margin-top: 100px;
  font-family: "Bodoni Moda", serif;
  font-optical-sizing: auto;
  font-weight: lighter;
  font-style: normal;
  font-size: 25px;
  color: white;
  letter-spacing: 1px;
}
.menu > ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  position: absolute;
  margin-top: 50px; /* Posiziona il menu in alto */
  right: 60px; /* Posiziona il menu a destra */
  display: flex;
  font-size: 25px;
  font-weight: lighter;
}
.menu > ul > li {
  margin-left: 50px; /* Distanza tra i menu items */
}
.menu > ul > li > a {
  text-decoration: none; /* Rimuove la sottolineatura dei link */
  color: white; /* Colore del testo */
  padding: 1px; /* Spaziatura interna */
  display: block;
  border-bottom: 1px solid transparent;
  border-radius: 2px;
  transition: border-color 0.9s;
}
.menu > ul > li > a:hover {
  border-bottom-color: white;
}
.hidden {
  opacity: 0;
  transition: all 2.9s ease-in-out;
}

.slide-sx {
  transform: translateX(-100px);
  transition: all 2.1s ease-in-out;
}
.slide-dx {
  transform: translateX(100px);
  transition: all 2.1s linear;
}
.zoom {
  transform: scale(0.8);
}

.fade {
  transform: translateY(20px);
}

/* Applica l'effetto quando viene aggiunta la classe .show */
.show {
  opacity: 1;
  transform: none;
}

/* Ritardo per effetto a cascata */
.delay {
  transition-delay: 0.8s;
}
.mezzo {
  width: 100%;
  height: 450px;
}
.mezzo > p {
  text-align: center;
  margin-top: 150px;
  border-top: 1px solid black;
  border-bottom: 1px solid black;
  border-radius: 3px;
  padding: 30px;
  width: 800px;
  margin-left: 200px;
  font-size: 22px;
  font-weight: lighter;
}
.slide-sx {
  transform: translateX(-50px);
}
.show {
  opacity: 1;
  transform: none;
}
.sec {
  width: 100%;
  height: 500px;
  background-image: url(sfondomezzo.jpg);
  background-size: cover;
  background-position: center;
}
.slide-dx {
  transform: translateX(100px);
}
.show {
  opacity: 1;
  transform: none;
}
.galleria {
  display: flex; /* Usa flexbox per disporre le immagini in orizzontale */
  justify-content: center; /* Centra le immagini orizzontalmente */
  gap: 80px; /* Aggiungi uno spazio di 20px tra le immagini */
  margin-top: 150px;
  margin-bottom: 150px;
  width: 100%;
}
.galleria > a > img {
  width: 340px; /* Imposta una larghezza fissa per ogni immagine */
  height: 100%; /* Mantieni le proporzioni dell'immagine */
  border-radius: 5px;
  border: 1px solid black;
}
.links {
  display: flex; /* Usa flexbox per disporre le immagini in orizzontale */
  justify-content: center; /* Centra le immagini orizzontalmente */
  gap: 400px; /* Aggiungi uno spazio di 20px tra le immagini */
  width: 100%;
  margin-bottom: 100px;
  margin-top: -130px;
}
.links > p {
  font-size: 20px;
  border: 1px solid black;
  border-radius: 5px;
  padding: 10px;
  margin-right: -20px;
  margin-left: -20px;
  background-color: black;
}
.links > p > a {
  color: white; /* Colore del testo */
  text-decoration: none; /* Rimuove la sottolineatura */
  font-weight: lighter; /* Imposta il testo in grassetto */
}
.hidden {
  opacity: 0;
  transition: all 3.5s ease;
}

/* Immagini che salgono dal basso */
.slide-up {
  transform: translateY(70px);
}

/* Testi che appaiono con fade */
.fade {
  transform: translateY(20px);
}

.show {
  opacity: 1;
  transform: none;
}
.cont {
  width: 100%;
  height: 450px;
  border-top: 1px solid black;
  border-radius: 4px;
  background-image: url(ekaterina-novitskaya-gLroHoWh_as-unsplash.jpg);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
.cont > ul {
  list-style: none;
  padding: 0;
  margin-top: -150px;
  width: 100%;
  display: flex;
  flex-direction: column;
  text-align: center;
  font-weight: lighter;
}
.cont > ul > li {
  margin: 20px;
  letter-spacing: 1px;
  font-style: normal;
  text-align: center;
  font-size: 18px;
  color: white;
}
.cont > ul > li > a {
  font-size: 19px;
  text-decoration: none;
  color: white;
  border-bottom: 1px solid transparent;
  transition: border-color 0.8s ease;
}
.cont > ul > li > a:hover {
  border-bottom: 1px solid white;
}
.cont i {
  color: white; /* Nero */
  margin-right: 10px;
  font-size: 18px;
}
.cont a {
  text-decoration: none;
  color: inherit;
}
.figcaption {
  font-size: 1.2em; /* Adjust the font size */
  font-style: italic; /* Make the text italic */
  text-align: center; /* Center the caption text */
  color: white; /* Set the text color */
  padding: 10px; /* Add some space around the caption */
  background-color: white; /* Add a semi-transparent background */
  border-radius: 5px; /* Round the corners of the background */
  margin-top: 10px; /* Add space above the caption */
}
.cont>img{
position: relative;
width: 380px;
right: -860px;
top: 70px;
}
.container {
  width: 350px;
  margin-top: -450px;
  margin-left: 20px;
  height: 100px;
}
h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 20px;
  color: white;
  font-family: "Zilla Slab", serif;
  font-weight: 300;
}
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
input, textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 18px;
  font-family: "Zilla Slab", serif;
  font-weight: 300;
}

button {
  background-color: #333;
  color: white;
  padding: 12px;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Zilla Slab", serif;
  font-weight: 300;
}

button:hover {
  background-color: #555;
}

#successMessage {
  display: none;
  color: green;
  text-align: center;
  font-weight: bold;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
@media (max-width: 480px) {
  body {
    padding: 0; /* Rimuove margini laterali indesiderati */
    margin: 0;
  }

  /* HEADER */
  .testa {
    height: 500px;
    background-size: cover;
    background-position: right;
  }

  /* MENU */
  .menu {
    text-align: center;
    padding: 10px 0;
  }

  .menu > h1 {
    font-size: 28px;
    margin-right: 10px;
    margin-top: 10px;
  }

  .menu > h2 {
    font-size: 20px;
    margin-top: 50px;
  }

  .menu > ul {
    flex-direction: column;
    gap: 25px;
    padding: 0;
    margin-top: 120px;
    margin-right: -30px;
  }

  .menu > ul > li {
    margin-left: 0;
    text-align: left;
  }

  .menu > ul > li > a {
    font-size: 20px;
  }

  /* SEZIONE MEZZO */
  .mezzo {
    height: auto;
    padding: 10px 0;
    margin-top: 30px;
  }

  .mezzo > p {
    width: 90%;
    max-width: 300px; /* Impedisce che il testo sia troppo largo */
    margin: 20px auto;
    font-size: 16px;
    padding: 25px;
  }

  /* SEC */
  .sec {
    display: none;
  }
  /* GALLERIA */
  .galleria {
    flex-direction: column;
    align-items: center;
    gap: 35px;
    margin: 40px 0;
  }

  .galleria > a > img {
    width: 300px;
    max-width: 250px; /* Riduce la dimensione per evitare larghezza eccessiva */
    margin-left: 10px;
    border: 1px solid black;
    border-radius: 0px;
    height: 340px;
  }

  /* LINK */
  .links {
    flex-direction: column;
    gap: 15px;
    text-align: center;
    margin-bottom: 70px;
    height: 140px;
    margin-top: 50px;
  }

  .links > p {
    font-size: 15px;
    padding: 6px;
    width: 50%;
    margin: 0 auto;
    margin-top: 20px;
    border-radius: 30px;
  }

  /* FOOTER */
  .cont {
    height: 700px;
    padding: 10px 0;
    text-align: center;
  }
  .cont > ul {
    flex-direction: column;
    font-size: 15px;
    margin-top: 20px;
  }
  .cont > ul > li {
    font-size: 17px;
    margin: 15px 0;
  }
  .cont > ul > li > a {
    font-size: 17px;
  }
  /* LOGO */
  .cont>img {
    display: none;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  /* HEADER */
  .testa {
    height: 250px; /* Ridotta l’altezza per adattarsi allo schermo orizzontale */
    background-size: contain;
    background-position: center;
    width: 105%;
  }

  /* MENU */
  .menu {
    display: flex;
    flex-direction: row;
    padding: 10px 0;
  }

  .menu > h1 {
    font-size: 24px;
    margin-top: 0px;
    margin-left: 10px;
  }

  .menu > h2 {
    font-size: 18px;
    margin-top: 30px;
    margin-left: 10px;
  }

  .menu > ul {
    display: flex;
    flex-direction: row;
    padding: 0;
    margin: 0;
    gap: 20px;
  }

  .menu > ul > li {
    text-align: center;
    list-style: none;
    margin-right: -30px;
  }

  .menu > ul > li > a {
    font-size: 18px;
  }

  /* SEZIONE MEZZO */
  .mezzo {
    height: auto;
    padding: 10px 20px;
    margin-top: 10px;
    text-align: center;
  }

  .mezzo > p {
    width: 80%;
    max-width: 600px;
    margin: 15px auto;
    font-size: 18px;
    padding: 15px;
  }
  .sec {
    height: 200px;
    width: 105%;
  }
  /* GALLERIA */
  .galleria {
    display: flex; /* Usa flexbox per disporre le immagini in orizzontale */
    justify-content: center; /* Centra le immagini orizzontalmente */
    gap: 80px; /* Aggiungi uno spazio di 20px tra le immagini */
    margin-top: 90px;
    margin-bottom: 150px;
    width: 105%;
  }
  .galleria > a > img {
    width: 160px; /* Imposta una larghezza fissa per ogni immagine */
    height: 100%; /* Mantieni le proporzioni dell'immagine */
    border-radius: 20px;
    border: 1px solid black;
  }

  /* LINK */
  .links {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 150px;
    margin-bottom: 30px;
    margin-top: -130px;
  }

  .links > p {
    font-size: 13px;
    padding: 6px;
    width: 10%;
    border-radius: 20px;
    text-align: center;
    margin-left: 30px;
  }

  /* FOOTER */
  .cont {
    height: 300px;
    padding: 10px 0;
    text-align: center;
    width: 105%;
  }

  .cont > ul {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    padding: 0;
  }

  .cont > ul > li {
    font-size: 17px;
  }
}
@media (min-width: 481px) and (max-width: 768px) and (orientation: portrait) {
  body {
    font-size: 15px;
    margin: 0;
    padding: 0;
  }

  /* HEADER */
  .testa {
    height: 400px;
    background-size: cover;
    background-position: center;
  }

  /* MENU */
  .menu {
    text-align: center;
    padding: 20px 0;
    flex-direction: column;
  }

  .menu > h1 {
    font-size: 24px;
    margin-top: 2px;
  }

  .menu > h2 {
    font-size: 20px;
    margin-top: 35px;
  }

  .menu > ul {
    flex-direction: row;
    align-items: center;
    gap: 1px;
    margin-top: 2px;
    padding: 0;
    margin-right: -50px;
  }

  .menu > ul > li > a {
    font-size: 20px;
  }

  /* SEZIONE MEZZO */
  .mezzo {
    padding: 15px 0;
    margin-top: 30px;
  }

  .mezzo > p {
    width: 90%;
    max-width: 400px;
    margin: 20px auto;
    font-size: 20px;
    padding: 20px;
  }

  .sec {
    background-attachment: fixed;
    width: 100%;
    height: 400px;
  }

  /* GALLERIA */
  .galleria {
    flex-direction: row;
    align-items: center;
    gap: 50px;
    margin: 60px 0;
    margin-top: 100px;
  }

  .galleria > a > img {
    width: 200px;
    height: 300px;
    border-radius: 50px;
    border: 1px solid black;
  }

  /* LINK */
  .links {
    flex-direction: row;
    align-items: center;
    gap: 200px;
    margin-top: -30px;
    text-align: center;
  }

  .links > p {
    font-size: 18px;
    width: 10%;
    padding: 10px;
    border-radius: 25px;
  }

  /* FOOTER */
  .cont {
    padding: 20px 0;
    text-align: center;
  }

  .cont > ul {
    flex-direction: column;
    gap: 10px;
  }

  .cont > ul > li {
    font-size: 17px;
  }

  /* LOGO */
  .logo {
    text-align: center;
  }

  .logo > img {
    width: 200px;
    margin: 20px 0;
  }
}
