/* Stile per Questionario Integrali Indefiniti - Versione DSA */
body {
  font-family: Arial, Verdana, sans-serif;
  background: #f5f7fa;
  margin: 0;
  padding: 20px;
  letter-spacing: 0.04em;
  line-height: 1.9;
}

.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 */
.header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e8f5e9;
}

.header h1 {
  color: #2e7d32;
  margin-bottom: 10px;
  font-size: 2em;
}

.subtitle {
  font-size: 1.1em;
  color: #666;
  margin-top: 10px;
}

/* SEZIONI ESPANDIBILI */
.section {
  margin-bottom: 20px;
}

.section h2 {
  margin: 0;
  padding: 0;
  font-size: 1em;
}

.section-button {
  width: 100%;
  padding: 15px;
  font-size: 1.2em;
  background: #e8f5e9;
  border: 2px solid #c8e6c9;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-weight: bold;
  color: #2e7d32;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-button:hover {
  background: #c8e6c9;
  transform: translateY(-2px);
}

.section-content {
  display: none;
  padding: 20px;
  border: 2px solid #e8f5e9;
  border-top: none;
  border-radius: 0 0 8px 8px;
  background: #fafafa;
}

.section-content.active {
  display: block;
}

.arrow {
  transition: transform 0.3s ease;
  font-size: 0.8em;
}

.arrow.rotated {
  transform: rotate(180deg);
}

/* CONTENUTI SPECIFICI */
.problem-text {
  background: #f0f4f8;
  padding: 15px;
  margin: 15px 0;
  border-left: 5px solid #2e7d32;
  border-radius: 4px;
}

.solution-box {
  background: white;
  padding: 20px;
  margin-top: 20px;
  border-radius: 8px;
  border: 2px solid #4caf50;
}

.step {
  background: #f1f8e9;
  padding: 15px;
  margin: 15px 0;
  border-radius: 8px;
}

.formula-box {
  background: white;
  padding: 15px;
  margin: 15px 0;
  border-left: 4px solid #4caf50;
  border-radius: 4px;
  overflow-x: auto;
}

.result-box {
  background: #e8f5e9;
  padding: 15px;
  border: 2px solid #2e7d32;
  border-radius: 8px;
}

/* STAMPA */
@media print {
  body { background: white; padding: 0; }
  .container { max-width: 100%; box-shadow: none; border: none; }
  .section-button { background: white !important; border: 1px solid #ccc !important; }
  .arrow, .nav-buttons { display: none !important; }
  .section-content { display: block !important; border: none !important; }
  .section { page-break-inside: avoid; margin-bottom: 30px; }
  .step, .formula-box, .solution-box { page-break-inside: avoid; border: 1px solid #eee !important; }
}

/* NAVIGAZIONE */
.nav-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.btn-nav {
  padding: 12px 24px;
  background: white;
  color: #2e7d32;
  border: 2px solid #2e7d32;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.btn-nav:hover { background: #2e7d32; color: white; }