/* ============================================================================
   WIZARD LEAD CAPTURE AMS WEB - CSS
   Design ottimizzato per massima conversione
   ============================================================================ */

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colori Brand AMS */
  --ams-red: #E85D75;
  --ams-red-hover: #d64d65;
  --ams-red-light: rgba(232, 93, 117, 0.1);
  --ams-dark: #1a2332;
  --ams-white: #ffffff;
  --ams-light-gray: #f8f9fa;
  --ams-gray: #6b7280;
  --ams-border: #e5e7eb;
  --ams-green: #4ade80;
  --ams-blue: #3b82f6;
  
  /* Tipografia */
  --font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Spaziatura */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 8px 20px rgba(232, 93, 117, 0.2);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ams-dark);
  background: var(--ams-light-gray);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ============================================================================
   HEADER
   ============================================================================ */

.wizard-header {
  background: var(--ams-white);
  border-bottom: 1px solid var(--ams-border);
  padding: var(--space-lg) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo svg text {
  font-family: var(--font-family);
}

.phone-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--ams-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: var(--space-sm) var(--space-lg);
  border: 2px solid var(--ams-red);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.phone-link:hover {
  background: var(--ams-red);
  color: var(--ams-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.wizard-main {
  padding: var(--space-3xl) 0;
}

.hero-section {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.hero-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--ams-dark);
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--ams-gray);
  margin-bottom: var(--space-xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.badge {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ams-dark);
}

.badge svg {
  flex-shrink: 0;
}

/* ============================================================================
   PROGRESS BAR
   ============================================================================ */

.progress-container {
  background: var(--ams-white);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-xl);
}

.progress-bar {
  height: 6px;
  background: var(--ams-light-gray);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ams-red) 0%, #ff6b85 100%);
  border-radius: 3px;
  transition: width var(--transition-slow);
  width: 25%;
}

.progress-text {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ams-gray);
}

/* ============================================================================
   WIZARD STEPS
   ============================================================================ */

.wizard-content {
  background: var(--ams-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: var(--space-2xl);
  min-height: 600px;
}

.wizard-step {
  display: none;
  animation: fadeIn var(--transition-base);
}

.wizard-step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--ams-dark);
  margin-bottom: var(--space-md);
  text-align: center;
}

.step-subtitle {
  font-size: 1.05rem;
  color: var(--ams-gray);
  text-align: center;
  margin-bottom: var(--space-2xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================================
   OPTIONS GRID (Step 1)
   ============================================================================ */

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.option-card {
  border: 2px solid var(--ams-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--ams-white);
  position: relative;
}

.option-card:hover {
  border-color: var(--ams-red);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.option-card.selected {
  border-color: var(--ams-red);
  background: var(--ams-red-light);
  box-shadow: var(--shadow-md);
}

.option-card.selected::after {
  content: '✓';
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 28px;
  height: 28px;
  background: var(--ams-red);
  color: var(--ams-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.option-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
}

.option-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ams-dark);
  margin-bottom: var(--space-xs);
}

.option-description {
  font-size: 0.9rem;
  color: var(--ams-gray);
  line-height: 1.5;
}

/* ============================================================================
   FORM ELEMENTS
   ============================================================================ */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ams-dark);
  margin-bottom: var(--space-xs);
}

.form-group input,
.form-group select,
.form-group textarea {
  border: 2px solid var(--ams-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: var(--font-family);
  transition: all var(--transition-fast);
  background: var(--ams-white);
  color: var(--ams-dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--ams-red);
  box-shadow: 0 0 0 3px var(--ams-red-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #9ca3af;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.char-count {
  font-size: 0.85rem;
  color: var(--ams-gray);
  text-align: right;
  margin-top: var(--space-xs);
}

/* Radio Groups */
.radio-group {
  display: grid;
  gap: var(--space-md);
}

.radio-group.horizontal {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.radio-card {
  position: relative;
  cursor: pointer;
}

.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-content {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 2px solid var(--ams-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  background: var(--ams-white);
}

.radio-card:hover .radio-content {
  border-color: var(--ams-red);
  box-shadow: var(--shadow-sm);
}

.radio-card input:checked + .radio-content {
  border-color: var(--ams-red);
  background: var(--ams-red-light);
  box-shadow: var(--shadow-sm);
}

.radio-icon {
  font-size: 1.5rem;
}

.radio-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ams-dark);
}

/* Sector Grid - Layout responsive settori */
.sector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 colonne desktop */
  gap: var(--space-md);
}

@media (max-width: 1024px) {
  .sector-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 colonne tablet */
  }
}

@media (max-width: 768px) {
  .sector-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 colonne mobile */
  }
}

/* Radio Pills */
.radio-pill {
  position: relative;
  cursor: pointer;
}

.radio-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-pill span {
  display: block;
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--ams-border);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  transition: all var(--transition-base);
  background: var(--ams-white);
  color: var(--ams-dark);
  white-space: nowrap;
}

.radio-pill:hover span {
  border-color: var(--ams-red);
}

.radio-pill input:checked + span {
  border-color: var(--ams-red);
  background: var(--ams-red);
  color: var(--ams-white);
}

/* ============================================================================
   TIMING CARDS (Step 3)
   ============================================================================ */

.timing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.timing-card {
  border: 2px solid var(--ams-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--ams-white);
  text-align: center;
}

.timing-card:hover {
  border-color: var(--ams-red);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.timing-card.selected {
  border-color: var(--ams-red);
  background: var(--ams-red-light);
  box-shadow: var(--shadow-md);
}

.timing-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.timing-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ams-dark);
  margin-bottom: var(--space-sm);
}

.timing-description {
  font-size: 0.9rem;
  color: var(--ams-gray);
  line-height: 1.5;
}

/* ============================================================================
   PRIVACY & SOCIAL PROOF
   ============================================================================ */

.privacy-section {
  background: var(--ams-light-gray);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xl);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--ams-gray);
  line-height: 1.6;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--ams-red);
}

.checkbox-label a {
  color: var(--ams-red);
  text-decoration: underline;
}

.social-proof {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  padding: var(--space-lg);
  background: var(--ams-light-gray);
  border-radius: var(--radius-md);
}

.proof-item {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ams-dark);
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.step-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-top: var(--space-2xl);
}

.btn-primary,
.btn-secondary {
  padding: 1rem 2.5rem;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-width: 180px;
}

.btn-primary {
  background: var(--ams-red);
  color: var(--ams-white);
  box-shadow: 0 4px 12px rgba(232, 93, 117, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: var(--ams-red-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-primary:disabled {
  background: var(--ams-gray);
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  color: var(--ams-gray);
  border: 2px solid var(--ams-border);
}

.btn-secondary:hover {
  border-color: var(--ams-dark);
  color: var(--ams-dark);
  transform: translateY(-2px);
}

.btn-loader {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.step-hint {
  width: 100%;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ams-gray);
  margin-top: var(--space-sm);
}

/* ============================================================================
   TOAST NOTIFICATION
   ============================================================================ */

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--ams-dark);
  color: var(--ams-white);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transform: translateX(400px);
  transition: transform var(--transition-base);
}

.toast.show {
  transform: translateX(0);
}

.toast.error {
  background: #dc2626;
}

.toast.success {
  background: #16a34a;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.toast-icon {
  font-size: 1.2rem;
}

.toast-message {
  font-size: 0.95rem;
  font-weight: 500;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
  .wizard-main {
    padding: var(--space-xl) 0;
  }
  
  .wizard-content {
    padding: var(--space-lg);
  }
  
  .hero-section {
    margin-bottom: var(--space-xl);
  }
  
  .options-grid {
    grid-template-columns: 1fr;
  }
  
  .timing-grid {
    grid-template-columns: 1fr;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .trust-badges {
    flex-direction: column;
    align-items: center;
  }
  
  .step-actions {
    flex-direction: column-reverse;
    width: 100%;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
  
  .phone-link {
    font-size: 0.85rem;
    padding: var(--space-xs) var(--space-md);
  }
  
  .social-proof {
    flex-direction: column;
    text-align: center;
  }
  
  .radio-group.horizontal {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }
  
  .wizard-content {
    padding: var(--space-md);
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .step-title {
    font-size: 1.25rem;
  }
  
  .option-card {
    padding: var(--space-md);
  }
  
  .timing-card {
    padding: var(--space-lg);
  }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 3px solid var(--ams-red);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .option-card,
  .timing-card,
  .radio-content {
    border-width: 3px;
  }
}
