body {
  font-family: Arial, Verdana, sans-serif;
  background: #f5f7fa;
  margin: 0;
  padding: 20px;
  letter-spacing: 0.04em;
}

.container {
  width: 95%;        /* Quasi tutta la larghezza sui cellulari */
  max-width: 1100px; /* Non supera mai questa larghezza sui monitor grandi */
  margin: auto;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header {
  text-align: center;
  margin-bottom: 30px;
}

.subtitle {
  font-size: 1.1em;
}

.switch {
  display: inline-block;
  margin-top: 10px;
}

h1, h2, h3 {
  color: #2e7d32;
}

p, li {
  line-height: 1.9;
  font-size: 1.05em;
}

.section-button {
  width: 100%;
  padding: 15px;
  font-size: 1.2em;
  background: #e8f5e9;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left; /* Assicura che il testo del bottone sia a sinistra */
}

.section-button:focus {
  outline: 3px solid #ff9800;
}

.section-content {
  display: none;
  padding: 20px;
  border: 1px solid #e8f5e9;
  border-top: none;
}

.section-content.active {
  display: block;
}

.arrow {
  display: inline-block;
  float: right;
  transition: transform 0.3s ease;
  font-size: 0.8em;
  margin-top: 5px;
}

.arrow.rotated {
  transform: rotate(180deg);
}

.example {
  background: #f1f8e9;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
}

.formula {
  background: white;
  padding: 12px;
  margin: 10px 0;
  border-left: 4px solid #4caf50;
}

.highlight {
  background: #fff59d;
  padding: 2px 6px;
}

.result {
  font-weight: bold;
}

/* --- REGOLE PER LA STAMPA --- */
@media print {
  /* Nasconde i bottoni di navigazione in alto e in fondo */
  nav, 
  .switch,
  p[style*="justify-content: center"],
  button:not(.section-button) {
    display: none !important;
  }

  /* Nasconde le freccette dentro i bottoni delle sezioni */
  .arrow {
    display: none !important;
  }

  /* Assicura che tutto il contenuto sia visibile su carta */
  .section-content {
    display: block !important;
    border: none !important;
    padding: 10px 0 !important;
  }

  /* Evita di spezzare gli esempi tra due pagine diverse */
  .example, .formula, .section {
    page-break-inside: avoid;
  }

  body {
    background: white;
    padding: 0;
  }
}

/* Accessibilità per chi preferisce meno animazioni */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
.feedback-box {
  background: #e8f5e9;
  padding: 20px;
  border-radius: 8px;
  margin: 30px 0 20px 0;
  border-left: 4px solid #2e7d32;
  text-align: center;
}

.feedback-button {
  display: inline-block;
  background: #2e7d32;
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  margin: 5px;
}

.feedback-note {
  font-size: 0.9em;
  color: #666;
  margin-top: 10px;
}
