:root {
  --primary: #003366;
  --primary-2: #0066CC;
  --text: #1f2937;
  --muted: #6b7280;
  --surface: #ffffff;
  --shadow-strong: 0 20px 40px rgba(0,0,0,.08);
  --shadow: 0 12px 35px rgba(0,0,0,.15);
  --radius: 16px;
}

* {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

body {
  color: var(--text);
  background: #f7f9fc;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.landing-navbar {
  background: #fff !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.landing-navbar .navbar-brand {
  color: var(--primary) !important;
  font-weight: 700;
}

.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  padding-bottom: 8px;
}

.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Stili per sezione statistiche */
.statistiche-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0,0,0,0.05);
  background: rgba(255,255,255,1);
  backdrop-filter: blur(10px);
}

.statistiche-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.stats-number {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: #333 !important;
}

.stats-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.5rem;
}

.progress-custom {
  height: 20px;
  background-color: #f8f9fa;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-bar-animated {
  animation: progress-fill 2s ease-in-out;
}

@keyframes progress-fill {
  0% { width: 0%; }
  100% { width: var(--target-width); }
}

.province-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.province-item:last-child {
  border-bottom: none;
}

.stats-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  margin-right: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .stats-number {
    font-size: 2rem;
  }
  
  .statistiche-card {
    margin-bottom: 1rem;
  }
}
  opacity: 0.1;
}

.particles div { will-change: transform; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.hero-content { min-height: calc(100vh - 80px); }

.card-glass {
  background: rgba(255,255,255,1);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,.08);
  border: 0;
}

.card-glass .card-header {
  border-radius: 24px 24px 0 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2)) !important;
  border: none !important;
  border-radius: var(--radius);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow) !important;
}

.btn-outline-primary,
.btn-outline-info,
.btn-outline-success {
  border-radius: var(--radius);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #333;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border: 1px solid #dee2e6;
  transition: transform .25s ease;
}
.feature-icon:hover { transform: scale(1.06); }

.document-list .list-group-item {
  background: transparent;
  border: none;
  padding: 12px 0;
}

.brand-logo {
  background: rgba(255,255,255,0.9);
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.hero-title {
  text-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.hero-subtitle {
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

@media (hover: hover) {
  .card { transition: transform .3s ease; }
  .card:hover { transform: translateY(-4px); }
}

@media (max-width: 576px) {
  .display-3 { font-size: 2.25rem; }
  .display-6 { font-size: 1.5rem; }
}

/* Focus accessibile */
:focus-visible { outline: 3px solid #7aa7ff; outline-offset: 2px; }

/* Riduzione motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Dark mode base */
/* Tema scuro automatico SOLO se l'utente non ha scelto manualmente */
@media (prefers-color-scheme: dark) {
  body:not([data-theme]) { background: #0f172a; color: #e5e7eb; }
  body:not([data-theme]) .landing-navbar { background: #0b1220 !important; box-shadow: 0 1px 0 rgba(255,255,255,.06); }
  body:not([data-theme]) .landing-navbar .navbar-brand { color: #e5e7eb !important; }
  body:not([data-theme]) .card-glass { background: rgba(255,255,255,.08); box-shadow: 0 20px 40px rgba(0,0,0,.45); color: #e5e7eb; }
  body:not([data-theme]) .text-muted { color: #cbd5e1 !important; }
  body:not([data-theme]) .text-primary { color: #60a5fa !important; }
}

/* Tema scuro manuale */
body[data-theme="dark"] { background: #0f172a; color: #e5e7eb; }
body[data-theme="dark"] .landing-navbar { background: #0b1220 !important; box-shadow: 0 1px 0 rgba(255,255,255,.06); }
body[data-theme="dark"] .landing-navbar .navbar-brand { color: #e5e7eb !important; }
body[data-theme="dark"] .card-glass { background: rgba(255,255,255,.08); box-shadow: 0 20px 40px rgba(0,0,0,.45); color: #e5e7eb; }
body[data-theme="dark"] .text-muted { color: #cbd5e1 !important; }
body[data-theme="dark"] .text-primary { color: #60a5fa !important; }

/* Toggle tema */
.theme-toggle {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 8px 10px;
  border-radius: 10px;
}
.theme-toggle:hover { background: rgba(0,0,0,.06); }
body[data-theme="dark"] .theme-toggle:hover { background: rgba(255,255,255,.08); }


