/* =========================================================
   CAMPUS FEH UI 2.0
   Sistema estructural y ancho de aplicaciones
   ========================================================= */

/* ---------------------------------------------------------
   Normalización estructural
   --------------------------------------------------------- */

.fehx-dashboard,
.fehx-course-experience,
.fehx-path,
.fehd-dashboard {
    box-sizing: border-box;
}

/* ---------------------------------------------------------
   Cursos Tutor renderizados mediante Elementor
   --------------------------------------------------------- */

/*
 * Astra no debe limitar el ancho de las páginas individuales
 * de cursos.
 */
body.single-courses .site-content > .ast-container {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    padding-inline: 0 !important;
}

/*
 * Elementor debe ocupar el ancho completo disponible.
 */
body.single-courses .site-content .elementor,
body.single-courses .site-content .elementor-section-wrap {
    width: 100% !important;
    max-width: none !important;
}

/*
 * Contenedor interno Boxed de Elementor.
 *
 * Este selector es el que anteriormente mostraba 1140 px
 * en la consola.
 */
body.single-courses
.elementor
.e-con.e-con-boxed
> .e-con-inner {
    width: min(
        calc(100% - (var(--feh-gutter) * 2)),
        var(--feh-width-app)
    ) !important;

    max-width: var(--feh-width-app) !important;
    margin-inline: auto !important;
}

/*
 * El widget Shortcode no debe crear otro cuello de botella.
 */
body.single-courses .elementor-widget-shortcode,
body.single-courses
.elementor-widget-shortcode
> .elementor-widget-container,
body.single-courses
.elementor-widget-shortcode
.elementor-shortcode {
    width: 100% !important;
    max-width: none !important;
}

/* ---------------------------------------------------------
   Aplicación Course Experience
   --------------------------------------------------------- */

body.single-courses .fehx-course-experience {
    width: 100% !important;
    max-width: var(--feh-width-app) !important;
    margin-inline: auto !important;
}

/*
 * Componentes superiores que actualmente aparecen limitados
 * a aproximadamente 760 px.
 */
body.single-courses .fehx-course-experience .fehx-heading,
body.single-courses
.fehx-course-experience
.fehx-continue-card {
    width: 100% !important;
    max-width: none !important;
    margin-inline: auto !important;
}

/*
 * Ruta académica.
 */
body.single-courses .fehx-course-experience .fehx-path,
body.single-courses .fehx-path {
    width: 100% !important;
    max-width: var(--feh-width-app) !important;
    margin-inline: auto !important;
}

/*
 * La línea temporal mantiene un ancho legible.
 * La aplicación es amplia, pero el texto no debe transformarse
 * en líneas excesivamente largas.
 */
body.single-courses .fehx-path__timeline {
    width: 100% !important;
    max-width: 1320px !important;
    margin-inline: auto !important;
}

/*
 * Beneficios y recomendaciones.
 */
body.single-courses .fehx-benefits__grid,
body.single-courses .fehx-recommendations__grid {
    width: 100% !important;
    max-width: none !important;
}

/* ---------------------------------------------------------
   Dashboard FEHX clásico
   --------------------------------------------------------- */

.fehx-dashboard {
    width: min(
        calc(100% - (var(--feh-gutter) * 2)),
        var(--feh-width-dashboard)
    ) !important;

    max-width: var(--feh-width-dashboard) !important;
    margin-inline: auto !important;
}

/* ---------------------------------------------------------
   Dashboard Premium FEHD
   --------------------------------------------------------- */

.fehd-dashboard {
    width: min(
        calc(100% - (var(--feh-gutter) * 2)),
        var(--feh-width-dashboard)
    ) !important;

    max-width: var(--feh-width-dashboard) !important;
    margin-inline: auto !important;
}

/* ---------------------------------------------------------
   Tablet
   --------------------------------------------------------- */

@media (max-width: 1024px) {
    body.single-courses
    .elementor
    .e-con.e-con-boxed
    > .e-con-inner {
        width: calc(100% - 32px) !important;
    }

    body.single-courses .fehx-path__timeline {
        max-width: 100% !important;
    }
}

/* ---------------------------------------------------------
   Móvil
   --------------------------------------------------------- */

@media (max-width: 767px) {
    body.single-courses
    .elementor
    .e-con.e-con-boxed
    > .e-con-inner {
        width: 100% !important;
        padding-inline: 16px !important;
    }

    .fehx-dashboard,
    .fehd-dashboard {
        width: 100% !important;
        padding-inline: 16px !important;
    }
}
/* =========================================================
   CAMPUS FEH UI 2.0
   TUTOR LMS — LEARNING AREA
   ========================================================= */

/*
|--------------------------------------------------------------------------
| Variables específicas del aula Tutor
|--------------------------------------------------------------------------
*/

:root {
    --feh-tutor-sidebar-width: 320px;
    --feh-tutor-content-max-width: 1500px;
    --feh-tutor-reading-max-width: 1180px;
    --feh-tutor-topbar-height: 76px;
    --feh-tutor-gap: 28px;
}

/*
|--------------------------------------------------------------------------
| Contenedor general de la aplicación de aprendizaje
|--------------------------------------------------------------------------
*/

body.single-lesson .tutor-course-single-content-wrapper,
body.single-tutor_quiz .tutor-course-single-content-wrapper,
body.single-tutor_assignments .tutor-course-single-content-wrapper {
    width: 100% !important;
    max-width: none !important;
    min-height: 100vh;
    margin: 0 !important;
    padding: 0 !important;
    background: #f5f7fa;
}

/*
|--------------------------------------------------------------------------
| Área principal Tutor
|--------------------------------------------------------------------------
*/

body.single-lesson .tutor-learning-area,
body.single-tutor_quiz .tutor-learning-area,
body.single-tutor_assignments .tutor-learning-area {
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    margin: 0 !important;
    background: #f5f7fa;
}

/*
|--------------------------------------------------------------------------
| Estructura horizontal: sidebar + contenido
|--------------------------------------------------------------------------
*/

@media (min-width: 768px) {

    body.single-lesson .tutor-learning-area-body,
    body.single-tutor_quiz .tutor-learning-area-body,
    body.single-tutor_assignments .tutor-learning-area-body {
        display: grid !important;
        grid-template-columns:
            var(--feh-tutor-sidebar-width)
            minmax(0, 1fr) !important;

        width: 100% !important;
        max-width: none !important;
        min-height: calc(
            100vh - var(--feh-tutor-topbar-height)
        );

        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
        align-items: stretch;
    }
}

/*
|--------------------------------------------------------------------------
| Sidebar Tutor
|--------------------------------------------------------------------------
*/

body.single-lesson .tutor-course-single-sidebar-wrapper,
body.single-tutor_quiz .tutor-course-single-sidebar-wrapper,
body.single-tutor_assignments
.tutor-course-single-sidebar-wrapper,
body.single-lesson .tutor-learning-sidebar,
body.single-tutor_quiz .tutor-learning-sidebar,
body.single-tutor_assignments .tutor-learning-sidebar {
    width: var(--feh-tutor-sidebar-width) !important;
    max-width: var(--feh-tutor-sidebar-width) !important;
    min-width: var(--feh-tutor-sidebar-width) !important;

    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    box-shadow:
        8px 0 30px rgba(15, 23, 42, 0.035);
}

/*
 * Evita que reglas internas de Tutor sigan alterando
 * el tamaño del sidebar.
 */
body.single-lesson
.tutor-course-single-sidebar-wrapper
> div,
body.single-tutor_quiz
.tutor-course-single-sidebar-wrapper
> div,
body.single-tutor_assignments
.tutor-course-single-sidebar-wrapper
> div {
    width: 100% !important;
    max-width: none !important;
}

/*
|--------------------------------------------------------------------------
| Contenedor principal de contenido
|--------------------------------------------------------------------------
*/

body.single-lesson .tutor-learning-area-content,
body.single-tutor_quiz .tutor-learning-area-content,
body.single-tutor_assignments .tutor-learning-area-content {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    margin: 0 !important;

    padding:
        clamp(28px, 3vw, 52px)
        clamp(24px, 4vw, 70px)
        clamp(48px, 5vw, 80px) !important;

    background:
        radial-gradient(
            circle at 95% 5%,
            rgba(15, 105, 180, 0.045),
            transparent 28%
        ),
        #f5f7fa;

    box-sizing: border-box;
}

/*
|--------------------------------------------------------------------------
| Área interna de lectura
|--------------------------------------------------------------------------
|
| Tutor suele insertar uno o más contenedores internos.
| En vez de limitar toda la aplicación, limitamos solamente
| el cuerpo real del contenido para mantener legibilidad.
|--------------------------------------------------------------------------
*/

body.single-lesson
.tutor-learning-area-content
> *,
body.single-tutor_quiz
.tutor-learning-area-content
> *,
body.single-tutor_assignments
.tutor-learning-area-content
> * {
    width: 100%;
    max-width: var(--feh-tutor-content-max-width);
    margin-inline: auto;
    box-sizing: border-box;
}

/*
|--------------------------------------------------------------------------
| Caja académica principal
|--------------------------------------------------------------------------
*/

body.single-lesson
.tutor-learning-area-content
.tutor-course-spotlight-wrapper,
body.single-lesson
.tutor-learning-area-content
.tutor-lesson-content-area,
body.single-lesson
.tutor-learning-area-content
.tutor-course-lesson-content,
body.single-tutor_quiz
.tutor-learning-area-content
.tutor-quiz-wrapper,
body.single-tutor_assignments
.tutor-learning-area-content
.tutor-assignment-wrapper {
    width: 100% !important;
    max-width: var(--feh-tutor-content-max-width) !important;

    margin-inline: auto !important;

    border: 1px solid #e2e8f0;
    border-radius: 26px;

    background: #ffffff;

    box-shadow:
        0 18px 46px rgba(15, 23, 42, 0.075);

    box-sizing: border-box;
}

/*
|--------------------------------------------------------------------------
| Cuerpo de lectura
|--------------------------------------------------------------------------
*/

body.single-lesson
.tutor-learning-area-content
.tutor-course-spotlight-wrapper
.tutor-lesson-content,
body.single-lesson
.tutor-learning-area-content
.tutor-lesson-content-area
.tutor-lesson-content,
body.single-lesson
.tutor-learning-area-content
.tutor-course-lesson-content {
    width: 100% !important;
    max-width: var(--feh-tutor-reading-max-width) !important;

    margin-inline: auto !important;

    padding:
        clamp(24px, 3vw, 46px) !important;

    color: #0f172a;

    font-size: 1rem;
    line-height: 1.75;

    box-sizing: border-box;
}

/*
|--------------------------------------------------------------------------
| Elementos tipográficos del contenido
|--------------------------------------------------------------------------
*/

body.single-lesson
.tutor-learning-area-content
h1,
body.single-lesson
.tutor-learning-area-content
h2,
body.single-lesson
.tutor-learning-area-content
h3,
body.single-lesson
.tutor-learning-area-content
h4 {
    color: #0f172a !important;
    letter-spacing: -0.025em;
}

body.single-lesson
.tutor-learning-area-content
h1 {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.08;
}

body.single-lesson
.tutor-learning-area-content
h2 {
    font-size: clamp(1.5rem, 2.4vw, 2.1rem);
    line-height: 1.18;
}

body.single-lesson
.tutor-learning-area-content
p,
body.single-lesson
.tutor-learning-area-content
li {
    color: #334155;
    line-height: 1.75;
}

/*
|--------------------------------------------------------------------------
| Resumen y pestañas superiores
|--------------------------------------------------------------------------
*/

body.single-lesson
.tutor-learning-area-content
.tutor-course-spotlight-nav,
body.single-lesson
.tutor-learning-area-content
.tutor-nav {
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

/*
|--------------------------------------------------------------------------
| Navegación lateral
|--------------------------------------------------------------------------
*/

body.single-lesson
.tutor-course-single-sidebar-wrapper
.tutor-course-topic,
body.single-tutor_quiz
.tutor-course-single-sidebar-wrapper
.tutor-course-topic,
body.single-tutor_assignments
.tutor-course-single-sidebar-wrapper
.tutor-course-topic {
    border-bottom: 1px solid #edf2f7;
}

body.single-lesson
.tutor-course-single-sidebar-wrapper
.tutor-course-topic-title,
body.single-tutor_quiz
.tutor-course-single-sidebar-wrapper
.tutor-course-topic-title,
body.single-tutor_assignments
.tutor-course-single-sidebar-wrapper
.tutor-course-topic-title {
    padding-block: 16px !important;
    color: #0f172a;
    font-weight: 800;
}

body.single-lesson
.tutor-course-single-sidebar-wrapper
.tutor-course-topic-item,
body.single-tutor_quiz
.tutor-course-single-sidebar-wrapper
.tutor-course-topic-item,
body.single-tutor_assignments
.tutor-course-single-sidebar-wrapper
.tutor-course-topic-item {
    margin: 4px 10px;
    border-radius: 12px;
    transition:
        background-color 180ms ease,
        transform 180ms ease;
}

body.single-lesson
.tutor-course-single-sidebar-wrapper
.tutor-course-topic-item:hover,
body.single-tutor_quiz
.tutor-course-single-sidebar-wrapper
.tutor-course-topic-item:hover,
body.single-tutor_assignments
.tutor-course-single-sidebar-wrapper
.tutor-course-topic-item:hover {
    background: #eff6ff;
}

body.single-lesson
.tutor-course-single-sidebar-wrapper
.tutor-course-topic-item.is-active,
body.single-tutor_quiz
.tutor-course-single-sidebar-wrapper
.tutor-course-topic-item.is-active,
body.single-tutor_assignments
.tutor-course-single-sidebar-wrapper
.tutor-course-topic-item.is-active {
    background: #eaf3fb;
}

/*
|--------------------------------------------------------------------------
| Botón pantalla completa
|--------------------------------------------------------------------------
*/

body.single-lesson
.tutor-learning-area
.tutor-course-single-content-wrapper
button[aria-label*="pantalla completa"],
body.single-lesson
.tutor-learning-area
button.tutor-course-single-content-fullscreen {
    z-index: 40;
}

/*
|--------------------------------------------------------------------------
| Tablet
|--------------------------------------------------------------------------
*/

@media (max-width: 1180px) and (min-width: 768px) {

    :root {
        --feh-tutor-sidebar-width: 290px;
    }

    body.single-lesson .tutor-learning-area-content,
    body.single-tutor_quiz .tutor-learning-area-content,
    body.single-tutor_assignments
    .tutor-learning-area-content {
        padding:
            30px
            28px
            54px !important;
    }
}

/*
|--------------------------------------------------------------------------
| Móvil
|--------------------------------------------------------------------------
*/

@media (max-width: 767px) {

    body.single-lesson .tutor-learning-area-body,
    body.single-tutor_quiz .tutor-learning-area-body,
    body.single-tutor_assignments
    .tutor-learning-area-body {
        display: block !important;
        width: 100% !important;
    }

    body.single-lesson
    .tutor-course-single-sidebar-wrapper,
    body.single-tutor_quiz
    .tutor-course-single-sidebar-wrapper,
    body.single-tutor_assignments
    .tutor-course-single-sidebar-wrapper,
    body.single-lesson .tutor-learning-sidebar,
    body.single-tutor_quiz .tutor-learning-sidebar,
    body.single-tutor_assignments .tutor-learning-sidebar {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    body.single-lesson .tutor-learning-area-content,
    body.single-tutor_quiz .tutor-learning-area-content,
    body.single-tutor_assignments
    .tutor-learning-area-content {
        padding:
            20px
            16px
            42px !important;
    }

    body.single-lesson
    .tutor-learning-area-content
    .tutor-course-spotlight-wrapper,
    body.single-lesson
    .tutor-learning-area-content
    .tutor-lesson-content-area,
    body.single-lesson
    .tutor-learning-area-content
    .tutor-course-lesson-content {
        border-radius: 18px;
    }
}

@media (min-width: 768px) {

    body.single-lesson
    .tutor-learning-area
    .tutor-learning-area-content[role="main"] {
        position: relative !important;
        left: auto !important;
        right: auto !important;

        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;

        flex: 1 1 auto !important;
    }
}
/* =========================================================
   CAMPUS FEH UI 2.0
   TUTOR LMS — CORRECCIÓN SEGÚN ESTRUCTURA REAL
   ========================================================= */

:root {
    --feh-tutor-sidebar-width: 320px;
    --feh-tutor-content-padding-x: clamp(20px, 2.5vw, 42px);
    --feh-tutor-reading-width: 1440px;
}

/* ---------------------------------------------------------
   Aplicación completa
   --------------------------------------------------------- */

body.single-lesson .tutor-learning-area,
body.single-tutor_quiz .tutor-learning-area,
body.single-tutor_assignments .tutor-learning-area {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

/* ---------------------------------------------------------
   Tutor usa padding-inline-start para dejar espacio
   al temario lateral. Conservamos esa arquitectura.
   --------------------------------------------------------- */

@media (min-width: 768px) {

    body.single-lesson .tutor-learning-area-body,
    body.single-tutor_quiz .tutor-learning-area-body,
    body.single-tutor_assignments .tutor-learning-area-body {
        display: block !important;

        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;

        margin: 0 !important;

        padding-inline-start:
            var(--feh-tutor-sidebar-width) !important;

        padding-inline-end: 0 !important;

        box-sizing: border-box !important;
    }
}

/* ---------------------------------------------------------
   Sidebar
   --------------------------------------------------------- */

@media (min-width: 768px) {

    body.single-lesson .tutor-learning-sidebar,
    body.single-tutor_quiz .tutor-learning-sidebar,
    body.single-tutor_assignments .tutor-learning-sidebar {
        width: var(--feh-tutor-sidebar-width) !important;
        max-width: var(--feh-tutor-sidebar-width) !important;
        min-width: var(--feh-tutor-sidebar-width) !important;
    }
}

/* ---------------------------------------------------------
   Columna principal
   --------------------------------------------------------- */

body.single-lesson .tutor-learning-area-content,
body.single-tutor_quiz .tutor-learning-area-content,
body.single-tutor_assignments .tutor-learning-area-content {
    position: relative !important;

    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    margin: 0 !important;

    padding-top: 28px !important;
    padding-right: var(--feh-tutor-content-padding-x) !important;
    padding-bottom: 56px !important;
    padding-left: var(--feh-tutor-content-padding-x) !important;

    box-sizing: border-box !important;
}

/* ---------------------------------------------------------
   Contenedores raíz internos de Tutor
   --------------------------------------------------------- */

body.single-lesson
.tutor-learning-area-content
> div,

body.single-tutor_quiz
.tutor-learning-area-content
> div,

body.single-tutor_assignments
.tutor-learning-area-content
> div {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    margin-left: 0 !important;
    margin-right: 0 !important;

    box-sizing: border-box !important;
}

/* ---------------------------------------------------------
   Contenedor académico principal
   --------------------------------------------------------- */

body.single-lesson .tutor-course-spotlight-wrapper,
body.single-lesson .tutor-course-spotlight,
body.single-lesson .tutor-course-spotlight-content,
body.single-lesson .tutor-lesson-content-wrapper,
body.single-lesson .tutor-lesson-content-area,
body.single-lesson .tutor-course-lesson-content,

body.single-tutor_quiz .tutor-quiz-wrapper,
body.single-tutor_quiz .tutor-quiz-attempt-details,

body.single-tutor_assignments .tutor-assignment-wrapper {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    margin-left: 0 !important;
    margin-right: 0 !important;

    box-sizing: border-box !important;
}

/* ---------------------------------------------------------
   Mantiene una lectura cómoda sin dejarla angosta
   --------------------------------------------------------- */

body.single-lesson
.tutor-learning-area-content
.tutor-course-spotlight-wrapper,

body.single-lesson
.tutor-learning-area-content
.tutor-lesson-content-wrapper,

body.single-lesson
.tutor-learning-area-content
.tutor-lesson-content-area {
    max-width: var(--feh-tutor-reading-width) !important;
    margin-inline: auto !important;
}

/* ---------------------------------------------------------
   Panel o tarjeta interior visible
   --------------------------------------------------------- */

body.single-lesson
.tutor-learning-area-content
.tutor-card,

body.single-lesson
.tutor-learning-area-content
.tutor-course-spotlight-wrapper
> div,

body.single-lesson
.tutor-learning-area-content
.tutor-lesson-content-wrapper
> div {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
}

/* ---------------------------------------------------------
   Contenido generado por Elementor o editor
   --------------------------------------------------------- */

body.single-lesson
.tutor-learning-area-content
.elementor,

body.single-lesson
.tutor-learning-area-content
.elementor-section-wrap,

body.single-lesson
.tutor-learning-area-content
.e-con,

body.single-lesson
.tutor-learning-area-content
.e-con-inner,

body.single-lesson
.tutor-learning-area-content
.elementor-widget,

body.single-lesson
.tutor-learning-area-content
.elementor-widget-container {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

/* ---------------------------------------------------------
   Campus IA dentro de la lección
   --------------------------------------------------------- */

body.single-lesson
.tutor-learning-area-content
.campus-ia-contextual,

body.single-lesson
.tutor-learning-area-content
.campus-ia-inline,

body.single-lesson
.tutor-learning-area-content
[data-campus-ia-contextual] {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
}

/* ---------------------------------------------------------
   Tablet
   --------------------------------------------------------- */

@media (max-width: 1100px) and (min-width: 768px) {

    :root {
        --feh-tutor-sidebar-width: 285px;
        --feh-tutor-content-padding-x: 24px;
    }
}

/* ---------------------------------------------------------
   Móvil
   --------------------------------------------------------- */

@media (max-width: 767px) {

    body.single-lesson .tutor-learning-area-body,
    body.single-tutor_quiz .tutor-learning-area-body,
    body.single-tutor_assignments .tutor-learning-area-body {
        display: block !important;

        width: 100% !important;
        max-width: none !important;

        padding-inline-start: 0 !important;
        padding-inline-end: 0 !important;
    }

    body.single-lesson .tutor-learning-area-content,
    body.single-tutor_quiz .tutor-learning-area-content,
    body.single-tutor_assignments .tutor-learning-area-content {
        width: 100% !important;
        padding: 18px 14px 42px !important;
    }
}
body.single-lesson
.tutor-learning-area-content * {
    max-width: none !important;
}
body.single-lesson .tutor-learning-area-content {
    outline: 5px solid #ff0000 !important;
    padding-top: 28px !important;
    background-color: #fff7ed !important;
}