/* --- ESTÉTICA PROFESIONAL BASADA EN JUSSANJUAN.GOV.AR --- */

@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;700&family=Roboto:wght@400;500;700&display=swap');

:root {
    /* Paleta extraída de jussanjuan.gov.ar */
    --color-primario: #090E21; /* Azul oscuro del header */
    --color-secundario: #9d8a58; /* Dorado institucional */
    --color-acento: #007bff; /* Un azul más brillante para interacciones */
    --color-fondo: #090E21; /* Un gris muy claro para el fondo general */
    --color-superficie: #ffffff; /* Blanco para las tarjetas */
    --color-texto-principal: #333333;
    --color-texto-secundario: #555555;
    
    --color-exito-fondo: #d4edda;
    --color-exito-texto: #155724;
    --color-error-fondo: #f8d7da;
    --color-error-texto: #721c24;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--color-superficie);
    color: var(--color-texto-principal);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.hidden { display: none !important; }

.main-container {
    background-color: var(--color-superficie);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12), 0 3px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 800px;
    margin: auto;
    overflow: hidden;
    border-top: 5px solid var(--color-secundario);
    transition: all 0.5s ease-in-out; 
}

.header {
    background-color: var(--color-fondo);
    color: white;
    padding: 25px;
    text-align: center;
    position: relative;
}
.header-logo {
    width: 450px;
    margin-bottom: auto;
}
.header h1 { 
    margin-top: 30px; 
    font-size: 1.8em; 
    font-weight: 700; 
    font-family: 'Lora', serif; 
}
.header p { margin: 5px 0 0; opacity: 0.8; }

.score-display {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 1.1em;
    margin-top: 15px;
    display: inline-block;
    transition: background-color 0.3s ease; 
}

.profile-button {
    position: absolute; top: 20px; right: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white; border: none; border-radius: 50%;
    width: 45px; height: 45px; font-size: 1.5em;
    cursor: pointer; display: flex; justify-content: center; align-items: center;
    transition: background-color 0.3s, transform 0.2s;
}
.profile-button:hover { 
    background-color: rgba(255, 255, 255, 0.3); 
    transform: scale(1.05); 
}

.screen { 
    padding: 30px; 
    opacity: 1;
    transition: opacity 0.4s ease-in-out; 
}
.screen.fade-out { opacity: 0; }
.screen.fade-in { opacity: 1; }


.screen h2 {
    font-size: 2em; 
    font-weight: 700;
    color: var(--color-primario);
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
    font-family: 'Lora', serif; 
}

.profile-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 15px; margin-top: 20px;
}
.btn-profile {
    padding: 18px; font-size: 1em; font-weight: 500;
    background-color: var(--color-primario);
    color: white; border: none; border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer; 
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}
.btn-profile:hover { 
    background-color: #2c3e66; 
    transform: translateY(-3px); 
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2); 
}
.btn-profile:active {
    transform: translateY(0); 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 
}


.badges-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 25px; margin-top: 20px;
}
.badge { text-align: center; }
.badge-icon {
    width: 80px; height: 80px; border-radius: 50%;
    background-color: #e9ecef; color: #adb5bd;
    display: flex; justify-content: center; align-items: center;
    font-size: 2.5em; margin: 0 auto; border: 4px solid #ced4da;
    filter: grayscale(1); opacity: 0.6; 
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.badge-icon.unlocked {
    filter: grayscale(0); opacity: 1;
    background-color: var(--color-secundario);
    color: white; border-color: var(--color-primario);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); 
    transform: scale(1.1); 
}
.badge-name { margin-top: 10px; font-weight: 500; font-size: 0.9em; }

.email-simulator {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.email-header {
    background-color: #f7f7f7; padding: 15px;
    border-bottom: 1px solid #dee2e6;
}
.email-header div { margin-bottom: 8px; word-break: break-all; }
.email-header span { color: #555; font-weight: 500; }
.email-body { padding: 20px; line-height: 1.7; }
.attachment {
    display: inline-flex; align-items: center; background-color: #e9ecef;
    padding: 8px 15px; border-radius: 20px; font-size: 0.9em;
    margin-top: 15px; border: 1px solid #ced4da;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease; 
}
.attachment::before { content: '📎'; margin-right: 8px; }
.email-link { 
    color: var(--color-acento); 
    text-decoration: underline; 
    cursor: pointer; 
    font-weight: 500; 
    transition: color 0.2s ease; 
}
.email-link:hover {
    color: var(--color-primario); 
}


.scenario-description {
    padding: 25px; line-height: 1.7; background-color: #f7f7f7;
    border: 1px solid #dee2e6; border-radius: 8px; margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.options-container { margin-top: 30px; }
.options-container h3 {
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--color-primario);
    font-family: 'Lora', serif;
}
.btn-option {
    display: block; width: 100%; padding: 15px; margin-bottom: 12px;
    font-size: 1em; text-align: left; background-color: var(--color-superficie);
    border: 2px solid #dee2e6; border-radius: 8px; cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease, box-shadow 0.3s ease; 
}
.btn-option:hover { 
    border-color: var(--color-secundario); 
    background-color: #faf9f6; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 
    transform: translateY(-2px); 
}
.btn-option:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.feedback {
    padding: 20px; margin-top: 20px; border-radius: 8px;
    border-left: 5px solid;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    opacity: 1; 
    transition: opacity 0.5s ease-in-out; 
}
.feedback.correct {
    background-color: var(--color-exito-fondo); color: var(--color-exito-texto);
    border-color: var(--color-exito-texto);
}
.feedback.incorrect {
    background-color: var(--color-error-fondo); color: var(--color-error-texto);
    border-color: var(--color-error-texto);
}

.navigation-buttons {
    display: flex; justify-content: center;
    gap: 15px; margin-top: 30px;
}
.btn-nav {
    padding: 12px 25px; font-size: 1em; font-weight: 500;
    background-color: var(--color-texto-secundario);
    color: white; border: none; border-radius: 8px; cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}
.btn-nav:hover { 
    background-color: #333; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); 
    transform: translateY(-2px); 
}
.btn-nav:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}


.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); display: flex;
    justify-content: center; align-items: center; z-index: 1000;
    opacity: 0; 
    visibility: hidden; 
    transition: opacity 0.4s ease, visibility 0.4s ease; 
}
.modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white; padding: 40px; border-radius: 12px;
    width: 90%; max-width: 600px; text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: translateY(20px); 
    opacity: 0; 
    transition: transform 0.4s ease-out, opacity 0.4s ease-out; 
}

.modal-overlay:not(.hidden) .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-content h2 { 
    color: var(--color-primario); 
    font-size: 1.8em; 
    font-family: 'Lora', serif; 
}
.modal-content p { line-height: 1.7; color: var(--color-texto-secundario); }
.modal-content .protocol-ref {
    font-size: 0.9em; font-style: italic; color: var(--color-texto-secundario);
    background: #e9ecef; padding: 10px; border-radius: 8px;
    display: inline-block; margin-top: 20px;
}

/* ESTILOS PARA LA BARRA DE PROGRESO */
.progress-bar-container {
    width: 90%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    margin: 15px auto 0;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%; 
    background-color: var(--color-secundario); 
    border-radius: 4px;
    transition: width 0.5s ease-in-out;
}



/* ESTILOS ESPECÍFICOS PARA LA PANTALLA DE LOGIN */
#login-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.login-form-container {
    width: 100%;
    max-width: 400px; /* Limitar el ancho del formulario para mejor estética */
    margin-top: 20px;
    padding: 25px;
    background-color: var(--color-superficie);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.login-form-container h2 {
    font-size: 1.8em;
    color: var(--color-primario);
    margin-bottom: 20px;
}

.welcome-message,
.info-message {
    font-size: 0.95em;
    color: var(--color-texto-secundario);
    margin-bottom: 15px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 18px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-primario);
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group select {
    width: calc(100% - 24px); /* Ajuste para padding y borde */
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1em;
    color: var(--color-texto-principal);
    background-color: #fcfcfc;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group select:focus {
    border-color: var(--color-acento);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
    outline: none;
}

.form-group select {
    appearance: none; /* Elimina estilos nativos del select */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007bff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13.2-6.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px auto;
    padding-right: 30px; /* Espacio para el icono */
}

#login-screen .btn-nav {
    width: 100%;
    padding: 14px;
    font-size: 1.05em;
    background-color: var(--color-secundario);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 20px;
}

#login-screen .btn-nav:hover {
    background-color: #b8a270; /* Un tono más oscuro del dorado */
    transform: translateY(-2px);
}

#login-screen .btn-nav:active {
    transform: translateY(0);
}

/* --- Estilos Específicos para el Módulo 1 (Programa Obligatorio) --- */

#module1-screen {
    background: linear-gradient(135deg, #e0f2f7 0%, #ffffff 100%); /* Fondo más suave y acogedor */
    color: #333;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: calc(100vh - 40px); /* Ajuste para ocupar casi toda la altura visible */
    justify-content: center;
}

#module1-screen .header {
    background-color: #090E21; /* Azul más institucional */
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#module1-screen .header h1 {
    font-size: 1.8em;
    margin-bottom: 5px;
}

#module1-screen .header h2 {
    font-size: 1.4em;
    color: #f0f8ff; /* Blanco azulado */
    margin-bottom: 5px;
}

#module1-screen .header h3 {
    font-size: 1.1em;
    color: #e6e6fa; /* Lavanda suave */
    font-weight: normal;
    text-align: center;
    max-width: 800px;
}

#module1-screen .score-display {
    background-color: #28a745; /* Verde para la puntuación */
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1em;
    color: white;
    margin-top: 10px;
    min-width: 150px;
}

#module1-screen .scenario-description,
#module1-screen .email-simulator {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
    margin-bottom: 20px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    text-align: left;
    line-height: 1.6;
}

#module1-screen .options-container h3 {
    color: #0056b3;
    margin-bottom: 15px;
}

#module1-screen #options-buttons .btn-option {
    background-color: #090E21; /* Azul primario */
    color: white;
    border: none;
    padding: 12px 25px;
    margin: 8px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    min-width: 250px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#module1-screen #options-buttons .btn-option:hover {
    background-color: #090E21;
    transform: translateY(-2px);
}

#module1-screen #options-buttons .btn-option:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Ajustes para la barra de progreso en el módulo 1 */
#module1-screen .progress-bar-container {
    width: 80%;
    max-width: 600px;
    background-color: #e0e0e0;
    border-radius: 5px;
    height: 15px;
    margin-top: 15px;
    overflow: hidden;
    border: 1px solid #b0b0b0;
}

#module1-screen .progress-bar-fill {
    height: 100%;
    width: 0%; /* Se actualiza con JS */
    background-color: #28a745; /* Verde de progreso */
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}