/* --- Form Layout & Card --- */
.form-card {
  background: rgba(11, 27, 61, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  max-width: 800px;
  margin: 0 auto 50px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 650px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group label i {
  color: var(--accent-lime);
}

.form-group label .required {
  color: var(--action-orange);
}

.form-control {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 12px 16px;
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-blue);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 10px rgba(0, 180, 216, 0.3);
}

.form-control option {
  background: #0b1b3d;
  color: #ffffff;
}

.field-check-wrap {
  opacity: 0;
  position: absolute;
  top: -9999px;
  left: -9999px;
  height: 0;
  width: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* Radio buttons / Card Selezione Percorso */
.radio-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-top: 5px;
}

.radio-card {
  position: relative;
}

.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.radio-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.radio-card input[type="radio"]:checked+.radio-label {
  border-color: var(--accent-lime);
  background: rgba(162, 255, 0, 0.1);
}

.radio-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent-lime);
}

.radio-desc {
  font-size: 0.85rem;
  color: #cccccc;
  margin-top: 4px;
}

/* Checkbox */
/* Styling specifico per il Checkbox del Regolamento */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 15px 0;
  color: #dddddd;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
  /* Impedisce al checkbox di rimpicciolirsi */
  accent-color: var(--action-orange);
  cursor: pointer;
}

/* Reset del layout per questo specifico label */
.checkbox-group label {
  display: inline;
  /* Ripristina la normale scorrevolezza del testo */
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.5;
  cursor: pointer;
}

/* Link Regolamento scorrevole nel testo */
.checkbox-group label a {
  color: var(--accent-lime);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.checkbox-group label a:hover {
  opacity: 0.8;
}

/* Asterisco obbligatorio attaccato alla fine del testo */
.checkbox-group label .required {
  color: var(--action-orange);
  font-weight: 700;
  margin-left: 3px;
}

/* Messaggio di Feedback */
.form-feedback {
  display: none;
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: 600;
  text-align: center;
}

.form-feedback.success {
  display: block;
  background: rgba(40, 167, 69, 0.2);
  border: 1px solid #28a745;
  color: #28a745;
}

.form-feedback.error {
  display: block;
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid #dc3545;
  color: #dc3545;
}

/* Compensazione dello scroll per l'header fisso */
.form-group,
.form-control,
.form-card {
  scroll-margin-top: 100px;
}