/* =============================================
   STYLE.CSS - pruebaicfes.com
   Versión definitiva: navbar moderna, modo oscuro, hero flotante, responsive,
   estilos completos del examen (incluye gráficas, modal, etc.)
   ============================================= */

:root {
    --primary: #0066cc;
    --primary-dark: #004999;
    --accent: #00cc88;
    --accent-dark: #009966;
    --dark-bg: #0f172a;
    --dark-surface: #1e2937;
    --light-bg: #f8fafc;
    --light-surface: #ffffff;
    --text-light: #1e2937;
    --text-dark: #e2e8f0;
    --gray: #64748b;
}
    --gray-light: #cbd5e1;

/* ====================== RESET ====================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

}
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--light-bg);
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark {
    background-color: var(--dark-bg);
    color: var(--text-dark);
}

/* ====================== NAVBAR MODERNA ====================== */
.navbar {
    background: var(--light-surface);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    transition: background 0.3s;
}

body.dark .navbar {
    background: var(--dark-surface);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo a {
    display: inline-flex;
    align-items: center;
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo a i {
    margin-right: 0.5rem;
    color: #3b82f6;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.2s;
}

body.dark .nav-links a {
    color: var(--text-dark);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.btn-outline {
    border: 2px solid var(--primary);
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    color: var(--primary) !important;
    font-weight: 600;
}

.btn-outline:hover {
    background: var(--primary);
    color: white !important;
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary);
}

/* ====================== HERO CON IMÁGENES FLOTANTES ====================== */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Botón primario general (blanco con texto azul) */
.btn-primary {
    display: inline-block;
    background: white;
    color: var(--primary);
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary);
}

/* Imágenes flotantes */
.hero-images {
    position: relative;
    height: 300px;
}

.floating-img {
    position: absolute;
    width: 180px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 30px -10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.floating-img:hover {
    transform: translateY(-8px);
}

.img1 {
    top: 0;
    right: 20%;
    width: 200px;
    animation: float1 4s ease-in-out infinite;
}

.img2 {
    bottom: 0;
    left: 0;
    width: 160px;
    animation: float2 5s ease-in-out infinite;
}

.img3 {
    top: 30%;
    right: 0;
    width: 140px;
    animation: float3 4.5s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
@keyframes float2 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(15px); }
}
@keyframes float3 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ====================== TRUST BADGE ====================== */
.trust-badge {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
	justify-content: center;
}

.trust-badge span i {
    margin-right: 0.4rem;
}

/* ====================== SECCIONES GENERALES ====================== */
.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-light);
}

body.dark .section-title {
    color: var(--text-dark);
}

/* ====================== CARDS ====================== */
.card-grid {
    max-width: 1280px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.card {
    background: var(--light-surface);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    flex: 1 1 300px;
    max-width: 600px;
}

body.dark .card {
    background: var(--dark-surface);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.card-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.8rem;
}

.card p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

body.dark .card p {
    color: var(--gray-light);
}

.card-btn {
    background: #eef2ff;
    color: #1e3a8a;
    padding: 0.7rem 1.5rem;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: 0.2s;
}

body.dark .card-btn {
    background: var(--primary-dark);
    color: white;
}

.card-btn:hover {
    background: var(--primary);
    color: white;
}

/* ====================== BENEFICIOS ====================== */
.benefits {
    background: var(--light-surface);
    padding: 4rem 2rem;
    margin: 2rem 0;
}

body.dark .benefits {
    background: var(--dark-surface);
}

.benefits-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    text-align: center;
	justify-content: center;
	flex-wrap: wrap;
}

.benefit-item i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* ====================== TESTIMONIOS ====================== */
.testimonials {
    max-width: 1280px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.testimonial-card {
    background: var(--light-surface);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
}

body.dark .testimonial-card {
    background: var(--dark-surface);
}

/* ====================== FAQ ====================== */
.faq-section {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.faq-item {
    background: var(--light-surface);
    border-radius: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    cursor: pointer;
}

body.dark .faq-item {
    background: var(--dark-surface);
}

.faq-question {
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--gray);
    padding-top: 0;
}

body.dark .faq-answer {
    color: var(--gray-light);
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding-top: 0.8rem;
}

/* ====================== FOOTER ====================== */
footer {
    background: var(--dark-bg);
    color: var(--gray-light);
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

/* ====================== BOTÓN MODO OSCURO ====================== */
.dark-mode-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    color: var(--text-light);
    transition: transform 0.2s;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
}

body.dark .dark-mode-toggle {
    color: var(--text-dark);
}

/* ====================== RESPONSIVE GENERAL ====================== */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .hero-images {
        height: 250px;
        margin-top: 2rem;
    }
/*    .floating-img {
        width: 130px;
    }*/
    .img1 { right: 40%; width: 230px; }
    .img2 { left: 10%; width: 230px; }
    .img3 { right: 5%; width: 230px; }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
        background: var(--light-surface);
    }
    body.dark .nav-links {
        background: var(--dark-surface);
    }
    .nav-links.active {
        display: flex;
    }
    .hamburger {
        display: block;
    }
    .hero {
        padding: 3rem 1rem;
    }
    .hero-content h1 {
        font-size: 1.8rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .trust-badge {
        justify-content: center;
    }
    .section-title {
        font-size: 1.6rem;
    }
    .card h3 {
        font-size: 1.4rem;
    }
    .benefits {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .hero-images {
        height: 200px;
    }
    .floating-img {
        width: 100px;
    }
    .img1 { width: 110px; }
    .img2 { width: 90px; }
    .img3 { width: 80px; }
}

/* Para pantallas grandes (≥ 1200px) forzar 4 columnas en grid de cards */
@media (min-width: 1200px) {
    .card-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Corrige el color del enlace activo en modo oscuro */
body.dark .nav-links a.active {
    color: var(--primary);
}

/* ====================== ESTILOS ESPECÍFICOS DEL EXAMEN (TyT) ====================== */
/* Contenedor principal del examen */
.exam-container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--light-surface);
    border-radius: 1.5rem;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.1);
}
body.dark .exam-container {
    background: var(--dark-surface);
}

/* Header del examen (reloj y botón salir) */
.exam-header-buttons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.btn-exit {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-exit:hover {
    background: #dc2626;
}

/* Botón "Siguiente" dentro del examen (sobrescribe el estilo general) */
.exam-container .btn-primary {
    background: #f97316;
    color: white;
}
.exam-container .btn-primary:hover {
    background: #ea580c;
}

/* Opciones de respuesta */
.option-btn {
    width: 100%;
    text-align: left;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.3rem 1.5rem;
    margin-bottom: 0.1rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.18s ease;
}
body.dark .option-btn {
    background: var(--dark-surface);
    border-color: #475569;
    color: var(--text-dark);
}
.option-btn:hover {
    border-color: var(--primary);
    background: #f0f7ff;
}
body.dark .option-btn:hover {
    background: #1e293b;
}
.option-btn.selected {
    border-color: var(--primary);
    background: #e8f0fe;
    color: var(--primary);
    font-weight: 600;
}
.option-btn .letra {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    line-height: 2rem;
    text-align: center;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-weight: 700;
    margin-right: 0.75rem;
}
.option-btn.selected .letra {
    background: var(--primary);
    color: white;
}
.option-btn-inner {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

/* Informe final (gráficas, badges, módulos) */
#informe-final {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
}
.puntaje-total {
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}
.puntaje-numero {
    font-size: 3.5rem;
    font-weight: 800;
}
.puntaje-label {
    font-size: 1rem;
    margin-top: 0.5rem;
}
.modulo-card {
    background: var(--light-surface);
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}
body.dark .modulo-card {
    background: var(--dark-surface);
}
.stats-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.stat-badge {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
}
.stat-correctas { background: #dcfce7; color: #16a34a; }
.stat-incorrectas { background: #fee2e2; color: #dc2626; }
.stat-sin-responder { background: #f1f5f9; color: #475569; }
.stat-badge-clickable {
    cursor: pointer;
    text-decoration: underline dotted;
}
.bar-group {
    margin-bottom: 0.75rem;
}
.bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    margin-bottom: 4px;
    color: var(--gray);
}
.bar-track {
    width: 100%;
    height: 14px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.8s ease;
}
.bar-fill.correctas { background: #22c55e; }
.bar-fill.incorrectas { background: #ef4444; }
.bar-fill.sin-responder { background: #94a3b8; }
.chart-container {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--light-surface);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}
body.dark .chart-container {
    background: var(--dark-surface);
}
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    height: 220px;
    padding: 0 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}
.bar-group-chart {
    flex: 1;
    text-align: center;
}
.bars-row {
    display: flex;
    justify-content: center;
    gap: 4px;
    align-items: flex-end;
    height: 190px;
}
.single-bar {
    width: 22px;
    border-radius: 4px 4px 0 0;
    transition: height 0.8s ease;
    min-height: 4px;
}
.bar-chart-label {
    font-size: 0.72rem;
    text-align: center;
    color: var(--gray);
    margin-top: 6px;
}
.chart-legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: var(--gray);
}
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}
.btn-reintentar {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.05rem;
    border: none;
    cursor: pointer;
    margin-top: 2rem;
    transition: all 0.3s;
}
.btn-reintentar:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Modal de preguntas incorrectas */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-box {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 720px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalEntrar 0.22s ease;
}
@keyframes modalEntrar {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
	color: indianred;
}
.modal-close {
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    width: 2.1rem;
    height: 2.1rem;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.modal-close:hover {
    background: #e2e8f0;
}
.modal-contenido {
    overflow-y: auto;
    padding: 1.5rem 1.75rem;
    flex: 1;
}
.modal-pregunta {
    border-left: 4px solid #ef4444;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    background: #fff8f8;
    border-radius: 0 12px 12px 0;
}
.modal-pregunta-num {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ef4444;
    margin-bottom: 0.5rem;
}
.modal-pregunta-texto {
    font-size: 0.98rem;
    line-height: 1.65;
    color: #1e2937;
    margin-bottom: 1rem;
}
.modal-opciones {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.modal-opcion {
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    font-size: 0.93rem;
    background: #f8fafc;
    color: #475569;
    border: 1.5px solid #e2e8f0;
}
.modal-opcion-correcta {
    background: #dcfce7;
    color: #15803d;
    border-color: #86efac;
    font-weight: 600;
}
.modal-opcion-elegida {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
    font-weight: 600;
}
.modal-explicacion {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #475569;
    background: #f0f7ff;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--primary);
}

/* Responsive para el examen */
@media (max-width: 768px) {
    .exam-header-buttons {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.5rem;
    }
    .btn-exit {
        padding: 0.3rem 1rem;
        font-size: 0.8rem;
    }
    .bar-chart {
        flex-direction: column;
        height: auto;
    }
    .bars-row {
        height: 150px;
    }
    .modal-box {
        max-height: 92vh;
        border-radius: 16px;
    }
    .modal-header, .modal-contenido {
        padding: 1rem 1.25rem;
    }
    #informe-final {
        padding: 1rem;
    }
}
/* Modo oscuro para el informe */
body.dark .chart-container h3,
body.dark .modulo-result strong {
    color: var(--text-dark) !important;
}
body.dark .modulo-result span {
    color: var(--gray-light) !important;
}
/* Tooltips en las barras */
div[title] {
    cursor: help;
}
/* ====================== CORRECCIÓN MODO OSCURO PARA SABER-PRO Y EXAMEN ====================== */

/* Recuadro informativo azul (formato del examen) - usado en saber-11.html, saber-pro.html, etc. */
body.dark section[style*="background: #eef2ff"],
body.dark div[style*="background: #eef2ff"] {
    background: #1e293b !important;
}
body.dark section[style*="background: #eef2ff"] h3,
body.dark div[style*="background: #eef2ff"] h3 {
    color: #60a5fa !important;
}
body.dark section[style*="background: #eef2ff"] p,
body.dark div[style*="background: #eef2ff"] p {
    color: #e2e8f0 !important;
}
body.dark section[style*="background: #eef2ff"] .btn-primary,
body.dark div[style*="background: #eef2ff"] .btn-primary {
    background: #f97316;
    color: white;
}

/* Asegurar que el texto del informe sea legible en modo oscuro */
body.dark .puntaje-total {
    color: white !important;
}
body.dark .puntaje-label,
body.dark .frase-motivadora {
    color: #f1f5f9 !important;
}
body.dark .modulo-result strong {
    color: #f1f5f9 !important;
}
body.dark .modulo-result span {
    color: #2c5adc !important;
}
body.dark .modulo-result .btn-incorrectas {
    background: #da2d2d !important;
    color: #fca5a5 !important;
	animation: pulse-dark 1.5s infinite;
}
body.dark .modulo-result .btn-incorrectas:hover {
    background: #7f1d1d !important;
}
body.dark .chart-container h3 {
    color: #f1f5f9 !important;
}
body.dark .bar-chart-label,
body.dark .legend-item {
    color: #94a3b8 !important;
}
body.dark .stat-badge.sin-responder {
    background: #334155 !important;
    color: #cbd5e1 !important;
}
body.dark .stat-badge.incorrectas {
    background: #450a0a !important;
    color: #fca5a5 !important;
}
body.dark .stat-badge.correctas {
    background: #064e3b !important;
    color: #86efac !important;
}
body.dark .modulo-card .stats-row .stat-badge {
    /* si usas módulo-card (en otros informes) */
    background: inherit;
}
.pregunta-imagen img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1rem 0;
}
/* ====================== CORRECCIÓN DEL FOOTER (modo claro y oscuro) ====================== */
footer {
    background: #0f172a; /* fondo oscuro fijo */
    color: #cbd5e1;      /* texto gris claro */
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}
/* Modo claro: el footer no debe cambiar de color de texto */
body:not(.dark) footer {
    background: #0f172a;
    color: #cbd5e1;
}
/* Modo oscuro: mismo fondo, pero texto un poco más claro para contraste */
body.dark footer {
    background: #0f4780;
    color: #e2e8f0;
    border-top: 1px solid #334155; /* línea sutil para separar del fondo */
}
footer a {
    color: #00cc88;
}
footer a:hover {
    text-decoration: underline;
}

/* ====================== LEGIBILIDAD DEL INFORME EN MODO OSCURO ====================== */
body.dark .chart-container h3,
body.dark .modulo-result strong,
body.dark .modulo-result .stats-row span {
    color: #f1f5f9 !important;
}
body.dark .modulo-result span[style*="color: #22c55e"] {
    color: #86efac !important;
}
body.dark .modulo-result span[style*="color: #94a3b8"] {
    color: #cbd5e1 !important;
}
body.dark .modulo-result span[style*="color: #ef4444"] {
    color: #fca5a5 !important;
}
/* Porcentajes dentro de las barras (ya son blancos sobre colores, pero aseguramos) */
body.dark .bar-fill {
    color: white !important;
    font-weight: bold;
}

/* ====================== ANIMACIÓN DE PARPADEO PARA BOTÓN DE INCORRECTAS ====================== */
.btn-incorrectas {
    animation: pulse 1.5s infinite;
    transition: all 0.2s;
}
@keyframes pulse {
    0% {
        background-color: #eeb8b8;
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
    }
    70% {
        background-color: #e4a2a2;
        box-shadow: 0 0 0 6px rgba(220, 38, 38, 0);
    }
    100% {
        background-color: #fee2e2;
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}
/* En modo oscuro, ajustamos los colores del parpadeo */
/*body.dark .btn-incorrectas {
    animation: pulse-dark 1.5s infinite;
}*/
@keyframes pulse-dark {
    0% {
        background-color: #7f1d1d;
        box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.4);
    }
    70% {
        background-color: #991b1b;
        box-shadow: 0 0 0 6px rgba(248, 113, 113, 0);
    }
    100% {
        background-color: #7f1d1d;
        box-shadow: 0 0 0 0 rgba(248, 113, 113, 0);
    }
}
/* ====================== ESTILOS PARA BLOG Y NOVEDADES ====================== */
.container-blog {
    max-width: 1280px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}
@media (max-width: 768px) {
    .container-blog {
        grid-template-columns: 1fr;
    }
}

.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.blog-card {
    background: var(--light-surface);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}
body.dark .blog-card {
    background: var(--dark-surface);
}
.blog-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}

.blog-category {
    margin-bottom: 0.75rem;
}
.cat-label {
    background: #eef2ff;
    color: #1e3a8a;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
body.dark .cat-label {
    background: #1e293b;
    color: #60a5fa;
}

.blog-title {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}
.blog-title a {
    text-decoration: none;
    color: var(--text-light);
}
body.dark .blog-title a {
    color: var(--text-dark);
}
.blog-title a:hover {
    color: var(--primary);
}

.blog-meta {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 1rem;
}
body.dark .blog-meta {
    color: var(--gray-light);
}

.read-more {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-top: 0.5rem;
}
.read-more:hover {
    text-decoration: underline;
}

/* Sidebar */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: var(--light-surface);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
body.dark .sidebar-widget {
    background: var(--dark-surface);
}
.sidebar-widget h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
    padding-left: 0.75rem;
}
.sidebar-widget ul {
    list-style: none;
    padding: 0;
}
.sidebar-widget ul li {
    margin-bottom: 0.6rem;
}
.sidebar-widget ul li a {
    color: var(--text-light);
    text-decoration: none;
}
body.dark .sidebar-widget ul li a {
    color: var(--text-dark);
}
.sidebar-widget ul li a:hover {
    color: var(--primary);
}
.sidebar-widget input {
    width: 100%;
    border-radius: 40px;
    border: 1px solid var(--gray-light);
    padding: 0.6rem 1rem;
}
.sidebar-widget button {
    width: 100%;
    margin-top: 0.5rem;
}

/* Paginación */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}
.pagination .page {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--light-surface);
    border-radius: 40px;
    text-decoration: none;
    color: #1e3a8a;
    font-weight: 500;
}
body.dark .pagination .page {
    background: var(--dark-surface);
    color: var(--text-dark);
}
.pagination .page.current {
    background: var(--primary);
    color: white;
}
.pagination .next {
    background: #eef2ff;
}
body.dark .pagination .next {
    background: #1e293b;
}
/* ====================== ESTILOS PARA ARTÍCULO (articulo.html) ====================== */
.articulo-container {
    max-width: 1280px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}
@media (max-width: 768px) {
    .articulo-container {
        grid-template-columns: 1fr;
    }
}

.articulo-principal {
    background: var(--light-surface);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
body.dark .articulo-principal {
    background: var(--dark-surface);
}

.articulo-categoria {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.25rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
body.dark .articulo-categoria {
    background: #1e293b;
    color: #60a5fa;
}

.articulo-titulo {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-light);
}
body.dark .articulo-titulo {
    color: var(--text-dark);
}

.articulo-fecha {
    color: var(--gray);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1rem;
}
body.dark .articulo-fecha {
    border-bottom-color: #334155;
}

.articulo-contenido {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-light);
}
body.dark .articulo-contenido {
    color: var(--text-dark);
}
.articulo-contenido h2 {
    font-size: 1.6rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}
.articulo-contenido h3 {
    font-size: 1.3rem;
    margin-top: 1.2rem;
}
.articulo-contenido p {
    margin-bottom: 1rem;
}
.articulo-contenido img {
    max-width: 100%;
    border-radius: 12px;
    margin: 1rem 0;
}

/* Sidebar del artículo */
.sidebar-articulo {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget-recientes {
    background: var(--light-surface);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
body.dark .widget-recientes {
    background: var(--dark-surface);
}
.widget-recientes h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
    padding-left: 0.75rem;
}

.lista-recientes {
    list-style: none;
    padding: 0;
}
.lista-recientes li {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}
body.dark .lista-recientes li {
    border-bottom-color: #334155;
}
.lista-recientes a {
    text-decoration: none;
    font-weight: 500;
    color: var(--text-light);
}
body.dark .lista-recientes a {
    color: var(--text-dark);
}
.lista-recientes a:hover {
    color: var(--primary);
}
.lista-recientes small {
    display: block;
    color: var(--gray);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.btn-leer-articulo {
    display: inline-block;
    margin-top: 2rem;
    background: #eef2ff;
    padding: 0.6rem 1.2rem;
    border-radius: 40px;
    text-decoration: none;
    color: #1e3a8a;
    font-weight: 600;
}
body.dark .btn-leer-articulo {
    background: var(--primary-dark);
    color: white;
}

.btn-volver {
    display: inline-block;
    margin-top: 2rem;
    background: #eef2ff;
    padding: 0.6rem 1.2rem;
    border-radius: 40px;
    text-decoration: none;
    color: #1e3a8a;
    font-weight: 600;
}
body.dark .btn-volver {
    background: var(--primary-dark);
    color: white;
}
.btn-volver i {
    margin-right: 0.5rem;
}