/* ==========================================================================
   QUIZZY BOSS - style.css
   Design moderno e minimalista (ispirato al tema Astra)
   Mobile-first, responsive, con dark mode opzionale.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variabili CSS (tema)
   -------------------------------------------------------------------------- */
:root {
  /* Palette colori (da brief) */
  --primary-color: #2563eb;   /* Blu (principale) */
  --primary-dark: #1d4ed8;    /* Blu scuro (hover) */
  --secondary-color: #10b981; /* Verde (successo) */
  --accent-color: #f59e0b;    /* Arancione (accento) */
  --error-color: #ef4444;     /* Rosso (errore) */

  --text-dark: #1f2937;       /* Grigio scuro (testo) */
  --text-light: #6b7280;      /* Grigio chiaro */
  --bg-light: #f9fafb;        /* Sfondo chiaro */
  --bg-white: #ffffff;        /* Bianco */
  --border-color: #e5e7eb;    /* Bordi */

  /* Tipografia */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Poppins', var(--font-body);

  /* Spaziature e raggi */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);

  --container: 1100px;
  --transition: 0.25s ease;
}

/* Dark mode (toggle via data-theme sull'elemento <html>) */
[data-theme="dark"] {
  --text-dark: #f3f4f6;
  --text-light: #9ca3af;
  --bg-light: #111827;
  --bg-white: #1f2937;
  --border-color: #374151;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------------------
   2. Reset e base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition), color var(--transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
}

h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { color: var(--text-light); }

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Accessibilità: focus visibile */
:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary-color);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   3. Pulsanti
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.75rem;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform var(--transition), background-color var(--transition),
              box-shadow var(--transition), border-color var(--transition);
  min-height: 48px; /* touch friendly */
  text-align: center;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--primary-dark);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: #fff;
}
.btn-secondary:hover {
  background-color: #0ea672;
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}
.btn-outline:hover {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-block { width: 100%; }

/* --------------------------------------------------------------------------
   4. Header e navigazione
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  max-width: var(--container);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-dark);
}
.brand:hover { color: var(--text-dark); }
.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}
.brand-name span { color: var(--primary-color); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-menu a {
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.98rem;
}
.nav-menu a:hover { color: var(--primary-color); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  width: 42px; height: 42px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition), transform var(--transition);
}
.theme-toggle:hover { transform: rotate(20deg); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  width: 26px;
  height: 3px;
  background-color: var(--text-dark);
  border-radius: 3px;
  transition: var(--transition);
}
.hamburger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   5. Hero (homepage)
   -------------------------------------------------------------------------- */
.hero {
  text-align: center;
  padding: 3.5rem 0 2.5rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.08), transparent 50%),
    radial-gradient(circle at 80% 0%, rgba(245, 158, 11, 0.08), transparent 45%);
}
.hero h1 { margin-bottom: 1rem; }
.hero .lead {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 1.75rem;
}
.hero-badge {
  display: inline-block;
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

/* Filtri categoria */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: 2rem 0 1rem;
}
.filter-btn {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition);
}
.filter-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
.filter-btn.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

/* --------------------------------------------------------------------------
   6. Griglia e card quiz
   -------------------------------------------------------------------------- */
.section { padding: 2.5rem 0; }
.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-subtitle {
  text-align: center;
  margin-bottom: 2rem;
}

.quiz-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.quiz-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.quiz-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.quiz-card-banner {
  height: 130px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #fff;
}
.quiz-card[data-category="calcio"] .quiz-card-banner {
  background: linear-gradient(135deg, #2563eb, #10b981);
}
.quiz-card[data-category="curiosita"] .quiz-card-banner {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}
.quiz-card[data-category="mix"] .quiz-card-banner {
  background: linear-gradient(135deg, #8b5cf6, #2563eb);
}

.quiz-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.quiz-card-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}
.tag-category {
  background-color: rgba(37, 99, 235, 0.12);
  color: var(--primary-color);
}
.tag-difficulty {
  background-color: rgba(245, 158, 11, 0.15);
  color: #b45309;
}
.quiz-card h3 { margin-bottom: 0.5rem; }
.quiz-card p { font-size: 0.95rem; margin-bottom: 1rem; flex: 1; }

.quiz-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
}
.best-score {
  color: var(--secondary-color);
  font-weight: 600;
}

.loading-state, .empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
  grid-column: 1 / -1;
}
.spinner {
  width: 42px; height: 42px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   7. Pagina Quiz
   -------------------------------------------------------------------------- */
.quiz-wrap {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1.25rem;
}

.quiz-screen { display: none; }
.quiz-screen.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Schermata intro */
.quiz-intro {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.quiz-intro h1 { margin-bottom: 0.75rem; }
.quiz-intro p { margin-bottom: 1.5rem; }
.quiz-intro-info {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}
.quiz-intro-info .info-item { text-align: center; }
.quiz-intro-info .info-item strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--primary-color);
}
.quiz-intro-info .info-item span { font-size: 0.85rem; color: var(--text-light); }

/* Schermata gioco */
.quiz-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-weight: 600;
  font-family: var(--font-heading);
}
.quiz-progress-label { color: var(--text-light); font-size: 0.9rem; }
.quiz-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.quiz-timer.warning { color: var(--error-color); border-color: var(--error-color); }

.progress-bar {
  width: 100%;
  height: 10px;
  background-color: var(--border-color);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.75rem;
}
.progress-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.question-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}
.question-text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.35;
}
.question-image {
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  width: 100%;
}

.options { display: grid; gap: 0.85rem; }
.option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  text-align: left;
  background-color: var(--bg-light);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  font-size: 1.02rem;
  font-family: var(--font-body);
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
  min-height: 56px;
}
.option:hover:not(:disabled) {
  border-color: var(--primary-color);
  background-color: rgba(37, 99, 235, 0.05);
}
.option:disabled { cursor: default; }
.option-key {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 8px;
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: var(--font-heading);
}
.option.correct {
  border-color: var(--secondary-color);
  background-color: rgba(16, 185, 129, 0.12);
}
.option.correct .option-key { background-color: var(--secondary-color); color: #fff; border-color: var(--secondary-color); }
.option.wrong {
  border-color: var(--error-color);
  background-color: rgba(239, 68, 68, 0.1);
}
.option.wrong .option-key { background-color: var(--error-color); color: #fff; border-color: var(--error-color); }

.explanation {
  margin-top: 1.5rem;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-light);
  border-left: 4px solid var(--primary-color);
  display: none;
}
.explanation.show { display: block; animation: fadeIn 0.3s ease; }
.explanation strong { color: var(--text-dark); display: block; margin-bottom: 0.25rem; }
.explanation p { color: var(--text-light); font-size: 0.95rem; }

.quiz-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

/* Schermata risultato */
.result-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.result-emoji { font-size: 4rem; margin-bottom: 0.5rem; line-height: 1; }
.result-score {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
  margin: 0.5rem 0;
}
.result-rank { font-size: 1.5rem; margin-bottom: 0.5rem; }
.result-message { margin-bottom: 1.5rem; }
.result-newbest {
  display: inline-block;
  background-color: rgba(16, 185, 129, 0.12);
  color: var(--secondary-color);
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.share-section { margin: 1.75rem 0; }
.share-title { font-size: 0.9rem; color: var(--text-light); margin-bottom: 0.85rem; }
.share-buttons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.share-btn {
  width: 50px; height: 50px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  transition: transform var(--transition), opacity var(--transition);
}
.share-btn:hover { transform: translateY(-3px); }
.share-whatsapp { background-color: #25d366; }
.share-facebook { background-color: #1877f2; }
.share-twitter  { background-color: #000000; }
.share-copy     { background-color: var(--text-light); }

.result-buttons {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* --------------------------------------------------------------------------
   8. Pagine di contenuto (about, privacy, ecc.)
   -------------------------------------------------------------------------- */
.page-header {
  text-align: center;
  padding: 3rem 0 1.5rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.07), transparent 60%);
}
.content {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 800px;
  margin: 0 auto 3rem;
  box-shadow: var(--shadow-sm);
}
.content h2 { margin: 2rem 0 0.75rem; }
.content h2:first-child { margin-top: 0; }
.content h3 { margin: 1.5rem 0 0.5rem; }
.content p { margin-bottom: 1rem; }
.content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.content ul li { color: var(--text-light); margin-bottom: 0.4rem; }
.content .updated { font-size: 0.85rem; color: var(--text-light); font-style: italic; }

/* Form di contatto */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  color: var(--text-dark);
}
.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  background-color: var(--bg-light);
  color: var(--text-dark);
  transition: border-color var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}
textarea.form-control { resize: vertical; min-height: 140px; }

/* --------------------------------------------------------------------------
   9. AdSense placeholder
   -------------------------------------------------------------------------- */
.ad-slot {
  margin: 2rem auto;
  max-width: var(--container);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-white);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-light);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--bg-white);
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-bottom: 1.75rem;
}
.footer-col h4 { margin-bottom: 0.75rem; font-size: 1rem; }
.footer-col p { font-size: 0.9rem; }
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col ul li a { color: var(--text-light); font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--primary-color); }
.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   11. Cookie banner & Modal
   -------------------------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background-color: var(--bg-white);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
  padding: 1.25rem;
  transform: translateY(110%);
  transition: transform 0.4s ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cookie-text { flex: 1; min-width: 250px; font-size: 0.9rem; }
.cookie-buttons { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cookie-buttons .btn { padding: 0.6rem 1.1rem; font-size: 0.9rem; min-height: 40px; }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background-color: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.modal-overlay.show { display: flex; animation: fadeIn 0.25s ease; }
.modal {
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.modal h3 { margin-bottom: 0.75rem; }
.modal p { margin-bottom: 1.5rem; }
.modal-buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   12. Confetti
   -------------------------------------------------------------------------- */
.confetti {
  position: fixed;
  top: -10px;
  width: 10px;
  height: 10px;
  z-index: 400;
  pointer-events: none;
  border-radius: 2px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

/* Toast (copia link) */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: var(--text-dark);
  color: var(--bg-white);
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 500;
  font-size: 0.95rem;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
  .quiz-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
@media (min-width: 1024px) {
  .quiz-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Menu mobile */
@media (max-width: 767px) {
  .hamburger { display: flex; }
  .nav-menu {
    position: fixed;
    top: 65px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-menu.is-open { max-height: 400px; }
  .nav-menu a {
    width: 100%;
    padding: 0.85rem 1.5rem;
  }
}

/* Riduzione movimento (accessibilità) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .confetti { display: none !important; }
}
