/* DEPURA FACILE - Form Styles */
/* Stili dedicati per il form progressivo */

/* Form Section */
.form-section h2 {
  font-size: 2.5rem;
  color: #005a9c;
  text-shadow: 0 2px 5px rgba(255, 255, 255, 0.071);
  margin-bottom: 1.5rem;
}

.form-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 800px;
}

/* Navigation Arrows */
.form-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: #1e3a8a;
  border: none;
  border-radius: 0;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.form-nav-arrow:hover {
  background: #1e40af;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.form-nav-arrow:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  opacity: 0.3;
  transform: translateY(-50%);
}

.form-nav-arrow:disabled:hover {
  transform: translateY(-50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.form-nav-prev {
  left: -80px;
}

.form-nav-next {
  right: -80px;
}

/* Form Container */
#progressive-form {
  width: 600px;
  background: white;
  padding: 32px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Progress Bar */
.progress-bar-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 1.5rem auto;
  max-width: 300px;
}

.progress-bar-track {
  height: 15px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 336px;
  position: relative;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background-color: #007bff;
  border-radius: 12px;
  transition: width 0.4s ease;
  position: relative;
}

.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: progressShine 2s infinite;
}

.progress-percentage {
  background-color: #007bff;
  color: white;
  font-size: 18px;
  font-weight: bold;
  width: 60px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  min-width: 60px;
}

@keyframes progressShine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Form Steps */
.form-step {
  display: none;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.4s ease;
}

.form-step.active-step {
  display: block;
  opacity: 1;
  transform: translateX(0);
  animation: slideInFromRight 0.4s ease forwards;
}

.form-step.step-exit {
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.3s ease;
}

@keyframes slideInFromRight {
  0% {
    opacity: 0;
    transform: translateX(20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutToLeft {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-20px);
  }
}

/* Form Questions */
.form-question {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: bold;
}

/* Radio Groups */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.radio-group label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 1rem;
  border: none;
  border-radius: 0;
  transition: all 0.2s ease;
  background: transparent;
}

.radio-group label:hover {
  background: transparent;
}

.radio-group input[type="radio"] {
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid #e5e7eb;
  background-color: white;
  margin-right: 16px;
  transition: all 0.3s ease;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
}

.radio-group input[type="radio"]:hover {
  border-color: #007bff;
  transform: scale(1.05);
}

.radio-group input[type="radio"]:checked {
  border-color: #007bff;
  background-color: white;
}

.radio-group input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  background-color: #007bff;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: radioCheck 0.3s ease forwards;
}

@keyframes radioCheck {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.radio-group label::before {
  display: none;
}

/* Validation Message */
.validation-message {
  background-color: transparent;
  color: #dc2626;
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  margin-top: 1rem;
  padding: 0.5rem;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.validation-message.show {
  opacity: 1;
  transform: translateY(0);
}

/* Stili per il Form di Contatto Finale */
.hidden {
  display: none;
}

#contact-form-container {
  display: none; /* Inizialmente completamente nascosto per eliminare spazio */
  gap: 2rem;
  width: 100%;
  max-width: 900px;
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

#contact-form-container.visible {
  opacity: 1;
  transform: translateY(0);
}

.contact-image-column {
  flex: 1;
  text-align: center;
}

.contact-operator-image {
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.contact-info-text {
  font-size: 1.32rem;
  color: #333;
  line-height: 1.6;
  font-family: "Times New Roman", Times, serif;
}

.contact-form-column {
  flex: 1.5;
}

.contact-form-column h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

#final-contact-form .form-group {
  margin-bottom: 1rem;
}

#final-contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #333;
}

#final-contact-form input[type="text"],
#final-contact-form input[type="tel"],
#final-contact-form select {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

.form-group-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.form-group-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
}

.form-group-checkbox label {
  font-weight: normal;
}

.form-group-checkbox a {
  color: #007bff;
  text-decoration: none;
}

.form-group-checkbox a:hover {
  text-decoration: underline;
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-top: 1rem;
}

.submit-btn:hover {
  background: #218838;
}

.submit-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  opacity: 0.5;
}

/* Responsive Design */

/* Tablet - 769px to 1024px */
@media (max-width: 1024px) and (min-width: 769px) {
  #progressive-form {
    width: 500px;
    padding: 28px;
  }

  .form-nav-arrow {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }

  .form-nav-prev {
    left: -65px;
  }

  .form-nav-next {
    right: -65px;
  }
}

/* Mobile Navigation Container */
.mobile-navigation {
  display: none;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  padding: 0 1rem;
}

/* Mobile Large - 481px to 768px */
@media (max-width: 768px) {
  /* Nascondi frecce desktop su mobile */
  .desktop-nav {
    display: none !important;
  }

  /* Mostra navigazione mobile */
  .mobile-navigation {
    display: flex;
  }

  /* Form ottimizzato per mobile - più spazio disponibile */
  #progressive-form {
    width: calc(100vw - 4rem);
    max-width: 500px;
    padding: 24px;
  }

  .form-container {
    max-width: 100%;
    position: static; /* Rimuove posizionamento relativo */
  }

  /* Frecce mobile - posizionamento statico */
  .mobile-nav {
    position: static;
    transform: none;
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    border-radius: 50%;
    background: #1e3a8a;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .mobile-nav:hover {
    background: #1e40af;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  }

  .mobile-nav:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
  }

  .mobile-nav:disabled:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  /* Ottimizzazione sezione form - riduce altezza eccessiva */
  .form-section {
    min-height: auto;
    padding: 1.5rem 1rem 0.5rem 1rem; /* Padding inferiore drasticamente ridotto */
    flex: none; /* Rimuove flex grow */
  }

  #contact-form-container {
    flex-direction: column;
  }
}

/* Mobile Medium - 361px to 480px */
@media (max-width: 480px) {
  /* Form ottimizzato per mobile medium */
  #progressive-form {
    width: calc(100vw - 3rem);
    max-width: 400px;
    padding: 20px;
  }

  /* Frecce mobile più piccole */
  .mobile-nav {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }

  .mobile-navigation {
    gap: 1.5rem;
    margin-top: 1rem;
  }

  /* Ottimizzazione sezione form */
  .form-section {
    padding: 1.5rem 0.75rem;
  }

  .form-question {
    font-size: 1.3rem;
  }

  .radio-group label {
    font-size: 1.1rem;
    padding: 0.8rem;
  }
}

/* Mobile Small - 320px to 360px */
@media (max-width: 360px) {
  /* Form ottimizzato per mobile small */
  #progressive-form {
    width: calc(100vw - 2rem);
    max-width: 320px;
    padding: 16px;
  }

  /* Frecce mobile ancora più piccole */
  .mobile-nav {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .mobile-navigation {
    gap: 1rem;
    margin-top: 1rem;
  }

  /* Ottimizzazione sezione form */
  .form-section {
    padding: 1rem 0.5rem;
  }

  .form-question {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  .radio-group label {
    font-size: 1rem;
    padding: 0.7rem;
  }

  .radio-group {
    gap: 0.8rem;
  }

  /* Progress bar più compatta */
  .progress-bar-container {
    margin-bottom: 1rem;
  }

  .progress-bar-track {
    width: 280px;
  }
}
