/* ============================================================
   STILE TEST AREE CON INTEGRALI - MATEFILIA.IT
   ============================================================ */

/* 1. Impostazioni Generali */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f8f9fa; /* Grigio chiarissimo per far risaltare il bianco */
    color: #333;
    line-height: 1.6;
}

/* Contenitore principale per centrare il contenuto */
.main-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-radius: 8px;
}

/* 2. Header e Loghi */
.header-box {
    width: 100%;
    border: 2px dashed #008000;
    box-sizing: border-box;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    margin-bottom: 25px;
}

.left-image, .right-image {
    max-height: 60px;
    height: auto;
    margin: 0;
}

/* 3. Testi e Titoli */
h1 {
    color: #0056b3;
    text-align: center;
    margin-bottom: 10px;
}

.Stile1 {
    font-size: 16px;
    font-weight: normal;
    text-align: center;
    margin-bottom: 20px;
}

/* 4. Blocchi Domanda */
.question-block {
    margin-bottom: 30px;
    padding: 15px;
}

.question-text {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: block;
}

/* Opzioni di risposta (Label cliccabili) */
.answer-option {
    display: block;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #eee;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.answer-option:hover {
    background-color: #f0f7ff;
    border-color: #007BFF;
}

input[type="radio"] {
    margin-right: 12px;
    transform: scale(1.2);
}

/* 5. Pulsanti */
.button-group {
    margin-top: 15px;
}

button {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 5px 5px 5px 0;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #005f9e;
}

/* 6. Box Grafici e Soluzioni */
.box {
    border: 1px solid #ccc;
    border-left: 5px solid #007BFF; /* Evidenziazione laterale */
    padding: 20px;
    margin-top: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.hidden {
    display: none;
}

/* Il contenitore grigio che racchiude l'immagine */
#graph1, #graph2, #graph3, #graph4, #graph5, 
#graph6, #graph7, #graph8, #graph9, #graph10 {
    text-align: center;      /* Centra l'immagine orizzontalmente */
    padding: 10px;           /* Riduce lo spazio interno del box grigio */
    background-color: #eee;  /* Un grigio leggermente diverso per staccare */
}

/* L'immagine del grafico vera e propria */
.graph-img {
    width: 70%;             /* Riduce la dimensione al 70% del contenitore */
    max-width: 400px;       /* Impedisce che diventi troppo grande su desktop */
    height: auto;           /* Mantiene le proporzioni */
    display: block;
    margin: 0 auto;         /* Centra l'immagine nel box */
    border: 1px solid #ccc;
    background-color: #fff; /* Sfondo bianco per il grafico */
}

/* 7. Risultati e Correzione */
#results {
    margin-top: 30px;
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
}

.correct {
    color: #28a745;
    font-weight: bold;
}

.incorrect {
    color: #dc3545;
    font-weight: bold;
}

.not-answered {
    color: #2196F3;
    font-weight: bold;
}

.results-details ul {
    list-style-type: none;
    padding-left: 0;
}

.results-details li {
    margin-bottom: 8px;
    padding: 10px;
    background: #f1f1f1;
    border-radius: 4px;
}

/* 8. Footer e Linee di separazione */
.footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px 0;
}

hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, #228B22, #90EE90);
    margin: 25px 0;
}

/* 9. Responsive (per cellulari) */
@media (max-width: 600px) {
    .header-box {
        flex-direction: column;
        text-align: center;
    }
    
    .left-image, .right-image {
        margin-bottom: 10px;
    }
    
    button {
        width: 100%;
        margin-right: 0;
    }
}
@media print {
    /* Mostra grafici e soluzioni durante la stampa */
    .hidden, .box.hidden, .graph-container.hidden {
        display: block !important;
    }
    
    /* Nasconde i bottoni per non spreca inchiostro */
    button, .button-group {
        display: none !important;
    }

    /* Evita che le domande vengano tagliate a metà tra due pagine */
    .question-block {
        page-break-inside: avoid;
    }
}
