/*Stile home Teoria Integrale Indefinito*/
    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      margin: 0;
      padding: 20px;
      min-height: 100vh;
    }
    
    .container {
      max-width: 1200px;
      margin: 0 auto;
      background: white;
      border-radius: 15px;
      box-shadow: 0 10px 30px rgba(0,0,0,0.2);
      overflow: hidden;
    }
    
    .header {
      background: linear-gradient(135deg, #4CAF50, #45a049);
      color: white;
      padding: 30px;
      text-align: center;
    }
    
    .header h1 {
      margin: 0;
      font-size: 2.5em;
      text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    }
    
    .content {
      padding: 30px;
    }
    
    .section {
      margin-bottom: 20px; /* Questo gestisce lo spazio tra i bottoni/sezioni */
      border: 2px solid #e0e0e0;
      border-radius: 10px;
      overflow: hidden;
      transition: all 0.3s ease;
    }
    
    .section:hover {
      border-color: #4CAF50;
      box-shadow: 0 5px 15px rgba(76, 175, 80, 0.2);
    }
    
    /* STATO NORMALE DEL BOTTONE (Grigio chiaro) */
.section-button {
  width: 100%;
  background: #f8f9fa; /* Rimosso gradiente per pulizia */
  border: none;
  padding: 20px;
  font-size: 1.3em;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* AL PASSAGGIO DEL MOUSE (Azzurro tenue) */
.section-button:hover {
  background: #e3f2fd !important; 
  color: #1976d2 !important;
}

/* QUANDO LA SEZIONE È APERTA (Azzurro più deciso) */
.section-button.active {
  background: #bbdefb !important; 
  color: #0d47a1 !important;
  border-left: 6px solid #1976d2; /* Barretta blu laterale */
}
    
    .arrow {
      transition: transform 0.3s ease;
      font-size: 1.2em;
    }
    
    .arrow.rotated {
      transform: rotate(180deg);
    }
    
    .section-content {
      display: none;
      padding: 25px;
      background: #fafafa;
      border-top: 1px solid #e0e0e0;
      line-height: 1.8;
    }
    
    .section-content.active {
      display: block;
      animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
      from {
        opacity: 0;
        transform: translateY(-10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    .formula {
      background: #fff;
      padding: 15px;
      border-left: 4px solid #4CAF50;
      margin: 15px 0;
      border-radius: 5px;
      font-family: 'Courier New', monospace;
      font-size: 1.1em;
      box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    .example {
      background: #e8f5e8;
      padding: 20px;
      border-radius: 8px;
      margin: 15px 0;
      border: 1px solid #c8e6c9;
    }
    
    .example h4 {
      color: #2e7d32;
      margin-top: 0;
    }
    
    .step {
      background: #fff3e0;
      padding: 15px;
      margin: 10px 0;
      border-radius: 5px;
      border-left: 3px solid #ff9800;
    }

    .step img {
        max-width: 100%; /* Rendi l'immagine responsiva */
        height: auto; /* Mantieni le proporzioni */
        display: block; /* Rimuovi spazio extra sotto l'immagine */
        margin-top: 10px; /* Spazio sopra l'immagine */
        border-radius: 5px; /* Angoli arrotondati per l'immagine */
    }
    
    .example img {
        max-width: 100%; /* Rendi l'immagine responsiva */
        height: auto; /* Mantieni le proporzioni */
        display: block; /* Rimuovi spazio extra sotto l'immagine */
        margin: 15px auto; /* Centra l'immagine e aggiungi spazio */
        border-radius: 5px; /* Angoli arrotondati per l'immagine */
        box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Ombra leggera */
    }

    h3 {
      color: #4CAF50;
      border-bottom: 2px solid #4CAF50;
      padding-bottom: 5px;
    }
    
    .highlight {
      background: #fff176;
      padding: 2px 6px;
      border-radius: 3px;
    }
    /* Stili per l'header */
    .left-image, .right-image {
      max-height: 60px;
      height: auto;
      width: auto;
      max-width: 48%;
      object-fit: contain;
    }
    .header-box {
      width: 100%;
      border: 2px dashed #28a745;
      box-sizing: border-box;
      padding: 15px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      background-color: white;
      min-height: 80px;
      border-radius: 8px;
      margin-bottom: 25px;
      background: white;
      flex-wrap: wrap;
      gap: 10px;
    }
/* Stili specifici per i bottoni Questionario (inversione dei colori dei bottoni Test) */
/* ROLLE - Colore Base: #28a745 (Verde) */
.rolle-questionario-btn {
    display: inline-block;
    padding: 6px 16px; /* RIDOTTO */
    border-radius: 8px;
    font-size: 1.0em; /* RIDOTTO */
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-right: 10px;
    margin-top: 10px;
    /* Inversione: Testo/Bordo Verdi, Sfondo Chiaro */
    background-color: #f8f9fa;
    color: #28a745;
    border: 2px solid #28a745;
}
.rolle-questionario-btn:hover {
    /* Hover Invertito: Sfondo Verde, Testo Bianco */
    background-color: #28a745;
    color: white;
    transform: translateY(-2px);
}

/* LAGRANGE - Colore Base: #007bff (Blu) */
.lagrange-questionario-btn {
    display: inline-block;
    padding: 6px 16px; /* RIDOTTO */
    border-radius: 8px;
    font-size: 1.0em; /* RIDOTTO */
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-right: 10px;
    margin-top: 10px;
    /* Inversione: Testo/Bordo Blu, Sfondo Chiaro */
    background-color: #f8f9fa;
    color: #007bff;
    border: 2px solid #007bff;
}
.lagrange-questionario-btn:hover {
    /* Hover Invertito: Sfondo Blu, Testo Bianco */
    background-color: #007bff;
    color: white;
    transform: translateY(-2px);
}

/* CAUCHY - Colore Base: #ffc107 (Giallo), Testo Scuro: #343a40 */
.cauchy-questionario-btn {
    display: inline-block;
    padding: 6px 16px; /* RIDOTTO */
    border-radius: 8px;
    font-size: 1.0em; /* RIDOTTO */
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-right: 10px;
    margin-top: 10px;
    /* Inversione: Testo Scuro, Bordo Giallo, Sfondo Chiaro */
    background-color: #f8f9fa;
    color: #343a40;
    border: 2px solid #ffc107;
}
.cauchy-questionario-btn:hover {
    /* Hover Invertito: Sfondo Giallo, Testo Scuro */
    background-color: #ffc107;
    color: #343a40;
    transform: translateY(-2px);
}

/* DE L'HOSPITAL - Colore Base: #dc3545 (Rosso) */
.delhospital-questionario-btn {
    display: inline-block;
    padding: 6px 16px; /* RIDOTTO */
    border-radius: 8px;
    font-size: 1.0em; /* RIDOTTO */
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-right: 10px;
    margin-top: 10px;
    /* Inversione: Testo/Bordo Rossi, Sfondo Chiaro */
    background-color: #f8f9fa;
    color: #dc3545;
    border: 2px solid #dc3545;
}
.delhospital-questionario-btn:hover {
    /* Hover Invertito: Sfondo Rosso, Testo Bianco */
    background-color: #dc3545;
    color: white;
    transform: translateY(-2px);
}
@media print {
    /* 1. Nascondiamo tutti i bottoni di navigazione, inclusi Indice test e quesiti */
    .header-box, 
    .rolle-questionario-btn, 
    .lagrange-questionario-btn, 
    .cauchy-questionario-btn, 
    .delhospital-questionario-btn,
    a[href*="indice"],
    p[style*="justify-content: center"],
    .arrow {
        display: none !important;
    }

    /* 2. Rendiamo visibili tutte le sezioni */
    .section-content {
        display: block !important;
        opacity: 1 !important;
        border: none !important;
        background: transparent !important;
        padding: 10px 0 !important;
    }

    /* 3. Pulizia del layout per risparmiare inchiostro */
    body {
        background: white !important;
        padding: 0 !important;
    }

    .container {
        box-shadow: none !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        border: none !important;
    }

    .header {
        background: white !important;
        color: black !important;
        border-bottom: 2px solid #4CAF50;
        padding: 10px 0 !important;
    }

    .header h1 {
        text-shadow: none !important;
        color: #2e7d32 !important;
    }

    .section {
        border: none !important;
        border-bottom: 1px solid #eee !important;
        page-break-inside: avoid; /* Evita di tagliare una sezione tra due pagine */
    }

    .section-button {
        background: white !important;
        color: #2e7d32 !important;
        text-align: left !important;
        padding: 5px 0 !important;
        font-size: 1.4em !important;
    }
}
.btn-test {
    background-color: #00bcd4 !important; /* Azzurro vivace */
    color: white !important;
}

.btn-test:hover {
    background-color: #00acc1 !important; /* Azzurro leggermente più scuro al passaggio del mouse */
    transform: translateY(-2px);
}