/**
 * Docentes (home) — enlazar en el layout DESPUÉS de @vite.
 * Tailwind preflight (img { height: auto }) carga con Vite y puede anular style_complementary_2.css.
 * Selectores con #main_home.home-redesign para ganar en cascada.
 *
 * Convención: solo dos vistas — móvil/tablet @media (max-width: 799px) (referencia 375×667)
 * y escritorio @media (min-width: 800px). Sin breakpoints intermedios (p. ej. 574px).
 */

/*
 * Cabecera — menú horizontal vs hamburguesa (800px = pm / obesi-js-wide).
 * No usar en el HTML `hidden` + `pm:flex`: la utilidad `.hidden` de Tailwind es display:none y puede
 * seguir ganando en cascada frente a `pm:flex`, dejando el sitio como «solo móvil» en escritorio.
 */


/*
 * Home — <main> con Tailwind `items-center`: centra verticalmente .cont_home.
 * Al sumar margen a los CTAs crece la columna y el main “recoloca” el bloque; los botones parecen no bajar.
 */
#main_home.home-redesign {
    align-items: flex-start !important;
}

/* Grilla docentes: ancho máximo siempre; gap grande solo en escritorio (en móvil row-gap=0 para unir filas del 2×2) */
#main_home.home-redesign #docentes .home-docentes-grid {
    max-width: min(100%, 1197px) !important;
    /* 1140px × 1.05 */
}

@media (min-width: 800px) {
    #main_home.home-redesign #docentes .home-docentes-grid {
        gap: 1.155rem !important;
        /* 1.1rem × 1.05 (filas y columnas) */
    }
}

/* Hueco entre hero y #temario: #main_home > .cont_home tenía gap: 1rem (max-width 1023px en style_complementary_2). */
@media (max-width: 1023px) {
    #main_home.home-redesign > .cont_home {
        gap: 0 !important;
        row-gap: 0 !important;
    }
}

@media (max-width: 799px) {

    /*
     * Hueco hero → vídeo: .home-block { margin-top: 0.9rem } en style_complementary_2 pega a #temario.
     * Ilustración: max-height muy alto (p.ej. 92vh) alarga la fila del grid por encima de la columna derecha.
     * Refuerzo sin html:not para móvil estrecho aunque exista html.obesi-js-wide.
     */
    #main_home.home-redesign .home-hero,
    #main_home.home-redesign .content_home.home-hero {
        margin-bottom: 0 !important;
    }

    #main_home.home-redesign #temario.home-block {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* #temario: layout columna sin depender de html:not (p. ej. obesi-js-wide en viewport estrecho) */
    #main_home.home-redesign #temario .home-block__two-cols {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        row-gap: 0 !important;
    }

    #main_home.home-redesign #temario .home-side-media {
        display: contents !important;
    }

    #main_home.home-redesign #temario .home-video-placeholder {
        order: 1 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Invitado: aire entre CTAs del hero y el vídeo */
    #main_home.home-redesign:not(.home-redesign--logged) #temario .home-video-placeholder {
        margin-top: clamp(0.75rem, 2.8vw, 1.2rem) !important;
    }

    /* Logueado: bajar un poco el vídeo (hero más alto + logout móvil) */
    #main_home.home-redesign.home-redesign--logged #temario .home-video-placeholder {
        margin-top: clamp(0.65rem, 2.6vw, 1.15rem) !important;
    }

    #main_home.home-redesign #temario .home-temario {
        order: 2 !important;
    }

    #main_home.home-redesign #temario .home-side-media__img {
        order: 3 !important;
    }

    /*
     * CTAs hero móvil (≤799px) sin depender de html:not(.obesi-js-wide): mismo criterio que el bloque footer.
     * Invitado: fila centrada. Logueado: al ancho del texto, fila a la derecha (~sangría vídeo 86%).
     */
    #main_home.home-redesign .home-hero__info .home-hero__actions--public {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.2rem !important;
        width: 100% !important;
        margin-top: 1rem !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    #main_home.home-redesign.home-redesign--logged .home-hero__info .home-hero__actions--logged {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: flex-end !important;
        align-items: center !important;
        align-self: stretch !important;
        gap: 0.2rem !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 1rem !important;
        padding-right: clamp(0.3rem, 7vw, 2rem) !important;
        padding-left: 0 !important;
        box-sizing: border-box !important;
    }

    #main_home.home-redesign .home-hero__info .home-hero__actions .button_access_home_logged,
    #main_home.home-redesign .home-hero__info .home-hero__actions--public .button_access_home_logged,
    #main_home.home-redesign .home-hero__info .home-hero__actions--logged .button_access_home_logged {
        min-width: 0 !important;
        max-width: none !important;
        padding: clamp(6px, 1.5vw, 10px) clamp(14px, 4vw, 22px) !important;
        border-radius: 6px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        height: auto !important;
        min-height: 0 !important;
    }

    #main_home.home-redesign .home-hero__info .home-hero__actions .button_access_home_logged a,
    #main_home.home-redesign .home-hero__info .home-hero__actions--public .button_access_home_logged a,
    #main_home.home-redesign .home-hero__info .home-hero__actions--logged .button_access_home_logged a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: clamp(0.52rem, 1.72vw, 0.7rem) !important;
        font-weight: bold !important;
        line-height: 1.15 !important;
        white-space: nowrap !important;
        text-align: center !important;
        width: auto !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #main_home.home-redesign.home-redesign--logged .home-hero__info .home-hero__actions--logged .button_access_home_logged {
        flex: 0 0 auto !important;
        width: max-content !important;
        max-width: min(100%, 24rem) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: clamp(10px, 2.2vw, 14px) clamp(22px, 5.5vw, 36px) !important;
    }

    #main_home.home-redesign.home-redesign--logged .home-hero__info .home-hero__actions--logged .button_access_home_logged a {
        font-size: clamp(0.63rem, 2.15vw, 0.82rem) !important;
        padding-inline: clamp(0.55rem, 2.6vw, 1.05rem) !important;
        padding-block: 0 !important;
    }

    /* Invitado: bajar bloque ilustración (poco; antes quedaba demasiado abajo) */
    #main_home.home-redesign:not(.home-redesign--logged) .home-hero__visual {
        margin-top: clamp(0.1rem, 1vw, 0.45rem) !important;
        align-self: start !important;
    }

    /* Logueado: subir bloque ilustración */
    #main_home.home-redesign.home-redesign--logged .home-hero.home-hero--logged .home-hero__visual {
        margin-top: clamp(-1.5rem, -5vw, -0.45rem) !important;
        align-self: start !important;
    }

    /* Invitado: ilustración más pequeña y ligeramente más abajo */
    #main_home.home-redesign:not(.home-redesign--logged) .home-hero__visual img {
        max-height: min(62vh, 420px) !important;
        object-fit: contain !important;
        object-position: center top !important;
        transform: translateY(clamp(0.1rem, 0.85vw, 0.38rem)) !important;
    }

    /* Logueado: ilustración más grande */
    #main_home.home-redesign.home-redesign--logged .home-hero.home-hero--logged .home-hero__visual img {
        max-height: min(90vh, 680px) !important;
        object-fit: contain !important;
        object-position: center top !important;
        transform: translateY(clamp(-1.1rem, -3.5vw, -0.25rem)) !important;
    }

    /* Columna ilustración: invitado más estrecha, logueado mitad/mitad */
    #main_home.home-redesign:not(.home-redesign--logged) .home-hero {
        grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr) !important;
    }

    #main_home.home-redesign.home-redesign--logged .home-hero.home-hero--logged {
        grid-template-columns: minmax(0, 0.5fr) minmax(0, 0.5fr) !important;
    }

    #main_home.home-redesign.home-redesign--logged .home-hero.home-hero--logged .home-hero__logout-mobile {
        grid-column: 1 / -1 !important;
        grid-row: 1 !important;
    }

    #main_home.home-redesign.home-redesign--logged .home-hero.home-hero--logged .home-hero__visual {
        grid-column: 1 !important;
        grid-row: 2 !important;
    }

    #main_home.home-redesign.home-redesign--logged .home-hero.home-hero--logged .home-hero__info {
        grid-column: 2 !important;
        grid-row: 2 !important;
    }

    /* Hero móvil: «Avalado por» compacto; logos en fila; botones en fila */
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__aval {
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-top: -0.5rem !important;
        /* Tirar de todo el bloque hacia arriba */
    }

    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__aval-title {
        text-align: center !important;
        width: auto !important;
        font-size: clamp(0.85rem, 3vw, 1.1rem) !important;
        padding: 0 !important;
        margin-left: 0 !important;
        margin-bottom: 0 !important;
        /* Ajuste para subir logos */
        box-sizing: border-box !important;
        display: block !important;
        transform: none !important;
        font-weight: 700 !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__aval-logos {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        align-self: auto !important;
        gap: 0.75rem !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        transform: none !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__aval-logos img,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__aval-logos img:nth-child(1),
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__aval-logos img:nth-child(2) {
        height: 35px !important;
        max-height: 35px !important;
        width: auto !important;
        object-fit: contain !important;
    }

    /* ------------------------------------- */
    /* ESPACIO PARA NAVBAR FIJO EN MÓVIL     */
    /* ------------------------------------- */
    html:not(.obesi-js-wide) #main_home.home-redesign {
        padding-top: 80px !important;
        /* Empujar el contenido hacia abajo para que el navbar no lo tape */
    }


    /* Padding lateral para el Hero */
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero,
    html:not(.obesi-js-wide) #main_home.home-redesign .content_home {
        padding-left: 1rem !important;
        /* Pequeño respiro a la izquierda */
        padding-right: 1rem !important;
        /* Pequeño respiro a la derecha */
        box-sizing: border-box !important;
    }

    /* Botones flexibles en móvil: permiten envolver (wrap) si el texto es largo */
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions--public,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions--logged {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 0.75rem !important;
        width: 100% !important;
        max-width: 100% !important;
        flex-wrap: wrap !important;

        margin-top: 0.8rem !important;
        padding-right: 0 !important;
    }

    /*
     * Solo invitado: antes `.home-hero__actions .button…` coincidía también con --logged
     * y aplicaba padding mínimo + `a { padding: 0 }`, pisando el CTA logueado.
     */
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions--public .button_access_home_logged {
        flex: 0 1 auto !important;
        min-width: 140px !important;

        max-width: 100% !important;
        /* Tamaño real del texto en <a>; evitar 0.42rem aquí (afectaba em y herencia). */
        font-size: clamp(0.52rem, 1.72vw, 0.7rem) !important;

        padding: 0.2rem 0.4rem !important;

        box-sizing: border-box !important;
        width: auto !important;
        border-radius: 8px !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions--public .button_access_home_logged a {
        font-size: clamp(0.52rem, 1.72vw, 0.7rem) !important;
        padding: 0 !important;
        white-space: normal !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1.2 !important;
        width: 100% !important;
    }

    /* Contener todo el hero dentro del viewport */
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__info {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Video antes que temario en móvil, y la imagen DESPUÉS del temario */
    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-block__two-cols {
        display: flex !important;
        flex-direction: column !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-side-media {
        display: contents !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-video-placeholder {
        order: 1 !important;
        width: 100% !important;
        aspect-ratio: 16 / 9 !important;
        /* Más rectangular/bajo que el 5/4 original */
        min-height: 180px !important;
        max-height: 300px !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign:not(.home-redesign--logged) #temario .home-video-placeholder {
        margin-top: clamp(0.75rem, 2.8vw, 1.2rem) !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign.home-redesign--logged #temario .home-video-placeholder {
        margin-top: clamp(0.65rem, 2.6vw, 1.15rem) !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-video-placeholder__play {
        width: 70px !important;
        /* Reducido de ~94px a 70px */
        height: 70px !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-video-placeholder__play::before {
        border-top: 12px solid transparent !important;
        border-bottom: 12px solid transparent !important;
        border-left: 18px solid #9a9a9a !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario {
        order: 2 !important;
        margin-bottom: 2rem !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-side-media__img {
        order: 3 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 0 !important;
    }

    /* Corrección de tipografía y estructura del Temario (móvil) */
    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario {
        display: flex !important;
        width: 75% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        flex-direction: column;

    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__title {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-end !important;
        /* Pegar los elementos a la base inferior */
        justify-content: flex-start !important;
        gap: 0.4rem !important;
        /* Separación horizontal suave y natural */
        padding: 0 !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__title img {
        width: 75px !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        transform: translateY(8px) !important;
        /* Hundir al ícono para saltarse píxeles blancos en el PNG */
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__title-stack {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-end !important;
        /* Asegurar que el texto se hunda hacia la línea base */
        width: 100% !important;
        height: auto !important;
        max-width: none !important;
        gap: 0.1rem !important;
        /* Espacio mínimo milimétrico entre texto y línea */
        margin: 0 !important;
        /* Resetear margen para evitar solapamientos */
        padding: 0 !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__title-stack h2 {
        font-size: 1.8rem !important;
        color: #1f4e94 !important;
        margin: 0 !important;
        padding: 0 !important;
        white-space: nowrap !important;
        background: none !important;
        line-height: 1 !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__line,
    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__title-stack>.home-temario__line {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        height: 3px !important;
        background-color: #1f4e94 !important;
        position: static !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__title::after {
        display: none !important;
    }

    /* Módulos y texto de items */
    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module {
        margin-top: 0.2rem !important;
        margin-bottom: 0.15rem !important;
        padding-left: 0rem !important;
        /* Añadido padding para mover un poco a la derecha */
    }

    /* Override h3 and its spans to force single line and consistent color */
    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module h3,
    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module h3 span {
        font-size: 10px !important;
        /* Valor absoluto incrementado en px para evitar errores de escalado */
        line-height: 1 !important;
        margin-bottom: 0.15rem !important;
        display: inline-block !important;
        text-align: left !important;
        white-space: nowrap !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module h3 span {
        font-size: 0.80rem !important;
        color: #1f4e94 !important;
        font-weight: 700 !important;
        display: inline !important;
        white-space: nowrap !important;
    }

    @media (max-width: 500px) {

        html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario {
            display: flex !important;
            width: 75% !important;
            max-width: 100% !important;
            margin: 0 5% !important;
            flex-direction: column;

        }

        html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module h3 span {
            font-size: 0.70rem !important;
            color: #1f4e94 !important;
            font-weight: 700 !important;
            display: inline !important;
            white-space: nowrap !important;
        }

    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module h3 span.home-temario__mod-label {
        margin-right: 0.35rem !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module p.home-temario__item,
    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module .home-temario__item-num,
    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module .home-temario__item-body,
    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module p.home-temario__item span {
        font-size: 11px !important;
        /* Fuente aumentada en px */
        color: #11629d !important;
        line-height: 1.1 !important;
        margin-bottom: 0.1rem !important;
        text-align: left !important;
        white-space: nowrap !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module p.home-temario__item {
        /* Indentación ligeramente reducida para mover un poquito a la izquierda */
        padding-left: 1rem !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__item-num {
        width: auto !important;
        min-width: 0 !important;
        margin-right: 0rem !important;
        display: block !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__item-body {
        display: block !important;
        flex: 1 1 auto !important;
    }


    /* Icono + título DOCENTES: +25 % vs 50px / clamp base (móvil) */
    #main_home.home-redesign #docentes .home-docente-card__title-row img {
        width: 62.5px !important;
        height: 62.5px !important;
        max-width: 62.5px !important;
        transform: translateY(3px) !important;
    }

    #main_home.home-redesign #docentes .home-docente-card--title {
        border-radius: 12px 12px 0 0 !important;
        overflow: hidden !important;
    }

    #main_home.home-redesign #docentes .home-docente-card__title-row h2 {
        font-size: 1.15rem !important;
        /* Reducido según pedido para versión móvil */
        line-height: 1.08 !important;
        margin-left: 0 !important;
        padding-left: 0.04rem !important;
        transform: translate(-3px, calc(-6px - 0.5mm)) !important;
    }

    #main_home.home-redesign #docentes .home-docente-card__title-row::after {
        left: calc(62.5px + 0.28rem) !important;
        bottom: 0.34rem !important;
        height: 3px !important;
        /* Línea un poco más gruesa (de 2px a 3px), igualando al temario */
    }

    /* Nombres y cargos en tarjetas: ~120 % del tamaño previo (×1,2); padding de grilla/celdas sin cambios */
    #main_home.home-redesign #docentes .home-docente-card:not(.home-docente-card--title):not(.home-docente-card--wide) h4 {
        font-size: clamp(0.625rem, 2.1vw, 0.75rem) !important;
    }

    #main_home.home-redesign #docentes .home-docente-card:not(.home-docente-card--title):not(.home-docente-card--wide) p {
        font-size: clamp(0.58rem, 1.86vw, 0.67rem) !important;
        line-height: 1.22 !important;
    }

    /* Ajustar el espacio de la sección docentes de forma estándar para evitar que se monte */
    #main_home.home-redesign #docentes {
        margin-top: 1rem !important;
        padding-top: 0 !important;
    }

    /* Dos columnas fusionadas verticalmente en móvil */
    #main_home.home-redesign #docentes .home-docentes-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        /* Volvemos a las dos columnas lado a lado */
        column-gap: 0.3rem !important;
        /* Mantenemos separación a lo ancho */
        row-gap: 0 !important;
        /* Destruimos la separación vertical para que se fusionen en bloques sólidos */
        padding-left: clamp(0.5rem, 2.6vw, 1rem) !important;
        padding-right: clamp(0.5rem, 2.6vw, 1rem) !important;
        margin-top: 0 !important;
        /* Reseteado para evitar solapamientos */
        box-sizing: border-box !important;
    }

    /* Reset de márgenes negativos de la antigua grilla 2x2 */
    #main_home.home-redesign #docentes .home-docente-card--area-top2:not(.home-docente-card--title),
    #main_home.home-redesign #docentes .home-docente-card--area-left2:not(.home-docente-card--title) {
        margin-top: 0 !important;
        padding-top: 0.38rem !important;
        /* Mantenemos el padding interno para que las fotos respiren al juntarse las cajas */
    }

    /* Ocultar radius para que las columnas superiores (A, B, C, D) se puedan fusionar pareciendo una sola fila/pilar */
    #main_home.home-redesign #docentes .home-docente-card--area-top1,
    #main_home.home-redesign #docentes .home-docente-card--area-left2 {
        border-bottom-left-radius: 0 !important;
        border-top-left-radius: 0 !important;
        border-radius: 0 !important;
    }

    #main_home.home-redesign #docentes .home-docente-card--area-left1,
    #main_home.home-redesign #docentes .home-docente-card--area-top2 {
        border-bottom-right-radius: 0 !important;
        border-top-right-radius: 0 !important;
        border-radius: 12px 0 0 12px !important;
    }

    /* ESTRUCTURA PARA LOS ÚLTIMOS 3 DOCENTES (Daniel, Javier, Anna Prats) */
    #main_home.home-redesign #docentes .home-docentes-pair-row--lower {
        grid-column: 1 / -1 !important;
        /* Toda la fila de extremo a extremo */
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        /* Daniel izq, Javier der */
        column-gap: 0 !important;
        /* Fusionarlos en un solo rectángulo visual */
        row-gap: 0 !important;
    }

    /* Fusión de fondo de Javier y Daniel */
    #main_home.home-redesign #docentes .home-docente-card--area-left3 {
        border-radius: 12px 0 0 12px !important;
        /* Daniel, redondeado a la izquierda */
    }

    #main_home.home-redesign #docentes .home-docente-card--area-bottom1 {
        border-radius: 0 12px 12px 0 !important;
        /* Javier, redondeado a la derecha */
    }

    /* Anna Prats que cae sola abajo a la izquierda */
    #main_home.home-redesign #docentes .home-docente-card--area-bottom2 {
        grid-column: 1 / 2 !important;
        /* Forzar 1ra columna */
        border-radius: 0 0 12px 12px !important;
        /* Solo redondeado abajo para fusionarse arriba con Daniel */
    }


    /* ===================================================== */
    /* LOGIN MODAL — Compacto para móvil                     */
    /* ===================================================== */

    /* Contenedor principal del modal: reducir padding-top gigante para subir la tarjeta */
    #div_modal.login-modal {
        padding-top: 12vh !important;
        justify-content: flex-start !important;
    }

    /* Tarjeta contenedora: más ancha (95% en vez de 80%) */
    #div_modal.login-modal .login-modal__card {
        width: 95% !important;
        max-width: 480px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        align-self: center !important;
        box-sizing: border-box !important;
    }

    /* Panel azul: padding vertical mínimo */
    #div_modal.login-modal .login-modal__panel {
        padding: 0.4rem 1rem 0.5rem !important;
        border-top-left-radius: 16px !important;
        border-top-right-radius: 16px !important;
    }

    /* Título: fuente compacta */
    #div_modal.login-modal .login-modal__title {
        font-size: 1.1rem !important;
        margin-bottom: 0.4rem !important;
        padding: 0.2rem 0 0 0 !important;
        letter-spacing: 0.04em !important;
        line-height: 1.15 !important;
    }

    /* Flash de error */
    #div_modal.login-modal .login-modal__flash-error {
        font-size: 0.7rem !important;
        padding: 0 0.5rem !important;
        margin-bottom: 0.3rem !important;
        line-height: 1.3 !important;
    }

    /* Labels dentro de los inputs */
    #div_modal.login-modal .login-modal__label-infield {
        font-size: 0.7rem !important;
    }

    /* Contenedores de input */
    #div_modal.login-modal .login-modal__input-wrap--stacked {
        padding: 0.4rem 0.6rem 0.35rem !important;
        gap: 0.15rem !important;
    }

    /* Inputs: fuente razonable, altura mínima */
    #div_modal.login-modal .login-modal__input-wrap input,
    #div_modal.login-modal .login-modal__input {
        font-size: 0.8rem !important;
        min-height: 1.6rem !important;
        padding: 0.15rem 0.1rem !important;
        line-height: 1.3 !important;
    }

    #div_modal.login-modal .login-modal__input::placeholder {
        font-size: 0.7rem !important;
    }

    /* Campos: margen entre ellos reducido */
    #div_modal.login-modal .login-modal__field {
        margin-bottom: 0.4rem !important;
    }

    /* Enlace "¿Ha olvidado su contraseña?" */
    #div_modal.login-modal .login-modal__forgot {
        font-size: 0.65rem !important;
        line-height: 1.3 !important;
        margin: 0.3rem 0 0.4rem !important;
        padding: 0 0.2rem !important;
    }

    /* Botón Entrar: compacto */
    #div_modal.login-modal .login-modal__submit {
        font-size: 1rem !important;
        line-height: 1.1 !important;
        padding: 0.3em 0.6em !important;
        border-radius: 8px !important;
    }

    /* Pie del modal */
    #div_modal.login-modal .login-modal__footer {
        padding: 0.4rem 0 0.5rem !important;
        border-bottom-left-radius: 16px !important;
        border-bottom-right-radius: 16px !important;
    }

    #div_modal.login-modal .login-modal__footer p {
        font-size: 0.65rem !important;
        line-height: 1.3 !important;
    }

    /* Botón cerrar (×) */
    #div_modal.login-modal .login-modal__close {
        top: 0.3rem !important;
        right: 0.3rem !important;
        width: 1.2rem !important;
        height: 1.2rem !important;
        max-width: 1.2rem !important;
        font-size: 0.8rem !important;
    }
}

@media (max-width: 450px) {

    /*
     * Hueco hero → vídeo: .home-block { margin-top: 0.9rem } en style_complementary_2 pega a #temario.
     * Ilustración: max-height muy alto (p.ej. 92vh) alarga la fila del grid por encima de la columna derecha.
     * Refuerzo sin html:not para móvil estrecho aunque exista html.obesi-js-wide.
     */
    #main_home.home-redesign .home-hero,
    #main_home.home-redesign .content_home.home-hero {
        margin-bottom: 0 !important;
    }

    #main_home.home-redesign #temario.home-block {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* #temario: layout columna sin depender de html:not (p. ej. obesi-js-wide en viewport estrecho) */
    #main_home.home-redesign #temario .home-block__two-cols {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        row-gap: 0 !important;
    }

    #main_home.home-redesign #temario .home-side-media {
        display: contents !important;
    }

    #main_home.home-redesign #temario .home-video-placeholder {
        order: 1 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Invitado: aire entre CTAs del hero y el vídeo */
    #main_home.home-redesign:not(.home-redesign--logged) #temario .home-video-placeholder {
        margin-top: clamp(0.75rem, 2.8vw, 1.2rem) !important;
    }

    /* Logueado: bajar un poco el vídeo (hero más alto + logout móvil) */
    #main_home.home-redesign.home-redesign--logged #temario .home-video-placeholder {
        margin-top: clamp(0.65rem, 2.6vw, 1.15rem) !important;
    }

    #main_home.home-redesign #temario .home-temario {
        order: 2 !important;
    }

    #main_home.home-redesign #temario .home-side-media__img {
        order: 3 !important;
    }

    /*
     * CTAs hero móvil (≤799px) sin depender de html:not(.obesi-js-wide): mismo criterio que el bloque footer.
     * Invitado: fila centrada. Logueado: al ancho del texto, fila a la derecha (~sangría vídeo 86%).
     */
    #main_home.home-redesign .home-hero__info .home-hero__actions--public {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.2rem !important;
        width: 100% !important;
        margin-top: 1rem !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    #main_home.home-redesign.home-redesign--logged .home-hero__info .home-hero__actions--logged {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: flex-end !important;
        align-items: center !important;
        align-self: stretch !important;
        gap: 0.2rem !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 1rem !important;
        padding-right: clamp(0.3rem, 7vw, 2rem) !important;
        padding-left: 0 !important;
        box-sizing: border-box !important;
    }

    #main_home.home-redesign .home-hero__info .home-hero__actions .button_access_home_logged,
    #main_home.home-redesign .home-hero__info .home-hero__actions--public .button_access_home_logged,
    #main_home.home-redesign .home-hero__info .home-hero__actions--logged .button_access_home_logged {
        min-width: 0 !important;
        max-width: none !important;
        padding: clamp(6px, 1.5vw, 10px) clamp(14px, 4vw, 22px) !important;
        border-radius: 6px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        height: auto !important;
        min-height: 0 !important;
    }

    #main_home.home-redesign .home-hero__info .home-hero__actions .button_access_home_logged a,
    #main_home.home-redesign .home-hero__info .home-hero__actions--public .button_access_home_logged a,
    #main_home.home-redesign .home-hero__info .home-hero__actions--logged .button_access_home_logged a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: clamp(0.52rem, 1.72vw, 0.7rem) !important;
        font-weight: bold !important;
        line-height: 1.15 !important;
        white-space: nowrap !important;
        text-align: center !important;
        width: auto !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #main_home.home-redesign.home-redesign--logged .home-hero__info .home-hero__actions--logged .button_access_home_logged {
        flex: 0 0 auto !important;
        width: max-content !important;
        max-width: min(100%, 24rem) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: clamp(10px, 2.2vw, 14px) clamp(22px, 5.5vw, 36px) !important;
    }

    #main_home.home-redesign.home-redesign--logged .home-hero__info .home-hero__actions--logged .button_access_home_logged a {
        font-size: clamp(0.63rem, 2.15vw, 0.82rem) !important;
        padding-inline: clamp(0.55rem, 2.6vw, 1.05rem) !important;
        padding-block: 0 !important;
    }

    /* Invitado: bajar bloque ilustración (poco; antes quedaba demasiado abajo) */
    #main_home.home-redesign:not(.home-redesign--logged) .home-hero__visual {
        margin-top: clamp(0.1rem, 1vw, 0.45rem) !important;
        align-self: start !important;
    }

    /* Logueado: subir bloque ilustración */
    #main_home.home-redesign.home-redesign--logged .home-hero.home-hero--logged .home-hero__visual {
        margin-top: clamp(-1.5rem, -5vw, -0.45rem) !important;
        align-self: start !important;
    }

    /* Invitado: ilustración más pequeña y ligeramente más abajo */
    #main_home.home-redesign:not(.home-redesign--logged) .home-hero__visual img {
        max-height: min(62vh, 420px) !important;
        object-fit: contain !important;
        object-position: center top !important;
        transform: translateY(clamp(0.1rem, 0.85vw, 0.38rem)) !important;
    }

    /* Logueado: ilustración más grande */
    #main_home.home-redesign.home-redesign--logged .home-hero.home-hero--logged .home-hero__visual img {
        max-height: min(90vh, 680px) !important;
        object-fit: contain !important;
        object-position: center top !important;
        transform: translateY(clamp(-1.1rem, -3.5vw, -0.25rem)) !important;
    }

    /* Columna ilustración: invitado más estrecha, logueado mitad/mitad */
    #main_home.home-redesign:not(.home-redesign--logged) .home-hero {
        grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr) !important;
    }

    #main_home.home-redesign.home-redesign--logged .home-hero.home-hero--logged {
        grid-template-columns: minmax(0, 0.5fr) minmax(0, 0.5fr) !important;
    }

    #main_home.home-redesign.home-redesign--logged .home-hero.home-hero--logged .home-hero__logout-mobile {
        grid-column: 1 / -1 !important;
        grid-row: 1 !important;
    }

    #main_home.home-redesign.home-redesign--logged .home-hero.home-hero--logged .home-hero__visual {
        grid-column: 1 !important;
        grid-row: 2 !important;
    }

    #main_home.home-redesign.home-redesign--logged .home-hero.home-hero--logged .home-hero__info {
        grid-column: 2 !important;
        grid-row: 2 !important;
    }

    /* Hero móvil: «Avalado por» compacto; logos en fila; botones en fila */
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__aval {
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-top: -0.5rem !important;
        /* Tirar de todo el bloque hacia arriba */
    }

    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__aval-title {
        text-align: center !important;
        width: auto !important;
        font-size: clamp(0.85rem, 3vw, 1.1rem) !important;
        padding: 0 !important;
        margin-left: 0 !important;
        margin-bottom: 0 !important;
        /* Ajuste para subir logos */
        box-sizing: border-box !important;
        display: block !important;
        transform: none !important;
        font-weight: 700 !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__aval-logos {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        align-self: auto !important;
        gap: 0.75rem !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        transform: none !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__aval-logos img,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__aval-logos img:nth-child(1),
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__aval-logos img:nth-child(2) {
        height: 35px !important;
        max-height: 35px !important;
        width: auto !important;
        object-fit: contain !important;
    }

    /* ------------------------------------- */
    /* ESPACIO PARA NAVBAR FIJO EN MÓVIL     */
    /* ------------------------------------- */
    html:not(.obesi-js-wide) #main_home.home-redesign {
        padding-top: 80px !important;
        /* Empujar el contenido hacia abajo para que el navbar no lo tape */
    }



    /* Padding lateral para el Hero */
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero,
    html:not(.obesi-js-wide) #main_home.home-redesign .content_home {
        padding-left: 1rem !important;
        /* Pequeño respiro a la izquierda */
        padding-right: 1rem !important;
        /* Pequeño respiro a la derecha */
        box-sizing: border-box !important;
    }

    /* Botones flexibles en móvil: permiten envolver (wrap) si el texto es largo */
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions--public,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions--logged {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 0.75rem !important;
        width: 100% !important;
        max-width: 100% !important;
        flex-wrap: wrap !important;

        margin-top: 0.8rem !important;
        padding-right: 0 !important;
    }

    /*
     * Solo invitado: antes `.home-hero__actions .button…` coincidía también con --logged
     * y aplicaba padding mínimo + `a { padding: 0 }`, pisando el CTA logueado.
     */
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions--public .button_access_home_logged {
        flex: 0 1 auto !important;
        min-width: 140px !important;

        max-width: 100% !important;
        /* Tamaño real del texto en <a>; evitar 0.42rem aquí (afectaba em y herencia). */
        font-size: clamp(0.52rem, 1.72vw, 0.7rem) !important;

        padding: 0.2rem 0.4rem !important;

        box-sizing: border-box !important;
        width: auto !important;
        border-radius: 8px !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions--public .button_access_home_logged a {
        font-size: clamp(0.52rem, 1.72vw, 0.7rem) !important;
        padding: 0 !important;
        white-space: normal !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1.2 !important;
        width: 100% !important;
    }

    /* Contener todo el hero dentro del viewport */
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__info {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Video antes que temario en móvil, y la imagen DESPUÉS del temario */
    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-block__two-cols {
        display: flex !important;
        flex-direction: column !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-side-media {
        display: contents !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-video-placeholder {
        order: 1 !important;
        width: 100% !important;
        aspect-ratio: 16 / 9 !important;
        /* Más rectangular/bajo que el 5/4 original */
        min-height: 180px !important;
        max-height: 300px !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign:not(.home-redesign--logged) #temario .home-video-placeholder {
        margin-top: clamp(0.75rem, 2.8vw, 1.2rem) !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign.home-redesign--logged #temario .home-video-placeholder {
        margin-top: clamp(0.65rem, 2.6vw, 1.15rem) !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-video-placeholder__play {
        width: 70px !important;
        /* Reducido de ~94px a 70px */
        height: 70px !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-video-placeholder__play::before {
        border-top: 12px solid transparent !important;
        border-bottom: 12px solid transparent !important;
        border-left: 18px solid #9a9a9a !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario {
        order: 2 !important;
        margin-bottom: 2rem !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-side-media__img {
        order: 3 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 0 !important;
    }

    /* Corrección de tipografía y estructura del Temario (móvil) */
    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        flex-direction: column;

    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__title {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-end !important;
        /* Pegar los elementos a la base inferior */
        justify-content: flex-start !important;
        gap: 0.4rem !important;
        /* Separación horizontal suave y natural */
        padding: 0 !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__title img {
        width: 60px !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        transform: translateY(8px) !important;
        /* Hundir al ícono para saltarse píxeles blancos en el PNG */
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__title-stack {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-end !important;
        /* Asegurar que el texto se hunda hacia la línea base */
        width: 100% !important;
        height: auto !important;
        max-width: none !important;
        gap: 0.1rem !important;
        /* Espacio mínimo milimétrico entre texto y línea */
        margin: 0 !important;
        /* Resetear margen para evitar solapamientos */
        padding: 0 !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__title-stack h2 {
        font-size: 1rem !important;
        color: #1f4e94 !important;
        margin: 0 !important;
        padding: 0 !important;
        white-space: nowrap !important;
        background: none !important;
        line-height: 1 !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__line,
    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__title-stack>.home-temario__line {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        height: 3px !important;
        background-color: #1f4e94 !important;
        position: static !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__title::after {
        display: none !important;
    }

    /* Módulos y texto de items */
    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module {
        margin-top: 0.2rem !important;
        margin-bottom: 0.15rem !important;
        padding-left: 0.8rem !important;
        /* Añadido padding para mover un poco a la derecha */
    }

    /* Override h3 and its spans to force single line and consistent color */
    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module h3,
    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module h3 span {
        font-size: 10px !important;
        /* Valor absoluto incrementado en px para evitar errores de escalado */
        line-height: 1 !important;
        margin-bottom: 0.15rem !important;
        display: inline-block !important;
        text-align: left !important;
        white-space: nowrap !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module h3 span {
        font-size: 0.60rem !important;
        color: #1f4e94 !important;
        font-weight: 700 !important;
        display: inline !important;
        white-space: nowrap !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module h3 span.home-temario__mod-label {
        margin-right: 0.35rem !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module p.home-temario__item,
    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module .home-temario__item-num,
    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module .home-temario__item-body,
    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module p.home-temario__item span {
        font-size: 9px !important;
        /* Fuente aumentada en px */
        color: #11629d !important;
        line-height: 1.1 !important;
        margin-bottom: 0.1rem !important;
        text-align: left !important;
        white-space: nowrap !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__module p.home-temario__item {
        /* Indentación ligeramente reducida para mover un poquito a la izquierda */
        padding-left: 0.5rem !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__item-num {
        width: auto !important;
        min-width: 0 !important;
        margin-right: 0rem !important;
        display: block !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign #temario .home-temario__item-body {
        display: block !important;
        flex: 1 1 auto !important;
    }


    /* Icono + título DOCENTES: +25 % vs 50px / clamp base (móvil) */
    #main_home.home-redesign #docentes .home-docente-card__title-row img {
        width: 62.5px !important;
        height: 62.5px !important;
        max-width: 62.5px !important;
        transform: translateY(3px) !important;
    }

    #main_home.home-redesign #docentes .home-docente-card--title {
        border-radius: 12px 12px 0 0 !important;
        overflow: hidden !important;
    }

    #main_home.home-redesign #docentes .home-docente-card__title-row h2 {
        font-size: 1.15rem !important;
        /* Reducido según pedido para versión móvil */
        line-height: 1.08 !important;
        margin-left: 0 !important;
        padding-left: 0.04rem !important;
        transform: translate(-3px, calc(-6px - 0.5mm)) !important;
    }

    #main_home.home-redesign #docentes .home-docente-card__title-row::after {
        left: calc(62.5px + 0.28rem) !important;
        bottom: 0.34rem !important;
        height: 3px !important;
        /* Línea un poco más gruesa (de 2px a 3px), igualando al temario */
    }

    /* Nombres y cargos en tarjetas: ~120 % del tamaño previo (×1,2); padding de grilla/celdas sin cambios */
    #main_home.home-redesign #docentes .home-docente-card:not(.home-docente-card--title):not(.home-docente-card--wide) h4 {
        font-size: clamp(0.625rem, 2.1vw, 0.75rem) !important;
    }

    #main_home.home-redesign #docentes .home-docente-card:not(.home-docente-card--title):not(.home-docente-card--wide) p {
        font-size: clamp(0.58rem, 1.86vw, 0.67rem) !important;
        line-height: 1.22 !important;
    }

    /* Ajustar el espacio de la sección docentes de forma estándar para evitar que se monte */
    #main_home.home-redesign #docentes {
        margin-top: 1rem !important;
        padding-top: 0 !important;
    }

    /* Dos columnas fusionadas verticalmente en móvil */
    #main_home.home-redesign #docentes .home-docentes-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        /* Volvemos a las dos columnas lado a lado */
        column-gap: 0.75rem !important;
        /* Mantenemos separación a lo ancho */
        row-gap: 0 !important;
        /* Destruimos la separación vertical para que se fusionen en bloques sólidos */
        padding-left: clamp(0.5rem, 2.6vw, 1rem) !important;
        padding-right: clamp(0.5rem, 2.6vw, 1rem) !important;
        margin-top: 0 !important;
        /* Reseteado para evitar solapamientos */
        box-sizing: border-box !important;
    }

    /* Reset de márgenes negativos de la antigua grilla 2x2 */
    #main_home.home-redesign #docentes .home-docente-card--area-top2:not(.home-docente-card--title),
    #main_home.home-redesign #docentes .home-docente-card--area-left2:not(.home-docente-card--title) {
        margin-top: 0 !important;
        padding-top: 0.38rem !important;
        /* Mantenemos el padding interno para que las fotos respiren al juntarse las cajas */
    }

    /* Ocultar radius para que las columnas superiores (A, B, C, D) se puedan fusionar pareciendo una sola fila/pilar */
    #main_home.home-redesign #docentes .home-docente-card--area-top1,
    #main_home.home-redesign #docentes .home-docente-card--area-left2 {
        border-bottom-left-radius: 0 !important;
        border-top-left-radius: 0 !important;
        border-radius: 0 !important;
    }

    #main_home.home-redesign #docentes .home-docente-card--area-left1,
    #main_home.home-redesign #docentes .home-docente-card--area-top2 {
        border-bottom-right-radius: 0 !important;
        border-top-right-radius: 0 !important;
        border-radius: 12px 0 0 12px !important;
    }

    /* ESTRUCTURA PARA LOS ÚLTIMOS 3 DOCENTES (Daniel, Javier, Anna Prats) */
    #main_home.home-redesign #docentes .home-docentes-pair-row--lower {
        grid-column: 1 / -1 !important;
        /* Toda la fila de extremo a extremo */
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        /* Daniel izq, Javier der */
        column-gap: 0 !important;
        /* Fusionarlos en un solo rectángulo visual */
        row-gap: 0 !important;
    }

    /* Fusión de fondo de Javier y Daniel */
    #main_home.home-redesign #docentes .home-docente-card--area-left3 {
        border-radius: 12px 0 0 12px !important;
        /* Daniel, redondeado a la izquierda */
    }

    #main_home.home-redesign #docentes .home-docente-card--area-bottom1 {
        border-radius: 0 12px 12px 0 !important;
        /* Javier, redondeado a la derecha */
    }

    /* Anna Prats que cae sola abajo a la izquierda */
    #main_home.home-redesign #docentes .home-docente-card--area-bottom2 {
        grid-column: 1 / 2 !important;
        /* Forzar 1ra columna */
        border-radius: 0 0 12px 12px !important;
        /* Solo redondeado abajo para fusionarse arriba con Daniel */
    }

    /* ===================================================== */
    /* LOGIN MODAL — Compacto para móvil                     */
    /* ===================================================== */

    /* Contenedor principal del modal: reducir padding-top gigante para subir la tarjeta */
    #div_modal.login-modal {
        padding-top: 12vh !important;
        justify-content: flex-start !important;
    }

    /* Tarjeta contenedora: más ancha (95% en vez de 80%) */
    #div_modal.login-modal .login-modal__card {
        width: 95% !important;
        max-width: 480px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        align-self: center !important;
        box-sizing: border-box !important;
    }

    /* Panel azul: padding vertical mínimo */
    #div_modal.login-modal .login-modal__panel {
        padding: 0.4rem 1rem 0.5rem !important;
        border-top-left-radius: 16px !important;
        border-top-right-radius: 16px !important;
    }

    /* Título: fuente compacta */
    #div_modal.login-modal .login-modal__title {
        font-size: 1.1rem !important;
        margin-bottom: 0.4rem !important;
        padding: 0.2rem 0 0 0 !important;
        letter-spacing: 0.04em !important;
        line-height: 1.15 !important;
    }

    /* Flash de error */
    #div_modal.login-modal .login-modal__flash-error {
        font-size: 0.7rem !important;
        padding: 0 0.5rem !important;
        margin-bottom: 0.3rem !important;
        line-height: 1.3 !important;
    }

    /* Labels dentro de los inputs */
    #div_modal.login-modal .login-modal__label-infield {
        font-size: 0.7rem !important;
    }

    /* Contenedores de input */
    #div_modal.login-modal .login-modal__input-wrap--stacked {
        padding: 0.4rem 0.6rem 0.35rem !important;
        gap: 0.15rem !important;
    }

    /* Inputs: fuente razonable, altura mínima */
    #div_modal.login-modal .login-modal__input-wrap input,
    #div_modal.login-modal .login-modal__input {
        font-size: 0.8rem !important;
        min-height: 1.6rem !important;
        padding: 0.15rem 0.1rem !important;
        line-height: 1.3 !important;
    }

    #div_modal.login-modal .login-modal__input::placeholder {
        font-size: 0.7rem !important;
    }

    /* Campos: margen entre ellos reducido */
    #div_modal.login-modal .login-modal__field {
        margin-bottom: 0.4rem !important;
    }

    /* Enlace "¿Ha olvidado su contraseña?" */
    #div_modal.login-modal .login-modal__forgot {
        font-size: 0.65rem !important;
        line-height: 1.3 !important;
        margin: 0.3rem 0 0.4rem !important;
        padding: 0 0.2rem !important;
    }

    /* Botón Entrar: compacto */
    #div_modal.login-modal .login-modal__submit {
        font-size: 1rem !important;
        line-height: 1.1 !important;
        padding: 0.3em 0.6em !important;
        border-radius: 8px !important;
    }

    /* Pie del modal */
    #div_modal.login-modal .login-modal__footer {
        padding: 0.4rem 0 0.5rem !important;
        border-bottom-left-radius: 16px !important;
        border-bottom-right-radius: 16px !important;
    }

    #div_modal.login-modal .login-modal__footer p {
        font-size: 0.65rem !important;
        line-height: 1.3 !important;
    }

    /* Botón cerrar (×) */
    #div_modal.login-modal .login-modal__close {
        top: 0.3rem !important;
        right: 0.3rem !important;
        width: 1.2rem !important;
        height: 1.2rem !important;
        max-width: 1.2rem !important;
        font-size: 0.8rem !important;
    }
}

/* (600–700px) antes forzaba gap ~1rem y reabría la rendija del 2×2; el row-gap móvil lo lleva max-width:799px */

/* Cabecera DOCENTES más compacta */
#main_home.home-redesign #docentes .home-docente-card--title {
    min-height: 0 !important;
}

#main_home.home-redesign #docentes .home-docente-card__title-row {
    padding: 0 0.28rem 0 !important;
    align-items: flex-end !important;
    box-sizing: border-box !important;
}

#main_home.home-redesign #docentes .home-docente-card__title-row::after {
    height: 2px !important;
}

@media (min-width: 800px) {

    /* .home-docente-card hereda text-align:center; en escritorio el título queda junto al icono. */
    #main_home.home-redesign #docentes .home-docente-card--title {
        text-align: left !important;
    }

    #main_home.home-redesign #docentes .home-docente-card__title-row img {
        width: 86px !important;
        height: 86px !important;
        max-width: 86px !important;
        object-fit: contain !important;
        flex-shrink: 0 !important;
        transform: translateY(2px) !important;
    }

    /*
     * Línea desde la zona del título (tras icono + gap) hasta el borde derecho de la cabecera.
     * Alineada con el inicio visual del texto (h2 lleva translateX(-4px)).
     */
    #main_home.home-redesign #docentes .home-docente-card__title-row::after {
        content: "" !important;
        position: absolute !important;
        left: calc(0.28rem + 86px + 0.1rem - 4px) !important;
        right: 0.28rem !important;
        bottom: 15px !important;
        height: 2px !important;
        background-color: #1f4e94 !important;
    }

    #main_home.home-redesign #docentes .home-docente-card__title-row h2 {
        margin-left: 0 !important;
        padding-left: 0 !important;
        transform: translate(-4px, calc(-13px - 1mm)) !important;
        text-align: left !important;
        flex: 0 1 auto !important;
        width: fit-content !important;
        max-width: 100% !important;
        border-bottom: none !important;
        box-sizing: border-box !important;
    }
}

#main_home.home-redesign #docentes .home-docente-card--area-title.home-docente-card--title {
    margin-bottom: 0.1rem !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Tarjetas docente: anular height:auto del preflight */
#main_home.home-redesign #docentes .home-docentes-grid .home-docente-card:not(.home-docente-card--title):not(.home-docente-card--wide) img {
    height: 100% !important;
    max-height: none !important;
    width: 100% !important;
    max-width: 100% !important;
    object-fit: contain !important;
}

/* Columna izquierda (left1 / left2 / left3): alineación; el padding del article evita que h4/p desborden la celda */
#main_home.home-redesign #docentes .home-docente-card--area-left1:not(.home-docente-card--title),
#main_home.home-redesign #docentes .home-docente-card--area-left2:not(.home-docente-card--title),
#main_home.home-redesign #docentes .home-docente-card--area-left3:not(.home-docente-card--title) {
    justify-items: start !important;
}

#main_home.home-redesign #docentes .home-docente-card--area-left1 img,
#main_home.home-redesign #docentes .home-docente-card--area-left2 img,
#main_home.home-redesign #docentes .home-docente-card--area-left3 img {
    margin-left: 0 !important;
    object-position: left top !important;
}

/* Columna central (top1 + bottom1): mismo fondo que la cabecera «DOCENTES» */
#main_home.home-redesign #docentes .home-docente-card--area-top1:not(.home-docente-card--title),
#main_home.home-redesign #docentes .home-docente-card--area-bottom1:not(.home-docente-card--title) {

    background-image: none !important;
}

@media (max-width: 799px) {

    /* Columna central (móvil): sin border-radius */
    #main_home.home-redesign #docentes .home-docente-card--area-top1:not(.home-docente-card--title),
    #main_home.home-redesign #docentes .home-docente-card--wide.home-docente-card--area-wide,
    #main_home.home-redesign #docentes .home-docente-card--area-bottom1:not(.home-docente-card--title) {
        border-radius: 0 !important;
    }

    #main_home.home-redesign #docentes .home-docente-card--wide.home-docente-card--area-wide img {
        border-radius: 0 !important;
    }

    /*
     * 2×2 móvil: columna derecha = top1 (arriba) + left2 (abajo), mismo fondo que la celda inferior derecha.
     * bottom1 va en la franja Daniel/Javier: se mantiene el tono claro.
     */
    #main_home.home-redesign #docentes .home-docente-card--area-top1:not(.home-docente-card--title),
    #main_home.home-redesign #docentes .home-docente-card--area-left2:not(.home-docente-card--title) {
        background-color: #cdeafa !important;
    }

    #main_home.home-redesign #docentes .home-docente-card--area-bottom1:not(.home-docente-card--title) {
        background-color: #c6e8f4 !important;
    }

    #main_home.home-redesign #docentes .home-docente-card--area-left1:not(.home-docente-card--title),
    #main_home.home-redesign #docentes .home-docente-card--area-top2:not(.home-docente-card--title),
    #main_home.home-redesign #docentes .home-docentes-pair-row--lower .home-docente-card--area-left3:not(.home-docente-card--title) {
        justify-items: start !important;
    }

    #main_home.home-redesign #docentes .home-docente-card--area-left1 img,
    #main_home.home-redesign #docentes .home-docente-card--area-top2 img,
    #main_home.home-redesign #docentes .home-docentes-pair-row--lower .home-docente-card--area-left3 img {
        margin-left: 0 !important;
        object-position: left top !important;
    }

    /* Móvil: celdas y textos respetan el ancho de columna; más aire lateral e inferior (sin tocar padding-top de top2/left2) */
    #main_home.home-redesign #docentes .home-docente-card:not(.home-docente-card--title):not(.home-docente-card--wide) {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding-left: clamp(0.48rem, 2.3vw, 0.68rem) !important;
        padding-right: clamp(0.48rem, 2.3vw, 0.68rem) !important;
        padding-bottom: clamp(0.52rem, 2.1vw, 0.65rem) !important;
    }

    #main_home.home-redesign #docentes .home-docente-card:not(.home-docente-card--title):not(.home-docente-card--wide) h4,
    #main_home.home-redesign #docentes .home-docente-card:not(.home-docente-card--title):not(.home-docente-card--wide) p {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        box-sizing: border-box !important;
    }

    #main_home.home-redesign #docentes .home-docente-card__title-row {
        padding: 0 0 0.1rem 0 !important;
    }

    #main_home.home-redesign #docentes .home-docente-card--area-title.home-docente-card--title {
        padding-left: 0.35rem !important;
        border-radius: 10px 10px 0 0 !important;
        overflow: hidden !important;
        margin-top: -0.22rem !important;
        margin-bottom: 7px !important;
    }

    /* Primera columna (móvil): esquina inferior izquierda del 2×2 = tarjeta top2 (fila inferior izq.) */
    #main_home.home-redesign #docentes .home-docente-card--area-left1:not(.home-docente-card--title) {
        border-radius: 0 !important;
    }

    #main_home.home-redesign #docentes .home-docente-card--area-top2:not(.home-docente-card--title) {
        border-radius: 0 !important;
        border-bottom-left-radius: 12px !important;
        overflow: hidden !important;
    }

    #main_home.home-redesign #docentes .home-docentes-pair-row--lower .home-docente-card--area-left3:not(.home-docente-card--title) {
        border-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
    }

    /* Javier (bottom1): esquinas derechas alineadas con el resto del bloque docentes (móvil) */
    #main_home.home-redesign #docentes .home-docentes-pair-row--lower .home-docente-card--area-bottom1:not(.home-docente-card--title) {
        border-top-right-radius: 12px !important;
        border-bottom-right-radius: 12px !important;
        overflow: hidden !important;
    }

    /* Cabecera DOCENTES: redondeo superior pronunciado en móvil (28px) */
    #main_home.home-redesign #docentes .home-docente-card--area-title.home-docente-card--title {
        border-radius: 28px 28px 0 0 !important;
        overflow: hidden !important;
    }
}

@media (min-width: 800px) {

    /*
     * Aire lateral dentro de cada celda (escritorio). Pisa #docentes padding 0 en columna izq. de style_complementary_2.
     */
    #main_home.home-redesign #docentes .home-docente-card:not(.home-docente-card--title):not(.home-docente-card--wide) {
        padding-top: 0.65rem !important;
        padding-bottom: 0.65rem !important;
        padding-left: clamp(0.72rem, 1.4vw, 1.2rem) !important;
        padding-right: clamp(0.72rem, 1.4vw, 1.2rem) !important;
        box-sizing: border-box !important;
    }

    #main_home.home-redesign #docentes .home-docente-card--title.home-docente-card--area-title {
        padding-left: clamp(0.55rem, 1.1vw, 1rem) !important;
        padding-right: clamp(0.55rem, 1.1vw, 1rem) !important;
        padding-top: 0.45rem !important;
        padding-bottom: 0.4rem !important;
        box-sizing: border-box !important;
    }

    #main_home.home-redesign #docentes .home-docente-card--wide.home-docente-card--area-wide {
        padding-left: clamp(0.5rem, 1vw, 0.9rem) !important;
        padding-right: clamp(0.5rem, 1vw, 0.9rem) !important;
        box-sizing: border-box !important;
    }

    /* Columna central (top1, ilustración wide): sin border-radius; bottom1 (Javier) sin redondeo en escritorio. */
    #main_home.home-redesign #docentes .home-docente-card--area-top1:not(.home-docente-card--title),
    #main_home.home-redesign #docentes .home-docente-card--wide.home-docente-card--area-wide {
        border-radius: 0 !important;
    }

    /* Javier (bottom1): sin redondeo; la columna derecha redondea Felipe (top2) y Anna (bottom2). */
    #main_home.home-redesign #docentes .home-docente-card--area-bottom1:not(.home-docente-card--title) {
        border-radius: 0 !important;
        overflow: hidden !important;
    }

    #main_home.home-redesign #docentes .home-docente-card--wide.home-docente-card--area-wide img {
        border-radius: 0 !important;
    }

    /* Tercera columna: Felipe (top2) y Anna (bottom2) — solo esquinas derecha arriba y abajo (escritorio). */
    #main_home.home-redesign #docentes .home-docente-card--area-top2:not(.home-docente-card--title) {
        border-radius: 0 !important;
        border-top-right-radius: 28px !important;
        border-bottom-right-radius: 28px !important;
        overflow: hidden !important;
    }

    #main_home.home-redesign #docentes .home-docente-card--area-bottom2:not(.home-docente-card--title) {
        border-radius: 0 !important;
        border-top-right-radius: 28px !important;
        border-bottom-right-radius: 28px !important;
        overflow: hidden !important;
    }

    /* Primera columna: cabecera DOCENTES (title) con redondeo superior; celdas left sin redondeo en la franja inferior. */
    #main_home.home-redesign #docentes .home-docente-card--area-title.home-docente-card--title {
        margin-bottom: 0 !important;
        
        border-radius: 10px 10px 0 0 !important;
        box-shadow: none !important;
        overflow: hidden !important;
    }

    #main_home.home-redesign #docentes .home-docente-card--area-left1:not(.home-docente-card--title) {
        border-radius: 0 !important;
    }

    /* Solo “la columna de abajo” (sin tocar left1 respecto al área del icono/title):
     * unimos left2 + left3 para que no se vea la franja/separación horizontal entre tarjetas.
     */
    #main_home.home-redesign #docentes .home-docente-card--area-left2:not(.home-docente-card--title) {
        /* Escritorio: solo anula el row-gap del grid (1.155rem). El solape en píxeles es solo en móvil (max-width: 799px). */
        margin-top: -1.155rem !important;
        border-radius: 0 !important;
        z-index: 3;
    }

    /* Daniel Moral Alguacil (left3): esquina inferior izquierda del bloque docentes en escritorio. */
    #main_home.home-redesign #docentes .home-docente-card--area-left3:not(.home-docente-card--title) {
        margin-top: -1.155rem !important;
        border-radius: 0 !important;
        border-bottom-left-radius: 28px !important;
        overflow: hidden !important;
        z-index: 2;
    }

    /* Cabecera DOCENTES: solo redondeo en las dos esquinas superiores (alineado con la rejilla) */
    #main_home.home-redesign #docentes .home-docente-card--area-title.home-docente-card--title {
        border-radius: 28px 28px 0 0 !important;
        overflow: hidden !important;
    }
}

/*
 * Hero — CTAs: esta hoja va DESPUÉS de @vite; refuerzo para que el bloque baje de verdad.
 * Con align-items:center en la rejilla, al sumar margin el bloque derecho se recentraba y casi no se notaba.
 */
@media (min-width: 800px) {

    html:not(.obesi-js-wide) .home-redesign .home-hero,
    html:not(.obesi-js-wide) .home-redesign.home-redesign--logged .home-hero.home-hero--logged {
        align-items: start !important;
    }

    /* Solo invitado: el mismo selector sin `--public` pisaba el `translateX` del logueado por mayor especificidad (html + …). */
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__info .home-hero__actions--public {
        margin-top: 6.5rem !important;
        padding-top: 0.5rem !important;
        padding-right: 0.65rem !important;
        transform: translate(-64px, 72px) !important;
    }
}

@media (max-width: 799px) {
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__info .home-hero__actions {
        transform: none !important;
    }

    /* Tipografía/tamaño/padding de CTAs: unificados en resources/css/app.css (@media max-width 799px). */
}

/* Tamaños de CTAs invitado (escritorio): unificados en resources/css/app.css + style_complementary_2 (#main_home). */

/* CTAs invitado: escritorio a la derecha; móvil alineados a la izquierda (Registrarse + Entrar). */
@media (min-width: 800px) {
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions--public {
        justify-content: flex-end !important;
    }
}

@media (max-width: 799px) {
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions--public {
        justify-content: flex-start !important;
    }
}

@media (min-width: 800px) {
    html:not(.obesi-js-wide) #main_home.home-redesign.home-redesign--logged .home-hero__actions--logged {
        justify-content: center !important;
        padding-block: 0 !important;
        padding-inline: clamp(2.1rem, 4.35vw, 3.4rem) 0 !important;
        transform: translateX(clamp(3.35rem, 6.5vw, 5.4rem)) !important;
    }
}

@media (max-width: 799px) {
    #main_home.home-redesign.home-redesign--logged .home-hero__actions--logged {
        align-items: center !important;
        justify-content: flex-end !important;
    }
}

/* Texto «Entrar al aula docente» centrado en el botón (refuerzo tras Vite); vista antigua escritorio. */
@media (min-width: 800px) {

    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions--public .button_access_home_logged:last-child,
    html:not(.obesi-js-wide) #main_home.home-redesign.home-redesign--logged .home-hero__actions--logged .button_access_home_logged {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions--public .button_access_home_logged:last-child a,
    html:not(.obesi-js-wide) #main_home.home-redesign.home-redesign--logged .home-hero__actions--logged .button_access_home_logged a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        padding: 0 !important;
        line-height: 1.15 !important;
        align-self: center !important;
    }
}

/*
 * Móvil — pie completo visible (zoom 100 %, iOS/Android):
 * · `grid-template-rows: auto 1fr auto` fuerza una fila central flexible frente a min-height:100vh y recorta el scroll útil.
 * · 100dvh evita el “hueco” clásico con la barra del navegador vs 100vh.
 */
@media (max-width: 799px) {
    html {
        scroll-padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    }

    body.grid_body_full_content {
        grid-template-rows: auto auto auto;
    }

    body.grid_body_full_content>main {
        min-height: 0;
        overflow: visible;
    }
}

@supports (min-height: 100dvh) {
    @media (max-width: 799px) {
        body {
            min-height: 100dvh;
        }
    }
}

/*
 * Hero — escritorio (≥800px): maqueta centrada (logo + aval + CTAs).
 * Sin depender de html.obesi-js-wide para que el aval y los logos se alineen a la derecha siempre en escritorio.
 * Ilustración del hero (#main_home .home-hero__visual img): única fuente aquí (no duplicar en app.css ni style_complementary_2).
 */
@media (min-width: 800px) {

    #main_home.home-redesign .home-hero,
    #main_home.home-redesign.home-redesign--logged .home-hero.home-hero--logged {
        /* Misma proporción izq./der. que móvil (ilustración | marca): orden estable en todo escritorio */
        grid-template-columns: minmax(0, 0.4fr) minmax(0, 0.6fr);
        gap: clamp(1.65rem, 3.6vw, 3.35rem);
        align-items: start;
        align-content: start;
    }

    #main_home.home-redesign .home-hero__visual {
        padding-left: 0;
        align-self: start;
        overflow: visible;
        min-height: clamp(330px, 30vh, 500px);
    }

    #main_home.home-redesign .home-hero__info {
        margin-left: auto;
        margin-right: auto;
        /* Logo centrado; aval + CTAs alineados a la derecha */
        align-items: stretch;
        text-align: center;
        width: 100%;
        max-width: min(100%, 56rem);
        padding: 0 0.35rem !important;
        box-sizing: border-box;
    }

    #main_home.home-redesign .home-hero__logo {
        align-self: center;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: 0 !important;
        transform: none !important;
        max-width: min(100%, 48rem);
        width: 100%;
        height: auto;
    }

    /*
     * «Avalado por» centrado; fila de logos a la derecha (sin mover el título).
     */
    #main_home.home-redesign .home-hero__aval {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: flex-start;
        align-self: center;
        margin-top: clamp(1rem, 2.25vw, 1.45rem);
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        max-width: 100%;
        gap: clamp(0.45rem, 1vw, 0.75rem);
        box-sizing: border-box;
        transform: none;
    }

    #main_home.home-redesign .home-hero__aval-title {
        margin: 0 !important;
        padding: 0 !important;
        text-align: center;
        width: 100%;
        flex: 0 0 auto;
        white-space: normal;
        font-size: clamp(1.05rem, 1.65vw, 1.38rem);
        font-weight: 800;
        color: #3c95dc;
    }
    #main_home.home-redesign .home-hero__aval-title2 {
        margin: 0 !important;
        padding: 0 !important;
        text-align: center;
        width: 100%;
        flex: 0 0 auto;
        white-space: normal;
        font-size: clamp(1.05rem, 1.65vw, 1.38rem);
        font-weight: 800;
        color: #3c95dc;
    }

    #main_home.home-redesign .home-hero__aval-logos {
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center;
        margin: 0 !important;
        transform: none !important;
        padding: 0 !important;
        gap: clamp(0.72rem, 1.55vw, 1.3rem);
        flex: 0 1 auto;
        flex-wrap: wrap;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* ~35 % más pequeñas que la escala anterior (×0,65) */
    #main_home.home-redesign .home-hero__aval-logos img:nth-child(1) {
        height: clamp(36px, 3.77vw, 55px);
        width: auto;
    }

    #main_home.home-redesign .home-hero__aval-logos img:nth-child(2) {
        height: clamp(42px, 4.29vw, 62px);
        width: auto;
    }

    /* CTAs: base común (invitado y logueado). No usar solo `.home-hero__actions` sin modificador: pisaba el logueado con flex-end + padding:0. */
    #main_home.home-redesign .home-hero__info .home-hero__actions {
        width: 100%;
        max-width: 100%;
        flex-wrap: wrap !important;
        align-items: stretch !important;
        margin-top: clamp(1.85rem, 3.9vw, 3rem) !important;
        left: 0 !important;
        box-sizing: border-box;
    }

    /* Invitado: fila a la derecha, alineada con el bloque aval */
    #main_home.home-redesign .home-hero__info .home-hero__actions--public {
        align-self: flex-end;
        justify-content: flex-end !important;
        transform: none !important;
        padding: 0 !important;
    }

    /*
     * Tipografía / color / radius de los CTAs: ver style_complementary_2.css (bloque «Home hero CTAs»).
     * Aquí solo layout: «Registrarse» un poco más estrecho; enlaces en una línea.
     */
    #main_home.home-redesign .home-hero__actions--public .button_access_home_logged {
        flex: 0 1 auto !important;
        min-width: 0 !important;
        width: fit-content !important;
        max-width: 100% !important;
    }

    #main_home.home-redesign .home-hero__info .home-hero__actions--public .button_access_home_logged:first-child {
        max-width: min(100%, 15rem) !important;
        margin-left: 0 !important;
    }

    #main_home.home-redesign .home-hero__actions--public .button_access_home_logged a {
        white-space: nowrap;
    }

    #main_home.home-redesign.home-redesign--logged .home-hero__info .home-hero__actions--logged,
    #main_home.home-redesign.home-redesign--logged .home-hero__actions--logged {
        justify-content: center !important;
        align-self: center !important;
        margin-top: clamp(3.35rem, 5.8vw, 4.95rem) !important;
        padding-block: 0 !important;
        padding-inline: clamp(2.1rem, 4.35vw, 3.4rem) 0 !important;
        transform: translateX(clamp(3.35rem, 6.5vw, 5.4rem)) !important;
    }

    #main_home.home-redesign.home-redesign--logged .home-hero__actions--logged .button_access_home_logged {
        flex: 0 1 auto !important;
        min-width: 0 !important;
        width: fit-content !important;
        max-width: min(100%, 48rem) !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__visual {
        height: 100% !important;
        min-height: clamp(380px, 34vh, 560px) !important;
        /* Aumentado quirúrgicamente para que la imagen sea más alta sin romper el resto */
        max-height: none !important;
        /* Eliminar cualquier límite de altura heredado del div */
        align-self: stretch !important;
        /* Asegurar que la caja ocupe todo el alto del grid */
        overflow: visible !important;
    }

    #main_home.home-redesign .home-hero__visual img,
    #main_home.home-redesign:not(.home-redesign--logged) .home-hero__visual img,
    #main_home.home-redesign.home-redesign--logged .home-hero.home-hero--logged .home-hero__visual img {
        height: 300% !important;
        width: 300% !important;
        max-height: none !important;
        object-fit: cover !important;
        display: block !important;

    }

    #main_home.home-redesign .home-hero__logo {
        margin-top: 0 !important;
        transform: none !important;
        max-width: min(100%, 50rem) !important;
    }

    #main_home.home-redesign .home-hero__info {
        margin-top: 0.2rem !important;
        transform: none !important;
        max-width: min(100%, 64rem);
    }

    #main_home.home-redesign .home-hero__info .home-hero__actions {
        margin-top: clamp(1rem, 3.6vw, .5rem) !important;
    }

    #main_home.home-redesign.home-redesign--logged .home-hero__info .home-hero__actions--logged,
    #main_home.home-redesign.home-redesign--logged .home-hero__actions--logged {
        margin-top: clamp(3.85rem, 5.4vw, 5.35rem) !important;
    }

    #main_home.home-redesign .home-hero__aval-title {
        font-size: clamp(1.15rem, 1.85vw, 1.55rem);
        margin-bottom: 0 !important;
    }

    #main_home.home-redesign .home-hero__aval-title2 {
        font-size: 1.2rem;
        margin-bottom: 0 !important;
    }

    #main_home.home-redesign .home-hero__aval-logos img:nth-child(1) {
        height: clamp(52px, 5.07vw, 78px);
    }

    #main_home.home-redesign .home-hero__aval-logos img:nth-child(2) {
        height: clamp(60px, 5.72vw, 90px);
        width: auto;
    }
}

/*
 * Home logueado — escritorio (html.obesi-js-wide): «Entrar al aula docente» +30 %.
 * Con `html:not(.obesi-js-wide)` los tamaños vienen de resources/css/app.css (×1.3).
 */


/* Escritorio logueado: esquinas más contenidas que el bloque genérico del hero. */
@media (min-width: 800px) {
    #main_home.home-redesign.home-redesign--logged .home-hero__info .home-hero__actions--logged .button_access_home_logged {
        border-radius: 11px !important;
    }
}

/*
 * Temario (móvil): raya al 80 % del ancho de .home-temario (.home-temario__title width 100 %).
 */
@media (max-width: 799px) {
    #main_home.home-redesign #temario .home-temario__title {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
    }

    #main_home.home-redesign #temario .home-temario__title::after {
        content: "" !important;
        position: absolute !important;
        left: auto !important;
        right: 0.5rem !important;
        bottom: 0.35rem !important;
        width: 80% !important;
        height: 3px !important;
        background-color: #1f4e94 !important;
        pointer-events: none !important;
    }

    #main_home.home-redesign #temario .home-temario__title-stack {
        align-items: flex-start !important;
        overflow: visible !important;
        display: flex !important;
        flex-direction: column !important;
        padding-bottom: 0 !important;
    }

    #main_home.home-redesign #temario .home-temario__title-stack h2 {
        padding-bottom: 0 !important;
        background: none !important;
        background-image: none !important;
    }

    #main_home.home-redesign #temario .home-temario__title-stack h2::after {
        content: none !important;
        display: none !important;
    }

    #main_home.home-redesign #temario .home-temario__title-stack::after {
        content: none !important;
        display: none !important;
    }

    #main_home.home-redesign #temario .home-temario__title-stack>.home-temario__line {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: none !important;
        overflow: hidden !important;
        position: absolute !important;
        pointer-events: none !important;
    }

    #main_home.home-redesign #temario.home-block,
    #main_home.home-redesign #temario .home-temario {
        overflow-x: visible !important;
    }

    #main_home.home-redesign #temario .home-temario>.home-temario__module:first-of-type {
        margin-top: 0.72rem !important;
    }
}

@media (min-width: 800px) {
    #main_home.home-redesign #temario .home-temario__title::after {
        content: none !important;
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        background: none !important;
    }

    #main_home.home-redesign #temario .home-temario__title-stack h2 {
        background: none !important;
        background-image: none !important;
        background-size: auto !important;
        padding-bottom: 0 !important;
        font-size: 1.9rem !important; /* Reducido a petición */
    }

    #main_home.home-redesign #temario .home-temario__module h3 {
        font-size: 1.3rem !important; /* Reducido a petición */
    }

    #main_home.home-redesign #temario .home-temario__module p.home-temario__item {
        font-size: 1.12rem !important; /* Reducido a petición */
    }

    #main_home.home-redesign #temario .home-temario__title-stack::after {
        content: none !important;
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        background: none !important;
    }
}

/* ===================================================== */
/* FOOTER — Ajustes móviles                              */
/* ===================================================== */
@media (max-width: 799px) {

    /* Reducir el logo de Novo Nordisk en móvil de forma moderada */
    .footer-obesicare.footer-obesicare--redesign .footer-obesicare__cell--collab .footer-obesicare__novo-logo {
        width: 200px !important;
        max-width: 55vw !important;
        height: auto !important;
        max-height: 100px !important;
    }

    /* Copyright en una sola línea sin scroll horizontal */
    .footer-obesicare.footer-obesicare--redesign .footer-obesicare__copyright-wrap {
        width: 100% !important;
        max-width: 100vw !important;
        padding-left: 2vw !important;
        padding-right: 2vw !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .footer-obesicare.footer-obesicare--redesign .footer-obesicare__copyright {
        white-space: normal !important;
        font-size: 10px !important;
        line-height: 1.6 !important;
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto !important;
        overflow: hidden !important;
        display: block !important;
    }

    .footer-obesicare.footer-obesicare--redesign .footer-obesicare__copyright-name,
    .footer-obesicare.footer-obesicare--redesign .footer-obesicare__copyright-rights {
        display: block !important;
        width: 100% !important;
        margin-top: 4px !important;
    }

    /* Reducir texto y el tamaño del fondo blanco de la sección de colaboración */
    .footer-obesicare.footer-obesicare--redesign .footer-obesicare__cell--collab {
        padding-top: 0.8rem !important;
        padding-bottom: 0.8rem !important;
    }

    .footer-obesicare.footer-obesicare--redesign .footer-obesicare__collab-heading {
        font-size: 0.8rem !important;
        /* Texto considerablemente más pequeño */
        margin-bottom: 0.5rem !important;
        line-height: 1.1 !important;
    }

    .footer-obesicare.footer-obesicare--redesign .footer-obesicare__collab-bar--mobile-banner {
        padding-top: 0.4rem !important;
        padding-bottom: 0.4rem !important;
    }

    .footer-obesicare.footer-obesicare--redesign .footer-obesicare__collab-label--banner {
        font-size: 0.75rem !important;
        /* Texto reducido en el banner si es el que se está mostrando */
    }

    /* Reducir el gran espacio blanco entre Metodología y el Footer tirando del footer hacia arriba fuertemente */
    .footer-obesicare.footer-obesicare--redesign {
        margin-top: -8rem !important;
        position: relative !important;
        z-index: 10 !important;
    }

    /* Reducir la fuente de la información de Secretaría Técnica en el footer */
    .footer-obesicare.footer-obesicare--redesign .footer-obesicare__block--secretaria p,
    .footer-obesicare.footer-obesicare--redesign .footer-obesicare__block--secretaria a,
    .footer-obesicare.footer-obesicare--redesign .footer-obesicare__block--secretaria .footer-obesicare__eyebrow {
        font-size: 11px !important;
        line-height: 1.2 !important;
    }

    /* Móvil: dos columnas — invitado ilustración más estrecha; logueado 50/50 */
    html:not(.obesi-js-wide) #main_home.home-redesign:not(.home-redesign--logged) .home-hero {
        grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr) !important;
        align-items: start !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign.home-redesign--logged .home-hero.home-hero--logged {
        grid-template-columns: minmax(0, 0.5fr) minmax(0, 0.5fr) !important;
        align-items: start !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign:not(.home-redesign--logged) .home-hero__visual {
        align-self: start !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        min-width: 0 !important;
        min-height: 0 !important;
        overflow: visible !important;
        margin-top: clamp(0.1rem, 1vw, 0.45rem) !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign.home-redesign--logged .home-hero.home-hero--logged .home-hero__visual {
        align-self: start !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        min-width: 0 !important;
        min-height: 0 !important;
        overflow: visible !important;
        margin-top: clamp(-1.5rem, -5vw, -0.45rem) !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign:not(.home-redesign--logged) .home-hero__visual img {
        height: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: min(62vh, 420px) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        object-fit: contain !important;
        object-position: center top !important;
        display: block !important;
        transform: translateY(clamp(0.1rem, 0.85vw, 0.38rem)) !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign.home-redesign--logged .home-hero.home-hero--logged .home-hero__visual img {
        height: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: min(90vh, 680px) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        object-fit: contain !important;
        object-position: center top !important;
        display: block !important;
        transform: translateY(clamp(-1.1rem, -3.5vw, -0.25rem)) !important;
    }

    /* Ajustes específicos para los botones del Hero en móvil (public / logged) */
    /* Ajustes definitivos con máxima especificidad para forzar fila y tamaño */
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__info .home-hero__actions,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__info .home-hero__actions--public,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__info .home-hero__actions--logged {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.2rem !important;
        width: 100% !important;
        margin-top: 1rem !important;
        padding: 0 !important;
    }

    /* Contenedores .button_access_home_logged con especificidad ganadora */
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__info .home-hero__actions .button_access_home_logged,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__info .home-hero__actions--public .button_access_home_logged,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__info .home-hero__actions--logged .button_access_home_logged {
        min-width: 0 !important;
        max-width: none !important;
        padding: clamp(6px, 1.5vw, 10px) clamp(14px, 4vw, 22px) !important;
        border-radius: 6px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        height: auto !important;
        min-height: 0 !important;
    }

    /* El enlace interno <a> con especificidad ganadora */
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__info .home-hero__actions .button_access_home_logged a,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__info .home-hero__actions--public .button_access_home_logged a,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__info .home-hero__actions--logged .button_access_home_logged a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: clamp(0.52rem, 1.72vw, 0.7rem) !important;
        font-weight: bold !important;
        line-height: 1.15 !important;
        white-space: nowrap !important;
        text-align: center !important;
        width: auto !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Logueado: no estirar el CTA a toda la fila; ancho al texto + alineación con el carril del vídeo */
    html:not(.obesi-js-wide) #main_home.home-redesign.home-redesign--logged .home-hero__info .home-hero__actions--logged {
        justify-content: flex-end !important;
        padding-right: clamp(0.3rem, 7vw, 2rem) !important;
        padding-left: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign.home-redesign--logged .home-hero__info .home-hero__actions--logged .button_access_home_logged {
        flex: 0 0 auto !important;
        width: max-content !important;
        max-width: min(100%, 24rem) !important;
        padding: clamp(10px, 2.2vw, 14px) clamp(22px, 5.5vw, 36px) !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign.home-redesign--logged .home-hero__info .home-hero__actions--logged .button_access_home_logged a {
        font-size: clamp(0.63rem, 2.15vw, 0.82rem) !important;
        padding-inline: clamp(0.55rem, 2.6vw, 1.05rem) !important;
        padding-block: 0 !important;
    }
}

/* ===================================================== */
/* RESOLUCIONES INTERMEDIAS (TABLETS / IPAD PORTRAIT)     */
/* Parche específico para el Temario sin romper el layout global */
/* ===================================================== */
@media (min-width: 800px) and (max-width: 1024px) {
    #main_home.home-redesign #temario .home-block__two-cols {
        display: flex !important;
        align-items: center !important;
        flex-direction: column !important;
        gap: 3rem !important;
    }

    #main_home.home-redesign #temario .home-side-media {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin: 0 auto !important;
        width: 100% !important;
    }

    /* Solucionar rotura de botones y deformaciones locas de margin/transform en Tablet (820px) */
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions--public,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions--logged {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.5rem !important;
        width: 100% !important;
        transform: none !important;
        /* Limpiar transforms del desktop */
        padding: 0 !important;
        /* Limpiar padding-right masivo del desktop */
        margin-top: 2rem !important;
    }

    /* Limpiar los anchos máximos y márgenes negativos de los hijos del desktop */
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions--public .button_access_home_logged,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions--public .button_access_home_logged:first-child,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions--public .button_access_home_logged:last-child {
        margin: 0 !important;
        padding: 0 !important;
        max-width: none !important;
        transform: none !important;
        flex: 1 !important;
        width: 50% !important;
    }

    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions a,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions--public a,
    html:not(.obesi-js-wide) #main_home.home-redesign .home-hero__actions--logged a {
        display: inline-flex !important;
        border-radius: 8px !important;
        padding: 0.6rem 0.2rem !important;
        font-size: 10px !important;
        white-space: normal !important;
        text-align: center !important;
        font-weight: bold !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }
}