/* --- Importazione Font Eleganti --- */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Lato:wght@300;400&display=swap");

/* --- Sfondo a Schermo Intero con Slideshow --- */
.background-slideshow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-size: cover;
  background-position: center;
  animation: slideshow 60s infinite linear;
}

.background-slideshow::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(
    65,
    75,
    55,
    0.6
  ); /* Leggermente più scuro per leggibilità */
  z-index: -1;
}

@keyframes slideshow {
  0% {
    background-image: url("immagini/slide/1.jpeg");
  }
  10% {
    background-image: url("immagini/slide/2.jpg");
  }
  20% {
    background-image: url("immagini/slide/3.jpg");
  }
  30% {
    background-image: url("immagini/slide/4.jpg");
  }
  40% {
    background-image: url("immagini/slide/5.jpg");
  }
  50% {
    background-image: url("immagini/slide/6.jpg");
  }
  60% {
    background-image: url("immagini/slide/7.jpg");
  }
  70% {
    background-image: url("immagini/slide/8.jpg");
  }
  80% {
    background-image: url("immagini/slide/9.jpg");
  }
  90% {
    background-image: url("immagini/slide/10.jpg");
  }
  100% {
    background-image: url("immagini/slide/1.jpeg");
  }
}

/* --- Stile Generale --- */
html {
  font-size: 16px; /* Imposta una base solida */
}
body {
  font-family: "Lato", sans-serif;
  background-color: transparent;
  color: #333;
  line-height: 1.5; /* Interlinea ridotta */
  margin: 0;
  padding: 0; /* Rimosso padding dal body */
  -webkit-text-size-adjust: 100%;
}
.container {
  max-width: 450px; /* Larghezza massima ridotta per desktop */
  margin: 20px auto;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}
h1,
h2 {
  font-family: "Playfair Display", serif;
  color: #3a4634;
  border-bottom: none;
  text-align: center;
}
h1 {
  font-size: 2.2rem;
}
h2 {
  font-size: 1.6rem;
  margin-top: 25px;
}
p {
  font-size: 1rem;
  color: #444;
  text-align: center;
  margin-bottom: 25px;
}
.form-group {
  margin-bottom: 15px; /* Spazio tra campi ridotto */
}
label {
  display: block;
  font-weight: 400;
  margin-bottom: 5px;
  font-size: 0.9rem;
  color: #3a4634;
  text-align: left;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px;
  border: none;
  border-bottom: 1px solid #ccc;
  background-color: transparent;
  box-sizing: border-box;
  font-size: 1rem;
  font-family: "Lato", sans-serif;
  transition: border-color 0.3s;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-bottom-color: #3a4634;
}
.btn {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background-color: #556b2f;
  border: none;
  border-radius: 5px;
  margin-top: 25px; /* Spazio sopra il pulsante */
  transition: background-color 0.3s, transform 0.2s;
}
.btn:hover {
  background-color: #3a4634;
  transform: translateY(-2px);
}

/* --- REGOLE SPECIFICHE E DECISIVE PER MOBILE --- */
@media (max-width: 500px) {
  body {
    display: block; /* Rimuove flex per un layout a scorrimento naturale */
  }
  .container {
    width: 100%;
    min-height: 100vh; /* Occupa tutta l'altezza dello schermo */
    margin: 0;
    padding: 40px 25px; /* Padding interno per non far toccare i bordi */
    border-radius: 0;
    box-shadow: none;
    border: none;
    background: rgba(
      255,
      255,
      255,
      0.95
    ); /* Leggermente più opaco per leggibilità */
  }
  h1 {
    font-size: 2rem;
  }
  p,
  label,
  input,
  select,
  .btn {
    font-size: 1.1rem !important; /* Testo più grande e leggibile */
  }
}
