@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

/* === Sfondo e layout base === */
body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #00d1b2, #0096c7);
  background-attachment: fixed;
  color: #fff;
  padding: 40px 20px;
}

/* === Contenitore principale === */
main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  width: 100%;
  max-width: 1100px;
  animation: fadeIn 0.8s ease-in-out;
}

/* === Sezione testo (sinistra desktop) === */
.text-section {
  flex: 1;
}

.text-section h2 {
  font-size: 2.4em;
  margin-bottom: 15px;
  font-weight: 700;
  text-shadow: 0 2px 5px rgba(0,0,0,0.25);
}

.text-section h3,
.text-section h4 {
  font-weight: 400;
  line-height: 1.5;
  max-width: 400px;
  color: rgba(255,255,255,1);
}

/* === Form (destra desktop) === */
form {
  flex: 1;
  background: #fff;
  color: #333;
  border-radius: 16px;
  padding: 40px 45px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

form:hover {
  transform: translateY(-3px);
}

/* === Campi input === */
form input[type=text],
form input[type=date],
form input[type=email],
form input[type=password],
form input[type=tel] {
  width: 100%;
  padding: 12px 14px;
  margin: 8px 0 18px 0;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1em;
  background: #f9f9f9;
  transition: all 0.3s ease;
}

form input:focus {
  outline: none;
  border-color: #00b4d8;
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.3);
}

/* === Checkbox policy === */
form label {
  font-size: 0.9em;
  color: #333;
  display: block;
  margin-top: 10px;
}

form input[type=checkbox] {
  margin-right: 8px;
  transform: scale(1.2);
  accent-color: #0096c7;
}

p {
  font-size: 0.6em;
  color: #444;
}
/* === Pulsante mostra password === */
.password-wrapper {
  position: relative;
}

.password-wrapper button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.1em;
  color: #555;
  transition: transform 0.2s, color 0.2s;
}

.password-wrapper button:hover {
  transform: translateY(-50%) scale(1.15);
  color: #0096c7;
}

/* === Pulsante submit === */
button[type=submit],
input[type=submit] {
  width: 100%;
  padding: 14px;
  margin-top: 15px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, #00d1b2, #0096c7);
  color: #fff;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.4s ease, transform 0.2s ease;
}

button[type=submit]:hover,
input[type=submit]:hover {
  background: linear-gradient(90deg, #0096c7, #00d1b2);
  transform: translateY(-2px);
}

/* === Effetto hover input === */
form input:hover {
  background: #fff;
}

/* === Animazione fade-in === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Layout Mobile === */
@media (max-width: 768px) {
  main {
    flex-direction: column;
    align-items: stretch;
    gap: 40px;
  }

  .text-section {
    text-align: center;
  }

  .text-section h2 {
    font-size: 1.9em;
  }

  .text-section h3,
  .text-section h4 {
    margin: 0 auto;
  }

  form {
    padding: 30px 25px;
  }
}
