* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: #11314a;
  background: url('../images/desktop.jpg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.wrap {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  padding: 24px 40px;
  position: relative;
  z-index: 1;
}

h1 {
  text-align: center;
  color: #000456;
  font-size: clamp(30px, 3vw, 35px);
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 10px;
  margin: 0 auto 18px;
  display: inline-block;

}

.card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.15);
  padding: 18px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.grid {
  display: grid;
  gap: 4px;
  margin-top: 0;

}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.req {
  color: #e11d48;
  margin-left: 4px;
}

input, textarea {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  font: inherit;
  background: #f9fafb;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus {
  border-color: #94c8ff;
  box-shadow: 0 0 0 4px rgba(142, 197, 252, 0.35);
  background: #fff;
}

textarea {
  resize: vertical;
}

.btn-primary {
  display: block;
  min-width: 200px;
  padding: 12px 24px;
  margin: 10px auto 0;
  border: none;
  border-radius: 16px;
  background: #000456;
  color: #fff;
  font-weight: 700;
  font-size: 26px;
  cursor: pointer;
  text-align: center;
}

.btn-primary:active {
  background: #000456;
}

.privacy-text {
  font-size: 8px;
  color: #6c7a86;
}

.privacy-checkbox {
  accent-color: #15803d;
  margin: 3px 3px 0 -20px;
  width: 14px !important;
  height: 14px !important;
  float: left;
}

.mt {
  margin-top: 0;
  margin-bottom: 0; 
  grid-column: 1 / -1;
}

.logo-container {
  position: absolute;
  top:40px;
  right: 40px;
  z-index: 10;
}

.logo-container img {
  max-width: 120px;
  height: auto;

}

.hero-text {
  text-align: center;
  margin-top: 30px;
  color: #000456;
}

.modal-header {
  justify-content: center;
  border-bottom: none;
  margin-bottom: 5px;
  padding: 12px 16px;
}

/* Mobile */
@media (max-width: 719px) {
  .mt-mobile-n8 {
    margin-top: -8rem !important;
  }
  .mt-mobile-n4 {
    margin-top: -4rem !important;
  }
  .mt-mobile-11 {
    margin-top: 11rem !important;
    margin-top: 11rem !important;
  }
  .desktop-only { display: none !important; }
  h1 { font-size: 20px; margin-bottom: 0; }
  h1 { font-size: 20px; margin-bottom: 0; }
  .wrap { padding: 60px; margin-top: 0 !important; }
  label { font-size: 16px; }
  body {
    padding-bottom: 40px;
    background-image: url('../images/mobile.jpg');
    background-size: cover;
    background-position: center;
  }
  .btn-primary {
    margin-top: 20px;
    font-size: 24px;
    position: relative;
    top: 300px;
  }
  .mobile-only { margin-top: 5px; }
  .card { min-height: auto; }
  .grid { grid-template-columns: 1fr; }
  .privacy { margin-top: 2px; font-size: 7px; }
  .diritti { margin-top: 320px; text-align: center;font-size: 14px; }
  .logo-container {
    position: absolute;
    top: 20px;
    right: 20px;
    text-align: right;
    margin-bottom: 0;
  }
  form.card {
    padding: 10px;
    margin: 30px auto 0; 
    min-height: auto;
    position: relative;
    top: 300px;
    
  }
}

/* Tablet */
@media (min-width: 720px) and (max-width: 1419px) {
  .mobile-only { display: none !important; }
  .grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin: 20px 0;

  }
    .wrap h1.desktop-only {
    text-align: center;
    margin: 0 auto 10px;
    display: block;
  }
  .wrap {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    text-align: left;
    padding-left:40px;
    top: 20px;
  }
  .logo-container {
  flex: 0 0 auto;
  width: 30%;
  margin-bottom: 0;
  margin-top: 180px; 
  }
  form.card {
  flex: 1;
  padding-top: 5px;  
  }
.form-wrapper {
    width: 65%;
  }

.logo-container img {
    max-width: 240px;
    height: auto;
    position: absolute;
    margin-bottom: 0;
    text-align: right;
    padding-right:40px;
    top: 20px;
    right: -20px;

  }
}
/* Desktop */
@media (min-width: 1420px) {
  .mobile-only { display: none !important; }
  .wrap {
  max-width: 1080px;
  }
  .grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin: 20px 0px;
  }
  .wrap h1.desktop-only {
    text-align: center;
    margin: 0 auto 10px;
    display: block;
  }
  .wrap {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    text-align: left;
    padding-left:40px;
    left: -200px;
    top: 10px;
  }
  .btn-primary {
    margin-top: 10px;
    font-size: 20px;
    min-width: 150px;
  }
form.card {
  flex: 1;
  padding-top: 5px;  
  }
.form-wrapper {
    width: 65%;
  }
  .logo-container {
  flex: 0 0 auto;
  width: 30%;
  margin-bottom: 0;
  margin-top: 180px; 
  }

.logo-container img {
    max-width: 240px;
    height: auto;
    position: absolute;
    margin-bottom: 0;
    text-align: right;
    padding-right:40px;
    bottom: 80px;
    right: -180px;
  }
}

