/**
 * DT Estilo CSS Learndash
 * Version: 1.3.4
 * Capa visual independiente para LearnDash y componentes relacionados.
 */

/* =====================================================
   VARIABLES DE IDENTIDAD VISUAL
   ===================================================== */
 :root {
    --vsp-dark: #050B24;
    --vsp-dark-2: #111C44;
    --vsp-purple: #7C3AED;
    --vsp-purple-2: #A855F7;
    --vsp-blue: #F26A2E;
    --vsp-green: #22C55E;
    --vsp-bg: #F8FAFC;
    --vsp-border: #E5E7EB;
    --vsp-text: #0F172A;
    --vsp-muted: #64748B;
    --vsp-white: #FFFFFF;
    --vsp-accent-soft: #F8F5FF;
    --vsp-accent-soft-2: #F3E8FF;
    --vsp-accent-soft-3: #F4F1FF;
    --vsp-accent-border: #EDE9FE;
    --vsp-accent-scroll: #C4B5FD;
    --vsp-purple-hover: #6D28D9;
    --vsp-blue-hover: #D95720;
    --vsp-purple-rgb: 124, 58, 237;
    --vsp-purple-2-rgb: 168, 85, 247;
}


/* Forzar medida 100% al body y paneles que dependan del ancho disponible. */
body {
    max-width: 100% !important;
}

/* =====================================================
   PLAN DE ESTUDIO / COMPRA
   ===================================================== */
.learndash-wrapper .ld-course-status.ld-course-status-not-enrolled .ld-course-status-action {
    align-items: center;
    flex-direction: column;
    justify-content: flex-start;
    font-size: 20px;
}

/* Eliminar texto LOG IN en Plan de Estudio. */
.learndash-wrapper .ld-course-status.ld-course-status-not-enrolled .ld-course-status-action .ld-text {
    font-size: .9375em;
    color: var(--ldx-course-status-text-color);
    display: none;
}

/* =====================================================
   CERTIFICADOS
   ===================================================== */
/* Eliminar redes sociales del certificado. */
.ld-cvss-social-button .ld-cvss-social-button-icon,
.ld-cvss-social-button.ld-cvss-social-button-linkedin-profile {
    display: none !important;
}

.ld-cvss-social-button.ld-cvss-social-button-linkedin-profile {
    width: 108px;
    height: 40px;
}

/* Eliminar aviso de lección completada. */
.learndash-wrapper .ld-alert--step-completed.ld-alert-success {
    color: #495255;
    display: none;
}

/* Eliminar título Buscar certificado en página Verificar certificado. */
.ld-cvss-search-form .ld-cvss-search-form-heading {
    display: none;
}

/* =====================================================
   LEARNDASH DASHBOARD
   ===================================================== */
/* Eliminar botón Crear curso en Mi Panel. */
.ld-dashboard-header-button .ld-dashboard-add-course {
    background: var(--vsp-purple);
    display: none;
}

/* =====================================================
   DEBATES / BBPRESS
   ===================================================== */
#bbpress-forums .bbp-reply-content,
#bbpress-forums .bbp-topic-content {
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: #333333 !important;
}

#bbpress-forums .bbp-author-avatar,
#bbpress-forums .bbp-author-role,
#bbpress-forums .bbp-author-ip {
    display: none !important;
}

#bbpress-forums .bbp-author-name {
    display: block !important;
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
}

#bbpress-forums .bbp-reply-author,
#bbpress-forums .bbp-topic-author {
    text-align: center;
    padding: 15px 10px !important;
}

/* =====================================================
   WOOCOMMERCE - RECUPERAR CONTRASEÑA
   ===================================================== */
.woocommerce-lost-password .woocommerce form .form-row input.input-text,
.woocommerce-lost-password .woocommerce form .form-row input[type="text"],
.woocommerce-lost-password .woocommerce form .form-row input[type="email"] {
    background-color: #f4f4f4 !important;
    border: 1px solid #d6d6d6 !important;
    color: #555555 !important;
    border-radius: 4px !important;
    padding: 12px 14px !important;
}

.woocommerce-lost-password .woocommerce form .form-row input.input-text:focus,
.woocommerce-lost-password .woocommerce form .form-row input[type="text"]:focus,
.woocommerce-lost-password .woocommerce form .form-row input[type="email"]:focus {
    background-color: #eeeeee !important;
    border-color: #b8b8b8 !important;
    color: #333333 !important;
    outline: none !important;
}

/* =====================================================
   LEARNDASH - MENÚ LATERAL DE LECCIONES
   Estilo moderno premium azul oscuro + púrpura
   ===================================================== */
.learndash-wrapper .ld-focus-sidebar {
    background: var(--vsp-white) !important;
    border-right: 1px solid var(--vsp-border) !important;
    box-shadow: 10px 0 30px rgba(15, 23, 42, 0.06) !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-focus-sidebar-header {
    background: var(--vsp-white) !important;
    border-bottom: 1px solid var(--vsp-border) !important;
    padding: 14px 18px !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-course-navigation-heading {
    background: linear-gradient(135deg, var(--vsp-dark) 0%, var(--vsp-purple) 100%) !important;
    color: var(--vsp-white) !important;
    padding: 28px 24px !important;
    border: none !important;
    border-radius: 0 !important;
    position: relative !important;
    overflow: hidden !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-course-navigation-heading::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    right: -55px;
    top: -45px;
    background: transparent;
    border-radius: 50%;
}

.learndash-wrapper .ld-focus-sidebar .ld-course-navigation-heading h3,
.learndash-wrapper .ld-focus-sidebar .ld-course-navigation-heading a,
.learndash-wrapper .ld-focus-sidebar .ld-course-navigation-heading span {
    color: var(--vsp-white) !important;
    font-weight: 800 !important;
    font-size: 18px !important;
    line-height: 1.35 !important;
    letter-spacing: -0.2px !important;
    position: relative !important;
    z-index: 2 !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-course-navigation-heading .ld-icon,
.learndash-wrapper .ld-focus-sidebar .ld-course-navigation-heading svg {
    color: var(--vsp-white) !important;
    fill: var(--vsp-white) !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-focus-sidebar-trigger {
    background: rgba(255, 255, 255, 0.10) !important;
    color: var(--vsp-white) !important;
    border-radius: 50% !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-lesson-item,
.learndash-wrapper .ld-focus-sidebar .ld-topic-row {
    background: var(--vsp-white) !important;
    border-bottom: 1px solid #EEF2F7 !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-lesson-item:hover,
.learndash-wrapper .ld-focus-sidebar .ld-topic-row:hover {
    background: var(--vsp-accent-soft) !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-section-heading,
.learndash-wrapper .ld-focus-sidebar .ld-lesson-section-heading {
    background: var(--vsp-accent-soft-3) !important;
    color: var(--vsp-dark) !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    letter-spacing: 0.3px !important;
    text-transform: uppercase !important;
    padding: 20px 24px !important;
    border-top: 1px solid var(--vsp-accent-border) !important;
    border-bottom: 1px solid var(--vsp-accent-border) !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-lesson-title,
.learndash-wrapper .ld-focus-sidebar .ld-topic-title,
.learndash-wrapper .ld-focus-sidebar a {
    color: var(--vsp-text) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    text-decoration: none !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-is-current-item,
.learndash-wrapper .ld-focus-sidebar .ld-topic-row.ld-is-current-item,
.learndash-wrapper .ld-focus-sidebar .ld-lesson-item.ld-is-current-item {
    background: linear-gradient(90deg, var(--vsp-accent-soft-2) 0%, var(--vsp-white) 100%) !important;
    border-left: 5px solid var(--vsp-purple) !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-is-current-item .ld-lesson-title,
.learndash-wrapper .ld-focus-sidebar .ld-is-current-item .ld-topic-title,
.learndash-wrapper .ld-focus-sidebar .ld-is-current-item a {
    color: var(--vsp-purple) !important;
    font-weight: 800 !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-status-icon {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    border-radius: 50% !important;
    border: 3px solid #CBD5E1 !important;
    background: var(--vsp-white) !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-status-complete,
.learndash-wrapper .ld-focus-sidebar .ld-status-icon.ld-status-complete {
    background: var(--vsp-green) !important;
    border-color: var(--vsp-green) !important;
    color: var(--vsp-white) !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-is-current-item .ld-status-icon {
    background: var(--vsp-purple) !important;
    border-color: var(--vsp-purple) !important;
    box-shadow: 0 0 0 6px rgba(var(--vsp-purple-rgb), 0.14) !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-lesson-item-preview,
.learndash-wrapper .ld-focus-sidebar .ld-topic-row {
    padding: 20px 24px !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-status-complete + .ld-lesson-title,
.learndash-wrapper .ld-focus-sidebar .ld-status-complete + .ld-topic-title {
    text-decoration: none !important;
    opacity: 0.92 !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-topic-duration,
.learndash-wrapper .ld-focus-sidebar .ld-lesson-duration {
    color: var(--vsp-muted) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-table-list-item-quiz,
.learndash-wrapper .ld-focus-sidebar .ld-quiz-item {
    background: var(--vsp-accent-soft) !important;
    border-left: 5px solid var(--vsp-purple) !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-expand-button,
.learndash-wrapper .ld-focus-sidebar .ld-expand-button .ld-icon {
    color: var(--vsp-purple) !important;
    font-weight: 800 !important;
}

.learndash-wrapper .ld-focus-sidebar::-webkit-scrollbar {
    width: 8px;
}

.learndash-wrapper .ld-focus-sidebar::-webkit-scrollbar-track {
    background: #F1F5F9;
}

.learndash-wrapper .ld-focus-sidebar::-webkit-scrollbar-thumb {
    background: var(--vsp-accent-scroll);
    border-radius: 30px;
}

.learndash-wrapper .ld-focus-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--vsp-purple);
}

@media (max-width: 768px) {
    .learndash-wrapper .ld-focus-sidebar .ld-course-navigation-heading {
        padding: 22px 18px !important;
    }

    .learndash-wrapper .ld-focus-sidebar .ld-course-navigation-heading h3,
    .learndash-wrapper .ld-focus-sidebar .ld-course-navigation-heading a,
    .learndash-wrapper .ld-focus-sidebar .ld-course-navigation-heading span {
        font-size: 16px !important;
    }

    .learndash-wrapper .ld-focus-sidebar .ld-lesson-item-preview,
    .learndash-wrapper .ld-focus-sidebar .ld-topic-row {
        padding: 16px 18px !important;
    }

    .learndash-wrapper .ld-focus-sidebar .ld-lesson-title,
    .learndash-wrapper .ld-focus-sidebar .ld-topic-title {
        font-size: 15px !important;
    }
}

/* =====================================================
   TÍTULO PRINCIPAL DE LA LECCIÓN
   No afecta títulos internos del contenido
   ===================================================== */
.learndash-wrapper .ld-focus-content > h1:first-of-type,
.learndash-wrapper .ld-focus-content > .entry-title:first-child {
    color: var(--vsp-dark) !important;
    font-size: 42px !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.8px !important;
    text-align: center !important;
    margin: 0 auto 10px auto !important;
    max-width: 980px !important;
}

.learndash-wrapper .ld-focus-content > h1:first-of-type::after,
.learndash-wrapper .ld-focus-content > .entry-title:first-child::after {
    content: "";
    display: block;
    width: 90px;
    height: 5px;
    margin: 18px auto 0 auto;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--vsp-purple) 0%, var(--vsp-purple-2) 55%, var(--vsp-blue) 100%);
    box-shadow: 0 6px 18px rgba(var(--vsp-purple-rgb), 0.22);
}

.learndash-wrapper .ld-focus-content .ld-tab-content h1,
.learndash-wrapper .ld-focus-content .ld-tab-content h2,
.learndash-wrapper .ld-focus-content .ld-tab-content h3,
.learndash-wrapper .ld-focus-content .learndash_content_wrap h1,
.learndash-wrapper .ld-focus-content .learndash_content_wrap h2,
.learndash-wrapper .ld-focus-content .learndash_content_wrap h3,
.learndash-wrapper .ld-focus-content .ld-focus-content-body h1,
.learndash-wrapper .ld-focus-content .ld-focus-content-body h2,
.learndash-wrapper .ld-focus-content .ld-focus-content-body h3 {
    text-align: left !important;
    letter-spacing: normal !important;
    max-width: none !important;
}

.learndash-wrapper .ld-focus-content .ld-tab-content h1::after,
.learndash-wrapper .ld-focus-content .ld-tab-content h2::after,
.learndash-wrapper .ld-focus-content .ld-tab-content h3::after,
.learndash-wrapper .ld-focus-content .learndash_content_wrap h1::after,
.learndash-wrapper .ld-focus-content .learndash_content_wrap h2::after,
.learndash-wrapper .ld-focus-content .learndash_content_wrap h3::after,
.learndash-wrapper .ld-focus-content .ld-focus-content-body h1::after,
.learndash-wrapper .ld-focus-content .ld-focus-content-body h2::after,
.learndash-wrapper .ld-focus-content .ld-focus-content-body h3::after {
    content: none !important;
    display: none !important;
}

@media (max-width: 768px) {
    .learndash-wrapper .ld-focus-content > h1:first-of-type,
    .learndash-wrapper .ld-focus-content > .entry-title:first-child {
        font-size: 20px !important;
        line-height: 1.18 !important;
        letter-spacing: -0.4px !important;
        text-align: left !important;
        margin: 0 0 10px 0 !important;
        max-width: 100% !important;
    }

    .learndash-wrapper .ld-focus-content > h1:first-of-type::after,
    .learndash-wrapper .ld-focus-content > .entry-title:first-child::after {
        margin-left: 0 !important;
        width: 72px !important;
        height: 4px !important;
    }
}

/* =====================================================
   BOTÓN VOLVER AL CURSO
   ===================================================== */
.learndash-wrapper .ld-focus-content .ld-course-step-back,
.learndash-wrapper .ld-content-actions .ld-course-step-back,
.learndash-wrapper a.ld-course-step-back,
.learndash-wrapper .ld-content-actions .ld-content-action a.ld-course-step-back {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    background: linear-gradient(135deg, var(--vsp-dark) 0%, var(--vsp-purple) 100%) !important;
    color: var(--vsp-white) !important;
    border: none !important;
    border-radius: 999px !important;
    padding: 14px 28px !important;
    margin: 22px auto 32px auto !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    width: fit-content !important;
    min-width: 230px !important;
    box-shadow: 0 12px 28px rgba(var(--vsp-purple-rgb), 0.28) !important;
    transition: all 0.22s ease-in-out !important;
}

.learndash-wrapper .ld-focus-content .ld-course-step-back:hover,
.learndash-wrapper .ld-content-actions .ld-course-step-back:hover,
.learndash-wrapper a.ld-course-step-back:hover,
.learndash-wrapper .ld-content-actions .ld-content-action a.ld-course-step-back:hover {
    background: linear-gradient(135deg, var(--vsp-dark) 0%, var(--vsp-purple-hover) 100%) !important;
    color: var(--vsp-white) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 16px 34px rgba(var(--vsp-purple-rgb), 0.36) !important;
}

.learndash-wrapper .ld-focus-content .ld-course-step-back::before,
.learndash-wrapper .ld-content-actions .ld-course-step-back::before,
.learndash-wrapper a.ld-course-step-back::before,
.learndash-wrapper .ld-content-actions .ld-content-action a.ld-course-step-back::before {
    content: "←";
    color: var(--vsp-white) !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

.learndash-wrapper .ld-course-step-back,
.learndash-wrapper .ld-course-step-back:visited,
.learndash-wrapper .ld-course-step-back:active,
.learndash-wrapper .ld-course-step-back:focus {
    color: var(--vsp-white) !important;
}

/* =====================================================
   LEARNDASH NOTES PANEL
   ===================================================== */
.learndash-wrapper .ld-focus-content .ld-notes-panel:first-of-type {
    margin-top: 40px !important;
}

.learndash-wrapper .ld-focus-content .ld-notes-panel:first-of-type .ld-notes-panel__header {
    margin-top: 0 !important;
}

.learndash-wrapper .ld-focus-content .ld-notes-panel + .ld-notes-panel {
    margin-top: 18px !important;
}

.learndash-wrapper .ld-notes-panel__header {
    background: var(--vsp-white) !important;
    border: 1px solid var(--vsp-border) !important;
    border-left: 5px solid var(--vsp-purple) !important;
    border-radius: 12px !important;
    padding: 0 18px !important;
    margin: 0 0 10px 0 !important;
    height: 68px !important;
    min-height: 68px !important;
    max-height: 68px !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05) !important;
    transition: all 0.25s ease-in-out !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.learndash-wrapper .ld-notes-panel__header-title-container::before {
    content: "✎";
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    border-radius: 8px !important;
    background: var(--vsp-accent-soft-2) !important;
    color: var(--vsp-purple) !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}

.learndash-wrapper .ld-notes-panel__header:hover {
    background: var(--vsp-accent-soft) !important;
    border-left-color: var(--vsp-purple-2) !important;
    box-shadow: 0 10px 26px rgba(var(--vsp-purple-rgb), 0.09) !important;
}

/* =====================================================
   NAVEGACIÓN INFERIOR LEARNDASH · COMPACTA
   Nativo: Anterior / Completar / Siguiente
   Volver al Curso: acción secundaria
   ===================================================== */
.learndash-wrapper .ld-focus-content .ld-content-actions {
    display: flex !important;
    flex-flow: row wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    border: none !important;
    margin: 30px auto 0 !important;
    padding: 0 !important;
    max-width: 620px !important;
}

.learndash-wrapper .ld-focus-content .ld-content-actions .ld-content-action {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Anterior y Siguiente: controles compactos solo con flecha. */
.learndash-wrapper .ld-focus-content .ld-content-actions .ld-content-action:has(.ld-icon-arrow-left),
.learndash-wrapper .ld-focus-content .ld-content-actions .ld-content-action:has(.ld-icon-arrow-right) {
    order: 1 !important;
}

.learndash-wrapper .ld-focus-content .ld-content-actions .ld-content-action a.ld-button:has(.ld-icon-arrow-left),
.learndash-wrapper .ld-focus-content .ld-content-actions .ld-content-action a.ld-button:has(.ld-icon-arrow-right) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, var(--dt-primary) 0%, var(--dt-secondary) 100%) !important;
    color: var(--vsp-white) !important;
    box-shadow: 0 8px 20px rgba(var(--dt-primary-rgb), 0.20) !important;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease !important;
}

.learndash-wrapper .ld-focus-content .ld-content-actions .ld-content-action a.ld-button:has(.ld-icon-arrow-left):hover,
.learndash-wrapper .ld-focus-content .ld-content-actions .ld-content-action a.ld-button:has(.ld-icon-arrow-right):hover {
    background: linear-gradient(135deg, var(--dt-primary-hover) 0%, var(--dt-secondary-hover) 100%) !important;
    color: var(--vsp-white) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 22px rgba(var(--dt-primary-rgb), 0.28) !important;
}

/* Oculta solo el texto de Anterior/Siguiente; conserva el icono nativo. */
.learndash-wrapper .ld-focus-content .ld-content-actions a.ld-button:has(.ld-icon-arrow-left) .ld-text,
.learndash-wrapper .ld-focus-content .ld-content-actions a.ld-button:has(.ld-icon-arrow-right) .ld-text {
    display: none !important;
}

.learndash-wrapper .ld-focus-content .ld-content-actions a.ld-button:has(.ld-icon-arrow-left) .ld-icon,
.learndash-wrapper .ld-focus-content .ld-content-actions a.ld-button:has(.ld-icon-arrow-right) .ld-icon {
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    color: var(--vsp-white) !important;
}

/* Completar lección/tema: acción principal al centro. */
.learndash-wrapper .ld-focus-content .ld-content-actions .ld-content-action:has(form.sfwd-mark-complete) {
    order: 1 !important;
}

.learndash-wrapper .ld-focus-content .ld-content-actions form.sfwd-mark-complete {
    display: flex !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
}

.learndash-wrapper .ld-focus-content .ld-content-actions form.sfwd-mark-complete input[type="submit"],
.learndash-wrapper .ld-focus-content .ld-content-actions form.sfwd-mark-complete .learndash_mark_complete_button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 180px !important;
    max-width: 250px !important;
    min-height: 46px !important;
    padding: 11px 22px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: var(--vsp-purple) !important;
    color: var(--vsp-white) !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    box-shadow: 0 8px 20px rgba(var(--vsp-purple-rgb), 0.18) !important;
    cursor: pointer !important;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease !important;
}

.learndash-wrapper .ld-focus-content .ld-content-actions form.sfwd-mark-complete input[type="submit"]:hover,
.learndash-wrapper .ld-focus-content .ld-content-actions form.sfwd-mark-complete .learndash_mark_complete_button:hover {
    background: linear-gradient(135deg, var(--dt-primary-hover) 0%, var(--dt-secondary-hover) 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 22px rgba(var(--dt-primary-rgb), 0.28) !important;
}

/* Volver al Curso siempre debajo y visualmente secundario. */
.learndash-wrapper .ld-focus-content .ld-content-actions .ld-content-action:has(.ld-course-step-back) {
    order: 2 !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    margin-top: 4px !important;
}

.learndash-wrapper .ld-focus-content .ld-content-actions a.ld-course-step-back,
.learndash-wrapper .ld-focus-content a.ld-course-step-back {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 40px !important;
    padding: 10px 18px !important;
    margin: 0 auto 34px auto !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, var(--dt-primary) 0%, var(--dt-secondary) 100%) !important;
    color: var(--vsp-white) !important;
    border: 0 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    box-shadow: 0 7px 18px rgba(15, 23, 42, .14) !important;
}

.learndash-wrapper .ld-focus-content .ld-content-actions a.ld-course-step-back::before,
.learndash-wrapper .ld-focus-content a.ld-course-step-back::before {
    font-size: 15px !important;
}


.learndash-wrapper .ld-focus-content .ld-content-actions a.ld-course-step-back:hover,
.learndash-wrapper .ld-focus-content a.ld-course-step-back:hover {
    background: linear-gradient(135deg, var(--dt-primary-hover) 0%, var(--dt-secondary-hover) 100%) !important;
    color: var(--vsp-white) !important;
}

/* En móvil se conserva la misma fila: flecha / completar / flecha. */
@media (max-width: 767px) {
    .learndash-wrapper .ld-focus-content .ld-content-actions {
        flex-flow: row wrap !important;
        gap: 8px !important;
        max-width: 100% !important;
        padding: 0 10px !important;
    }

    .learndash-wrapper .ld-focus-content .ld-content-actions .ld-content-action {
        width: auto !important;
        flex: 0 0 auto !important;
    }

    .learndash-wrapper .ld-focus-content .ld-content-actions form.sfwd-mark-complete input[type="submit"],
    .learndash-wrapper .ld-focus-content .ld-content-actions form.sfwd-mark-complete .learndash_mark_complete_button {
        min-width: 150px !important;
        max-width: 190px !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
        font-size: 13px !important;
    }

    .learndash-wrapper .ld-focus-content .ld-content-actions .ld-content-action:has(.ld-course-step-back) {
        flex: 0 0 100% !important;
        width: 100% !important;
    }
}

/* =====================================================
   OCULTAR TÍTULO EN PÁGINAS DE CURSOS
   ===================================================== */
body.single-sfwd-courses .page-header .entry-title,
body.single-sfwd-courses h1.entry-title,
body.single-sfwd-courses .page-header {
    display: none !important;
}

body.single-sfwd-courses .page-content,
body.single-sfwd-courses .entry-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* =====================================================
   ENCABEZADO CONTENIDO DEL CURSO
   ===================================================== */
.learndash-wrapper .ld-item-list .ld-section-heading,
.learndash-wrapper .ld-course-status-content .ld-section-heading,
.learndash-wrapper .ld-course-list-content .ld-section-heading {
    background: linear-gradient(135deg, var(--vsp-dark) 0%, var(--vsp-dark-2) 45%, var(--vsp-purple) 100%) !important;
    color: var(--vsp-white) !important;
    border-radius: 16px !important;
    padding: 42px 26px !important;
    margin-bottom: 28px !important;
    box-shadow: 0 14px 34px rgba(var(--vsp-purple-rgb), 0.18) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.learndash-wrapper .ld-item-list .ld-section-heading h2,
.learndash-wrapper .ld-item-list .ld-section-heading h3,
.learndash-wrapper .ld-course-status-content .ld-section-heading h2,
.learndash-wrapper .ld-course-status-content .ld-section-heading h3,
.learndash-wrapper .ld-course-list-content .ld-section-heading h2,
.learndash-wrapper .ld-course-list-content .ld-section-heading h3 {
    color: var(--vsp-white) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    font-size: 24px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 768px) {
    .learndash-wrapper .ld-item-list .ld-section-heading,
    .learndash-wrapper .ld-course-status-content .ld-section-heading,
    .learndash-wrapper .ld-course-list-content .ld-section-heading {
        padding: 28px 20px !important;
        border-radius: 14px !important;
        margin-bottom: 22px !important;
    }

    .learndash-wrapper .ld-item-list .ld-section-heading h2,
    .learndash-wrapper .ld-item-list .ld-section-heading h3,
    .learndash-wrapper .ld-course-status-content .ld-section-heading h2,
    .learndash-wrapper .ld-course-status-content .ld-section-heading h3,
    .learndash-wrapper .ld-course-list-content .ld-section-heading h2,
    .learndash-wrapper .ld-course-list-content .ld-section-heading h3 {
        font-size: 20px !important;
        letter-spacing: 0.6px !important;
    }
}

/* =====================================================
   MÓDULOS DEL PLAN DE ESTUDIO
   ===================================================== */
.learndash-wrapper .ld-lesson-section-heading,
.learndash-wrapper .ld-section-heading.ld-lesson-section-heading,
.learndash-wrapper .ld-item-list-section-heading {
    background: linear-gradient(135deg, var(--vsp-dark) 0%, var(--vsp-dark-2) 55%, var(--vsp-purple) 100%) !important;
    color: var(--vsp-white) !important;
    border-radius: 12px !important;
    border-left: 5px solid var(--vsp-purple-2) !important;
    padding: 16px 24px !important;
    margin: 28px 0 18px 0 !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    box-shadow: 0 8px 22px rgba(var(--vsp-purple-rgb), 0.14) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    position: relative !important;
    overflow: hidden !important;
}

.learndash-wrapper .ld-lesson-section-heading span,
.learndash-wrapper .ld-section-heading.ld-lesson-section-heading span,
.learndash-wrapper .ld-item-list-section-heading span,
.learndash-wrapper .ld-lesson-section-heading div,
.learndash-wrapper .ld-section-heading.ld-lesson-section-heading div,
.learndash-wrapper .ld-item-list-section-heading div,
.learndash-wrapper .ld-lesson-section-heading strong,
.learndash-wrapper .ld-section-heading.ld-lesson-section-heading strong,
.learndash-wrapper .ld-item-list-section-heading strong {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    color: var(--vsp-white) !important;
}

.learndash-wrapper .ld-lesson-section-heading::before,
.learndash-wrapper .ld-lesson-section-heading::after,
.learndash-wrapper .ld-section-heading.ld-lesson-section-heading::before,
.learndash-wrapper .ld-section-heading.ld-lesson-section-heading::after,
.learndash-wrapper .ld-item-list-section-heading::before,
.learndash-wrapper .ld-item-list-section-heading::after {
    display: none !important;
    content: none !important;
}

.learndash-wrapper .ld-lesson-section-heading *,
.learndash-wrapper .ld-section-heading.ld-lesson-section-heading *,
.learndash-wrapper .ld-item-list-section-heading * {
    color: var(--vsp-white) !important;
    text-shadow: none !important;
}

@media (max-width: 768px) {
    .learndash-wrapper .ld-lesson-section-heading,
    .learndash-wrapper .ld-section-heading.ld-lesson-section-heading,
    .learndash-wrapper .ld-item-list-section-heading {
        font-size: 16px !important;
        padding: 14px 18px !important;
        margin: 24px 0 16px 0 !important;
        border-radius: 10px !important;
    }
}

/* =====================================================
   VISOR PDF / PDF EMBEDDER
   ===================================================== */
.learndash-wrapper .ld-focus-content .pdfemb-viewer,
.learndash-wrapper .ld-focus-content .pdfemb-viewer *,
.learndash-wrapper .ld-focus-content .pdfjs-viewer,
.learndash-wrapper .ld-focus-content .pdfjs-viewer * {
    box-sizing: border-box !important;
}

.learndash-wrapper .ld-focus-content .pdfemb-viewer,
.learndash-wrapper .ld-focus-content .pdfjs-viewer,
.learndash-wrapper .ld-focus-content .wp-block-file {
    width: 100% !important;
    max-width: 1020px !important;
    margin: 30px auto 55px auto !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: var(--vsp-white) !important;
    border: 1px solid #D1D5DB !important;
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16) !important;
}

.learndash-wrapper .ld-focus-content .pdfemb-toolbar {
    background: linear-gradient(135deg, var(--vsp-dark) 0%, var(--vsp-dark-2) 55%, var(--vsp-purple) 100%) !important;
    color: var(--vsp-white) !important;
    border: none !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 10px !important;
}

.learndash-wrapper .ld-focus-content .pdfemb-pagescontainer,
.learndash-wrapper .ld-focus-content .pdfemb-inner-div {
    background: var(--vsp-bg) !important;
}

.learndash-wrapper .ld-focus-content .pdfemb-page,
.learndash-wrapper .ld-focus-content .pdfemb-viewer canvas {
    margin: 0 auto !important;
    background: var(--vsp-white) !important;
}

@media (max-width: 768px) {
    .learndash-wrapper .ld-focus-content .pdfemb-viewer,
    .learndash-wrapper .ld-focus-content .pdfjs-viewer,
    .learndash-wrapper .ld-focus-content .wp-block-file {
        max-width: calc(100% - 20px) !important;
        margin: 22px auto 38px auto !important;
        border-radius: 12px !important;
    }

    .learndash-wrapper .ld-focus-content .pdfemb-toolbar {
        height: 40px !important;
        min-height: 40px !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }

    .learndash-wrapper .ld-focus-content .pdfemb-toolbar span,
    .learndash-wrapper .ld-focus-content .pdfemb-toolbar div {
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    .learndash-wrapper .ld-focus-content .pdfemb-viewer,
    .learndash-wrapper .ld-focus-content .pdfjs-viewer,
    .learndash-wrapper .ld-focus-content .wp-block-file {
        max-width: calc(100% - 12px) !important;
        border-radius: 10px !important;
    }
}

/* =====================================================
   MENÚ USUARIO EN FOCUS MODE
   Cambiar "Hola usuario" por icono de menú
   ===================================================== */
.ld-focus-header .ld-user-menu,
.learndash-wrapper .ld-user-menu {
    min-width: 74px !important;
    justify-content: center !important;
    cursor: pointer !important;
    position: relative !important;
}

.ld-focus-header .ld-user-menu .ld-text,
.learndash-wrapper .ld-user-menu .ld-text,
.ld-user-menu .ld-text {
    font-size: 0 !important;
    color: transparent !important;
    width: 0 !important;
    overflow: hidden !important;
    display: inline-block !important;
}

.ld-focus-header .ld-user-menu .ld-profile-avatar,
.learndash-wrapper .ld-user-menu .ld-profile-avatar,
.ld-user-menu .ld-profile-avatar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: hidden !important;
}

.ld-focus-header .ld-user-menu::before,
.learndash-wrapper .ld-user-menu::before,
.ld-user-menu::before {
    content: "☰";
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
    background: #F1F5F9 !important;
    color: var(--vsp-purple) !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    transition: all 0.25s ease !important;
}

/* =====================================================
   LOGROS / PUNTOS LEARNDASH
   ===================================================== */
.ld-achievements .ld-achievement-items {
    display: none;
}

.learndash-wrapper .ld-profile-summary .ld-profile-stats .ld-profile-stat:last-child {
    border-right: 0;
    display: none;
}

/* =====================================================
   RANKING DE LOGROS Y PUNTOS
   Solo afecta .vsp-ranking-logros
   ===================================================== */
.vsp-ranking-logros {
    width: 100% !important;
    max-width: 100% !important;
}

.vsp-ranking-logros h1,
.vsp-ranking-logros h2,
.vsp-ranking-logros h3,
.vsp-ranking-logros h4,
.vsp-ranking-logros .elementor-heading-title {
    color: var(--vsp-dark) !important;
    font-weight: 900 !important;
    letter-spacing: -0.3px !important;
}

.vsp-ranking-logros .elementor-widget-shortcode,
.vsp-ranking-logros .elementor-shortcode {
    width: 100% !important;
    max-width: 100% !important;
}

.vsp-ranking-logros table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: var(--vsp-white) !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    border: 1px solid rgba(var(--vsp-purple-rgb), 0.14) !important;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08) !important;
    margin: 18px 0 38px 0 !important;
}

.vsp-ranking-logros table thead tr,
.vsp-ranking-logros table thead th {
    background: linear-gradient(135deg, var(--vsp-dark) 0%, #111827 46%, var(--vsp-purple) 100%) !important;
    color: var(--vsp-white) !important;
}

.vsp-ranking-logros table th {
    color: var(--vsp-white) !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    padding: 18px 22px !important;
    border: none !important;
    text-align: left !important;
    vertical-align: middle !important;
}

.vsp-ranking-logros table th:first-child {
    border-radius: 18px 0 0 0 !important;
}

.vsp-ranking-logros table th:last-child {
    border-radius: 0 18px 0 0 !important;
}

.vsp-ranking-logros table tbody tr {
    background: var(--vsp-white) !important;
}

.vsp-ranking-logros table td {
    background: var(--vsp-white) !important;
    color: var(--vsp-dark) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    padding: 22px !important;
    border: none !important;
    border-bottom: 1px solid #EEF2F7 !important;
    vertical-align: middle !important;
}

.vsp-ranking-logros table tbody tr:last-child td {
    border-bottom: none !important;
}

.vsp-ranking-logros table tbody tr:hover td {
    background: var(--vsp-accent-soft) !important;
}

.vsp-ranking-logros table td:first-child {
    font-weight: 900 !important;
    color: var(--vsp-dark) !important;
}

.vsp-ranking-logros table td:last-child {
    color: var(--vsp-purple) !important;
    font-size: 18px !important;
    font-weight: 950 !important;
}

.vsp-ranking-logros table img {
    width: 36px !important;
    height: 36px !important;
    object-fit: contain !important;
    background: var(--vsp-white) !important;
    border-radius: 50% !important;
    padding: 5px !important;
    margin: 0 5px !important;
    border: 2px solid var(--vsp-border) !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08) !important;
    vertical-align: middle !important;
}

.vsp-ranking-logros table tbody tr:first-child td {
    background: linear-gradient(135deg, var(--vsp-accent-soft) 0%, var(--vsp-white) 100%) !important;
}

.vsp-ranking-logros table tbody tr:first-child td:first-child::before {
    content: "🏆 ";
}

.vsp-ranking-logros table,
.vsp-ranking-logros table tr,
.vsp-ranking-logros table th,
.vsp-ranking-logros table td {
    border-left: none !important;
    border-right: none !important;
}

.vsp-ranking-logros table a {
    color: inherit !important;
    text-decoration: none !important;
}

@media (max-width: 1024px) {
    .vsp-ranking-logros table th {
        font-size: 12.5px !important;
        padding: 16px !important;
    }

    .vsp-ranking-logros table td {
        font-size: 14px !important;
        padding: 18px 16px !important;
    }

    .vsp-ranking-logros table td:last-child {
        font-size: 16px !important;
    }

    .vsp-ranking-logros table img {
        width: 32px !important;
        height: 32px !important;
        padding: 4px !important;
    }
}

@media (max-width: 768px) {
    .vsp-ranking-logros {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    .vsp-ranking-logros .elementor-widget-shortcode,
    .vsp-ranking-logros .elementor-shortcode {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
        padding-bottom: 0 !important;
    }

    .vsp-ranking-logros table {
        width: 100% !important;
        min-width: 0 !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
        background: var(--vsp-white) !important;
        border-radius: 16px !important;
        overflow: hidden !important;
        border: 1px solid rgba(var(--vsp-purple-rgb), 0.16) !important;
        box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08) !important;
        margin: 14px 0 30px 0 !important;
        table-layout: fixed !important;
    }

    .vsp-ranking-logros table thead {
        display: table-header-group !important;
    }

    .vsp-ranking-logros table thead tr {
        display: table-row !important;
    }

    .vsp-ranking-logros table thead th {
        display: table-cell !important;
        background: linear-gradient(135deg, var(--vsp-dark) 0%, #111827 48%, var(--vsp-purple) 100%) !important;
        color: var(--vsp-white) !important;
        font-size: 10.5px !important;
        font-weight: 900 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.45px !important;
        padding: 13px 8px !important;
        border: none !important;
        text-align: center !important;
        vertical-align: middle !important;
        line-height: 1.25 !important;
        white-space: normal !important;
    }

    .vsp-ranking-logros table tbody {
        display: table-row-group !important;
    }

    .vsp-ranking-logros table tbody tr {
        display: table-row !important;
        background: var(--vsp-white) !important;
    }

    .vsp-ranking-logros table tbody td {
        display: table-cell !important;
        background: var(--vsp-white) !important;
        color: var(--vsp-dark) !important;
        font-size: 12.5px !important;
        font-weight: 800 !important;
        padding: 16px 8px !important;
        border: none !important;
        border-bottom: 1px solid #EEF2F7 !important;
        vertical-align: middle !important;
        line-height: 1.35 !important;
        white-space: normal !important;
        word-break: normal !important;
    }

    .vsp-ranking-logros table tbody tr:last-child td {
        border-bottom: none !important;
    }

    .vsp-ranking-logros table th:nth-child(1),
    .vsp-ranking-logros table td:nth-child(1) {
        width: 34% !important;
        text-align: left !important;
    }

    .vsp-ranking-logros table th:nth-child(2),
    .vsp-ranking-logros table td:nth-child(2) {
        width: 42% !important;
        text-align: center !important;
    }

    .vsp-ranking-logros table th:nth-child(3),
    .vsp-ranking-logros table td:nth-child(3) {
        width: 24% !important;
        text-align: center !important;
    }

    .vsp-ranking-logros table td:first-child {
        font-size: 12.5px !important;
        font-weight: 900 !important;
        color: var(--vsp-dark) !important;
    }

    .vsp-ranking-logros table td:last-child {
        color: var(--vsp-purple) !important;
        font-size: 16px !important;
        font-weight: 950 !important;
    }

    .vsp-ranking-logros table img {
        width: 27px !important;
        height: 27px !important;
        object-fit: contain !important;
        background: var(--vsp-white) !important;
        border-radius: 50% !important;
        padding: 4px !important;
        margin: 2px !important;
        border: 2px solid var(--vsp-border) !important;
        box-shadow: 0 7px 16px rgba(15, 23, 42, 0.08) !important;
        vertical-align: middle !important;
    }

    .vsp-ranking-logros table tbody tr:first-child td {
        background: linear-gradient(135deg, var(--vsp-accent-soft) 0%, var(--vsp-white) 100%) !important;
    }

    .vsp-ranking-logros table tbody tr:first-child td:first-child::before {
        content: none !important;
        display: none !important;
    }

    .vsp-ranking-logros table th:first-child {
        border-radius: 16px 0 0 0 !important;
    }

    .vsp-ranking-logros table th:last-child {
        border-radius: 0 16px 0 0 !important;
    }
}

@media (max-width: 480px) {
    .vsp-ranking-logros table th {
        font-size: 9.8px !important;
        padding: 12px 6px !important;
        letter-spacing: 0.35px !important;
    }

    .vsp-ranking-logros table td {
        font-size: 12px !important;
        padding: 15px 6px !important;
    }

    .vsp-ranking-logros table td:first-child {
        font-size: 12px !important;
    }

    .vsp-ranking-logros table td:last-child {
        font-size: 15px !important;
    }

    .vsp-ranking-logros table img {
        width: 25px !important;
        height: 25px !important;
        padding: 3.5px !important;
        margin: 2px 1px !important;
    }
}


/* =====================================================
   V1.3.2 - ELIMINAR AZUL HEREDADO DE LEARNDASH
   Todos los componentes de marca toman los colores del cliente.
   ===================================================== */
.learndash-wrapper {
    --ld-color-primary: var(--vsp-purple) !important;
    --ld-color-secondary: var(--vsp-purple-2) !important;
    --ld-color-tertiary: var(--vsp-accent-soft) !important;
}

/* Botón para contraer/expandir el menú lateral. */
.learndash-wrapper .ld-focus-sidebar .ld-focus-sidebar-trigger,
.learndash-wrapper .ld-focus-sidebar .ld-focus-sidebar-trigger:hover,
.learndash-wrapper .ld-focus-sidebar .ld-focus-sidebar-trigger:focus,
.learndash-wrapper .ld-focus-sidebar .ld-focus-sidebar-trigger::before,
.learndash-wrapper .ld-focus-sidebar .ld-focus-sidebar-trigger::after {
    background: var(--vsp-purple) !important;
    border-color: var(--vsp-purple) !important;
    color: var(--vsp-white) !important;
}
.learndash-wrapper .ld-focus-sidebar .ld-focus-sidebar-trigger .ld-icon,
.learndash-wrapper .ld-focus-sidebar .ld-focus-sidebar-trigger svg {
    color: var(--vsp-white) !important;
    fill: var(--vsp-white) !important;
}

/* Cabeceras de listas de temas/lecciones (p. ej. "Contenido de la Lección"). */
.learndash-wrapper .ld-table-list .ld-table-list-header,
.learndash-wrapper .ld-table-list.ld-topic-list .ld-table-list-header,
.learndash-wrapper .ld-lesson-topic-list .ld-table-list-header,
.learndash-wrapper .ld-item-list .ld-item-list-item .ld-item-list-item-preview.ld-is-current-item {
    background: var(--vsp-purple) !important;
    border-color: var(--vsp-purple) !important;
    color: var(--vsp-white) !important;
}
.learndash-wrapper .ld-table-list .ld-table-list-header a,
.learndash-wrapper .ld-table-list .ld-table-list-header span,
.learndash-wrapper .ld-table-list .ld-table-list-header .ld-text,
.learndash-wrapper .ld-table-list .ld-table-list-header .ld-icon,
.learndash-wrapper .ld-table-list .ld-table-list-header svg {
    color: var(--vsp-white) !important;
    fill: var(--vsp-white) !important;
}

/* Controles LearnDash que todavía puedan heredar el azul nativo. */
.learndash-wrapper .ld-button,
.learndash-wrapper a.ld-button,
.learndash-wrapper .ld-expand-button .ld-icon,
.learndash-wrapper .ld-status-in-progress,
.learndash-wrapper .ld-progress .ld-progress-bar .ld-progress-bar-percentage {
    border-color: var(--vsp-purple) !important;
}
.learndash-wrapper .ld-progress .ld-progress-bar .ld-progress-bar-percentage {
    background: var(--vsp-purple) !important;
}


/* =====================================================
   V1.3.3 - CABECERA LIMPIA: SIN FIGURA OVALADA
   El control lateral conserva solo el botón circular con flecha.
   ===================================================== */
.learndash-wrapper .ld-focus-sidebar .ld-course-navigation-heading::before,
.learndash-wrapper .ld-focus-sidebar .ld-course-navigation-heading::after {
    content: none !important;
    display: none !important;
    background: transparent !important;
}

/* Evitar que los pseudo-elementos nativos del trigger formen una pastilla/óvalo. */
.learndash-wrapper .ld-focus-sidebar .ld-focus-sidebar-trigger::before,
.learndash-wrapper .ld-focus-sidebar .ld-focus-sidebar-trigger::after {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.learndash-wrapper .ld-focus-sidebar .ld-focus-sidebar-trigger {
    background: transparent !important;
    border: 3px solid var(--vsp-white) !important;
    box-shadow: none !important;
    border-radius: 50% !important;
}

/* =====================================================
   V1.3.4 - CONTROL LATERAL COMPACTO Y COLOR DEL CLIENTE
   Elimina por completo la figura ovalada nativa de LearnDash.
   Conserva solo un botón circular que hereda el color principal.
   ===================================================== */
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation-heading::before,
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation-heading::after {
    content: none !important;
    display: none !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation-heading {
    overflow: visible !important;
}

body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-focus-sidebar-trigger,
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-focus-sidebar-trigger:hover,
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-focus-sidebar-trigger:focus,
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-focus-sidebar-trigger:active {
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    padding: 0 !important;
    right: 12px !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    background: var(--vsp-purple) !important;
    background-color: var(--vsp-purple) !important;
    border: 3px solid var(--vsp-white) !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    outline: none !important;
    color: var(--vsp-white) !important;
    overflow: hidden !important;
    z-index: 20 !important;
}

body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-focus-sidebar-trigger:hover,
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-focus-sidebar-trigger:focus-visible {
    background: var(--vsp-purple-hover) !important;
    background-color: var(--vsp-purple-hover) !important;
}

body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-focus-sidebar-trigger::before,
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-focus-sidebar-trigger::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-focus-sidebar-trigger .ld-icon,
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-focus-sidebar-trigger svg {
    color: var(--vsp-white) !important;
    fill: var(--vsp-white) !important;
}


/* =====================================================
   V1.3.5 - CONTROL LATERAL DEFINITIVO + AZULES RESIDUALES
   Un solo círculo, sin aro/óvalo blanco. Todos los estados de
   marca heredan la paleta configurada para el cliente.
   ===================================================== */

/* El botón contenedor queda completamente invisible: evita el aro blanco nativo. */
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation-heading #ld-focus-sidebar-toggle.ld-focus-sidebar-trigger,
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation-heading #ld-focus-sidebar-toggle.ld-focus-sidebar-trigger:hover,
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation-heading #ld-focus-sidebar-toggle.ld-focus-sidebar-trigger:focus,
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation-heading #ld-focus-sidebar-toggle.ld-focus-sidebar-trigger:active {
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    padding: 0 !important;
    right: 12px !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    border-radius: 50% !important;
    overflow: visible !important;
    z-index: 30 !important;
}

body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation-heading #ld-focus-sidebar-toggle.ld-focus-sidebar-trigger::before,
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation-heading #ld-focus-sidebar-toggle.ld-focus-sidebar-trigger::after {
    content: none !important;
    display: none !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* El icono es el ÚNICO círculo visible y usa el color principal del cliente. */
body .learndash-wrapper .ld-focus .ld-focus-sidebar #ld-focus-sidebar-toggle.ld-focus-sidebar-trigger > .ld-icon,
body .learndash-wrapper .ld-focus .ld-focus-sidebar #ld-focus-sidebar-toggle.ld-focus-sidebar-trigger > span.ld-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 52px !important;
    min-width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--vsp-purple) !important;
    background-color: var(--vsp-purple) !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    border-radius: 50% !important;
    color: var(--vsp-white) !important;
    font-size: 26px !important;
    line-height: 1 !important;
}
body .learndash-wrapper .ld-focus .ld-focus-sidebar #ld-focus-sidebar-toggle.ld-focus-sidebar-trigger:hover > .ld-icon,
body .learndash-wrapper .ld-focus .ld-focus-sidebar #ld-focus-sidebar-toggle.ld-focus-sidebar-trigger:focus-visible > .ld-icon {
    background: var(--vsp-purple-hover) !important;
    background-color: var(--vsp-purple-hover) !important;
}

/* Neutraliza cualquier aro decorativo adicional dentro de la cabecera. */
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation-heading::before,
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation-heading::after,
body .learndash-wrapper .ld-focus .ld-focus-sidebar #ld-focus-sidebar-toggle .ld-icon::before,
body .learndash-wrapper .ld-focus .ld-focus-sidebar #ld-focus-sidebar-toggle .ld-icon::after {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

/* Enlaces/títulos activos del menú lateral: nunca azul nativo de LearnDash. */
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-is-current-item a,
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-is-current-item .ld-lesson-title,
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-is-current-item .ld-topic-title,
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-lesson-item-preview a:hover,
body .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-topic-row a:hover {
    color: var(--vsp-purple) !important;
}

/* Estados de curso y botones de marca heredan el color principal. */
body .learndash-wrapper .ld-status-in-progress,
body .learndash-wrapper .ld-status.ld-status-progress,
body .learndash-wrapper .ld-status.ld-status-in-progress,
body .learndash-wrapper .ld-course-status .ld-status,
body .learndash-wrapper .ld-button,
body .learndash-wrapper a.ld-button {
    background-color: var(--vsp-purple) !important;
    border-color: var(--vsp-purple) !important;
    color: var(--vsp-white) !important;
}
body .learndash-wrapper .ld-status-in-progress:hover,
body .learndash-wrapper .ld-button:hover,
body .learndash-wrapper a.ld-button:hover {
    background-color: var(--vsp-purple-hover) !important;
    border-color: var(--vsp-purple-hover) !important;
}

/* Progreso y navegación usan la paleta del cliente. */
body .learndash-wrapper .ld-progress .ld-progress-bar .ld-progress-bar-percentage {
    background-color: var(--vsp-purple) !important;
}
body .learndash-wrapper .ld-focus-header .ld-content-action a,
body .learndash-wrapper .ld-focus-header .ld-content-action .ld-text,
body .learndash-wrapper .ld-focus-header .ld-content-action .ld-icon {
    color: var(--vsp-purple-2) !important;
}

/* =====================================================
   DT 1.4.6 · NAVEGACIÓN INFERIOR LEARNDASH
   Estructura fija: <  Completar lección  > / Volver al Curso
   ===================================================== */
.learndash-wrapper .ld-focus-content .ld-content-actions {
    display: grid !important;
    grid-template-columns: 46px minmax(180px, 250px) 46px !important;
    grid-template-rows: auto auto !important;
    justify-content: center !important;
    align-items: center !important;
    column-gap: 10px !important;
    row-gap: 12px !important;
    max-width: 620px !important;
}

/* LearnDash coloca Completar + Volver al curso dentro de la acción central.
   display:contents permite ubicarlos en filas distintas sin alterar el HTML nativo. */
.learndash-wrapper .ld-focus-content .ld-content-actions > .ld-content-action:nth-child(2) {
    display: contents !important;
}

.learndash-wrapper .ld-focus-content .ld-content-actions > .ld-content-action:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
}

.learndash-wrapper .ld-focus-content .ld-content-actions > .ld-content-action:nth-child(2) form.sfwd-mark-complete {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: center !important;
}

.learndash-wrapper .ld-focus-content .ld-content-actions > .ld-content-action:last-child {
    grid-column: 3 !important;
    grid-row: 1 !important;
}

.learndash-wrapper .ld-focus-content .ld-content-actions > .ld-content-action:nth-child(2) .ld-course-step-back {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    justify-self: center !important;
    margin: 0 auto 34px !important;
}

/* Evita que reglas anteriores conviertan el bloque central en una fila completa. */
.learndash-wrapper .ld-focus-content .ld-content-actions .ld-content-action:has(.ld-course-step-back) {
    width: auto !important;
    margin-top: 0 !important;
}

@media (max-width: 767px) {
    .learndash-wrapper .ld-focus-content .ld-content-actions {
        grid-template-columns: 42px minmax(145px, 1fr) 42px !important;
        column-gap: 7px !important;
        row-gap: 10px !important;
        width: 100% !important;
        max-width: 360px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 0 8px !important;
    }

    .learndash-wrapper .ld-focus-content .ld-content-actions .ld-content-action a.ld-button:has(.ld-icon-arrow-left),
    .learndash-wrapper .ld-focus-content .ld-content-actions .ld-content-action a.ld-button:has(.ld-icon-arrow-right) {
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;
    }

    .learndash-wrapper .ld-focus-content .ld-content-actions form.sfwd-mark-complete input[type="submit"],
    .learndash-wrapper .ld-focus-content .ld-content-actions form.sfwd-mark-complete .learndash_mark_complete_button {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        min-height: 42px !important;
        white-space: nowrap !important;
    }
}
