/* ══════════════════════════════════════════════════════════════════════
   InverNovaK — LearnDash Lesson & Course Page Styling
   Aplica en: body.sfwd-lessons, body.sfwd-courses
   ══════════════════════════════════════════════════════════════════════ */

/* ── Base de página ─────────────────────────────────────────────────── */
body.sfwd-lessons,
body.sfwd-courses,
body.sfwd-quiz,
body.sfwd-topic {
    background: #010b20 !important;
    color: #ffffff;
}

/* Quitar fondo blanco del contenido principal */
body.sfwd-lessons .site-content,
body.sfwd-courses .site-content,
body.sfwd-lessons #content,
body.sfwd-courses #content,
body.sfwd-lessons .entry-content,
body.sfwd-courses .entry-content,
body.sfwd-lessons article,
body.sfwd-courses article {
    background: transparent !important;
}

/* ── Wrapper LearnDash ──────────────────────────────────────────────── */
.learndash-wrapper {
    --ld-bg:       #0e1120;
    --ld-card:     #131629;
    --ld-border:   rgba(255,255,255,.08);
    --ld-txt1:     #ffffff;
    --ld-txt2:     #8892b0;
    --ld-txt3:     #4d5678;
    --ld-accent:   #2563eb;
    --ld-teal:     #06d6f0;
    --ld-orange:   #f97316;
    --ld-radius:   12px;
    max-width: 900px !important;
    margin: 0 auto !important;
    padding: 1.5rem 1.5rem 4rem !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    color: var(--ld-txt1) !important;
}

/* ── Breadcrumbs ────────────────────────────────────────────────────── */
.learndash-wrapper .ld-breadcrumbs,
.learndash-wrapper .ld-breadcrumbs-wrap {
    background: transparent !important;
    border: none !important;
    padding: 0 0 1rem !important;
    font-size: .78rem !important;
    color: var(--ld-txt3) !important;
}
.learndash-wrapper .ld-breadcrumbs a,
.learndash-wrapper .ld-breadcrumbs span {
    color: var(--ld-txt3) !important;
    text-decoration: none !important;
}
.learndash-wrapper .ld-breadcrumbs a:hover { color: var(--ld-txt2) !important; }
.learndash-wrapper .ld-breadcrumbs .ld-separator { margin: 0 .4rem; opacity: .5; }

/* ── Cabecera del paso (título) ─────────────────────────────────────── */
.learndash-wrapper .ld-lesson-header,
.learndash-wrapper .ld-topic-header {
    background: var(--ld-card) !important;
    border: 1px solid var(--ld-border) !important;
    border-radius: var(--ld-radius) !important;
    padding: 1.75rem 2rem !important;
    margin-bottom: 1.25rem !important;
}
.learndash-wrapper .ld-lesson-header h2,
.learndash-wrapper .ld-topic-header h2,
.learndash-wrapper .ld-lesson-status h2,
.learndash-wrapper .ld-status-bubble + h2,
.learndash-wrapper h2.ld-lesson-title {
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    color: var(--ld-txt1) !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    letter-spacing: -.02em !important;
}

/* El título del post (H1 de WP) */
.sfwd-lessons .entry-title,
.sfwd-courses .entry-title,
.sfwd-topic .entry-title {
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    letter-spacing: -.02em !important;
    margin: 0 0 .25rem !important;
}

/* ── Barra de acciones — top y bottom ──────────────────────────────── */
.learndash-wrapper .ld-content-actions,
.learndash-wrapper .ld-content-actions--top,
.learndash-wrapper .ld-content-actions--bottom {
    display: flex !important;
    align-items: center !important;
    gap: .6rem !important;
    flex-wrap: wrap !important;
    background: transparent !important;
    border: none !important;
    padding: 1rem 0 !important;
}

/* Botones de navegación (Anterior / Volver al Curso / Siguiente) */
.learndash-wrapper .ld-content-actions .ld-button,
.learndash-wrapper .ld-content-actions a.ld-button,
.learndash-wrapper .ld-content-actions button.ld-button {
    background: var(--ld-card) !important;
    color: var(--ld-txt2) !important;
    border: 1px solid var(--ld-border) !important;
    border-radius: 8px !important;
    padding: .5rem 1rem !important;
    font-size: .8rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all .15s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: .3rem !important;
    white-space: nowrap !important;
}
.learndash-wrapper .ld-content-actions .ld-button:hover {
    border-color: rgba(255,255,255,.18) !important;
    color: var(--ld-txt1) !important;
    transform: none !important;
}

/* Botón "Siguiente Lección" / "Fin del Módulo" — destacado */
.learndash-wrapper .ld-content-actions .ld-button.ld-primary-color-btn,
.learndash-wrapper .ld-content-actions .ld-button[class*="primary"],
.learndash-wrapper .ld-content-actions .ld-next-prev-nav .ld-button:last-child {
    background: var(--ld-accent) !important;
    color: #fff !important;
    border-color: var(--ld-accent) !important;
    font-weight: 600 !important;
}
.learndash-wrapper .ld-content-actions .ld-button.ld-primary-color-btn:hover {
    background: #1d50c8 !important;
    border-color: #1d50c8 !important;
}

/* ── Contenido de la lección ────────────────────────────────────────── */
.learndash-wrapper .learndash-content-body,
.learndash-wrapper .ld-content-body {
    background: var(--ld-card) !important;
    border: 1px solid var(--ld-border) !important;
    border-radius: var(--ld-radius) !important;
    padding: 2rem !important;
    margin: 1.25rem 0 !important;
    color: var(--ld-txt2) !important;
}

/* Tipografía dentro del contenido */
.learndash-wrapper .learndash-content-body h1,
.learndash-wrapper .learndash-content-body h2 {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: var(--ld-txt1) !important;
    margin: 0 0 .75rem !important;
    letter-spacing: -.01em !important;
}
.learndash-wrapper .learndash-content-body h3 {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: var(--ld-txt2) !important;
    margin: 1.5rem 0 .5rem !important;
}
.learndash-wrapper .learndash-content-body p {
    color: var(--ld-txt2) !important;
    line-height: 1.7 !important;
    margin-bottom: .75rem !important;
}
.learndash-wrapper .learndash-content-body ul,
.learndash-wrapper .learndash-content-body ol {
    color: var(--ld-txt2) !important;
    padding-left: 1.4rem !important;
    margin-bottom: .75rem !important;
}
.learndash-wrapper .learndash-content-body li {
    line-height: 1.65 !important;
    margin-bottom: .3rem !important;
}
.learndash-wrapper .learndash-content-body a {
    color: var(--ld-teal) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}
.learndash-wrapper .learndash-content-body a:hover {
    color: var(--ld-accent) !important;
    text-decoration: underline !important;
}
.learndash-wrapper .learndash-content-body strong,
.learndash-wrapper .learndash-content-body b {
    color: var(--ld-txt1) !important;
    font-weight: 600 !important;
}
.learndash-wrapper .learndash-content-body hr {
    border: none !important;
    border-top: 1px solid var(--ld-border) !important;
    margin: 1.5rem 0 !important;
}

/* ── Botón "Marcar como completado" ─────────────────────────────────── */
#learndash_mark_complete_button,
.learndash_mark_complete_button,
.learndash-wrapper .ld-button.ld-lesson-complete-btn,
.learndash-wrapper input[name="learndash_mark_complete_button"],
.learndash-wrapper button[name="learndash_mark_complete_button"] {
    background: var(--ld-accent) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: .6rem 1.4rem !important;
    font-size: .875rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background .15s !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: .4rem !important;
}
#learndash_mark_complete_button:hover,
.learndash_mark_complete_button:hover {
    background: #1d50c8 !important;
}

/* ── Link "Siguiente Lección" ───────────────────────────────────────── */
.learndash-wrapper .ld-nav-next-prev a,
.learndash-wrapper .ld-next-prev-nav a {
    color: var(--ld-teal) !important;
    text-decoration: none !important;
    font-size: .85rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: .3rem !important;
    padding: .4rem .9rem !important;
    border: 1px solid rgba(6,214,240,.3) !important;
    border-radius: 8px !important;
    background: rgba(6,214,240,.06) !important;
    transition: all .15s !important;
}
.learndash-wrapper .ld-nav-next-prev a:hover {
    background: rgba(6,214,240,.12) !important;
    border-color: rgba(6,214,240,.5) !important;
}

/* ── Panel de navegación del curso (sidebar derecha) ────────────────── */
.learndash-wrapper .ld-course-navigation,
.learndash-wrapper .ld-course-navigation-heading {
    background: var(--ld-card) !important;
    border: 1px solid var(--ld-border) !important;
    border-radius: var(--ld-radius) !important;
    overflow: hidden !important;
}
.learndash-wrapper .ld-course-navigation-heading h3 {
    background: var(--ld-bg) !important;
    color: var(--ld-txt2) !important;
    font-size: .75rem !important;
    font-weight: 700 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
    padding: .75rem 1rem !important;
    margin: 0 !important;
    border-bottom: 1px solid var(--ld-border) !important;
}
.learndash-wrapper .ld-nav-item,
.learndash-wrapper .ld-lesson-item,
.learndash-wrapper .ld-topic-list-item {
    border-bottom: 1px solid var(--ld-border) !important;
    background: transparent !important;
}
.learndash-wrapper .ld-nav-item:last-child,
.learndash-wrapper .ld-lesson-item:last-child { border-bottom: none !important; }
.learndash-wrapper .ld-nav-item a,
.learndash-wrapper .ld-lesson-item a {
    color: var(--ld-txt2) !important;
    font-size: .82rem !important;
    padding: .65rem 1rem !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: .5rem !important;
    transition: color .15s !important;
}
.learndash-wrapper .ld-nav-item a:hover,
.learndash-wrapper .ld-lesson-item a:hover { color: var(--ld-txt1) !important; }
.learndash-wrapper .ld-nav-item.ld-is-current-lesson a,
.learndash-wrapper .ld-nav-item.ld-is-current-topic a {
    color: var(--ld-teal) !important;
    font-weight: 600 !important;
}

/* ── Status bubble / iconos de completado ───────────────────────────── */
.learndash-wrapper .ld-status-complete .ld-icon-checkmark,
.learndash-wrapper .ld-lesson-complete .ld-icon-checkmark {
    color: #22c55e !important;
}
.learndash-wrapper .ld-status-incomplete .ld-icon-checkmark {
    color: var(--ld-txt3) !important;
}

/* ── Barra de progreso del curso ─────────────────────────────────────── */
.learndash-wrapper .ld-progress,
.learndash-wrapper .learndash-course-progress-bar {
    background: rgba(255,255,255,.08) !important;
    border-radius: 99px !important;
    height: 5px !important;
    overflow: hidden !important;
}
.learndash-wrapper .ld-progress-bar,
.learndash-wrapper .learndash-course-progress-bar span {
    background: linear-gradient(90deg, #2563eb, #06d6f0) !important;
    border-radius: 99px !important;
    height: 100% !important;
}

/* ── Mensaje "breadcrumb" de navegación de curso ────────────────────── */
.learndash-wrapper .ld-course-step-back,
.learndash-wrapper .ld-course-step-back a {
    color: var(--ld-teal) !important;
    font-size: .78rem !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: .3rem !important;
}

/* ── Quitar sombras y bordes blancos del theme base ─────────────────── */
.learndash-wrapper,
.learndash-wrapper * {
    box-shadow: none !important;
}
.learndash-wrapper .ld-table-list,
.learndash-wrapper .ld-table-list-item {
    background: var(--ld-card) !important;
    border-color: var(--ld-border) !important;
    color: var(--ld-txt2) !important;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .learndash-wrapper { padding: 1rem 1rem 3rem !important; }
    .learndash-wrapper .learndash-content-body { padding: 1.25rem !important; }
}

/* ── Accordion LD5 (modern.min.css) — override tema oscuro ───────────── */
/* Fuerza CSS variables para romper cualquier herencia de Elementor/tema */
.learndash-wrapper,
.learndash-wrapper .ld-accordion {
    --ld-color-system-light-2:     rgba(255,255,255,.04) !important;
    --ld-color-system-border:      rgba(255,255,255,.08) !important;
    --ld-color-system-body-text:   #e8eaf0 !important;
    --ld-color-brand-primary:      #2563eb !important;
    --ld-color-system-middle-gray: rgba(255,255,255,.15) !important;
    --ld-color-primitives-grey-0:  #131629 !important;
    --ld-color-primitives-grey-100: #1c1f2a !important;
}

/* Item activo/hover del accordion — fondo sutil oscuro, NO rojo */
.ld-accordion__item:has(.ld-accordion__expand-button[aria-expanded="true"]),
.ld-accordion__item:hover {
    background-color: rgba(255,255,255,.04) !important;
}

/* Título del item — texto claro */
.ld-accordion__item-title,
.ld-accordion__item-header,
.ld-accordion__heading,
.ld-accordion__subheading {
    color: #e8eaf0 !important;
}

/* Expand button — color teal cuando activo */
.ld-accordion__expand-button[aria-expanded="true"],
.ld-accordion__expand-button:hover {
    color: #06d6f0 !important;
}

/* Sección del accordion — borde sutil */
.ld-accordion__section {
    border-color: rgba(255,255,255,.08) !important;
    background: transparent !important;
}

/* Botón expandir todos */
.ld-accordion__expand-button--all:hover,
.ld-accordion__expand-button-text {
    border-bottom-color: #2563eb !important;
}

/* ── WPProQuiz — tema oscuro completo ────────────────────────────────── */

/* Wrapper del quiz */
.learndash-wrapper .wpProQuiz_content,
body.sfwd-quiz .wpProQuiz_content {
    background: transparent !important;
    color: var(--ld-txt1, #e8eaf0) !important;
}

/* Lista de preguntas */
.learndash-wrapper .wpProQuiz_list,
.learndash-wrapper .wpProQuiz_listItem,
.learndash-wrapper .wpProQuiz_questionList {
    background: var(--ld-card, #131629) !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: 10px !important;
    padding: 1.25rem !important;
    margin-bottom: 1rem !important;
    list-style: none !important;
}

/* Texto de la pregunta */
.learndash-wrapper .wpProQuiz_question_text,
.learndash-wrapper .wpProQuiz_questionText,
.learndash-wrapper .wpProQuiz_header,
.learndash-wrapper .wpProQuiz_headerName {
    color: #ffffff !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    margin-bottom: .75rem !important;
    background: transparent !important;
}

/* Lista de respuestas */
.learndash-wrapper .wpProQuiz_answerList,
.learndash-wrapper ul.wpProQuiz_answerList {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

/* Cada fila de respuesta */
.learndash-wrapper .wpProQuiz_answerList li,
.learndash-wrapper .wpProQuiz_answerList .wpProQuiz_questionInput {
    background: rgba(255,255,255,.04) !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: 8px !important;
    padding: .6rem .9rem !important;
    margin-bottom: .4rem !important;
    cursor: pointer !important;
    transition: border-color .15s, background .15s !important;
    display: flex !important;
    align-items: center !important;
    gap: .6rem !important;
}
.learndash-wrapper .wpProQuiz_answerList li:hover {
    background: rgba(37,99,235,.12) !important;
    border-color: rgba(37,99,235,.4) !important;
}

/* Label y texto de respuesta */
.learndash-wrapper .wpProQuiz_answerList label,
.learndash-wrapper .wpProQuiz_answerList .wpProQuiz_answerText {
    color: #e8eaf0 !important;
    font-size: .9rem !important;
    cursor: pointer !important;
    background: transparent !important;
    flex: 1 !important;
}

/* Input radio/checkbox */
.learndash-wrapper .wpProQuiz_answerList input[type="radio"],
.learndash-wrapper .wpProQuiz_answerList input[type="checkbox"] {
    accent-color: #2563eb !important;
    flex-shrink: 0 !important;
}

/* Respuesta seleccionada */
.learndash-wrapper .wpProQuiz_answerList li.wpProQuiz_answerList_hidden,
.learndash-wrapper .wpProQuiz_answerList li.wpProQuiz_questionInputWrap {
    display: flex !important;
}

/* Correcta / incorrecta */
.learndash-wrapper .wpProQuiz_answerList li.correct,
.learndash-wrapper .wpProQuiz_answerList .wpProQuiz_answerCorrect {
    background: rgba(34,197,94,.12) !important;
    border-color: rgba(34,197,94,.4) !important;
}
.learndash-wrapper .wpProQuiz_answerList li.incorrect,
.learndash-wrapper .wpProQuiz_answerList .wpProQuiz_answerIncorrect {
    background: rgba(239,68,68,.10) !important;
    border-color: rgba(239,68,68,.35) !important;
}

/* Botones de quiz (Anterior / Comprobar / Siguiente / Finalizar) */
.learndash-wrapper .wpProQuiz_button,
.learndash-wrapper .wpProQuiz_button2,
.learndash-wrapper input.wpProQuiz_button,
.learndash-wrapper input.wpProQuiz_button2,
.learndash-wrapper button.wpProQuiz_button,
.learndash-wrapper button.wpProQuiz_button2 {
    background: #2563eb !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: .55rem 1.25rem !important;
    font-size: .875rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background .15s !important;
    display: inline-flex !important;
    align-items: center !important;
}
.learndash-wrapper .wpProQuiz_button:hover,
.learndash-wrapper .wpProQuiz_button2:hover {
    background: #1d50c8 !important;
}
/* Botón secundario (Anterior / Back) */
.learndash-wrapper .wpProQuiz_button2 {
    background: rgba(255,255,255,.08) !important;
    color: #e8eaf0 !important;
}
.learndash-wrapper .wpProQuiz_button2:hover {
    background: rgba(255,255,255,.14) !important;
}

/* Barra de progreso del quiz */
.learndash-wrapper .wpProQuiz_progress,
.learndash-wrapper .wpProQuiz_progressBar {
    background: rgba(255,255,255,.08) !important;
    border-radius: 99px !important;
    height: 5px !important;
    overflow: hidden !important;
}
.learndash-wrapper .wpProQuiz_progressBar span {
    background: linear-gradient(90deg, #2563eb, #06d6f0) !important;
    height: 100% !important;
    border-radius: 99px !important;
    display: block !important;
}

/* Resultado / score final */
.learndash-wrapper .wpProQuiz_results,
.learndash-wrapper .wpProQuiz_resultsFinal,
.learndash-wrapper .wpProQuiz_resultMessage {
    background: var(--ld-card, #131629) !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: 10px !important;
    padding: 1.5rem !important;
    color: #e8eaf0 !important;
    text-align: center !important;
}
.learndash-wrapper .wpProQuiz_results h4,
.learndash-wrapper .wpProQuiz_resultsFinal h4 {
    color: #ffffff !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    margin-bottom: .5rem !important;
}
.learndash-wrapper .wpProQuiz_results .wpProQuiz_points,
.learndash-wrapper .wpProQuiz_resultsFinal .wpProQuiz_points {
    color: #22c55e !important;
    font-size: 2rem !important;
    font-weight: 800 !important;
}

/* Timebar / contador */
.learndash-wrapper .wpProQuiz_time,
.learndash-wrapper .wpProQuiz_time_limit {
    color: var(--ld-teal, #06d6f0) !important;
    background: transparent !important;
    font-size: .85rem !important;
}

/* Número de pregunta */
.learndash-wrapper .wpProQuiz_question_page,
.learndash-wrapper .wpProQuiz_questionCount {
    color: rgba(255,255,255,.4) !important;
    font-size: .75rem !important;
    letter-spacing: .04em !important;
    background: transparent !important;
}

/* Hint / pista */
.learndash-wrapper .wpProQuiz_tipp,
.learndash-wrapper .wpProQuiz_hintText {
    background: rgba(6,214,240,.08) !important;
    border: 1px solid rgba(6,214,240,.25) !important;
    border-radius: 8px !important;
    padding: .75rem 1rem !important;
    color: #e8eaf0 !important;
    font-size: .875rem !important;
}

/* ── Viejo accordion LD30 (learndash.min.css) — por si acaso ─────────── */
/* Item activo */
.ld-item-list-item--expanded > .ld-item-list-item-preview,
.ld-item-list-item--expanded .ld-item-list-item-preview,
.ld-primary-color-bg {
    background-color: #2563eb !important;
    background:       #2563eb !important;
}
.ld-primary-color { color: #2563eb !important; }
