/* ----------------------------------------------------
   WRAPPER CONTATTI (isolamento totale)
---------------------------------------------------- */
#contatti-wrapper {
  max-width: 850px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  line-height: 1.65;
}

/* ----------------------------------------------------
   HEADER INTRO
---------------------------------------------------- */
#contatti-wrapper .ct-header {
  text-align: center;
  margin-bottom: 40px;
}

#contatti-wrapper .ct-header h1 {
  font-size: 2.2rem;
  color: #1697c7;
  margin-bottom: 10px;
  font-weight: 800;
}

/* ----------------------------------------------------
   FORM SECTION
---------------------------------------------------- */
#contatti-wrapper .ct-form-section {
  background: #ffffff;
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* ----------------------------------------------------
   MODULO
---------------------------------------------------- */
#contatti-wrapper form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Place the form flush to the left inside the card (labels and fields align more left) */
#contatti-wrapper .ct-form-section form {
  max-width: 680px;
  margin: 0 auto 0 0; /* top right bottom left -> right auto keeps it aligned to left */
  width: 100%;
}

/* NOTE: decorative accent removed — form aligned with card padding */

/* Honeypot (nascosto) */
#contatti-wrapper .hp-field {
  display: none !important;
}

/* Campo */
#contatti-wrapper .ct-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#contatti-wrapper label {
  font-weight: 600;
  color: #0c6f97;
}

#contatti-wrapper input,
#contatti-wrapper textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #d9e7ef;
  background: #f7fbff;
  font-size: 1rem;
  color: #0b1220;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

#contatti-wrapper input:focus,
#contatti-wrapper textarea:focus {
  border-color: #1697c7;
  background: #ffffff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 151, 199, 0.15);
}

/* Pulsante */
#contatti-wrapper .ct-submit {
  background: #1697c7;
  color: #ffffff;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.25s ease;
}

#contatti-wrapper .ct-submit:hover {
  background: #0c6f97;
}

#contatti-wrapper .ct-submit:active {
  background: #09597b;
}

/* Info privacy */
#contatti-wrapper .ct-info {
  font-size: 0.9rem;
  color: #5b677a;
  margin-top: 8px;
}

/* ----------------------------------------------------
   RESPONSIVE
---------------------------------------------------- */
@media (max-width: 768px) {
  #contatti-wrapper {
    padding: 12px;
  }

  #contatti-wrapper .ct-form-section {
    padding: 12px;
  }
}

/* ----------------------------------------------------
   ALERTS (success / error)
---------------------------------------------------- */
.ct-alert {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(11, 18, 32, 0.06);
  transition: transform 200ms ease, opacity 200ms ease;
  opacity: 0.98;
}

.ct-alert::before {
  display: inline-block;
  margin-right: 10px;
  vertical-align: middle;
  font-size: 1.05rem;
}

.ct-alert-success {
  background: linear-gradient(180deg, #e8fbf7 0%, #f3fff9 100%);
  color: #064c40;
  border: 1px solid rgba(6, 76, 64, 0.08);
}
.ct-alert-success::before {
  content: "\2714"; /* check */
}

.ct-alert-error {
  background: linear-gradient(180deg, #fff6f5 0%, #fffaf9 100%);
  color: #5a1f18;
  border: 1px solid rgba(90, 31, 24, 0.08);
}
.ct-alert-error::before {
  content: "\26A0"; /* warning */
}

/* Small helper for inline note under submit */
.ct-note {
  display: block;
  font-size: 0.95rem;
  color: #415063;
  margin-top: 8px;
}

/* Improve visual focus for inputs on small screens */
@media (max-width: 480px) {
  #contatti-wrapper input,
  #contatti-wrapper textarea {
    padding: 12px;
  }

  #contatti-wrapper .ct-submit {
    padding: 12px 16px;
    font-size: 1rem;
  }

  /* Ensure the centered form keeps comfortable side padding on very small screens */
  #contatti-wrapper .ct-form-section form {
    width: calc(100% - 24px);
    max-width: none;
    margin-left: 12px;
  }
  /* ensure form uses the card padding on very small screens */
  #contatti-wrapper .ct-form-section form {
    margin-left: 0;
  }
}
