/* Importa un font da Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* Reset CSS */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    background-image: url('b2cb249f-3950-43f2-a387-5b76d2f360bf.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed; /* Mantiene l'immagine fissa durante lo scroll */
}

/* Contenitore principale */
.container {
    width: 90%;
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9); /* Sfondo bianco semi-trasparente per la leggibilità */
    border-radius: 10px;
}

/* Logo */
img {
    display: block;
    margin: 0 auto 20px auto;
    width: 150px;
    height: auto;
}

/* Titoli */
h1 {
    text-align: center;
    color: #222;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 2em;
}

h2 {
    text-align: center;
    color: #222;
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.5em;
}

h3 {
    color: #444;
    font-weight: 500;
    margin-bottom: 15px;
}

/* Testo introduttivo */
.intro-text {
    text-align: center;
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #555;
}

/* Simulazione Esame */
.exam-simulation {
    text-align: center;
    margin-bottom: 40px;
}

.exam-button {
    display: inline-block;
    padding: 20px 30px;
    font-size: 1.2em;
    font-weight: 600;
    background-color: rgba(40, 167, 69, 0.9);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    text-align: center;
}

.exam-button i {
    margin-right: 10px;
}

.exam-button:hover {
    background-color: rgba(33, 136, 56, 0.9);
    transform: translateY(-2px);
}

.exam-button:active {
    transform: translateY(0);
}

.exam-description {
    margin-top: 15px;
    font-size: 1em;
    color: #555;
}

/* Divider */
.divider {
    border: none;
    height: 1px;
    background-color: #ccc;
    margin: 40px 0;
}

/* Moduli */
.modules-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.module-button {
    flex: 1 1 calc(45% - 20px);
    padding: 15px;
    font-size: 1em;
    font-weight: 500;
    background-color: rgba(0, 123, 255, 0.9);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    max-width: 300px;
    transition: background-color 0.3s, transform 0.2s;
    text-align: left;
    position: relative;
}

.module-button i {
    margin-right: 10px;
    font-size: 1.2em;
}

.module-button span {
    display: block;
    font-size: 0.9em;
    color: #e0e0e0;
    margin-top: 5px;
}

.module-button:hover {
    background-color: rgba(0, 86, 179, 0.9);
    transform: translateY(-2px);
}

.module-button:active {
    transform: translateY(0);
}

/* Responsività */
@media (max-width: 768px) {
    .modules-grid {
        flex-direction: column;
        align-items: center;
    }

    .module-button {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* Quiz Container */
#quizContainer {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Back link */
.back-link {
    display: block;
    text-align: center;
    color: #007BFF;
    text-decoration: underline;
    font-size: 0.9em;
    margin: 10px auto;
}

.back-link:hover {
    color: #0056b3;
}

.back-link:active {
    color: #0056b3;
}

/* Barra di Progresso */
#progressBar {
    width: 100%;
    background-color: rgba(233, 236, 239, 0.9);
    border-radius: 13px;
    margin-bottom: 20px;
    overflow: hidden;
}

#progress {
    width: 0%;
    height: 20px;
    background-color: #17a2b8;
    transition: width 0.5s ease-in-out;
}

#progressText {
    text-align: center;
    margin-top: 5px;
    font-size: 1em;
    color: #555;
}

/* Timer */
#timer {
    text-align: center;
    font-size: 1.2em;
    margin-bottom: 20px;
    font-weight: 500;
    color: #dc3545;
}

/* Contatori */
#score {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    margin-bottom: 20px;
}

#score span {
    margin: 0 15px;
}

.icon-correct {
    color: #28a745;
    margin-right: 5px;
}

.icon-incorrect {
    color: #dc3545;
    margin-right: 5px;
}

/* Domanda */
.question {
    margin-bottom: 30px;
    font-size: 1.2em;
    color: #222;
}

/* Risposte */
.answers {
    margin: 0;
    margin-bottom: 20px;
}

.answer-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 15px 20px;
    margin: 10px 0;
    font-size: 1.1em;
    background-color: rgba(248, 249, 250, 0.9);
    border: 2px solid rgba(233, 236, 239, 0.9);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    word-wrap: break-word;
}

.answer-option input[type="radio"] {
    display: none;
}

.answer-option span {
    margin-right: 10px;
}

.symbol {
    font-size: 24px;
    margin-left: auto; /* Allinea il simbolo a destra */
    flex-shrink: 0;
    visibility: hidden; /* Nascondi il simbolo finché non necessario */
}

.answer-option.correct .symbol {
    visibility: visible;
    color: #28a745;
}

.answer-option.incorrect .symbol {
    visibility: visible;
    color: #dc3545;
}

.answer-option:hover {
    background-color: rgba(226, 230, 234, 0.9);
    border-color: rgba(218, 224, 229, 0.9);
}

.answer-option.correct {
    background-color: rgba(212, 237, 218, 0.9) !important;
    border-color: rgba(195, 230, 203, 0.9) !important;
}

.answer-option.incorrect {
    background-color: rgba(248, 215, 218, 0.9) !important;
    border-color: rgba(245, 198, 203, 0.9) !important;
}

.answer-option.disabled {
    pointer-events: none;
    opacity: 0.7;
}

/* Animazione fade-in */
.fade-in {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Feedback */
#feedback {
    margin-top: 20px;
    font-weight: bold;
    text-align: center;
}

.feedback-correct {
    color: #28a745;
}

.feedback-incorrect {
    color: #dc3545;
}

/* Riepilogo Quiz */
.quiz-summary {
    text-align: center;
    padding: 20px;
}

.summary-stats {
    margin: 20px 0;
    font-size: 1.2em;
}

.pass-message {
    color: #28a745;
    font-weight: bold;
}

.oral-message {
    color: #ffc107;
    font-weight: bold;
}

.fail-message {
    color: #dc3545;
    font-weight: bold;
}

/* Pulsanti */
button {
    display: block;
    margin: 20px auto;
    padding: 15px;
    font-size: 1.1em;
    font-weight: 500;
    background-color: rgba(40, 167, 69, 0.9);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 80%;
    max-width: 400px;
    transition: background-color 0.3s, transform 0.2s;
}

button:hover {
    background-color: rgba(33, 136, 56, 0.9);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

#nextButton {
    display: none;
}

/* Footer */
#footer {
    text-align: center;
    margin-top: 30px;
}

#footer a {
    color: #007BFF;
    text-decoration: none;
    font-size: 1em;
}

#footer a:hover {
    text-decoration: underline;
}

/* Sezione del testo esplicativo */
#infoSection {
    display: none;
    margin-top: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
}

#infoSection p {
    text-align: justify;
    line-height: 1.6;
    color: #333;
}

#infoSection h2,
#infoSection h3 {
    text-align: center;
    color: #222;
    margin-bottom: 15px;
}

#infoSection ul {
    margin: 15px 0;
    padding-left: 20px;
}

#infoSection ul li {
    margin-bottom: 10px;
    line-height: 1.4;
}

#infoSection button {
    margin-top: 20px;
    background-color: rgba(0, 123, 255, 0.9);
}

/* Disclaimer */
.disclaimer {
    font-size: 0.9em;
    color: #555;
    border-top: 1px solid #ccc;
    padding-top: 15px;
    background-color: rgba(255, 255, 255, 0.9);
}

/* Firma */
.signature {
    font-size: 0.9em;
    color: #555;
    margin-top: 10px;
}

.signature i {
    color: #007BFF;
    margin-right: 5px;
}

.signature strong {
    color: #000;
}


/* Media query per dispositivi mobili */
@media (max-width: 768px) {
    .exam-button {
        padding: 15px 20px;
        font-size: 1.1em;
    }

    .modules-grid {
        flex-direction: column;
        align-items: center;
    }

    .module-button {
        flex: 1 1 100%;
        max-width: 100%;
        font-size: 1em;
        padding: 15px;
    }

    .module-button i {
        font-size: 1.1em;
    }

    .module-button span {
        font-size: 0.9em;
    }

    .question {
        font-size: 1.1em;
    }

    button {
        font-size: 1em;
        padding: 12px;
    }

    #progressBar {
        height: 15px;
    }

    #progress {
        height: 15px;
    }
    
}
