
/* css para  quiz corregido*/

/* Contenedor principal del quiz */
.quiz-container {
    max-width: 1250px;   /* centrado en pantallas grandes */
    margin: 0 auto;
    padding: 15px;
}

/* Tarjeta de cada pregunta */
.question-card {
    background: #ffffff;   /* fondo blanco */
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0px 2px 6px rgba(0,0,0,0.1);
}

/* Encabezado de la pregunta */
.question-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap; /* para que no se rompa en móvil */
    font-size: 15px;
    margin-bottom: 15px;
}

/* Opciones */
.options p {
    margin: 6px 0;
    padding: 10px 14px;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    color: #7e7777;
}

/* Respuesta correcta */
.option.correct-option {
    color: #155724;
    font-weight: bold;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

/* Respuesta incorrecta */
.option.wrong-option {
    color: #721c24;
    font-weight: bold;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* Estado de respuesta */
.answer-section {
    margin-top: 15px;
}

.correct {
    color: green;
    font-weight: bold;
}

.incorrect {
    color: red;
    font-weight: bold;
}

.final-grade {
    text-align: center;
    color: #0056b3;
    margin: 20px 0;
    font-size: 18px;
    font-weight: bold;
}

/* RESPONSIVE: se ajusta en móviles */
@media (max-width: 768px) {
    .quiz-container {
        padding: 10px;
    }
    .question-card {
        padding: 15px;
    }
    .question-header {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* css para respuesta del quiz */

/* Marcar preguntas incompletas */
.question-card.incompleta {
    border: 2px solid #ef4444;
    background: #fef2f2;
}

.question-title {
    font-size: 17px;
    font-weight: 600;
    color: #337ab7;
}
.question-score {
    font-size: 13px;
    color: #374151;
    background: #f3f4f6;
    padding: 5px 12px;
    border-radius: 6px;
    font-weight: 500;
}

/* Opciones */
.option-label {
    display: block;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    font-size: 15px;
}
.option-label:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}
.option-label input {
    margin-right: 8px;
}

/* Textarea */
textarea.form-control {
    border-radius: 8px;
    font-size: 15px;
}


/* css para listas los quiz */

/* Contenedor de pestañas */
.nav-tabs {
    border: none;
    margin-bottom: 0px;
    display: flex;
    padding-bottom: 0;
    position: relative;
}

/* Todas las pestañas unidas y mismo tamaño con borde */
.nav-tabs .nav-link {
    font-weight: 600;
    color: #444;
    background: #f5f7fa;
    padding: 12px 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    position: relative;
    flex: 1;
    justify-content: center;
    margin: 0; 
    margin-bottom: 1px; /* aqui para bajar la linea */
    border: 1px solid #e0e6ed; /* borde agregado */
    border-left: none; /* eliminamos borde izquierdo para unirse */
}
.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{
    color:#fff;
    cursor:default;
    background-color:#337ab7;
    border:1px solid #ddd;
    border-bottom-color:transparent
}

/* Primer y último borde */
.nav-tabs .nav-link:first-child {
    border-radius: 10px 0 0 10px;
    border-left: 1px solid #e0e6ed; /* añadir borde izquierdo solo al primero */
}

.nav-tabs .nav-link:last-child {
    border-radius: 0 10px 10px 0;
}

/* Iconos dentro de pestañas */
.nav-tabs .nav-link i {
    font-size: 16px;
}

/* Hover */
.nav-tabs .nav-link:hover {
    background: #e6ebf3;
    color: #0047FF;
}

/* Activa */
.nav-tabs .nav-link.active {
    background: linear-gradient(135deg, #0047FF, #2563eb);
    color: #fff;
    font-weight: bold;
}

/* Línea debajo de todas las pestañas (opcional si quieres borde solo arriba) */
.nav-tabs::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #e0e6ed;
    z-index: 0;
}

/* Input buscar más compacto */
.search-box {
    width: 40%;   /* más pequeño */
    margin: 0 auto 20px;
    position: relative;
    padding: 10px;
}

.search-box input {
    width: 100%;
    padding: 6px 12px; /* menos alto y compacto */
    border-radius: 8px;
    border: 1px solid #ccd3db;
    font-size: 13px;
    transition: 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #0047FF;
    box-shadow: 0 0 6px rgba(0,71,255,0.3);
}

#evaluacion-container {
    display: none;
    height: auto;
    margin-top: 15px;
}

/* Ocultar completamente las pestañas inactivas */
.tab-pane {
    display: none !important; /* No ocupa espacio */
}

.tab-pane.active {
    display: block !important; /* Solo la activa visible */
}

/* Si quieres conservar el efecto fade */
.tab-pane.fade {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.tab-pane.fade.active {
    opacity: 1;
}

