/* ============================================================
   STILE TEST MATEFILIA - VERSIONE DSA (VOLUMI PER SEZIONI)
   ============================================================ */

:root {
    --bg-dsa: #fdf6e3;          
    --text-dsa: #202124;        
    --primary-blue: #0056b3;
    --verify-blue: #004494;
    --reset-red: #b22222;
    --index-bordeaux: #800020;
    --step-bg: #fff9e6;         
}

body {
    font-family: 'Verdana', 'Geneva', sans-serif;
    background-color: var(--bg-dsa);
    color: var(--text-dsa);
    line-height: 1.8;           
    letter-spacing: 0.05em;     
    margin: 0;
    padding: 10px;
    
    /* Centratura perfetta */
    display: flex;
    flex-direction: column;
    align-items: center;
    
    /* Opzionale: assicura che il contenuto parta dall'alto */
    justify-content: flex-start; 
    min-height: 100vh;
}

.main-test-wrapper {
    background-color: #ffffff;
    /* LARGHEZZA UGUALE ALLA STANDARD */
    max-width: 1000px;           
    width: 95%; /* Importante per i tablet/cellulari */
    
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin: 20px 0; /* Margine sopra e sotto */
    box-sizing: border-box;
}

/* Header con Loghi e cornice tratteggiata (Stile Matefilia) */
.header-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px dashed #008000; /* La tua classica cornice verde */
    padding: 15px;
    margin-bottom: 25px;
    background: white;
}

.left-image, .right-image {
    max-height: 45px;
    height: auto;
}

/* Titoli */
h1 {
    font-size: 2rem;
    color: var(--text-dsa);
    text-align: center;
    margin: 10px 0;
}

.subtitle-dsa {
    text-align: center;
    color: var(--index-bordeaux);
    font-weight: bold;
    font-size: 1.4em;
    margin-bottom: 30px;
}

/* Blocchi Domanda */
.question-block {
    background: #fff;
    border: 2px solid #ced4da;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 40px;
    transition: border-left 0.3s ease;
}

.header-q {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Bottoni Colorati */
.btn-audio { background-color: #6f42c1; color: white; border: none; padding: 10px 15px; border-radius: 8px; cursor: pointer; }
.btn-graph { background-color: #17a2b8; color: white; }
.btn-sol { background-color: #ffc107; color: black; }

.button-group-q button {
    min-height: 50px;
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    margin-right: 10px;
    margin-top: 10px;
}

/* Opzioni di risposta */
.options-container label {
    display: block;
    background: #f8f9fa;
    padding: 15px;
    margin: 12px 0;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    cursor: pointer;
}

.options-container label:hover { background: #e9ecef; }

/* Box a comparsa (Grafici e Soluzioni) */
.box {
    margin-top: 20px;
    padding: 20px;
    background-color: var(--step-bg);
    border-radius: 8px;
    border: 1px dashed #d4a017;
}

.hidden { display: none; }

/* Footer pulsanti finali */
.footer-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}
.instruction-text {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-size: 1.1rem; /* Leggermente più grande per facilitare la lettura */
    line-height: 1.5;
}
/* Contenitore del grafico */
.graph-container {
    display: flex;            /* Attiva Flexbox */
    justify-content: center;   /* Centra orizzontalmente */
    align-items: center;       /* Centra verticalmente */
    padding: 20px;             /* Spazio interno per non toccare i bordi del box */
    background-color: #fff;    /* Sfondo bianco per far risaltare il grafico */
    border-radius: 8px;
    min-height: 200px;         /* Altezza minima per evitare salti visivi */
}

/* L'immagine all'interno */
.graph-container img {
    max-width: 100%;           /* Non esce mai dal box */
    height: auto;              /* Mantiene le proporzioni */
    display: block;            /* Rimuove spazi vuoti sotto l'immagine */
    border: 1px solid #eee;    /* Opzionale: un sottile bordo grigio */
}