/* === RESET GENERALE === */
body, html {
  height: 100%;
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f4f4f4;
}

a {
  text-decoration: none;
}

input, button {
  font-family: inherit;
  outline: none;
  box-sizing: border-box; /* uniforma input e button */
}

/* === HERO / HOME === */
.hero {
  background-image: url('../img/sfondo-città.svg');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 100px 20px;
  text-align: center;
}

.hero h1 {
  font-size: 4em;
  margin-bottom: 10px;
  position: relative;
}

.hero h1 .city {
  color: #89e5e8;
}

.hero p {
  font-size: 1.2em;
  margin-bottom: 30px;
}

.hero a {
  display: inline-block;
  margin: 10px;
  padding: 15px 30px;
  font-size: 1em;
  color: white;
  background-color: #89e5e8b0;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

.hero a:hover {
  background-color: #1d1f50b0;
}

/* === SEZIONI / VANTAGGI === */
.section {
  padding: 60px 20px;
  text-align: center;
}

.section h2 {
  font-size: 2em;
  margin-bottom: 20px;
}

.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin-top: 30px;
}

.feature {
  max-width: 250px;
}

.feature img {
  width: 80px;
  margin-bottom: 15px;
}

.feature p {
  font-size: 1em;
}

/* === ICONS (sprite) === */
.icon-step,
.icon-index {
  width: 260px;
  height: 90px;
  border: none;
  background-repeat: no-repeat;
  background-size: auto;
  cursor: pointer;
  margin: 0 auto;
}

.icon-step {
  background-image: url('../img/sprite_step.png');
}

.icon-step1 { background-position: 0 0; width: 90px; height: 90px; }
.icon-step2 { background-position: -90px 0; width: 90px; height: 90px; }
.icon-step3 { background-position: -180px 0; width: 90px; height: 90px; }

.icon-index {
  background-image: url('../img/sprite_index.png');
}

.icon-index1 { background-position: 0 0; width: 90px; height: 90px; }
.icon-index2 { background-position: -90px 0; width: 90px; height: 90px; }
.icon-index3 { background-position: -180px 0; width: 90px; height: 90px; }

/* === FOOTER === */
footer {
  text-align: center;
  padding: 30px 0px;
  background-color: #333;
  color: white;
  margin-top: auto;
  width: 100%;
}

footer a {
  color: #aaa;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2em;
  }
  .features {
    flex-direction: column;
    align-items: center;
  }
}

/* === PAGINA REGISTRAZIONE / OTP / LOGIN === */
body.registration-page {
  background-color: #f4f4f4;
  background-image: url('../img/sfondo-città.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 40px;
}

.box {
  background-color: #ffffffd9;
  padding: 30px;
  border-radius: 12px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  margin-bottom: 20px;
}

.box h2 {
  text-align: center;
  color: #1d1f50;
  margin-bottom: 30px;
}

.box label {
  display: block;
  margin-top: 15px;
  font-weight: bold;
}

.box input,
.box button {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: block;
  margin-top: 8px;
  font-size: 16px;
}

.box input {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.box button {
  padding: 12px;
  background-color: #89e5e8b0;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease;
}

.box button:hover {
  background-color: #1d1f50b0;
}

.box button:active {
  transform: scale(0.98);
}

.box button:disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
  opacity: 0.7;
}

#message {
  margin-top: 20px;
  text-align: center;
  color: #dc3545;
}

@media (max-width: 480px) {
  body.registration-page {
    padding: 20px;
  }
  .box {
    padding: 20px;
  }
}

/* === MOSTRA/NASCONDI PASSWORD === */
.show-password {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 14px;
}

.show-password input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.show-password label {
  cursor: pointer;
  color: #333;
  font-weight: normal;
  margin-top: 4px;
}


/* === PAGINA ISCRIVI / AREA RISERVATA === */
.form-container {
  background-color: #ffffffd9;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  box-sizing: border-box;
}

.form-container h2 {
  color: #1d1f50;
  text-align: center;
  margin-bottom: 20px;
}

.form-container label {
  font-weight: bold;
  display: block;
  margin-top: 15px;
  margin-bottom: 5px;
}

.form-container input[type="tel"],
.form-container input[type="text"],
.form-container input[type="password"],
.form-container button {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: block;
  margin-top: 8px;
  font-size: 16px;
}

.form-container input[type="tel"],
.form-container input[type="text"],
.form-container input[type="password"] {
  padding: 10px;
  border: 1px solid #cccccc;
  border-radius: 6px;
}

.checkbox-group {
  margin-top: 20px;
}

.checkbox-group label {
  font-weight: normal;
  display: block;
  margin-bottom: 8px;
}

.form-container button {
  background-color: #89e5e8b0;
  color: #ffffff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease;
}

.form-container button:hover {
  background-color: #1d1f50b0;
}

.form-container button:active {
  transform: scale(0.98);
}

.form-container button:disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
  opacity: 0.7;
}

.error {
  color: #dc3545;
  margin-top: 15px;
  text-align: center;
}

.success {
  color: #28a745;
  margin-top: 15px;
  text-align: center;
}

/* Suggerimenti città */
.suggestion-item {
  padding: 8px;
  border-bottom: 1px solid #ccc;
  cursor: pointer;
}

.suggestion-item:hover {
  background-color: #f0f0f0;
}

/* Città selezionata */
.selected-city {
  margin-top: 10px;
  background-color: #e9ecef;
  padding: 10px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.selected-city #removeCity {
  cursor: pointer;
  color: #dc3545;
  font-weight: bold;
}

.selected-city #removeCity:hover {
  color: #b02a37;
}

#otpMessage {
  margin-top: 10px;
  text-align: center;
}

#otpModal {
  margin-top: 20px;
}

@media (max-width: 480px) {
  .form-container {
    max-width: 95%;
    padding: 20px;
  }
}


/* === RESPONSIVE PER MOBILE === */
@media (max-width: 480px) {

  body.registration-page{
    padding: 0px;
  }
  
  .form-container,
  .box {
    max-width: 95%;
    width: 95%;
    padding: 20px;
  }

   .box {
    width: 80%;
    margin: 0 auto;
    margin-top: 40px;
  }

  .form-container h2,
  .box h2 {
    font-size: 1.4em;
  }

  .form-container input,
  .form-container button,
  .box input,
  .box button {
    font-size: 15px;
    padding: 10px;
  }

  .show-password {
    font-size: 13px;
    gap: 6px;
  }
}
