/* ========================================================= */
/* INICIO: VARIABLES GLOBALES Y ESTILOS BASE ACTUALIZADOS    */
/* ========================================================= */
:root {
    --color-principal: #00A98F; /* Color principal de 'muestra.css' */
    --color-texto: #333; /* Color de texto de 'muestra.css' */
    --color-fondo: #f8f9fa;
    --color-acento-claro: #e6f6f4;
    --color-secondary: #f1c40f; /* Conservado para elementos específicos del test como gradientes y resultados */
    
    /* Variables de estilo unificadas */
    --shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    --border-radius: 12px; /* Un radio de borde más sutil y consistente */
}

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

body {
    font-family: 'Source Sans Pro', sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    line-height: 1.6;
    margin: 0;
    /* Se elimina el padding superior ya que el header y main lo manejan */
}

.container {
    max-width: 800px;
    margin: 2rem auto; /* Espacio arriba y abajo para separar del header/footer */
    padding: 0 20px;
}

h1, h2, h3 { 
    font-weight: 700; 
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; margin-bottom: 2.5rem; text-align: center; color: var(--color-principal); border-bottom: 2px solid var(--color-acento-claro); padding-bottom: 1rem; }
h3 { font-size: 1.4rem; margin-bottom: 1rem; }
/* ========================================================= */
/* FIN: VARIABLES GLOBALES Y ESTILOS BASE ACTUALIZADOS       */
/* ========================================================= */


/* --- ESTILOS DEL TEST (colores actualizados) --- */

.progress-container {
    margin-bottom: 0.8rem;
    position: relative;
}
.progress-bar {
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-principal), var(--color-secondary));
    border-radius: 4px;
    transition: width 0.4s ease-in-out;
}
.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    top: -25px;
}
.progress-step {
    color: #777;
    font-weight: 700;
    transition: color 0.4s ease;
}
.progress-step.active {
    color: var(--color-principal);
}
.test-step { display: none; }
.test-step.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.intro-section {
    position: relative;
    text-align: center;
    padding: 0.8rem 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    background-image: url('/img/hero.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: #fff; /* Texto blanco por defecto sobre overlay */
}
.intro-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.4), rgba(0,0,0,0.6));
    z-index: 1;
}
.intro-section__content {
    position: relative;
    z-index: 2;
    width: 100%;
}
.intro__title { 
    font-size: 2.5rem; 
    line-height: 1.2; 
    margin-bottom: 1rem;
    color: #ffffff; 
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.intro__subtitle { 
    font-size: 1.1rem; 
    color: #f3f4f6; 
    max-width: 600px; 
    margin: 0 auto 2rem; 
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.instructions {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--color-principal);
    text-align: left;
    margin-top: 0.5rem;
    color: var(--color-texto);
}
.instructions h3 {
    color: var(--color-principal);
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.instructions p {
    margin-bottom: 0;
}

.designed-by {
    margin-top: 2.5rem;
    text-align: center;
}
.designed-by__label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f3f4f6;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    margin: 0 0 0.75rem 0;
}
.designed-by__logo {
    max-width: 180px;
    height: auto;
    background-color: #fff;
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid var(--color-texto);
    box-sizing: border-box;
}

.question-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid #eee;
    box-shadow: var(--shadow);
    transition: border-color 0.3s ease;
}
.question-card__description { 
    color: #555;
    margin: 0 0 1.5rem 0; 
}
.question-card.missing-answer { border-color: #e74c3c; }
.question-card__title { font-size: 1.2rem; font-weight: 700; margin: 0 0 0.5rem 0; color: var(--color-principal); }
.options-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    border: none; 
    padding: 0;
}
.options-group label {
    text-align: center;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--color-fondo);
    font-size: 0.9rem;
}
.options-group input[type="radio"] { 
    display: none; 
}
.options-group input[type="radio"]:checked + label {
    background: var(--color-principal);
    color: #ffffff;
    border-color: var(--color-principal);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 169, 143, 0.3);
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2.5rem;
}
.nav-button, .cta-button {
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.nav-button.prev-button {
    background-color: #f0f0f0;
    color: #555;
}
.nav-button.prev-button:hover {
    background-color: #e0e0e0;
    color: var(--color-texto);
}
.nav-button.next-button {
    background-color: var(--color-principal);
    color: #fff;
}
.nav-button.next-button:hover {
    background-color: #008a75; /* Un tono más oscuro del principal */
}
.cta-button {
    background: linear-gradient(90deg, var(--color-principal), var(--color-secondary));
    color: #fff;
    width: 100%;
}
.cta-button:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(0, 169, 143, 0.3);
}
.intro-button {
    margin-top: 2.5rem;
    display: inline-block;
    width: auto;
    min-width: 200px;
}

.results-section { background-color: transparent; }
.risk-scale-card, .lead-form-container {
    background-color: #fff;
    box-shadow: var(--shadow);
}
.risk-scale-card { padding: 2rem; border-radius: var(--border-radius); margin-bottom: 3rem; text-align: center; }
.risk-scale { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-bottom: 2rem; }
.risk-scale__item {
    background-color: var(--color-fondo);
    color: #555;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease-in-out;
    flex-grow: 1;
}
.item__level { display: block; font-weight: 700; font-size: 1rem; color: var(--color-texto); }
.item__score-range { font-size: 0.85rem; }
.risk-scale__item.is-active { transform: scale(1.05); color: #fff; box-shadow: var(--shadow); }
.risk-scale__item.is-active .item__level { color: inherit; }
.risk-scale-summary #result-level { margin-top: 0; margin-bottom: 0.5rem; font-size: 1.8rem; transition: color 0.5s ease; }
.risk-scale-summary #result-interpretation { font-size: 1.1rem; color: #555; max-width: 500px; margin: 0 auto 1rem auto; }
.risk-scale-summary .summary-score { font-size: 1rem; color: var(--color-texto); }
.risk-scale-summary .summary-score strong { font-weight: 700; }

.table-container { overflow-x: auto; }
#action-plan-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
#action-plan-table th, #action-plan-table td { padding: 1rem; text-align: left; border-bottom: 1px solid #eee; }
#action-plan-table th { background-color: var(--color-fondo); font-weight: 700; }
#action-plan-table tbody tr { transition: background-color 0.3s ease; }

/* --- Footer Unificado (Modelo de muestra.css) --- */
.page-footer {
    text-align: center;
    padding: 3rem 2rem;
    background-color: #fff;
    border-top: 1px solid #eee;
}
.footer-copyright {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #777;
}
.footer-copyright p {
    margin: 0.25rem 0;
}
.footer-powered-by p {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #777;
}
.powered-by-logo {
    height: 45px;
    transition: opacity 0.3s;
}
.powered-by-logo:hover {
    opacity: 0.8;
}

/* --- Formulario de Leads (colores actualizados) --- */
.lead-form-container {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 3rem;
    border-radius: var(--border-radius);
}
.lead-form-visual { flex-basis: 40%; flex-shrink: 0; }
.lead-form-visual img { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.lead-form-content { flex-basis: 60%; text-align: left; }
.lead-form__title { color: var(--color-texto); font-size: 1.8rem; margin-bottom: 0.5rem; text-align: left; border: none; }
.lead-form__subtitle { color: #555; font-size: 1.1rem; margin-bottom: 1.5rem; }
.ebook-features { list-style-type: none; padding-left: 0; margin-bottom: 2rem; }
.ebook-features li { padding-left: 1.5rem; position: relative; margin-bottom: 0.5rem; color: var(--color-texto); }
.ebook-features li::before { content: '✓'; color: var(--color-secondary); position: absolute; left: 0; font-weight: bold; }
.lead-form__cta-text { font-weight: 600; }
.form-group { margin-bottom: 1rem; }
.lead-capture-form input { width: 100%; padding: 0.8rem 1rem; background-color: var(--color-fondo); border: 1px solid #ddd; border-radius: 8px; color: var(--color-texto); font-size: 1rem; font-family: 'Source Sans Pro', sans-serif; }
.form-actions { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
#form-status { color: #777; text-align: center; margin-top: 1rem; font-weight: 600; min-height: 1.2em; }

/* Estilos de 'Designed by' en sección de resultados (actualizado) */
.results-section .designed-by {
    margin-top: 3rem;
}
.results-section .designed-by__label {
    color: #777;
    text-shadow: none;
}
.results-section .designed-by__logo {
    filter: none;
    opacity: 1;
}

/* --- ESTILOS PARA ENLACES EN LA TABLA DE RESULTADOS --- */
#action-plan-table td a {
    color: var(--color-principal);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: color 0.2s ease, background-color 0.2s ease;
    padding: 2px 4px;
    margin: -2px -4px; /* Contrarresta el padding para mantener el flujo */
    border-radius: 4px;
}

#action-plan-table td a:hover {
    color: #fff;
    background-color: var(--color-principal);
    text-decoration: none;
}

/* Estilo para alinear campos en la misma fila */
.form-row {
    display: flex;
    gap: 1rem;
}
.form-row .form-group {
    flex: 1; /* Cada campo ocupa la mitad del espacio */
}

/* ========================================================= */
/* INICIO: MEDIA QUERIES UNIFICADAS                          */
/* ========================================================= */
@media (max-width: 768px) {
    .container {
        margin: 1rem auto;
    }
    main {
        padding: 0 1rem;
    }
    
    main.container {
        margin-top: 1.5rem; /* Ajusta este valor si lo necesitas */
    }

    /* === LÓGICA DEL MENÚ MÓVIL (de muestra.css) === */
    .nav-toggle {
        display: block;
        z-index: 1001; /* Asegurar que esté por encima de otros elementos */
    }
    .header-content {
        position: relative;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        gap: 0;
        position: absolute;
        top: 100%; 
        right: -2rem;
        width: 100vw;
        background-color: white;
        box-shadow: 0 3px 5px rgba(0,0,0,0.1);
        padding-bottom: 1rem;
    }
    .nav-links.nav-active {
        display: flex;
    }
    .nav-links li {
        width: 100%;
        text-align: center;
    }
    .nav-links a {
        display: block;
        width: 100%;
        padding: 1rem 2rem;
        border-top: 1px solid #f0f0f0;
    }
    .nav-links a::after {
        display: none;
    }

    /* --- Ajustes responsivos para el contenido del test --- */
    .intro__title { font-size: 2rem; }
    .intro-section { padding: 1.5rem; }
    .lead-form-container { flex-direction: column; gap: 2rem; padding: 1.5rem; }
    .lead-form-content { text-align: center; }
    .lead-form__title { font-size: 1.5rem; text-align: center; }
    .ebook-features { text-align: left; }
    .nav-button, .cta-button { width: 100%; margin-top: 0.5rem; }
    .navigation-buttons { flex-direction: column-reverse; }
    .nav-button.prev-button { margin-top: 1rem; }
}
/* ========================================================= */
/* FIN: MEDIA QUERIES UNIFICADAS                             */
/* ========================================================= */