/* Stili modernizzati per l'analizzatore di accessibilità WCAG - 2025 Edition */

:root {
  /* Nuova palette colori moderna con gradazioni */
  --primary-color: #027970;
  --primary-light: #039c91;
  --primary-dark: #015750;
  --primary-gradient: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  
  --success-color: #10b981;
  --success-light: #34d399;
  --success-dark: #059669;
  --success-gradient: linear-gradient(135deg, var(--success-light), var(--success-dark));
  
  --warning-color: #f59e0b;
  --warning-light: #fbbf24;
  --warning-dark: #d97706;
  --warning-gradient: linear-gradient(135deg, var(--warning-light), var(--warning-dark));
  
  --danger-color: #ef4444;
  --danger-light: #f87171;
  --danger-dark: #dc2626;
  --danger-gradient: linear-gradient(135deg, var(--danger-light), var(--danger-dark));
  
  --neutral-dark: #1f2937;
  --neutral-medium: #6b7280;
  --neutral-light: #f9fafb;
  --background-color: #f3f4f6;
  
  /* Ombre più sofisticate */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.05), 0 15px 30px rgba(0, 0, 0, 0.1);
  --shadow-focus: 0 0 0 3px rgba(2, 121, 112, 0.4);
  
  /* Sistema di design */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --border-radius-sm: 0.375rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 1rem;
  --border-radius-2xl: 1.5rem;
  
  /* Transizioni fluide */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  --spacing-scale: 1rem;
}

body {
  background-color: var(--background-color);
  color: var(--neutral-dark);
  font-family: var(--font-sans);
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* Header riprogettato con sfumatura e glass effect */
header {
  position: relative;
  border-radius: var(--border-radius-xl);
  padding: calc(var(--spacing-scale) * 2) var(--spacing-scale);
  background: var(--primary-gradient);
  color: white;
  margin-bottom: calc(var(--spacing-scale) * 3);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 50%);
  pointer-events: none;
}

.navbar-modern {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(var(--spacing-scale) * 0.5) 0;
}

/* Punteggio riprogettato con effetto neon e animazione */
.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  box-shadow: var(--shadow-lg), 0 0 15px rgba(2, 121, 112, 0.5);
  background: var(--primary-gradient);
  position: relative;
  margin: 0 auto;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.score-circle::before {
  content: '';
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.4);
  animation: rotate 8s linear infinite;
}

.score-circle::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.score-circle:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(2, 121, 112, 0.7);
}

.score-circle.bg-success {
  background: var(--success-gradient);
  box-shadow: var(--shadow-lg), 0 0 15px rgba(16, 185, 129, 0.5);
}

.score-circle.bg-success:hover {
  box-shadow: var(--shadow-lg), 0 0 25px rgba(16, 185, 129, 0.7);
}

.score-circle.bg-warning {
  background: var(--warning-gradient);
  box-shadow: var(--shadow-lg), 0 0 15px rgba(245, 158, 11, 0.5);
}

.score-circle.bg-warning:hover {
  box-shadow: var(--shadow-lg), 0 0 25px rgba(245, 158, 11, 0.7);
}

.score-circle.bg-danger {
  background: var(--danger-gradient);
  box-shadow: var(--shadow-lg), 0 0 15px rgba(239, 68, 68, 0.5);
}

.score-circle.bg-danger:hover {
  box-shadow: var(--shadow-lg), 0 0 25px rgba(239, 68, 68, 0.7);
}

/* Card design completamente ridisegnato con animazioni e hover */
.card {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  overflow: hidden;
  background-color: white;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding: calc(var(--spacing-scale) * 1.25);
  background-color: white;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

.card-body {
  padding: calc(var(--spacing-scale) * 1.5);
}

/* Badge moderni con effetti */
.badge {
  padding: 0.5em 1em;
  font-weight: 500;
  border-radius: 50rem;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.badge.bg-primary {
  background-color: var(--primary-color) !important;
  box-shadow: 0 2px 5px rgba(2, 121, 112, 0.3);
}

.badge.bg-success {
  background-color: var(--success-color) !important;
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3);
}

.badge.bg-danger {
  background-color: var(--danger-color) !important;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.3);
}

.badge.bg-warning {
  background-color: var(--warning-color) !important;
  color: white !important;
  box-shadow: 0 2px 5px rgba(245, 158, 11, 0.3);
}

.badge.bg-info {
  background-color: #06b6d4 !important;
  box-shadow: 0 2px 5px rgba(6, 182, 212, 0.3);
}

.badge.bg-secondary {
  background-color: var(--neutral-medium) !important;
  box-shadow: 0 2px 5px rgba(107, 114, 128, 0.3);
}

/* Bottoni completamente ridisegnati con animazioni ed effetti */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 50rem;
  font-weight: 600;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: none;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300%;
  height: 300%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.5s ease;
}

.btn:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

.btn:active {
  transform: translateY(2px);
}

.btn:focus {
  box-shadow: var(--shadow-focus);
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.btn-success {
  background: var(--success-gradient);
  color: white;
}

.btn-success:hover {
  background: linear-gradient(135deg, var(--success-dark), var(--success-color));
}

.btn-outline-secondary {
  border: 2px solid rgba(107, 114, 128, 0.2);
  color: var(--neutral-dark);
  background: white;
}

.btn-outline-secondary:hover {
  background-color: var(--neutral-light);
  color: var(--primary-color);
  border-color: rgba(2, 121, 112, 0.3);
}

/* Tabelle eleganti con design pulito */
.table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.table th {
  font-weight: 600;
  color: var(--neutral-dark);
  border-bottom: 2px solid rgba(0, 0, 0, 0.05);
  padding: 1.25rem 1rem;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.table td {
  padding: 1.25rem 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  vertical-align: middle;
}

.table-hover tbody tr {
  transition: background-color var(--transition-fast);
}

.table-hover tbody tr:hover {
  background-color: rgba(2, 121, 112, 0.05);
  cursor: pointer;
}

/* Timeline personalizzata per la pagina di caricamento */
.timeline {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 1.15rem;
  top: 0;
  height: 100%;
  width: 2px;
  background-color: rgba(2, 121, 112, 0.2);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -3rem;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background-color: white;
  border: 2px solid rgba(2, 121, 112, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-medium);
  transition: all var(--transition-normal);
}

.timeline-item.active .timeline-marker {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  box-shadow: 0 0 0 5px rgba(2, 121, 112, 0.2);
}

.timeline-item.completed .timeline-marker {
  background-color: var(--success-color);
  border-color: var(--success-color);
  color: white;
}

.timeline-content {
  padding-left: 0.5rem;
}

/* Animazioni */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s forwards;
}

/* Footer ridisegnato */
footer {
  background-color: white;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--neutral-medium);
  position: relative;
  z-index: 10;
}

footer p {
  margin-bottom: 0;
}

footer a {
  color: var(--primary-color);
  transition: color var(--transition-fast);
}

footer a:hover {
  color: var(--primary-dark);
}

/* Media Queries per stampa */
@media print {
  body {
    background-color: white;
    font-size: 12pt;
  }
  
  .container {
    max-width: 100%;
    width: 100%;
    padding: 0;
  }
  
  .btn, footer, .no-print {
    display: none !important;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .score-circle {
    box-shadow: none;
    border: 3px solid currentColor;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  
  .badge {
    box-shadow: none;
    border: 1px solid currentColor;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  
  header {
    background: #f3f4f6 !important;
    color: #000 !important;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* Responsive */
@media (max-width: 767.98px) {
  :root {
    --spacing-scale: 0.75rem;
  }
  
  h1 {
    font-size: 1.75rem !important;
  }
  
  .score-circle {
    width: 100px;
    height: 100px;
    font-size: 1.75rem;
  }
  
  .score-circle::before {
    width: 92px;
    height: 92px;
  }
  
  .score-circle::after {
    width: 84px;
    height: 84px;
  }
  
  .table th, .table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  .navbar-modern {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Indicatori di stato personalizzati */
.status-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.status-indicator.critical {
  background-color: var(--danger-color);
  box-shadow: 0 0 5px var(--danger-color);
}

.status-indicator.serious {
  background-color: var(--warning-color);
  box-shadow: 0 0 5px var(--warning-color);
}

.status-indicator.moderate {
  background-color: #06b6d4;
  box-shadow: 0 0 5px #06b6d4;
}

.status-indicator.minor {
  background-color: var(--neutral-medium);
  box-shadow: 0 0 5px var(--neutral-medium);
}

/* Classi di utilità */
.glassmorphism {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Toast di notifica */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition-normal);
}

.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Animazioni aggiuntive */
.animated-alert {
    animation: slideIn 0.4s forwards;
}

.fade-out {
    animation: fadeOut 0.3s forwards;
}

.pulse-animation {
    animation: pulse 1.5s infinite;
}

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

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Stili per la ricerca */
.search-highlight {
    background-color: rgba(245, 158, 11, 0.3);
    padding: 0 2px;
    border-radius: 2px;
}

/* Effetto di transizione del contenuto */
body.content-loaded .fade-in {
    animation-play-state: running;
}

/* Personalizzazione validazione campi */
.form-control.is-valid {
    border-color: var(--success-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2310b981' class='bi bi-check-circle-fill' viewBox='0 0 16 16'%3E%3Cpath d='M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z'/%3E%3C/svg%3E");
}

.form-control.is-invalid {
    border-color: var(--danger-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23ef4444' class='bi bi-exclamation-circle-fill' viewBox='0 0 16 16'%3E%3Cpath d='M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4m.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2'/%3E%3C/svg%3E");
}

/* Personalizzazione tabella */
.table-hover tr {
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.table-hover tr:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.no-results-message {
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.025);
    border-radius: var(--border-radius-md);
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Stili per i badge nell'header */
.header-badges .badge {
  background-color: white !important;
  color: var(--primary-color) !important;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border: none;
}

.header-badges .badge i {
  color: var(--primary-color);
}

/* Stile specifico per il pulsante Analizza */
.analyze-btn {
  background: var(--primary-gradient);
  color: white;
  font-weight: 700;
  padding: 1rem 2rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
}

.analyze-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(2, 121, 112, 0.3);
} 