/*tipo de letra sena para el año 2024*/
.letra-sena-2024,
.letra-sena-2024 .form-control,
.letra-sena-2024 .btn,
.letra-sena-2024 input,
.letra-sena-2024 textarea,
.letra-sena-2024 select,
.letra-sena-2024 button {
    font-family: 'Work Sans', sans-serif !important;
}

.letra-sena-2024 .fas,
.letra-sena-2024 .far,
.letra-sena-2024 .fab,
.letra-sena-2024 .fa {
    font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Brands', sans-serif !important;
}
/*fin tipo de letra sena para el año 2024*/

html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.card-hover-lift {
    border-radius: 10px;
    transition: transform 0.15s;
}

.card-hover-lift:hover,
.card-hover-lift:focus-within {
    transform: scale(1.005);
}

.fondo {
    opacity: 0.8;
    background-size: cover;
    background-position: bottom;
    position: absolute;
    width: 100%;
    height: 100%;
}

#logo-sena {
    max-width: 120px;
}

.bg-gradient-custom {
    background-color: #00304D;
    background-image: linear-gradient(180deg, #00304D 0%, #001f33 100%);
    background-size: cover;
}

.centro {
    padding-left: 30%;
}

.btn-success {
    background-color: #38a900 !important;
}

/* ==========================================================================
   FIX #1: primera aparición de .scrollable-container (ver FIX #2 más abajo
   para la explicación completa). flex-shrink pasa de 0 a 1 y se agrega
   min-height:0, que es lo que realmente habilita el overflow-y:auto dentro
   de un contenedor flex con altura fija en el padre.
   ========================================================================== */
.scrollable-container {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

/* Estilos para spinner de carga */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.loader {
    width: 70px;
    height: 70px;
    position: relative;
}

.loader:before {
    content: "";
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 6px solid #ffffff;
    position: absolute;
    top: 0;
    left: 0;
    animation: pulse 1s ease-in-out infinite;
}

.loader:after {
    content: "";
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 6px solid transparent;
    border-top-color: #ffffff;
    position: absolute;
    top: 0;
    left: 0;
    animation: spin 2s linear infinite;
}

.loader-text {
    font-size: 24px;
    margin-top: 20px;
    color: #ffffff;
    font-family: 'Work Sans', sans-serif;
    text-align: center;
    text-transform: uppercase;
}

@keyframes pulse {
    0% {
        transform: scale(0.6);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0;
    }
    100% {
        transform: scale(0.6);
        opacity: 1;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.content {
    display: none;
}

.loaded .loader-container {
    display: none;
}

.loaded .content {
    display: block;
}

.clock {
    font-size: 0.8rem;
}
/* Fin estilos para spinner de carga */

/* Estilos para el boton de whatsapp */
.button2 {
    display: inline-block;
    transition: all 0.2s ease-in;
    position: relative;
    overflow: hidden;
    z-index: 1;
    color: #090909;
    padding: 0.7em 3.3em 0.7em 1.7em;
    font-size: 18px;
    border-radius: 0.5em;
    background: #e8e8e8;
    border: 1px solid #e8e8e8;
    box-shadow: 6px 6px 12px #c5c5c5, -6px -6px 12px #ffffff;
}

.button2>svg {
    height: 30px;
    position: absolute;
    padding: 0px 5px;
    margin-top: -4px;
}

.button2:active {
    color: #666;
    box-shadow: inset 4px 4px 12px #c5c5c5, inset -4px -4px 12px #ffffff;
}

.button2:before {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%) scaleY(1) scaleX(1.25);
    top: 100%;
    width: 140%;
    height: 180%;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    display: block;
    transition: all 0.5s 0.1s cubic-bezier(0.55, 0, 0.1, 1);
    z-index: -1;
}

.button2:after {
    content: "";
    position: absolute;
    left: 55%;
    transform: translateX(-50%) scaleY(1) scaleX(1.45);
    top: 180%;
    width: 160%;
    height: 190%;
    background-color: #009087;
    border-radius: 50%;
    display: block;
    transition: all 0.5s 0.1s cubic-bezier(0.55, 0, 0.1, 1);
    z-index: -1;
}

.button2:hover {
    color: #ffffff;
    border: 1px solid #009087;
}

.button2:hover:before {
    top: -35%;
    background-color: #009087;
    transform: translateX(-50%) scaleY(1.3) scaleX(0.8);
}

.button2:hover:after {
    top: -45%;
    background-color: #009087;
    transform: translateX(-50%) scaleY(1.3) scaleX(0.8);
}

.whatsapp {
    display: flex;
    align-items: end;
    justify-content: center;
    margin-right: 3%;
}
/* Fin estilos para el boton de whatsapp */

/* personalizacion del espacio de chat aprendiz */
#chatWindow {
    height: 400px;
    background-color: white;
    border-radius: 10px;
    padding: 10px;
    overflow-y: auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.mensaje-usuario {
    text-align: right;
}

.mensaje-admin {
    text-align: left;
}

.mensaje-usuario .mensaje {
    background-color: #d1ecf1;
    border-radius: 10px;
    padding: 10px;
    display: inline-block;
}

.mensaje-admin .mensaje {
    background-color: #c3e6cb;
    border-radius: 10px;
    padding: 10px;
    display: inline-block;
}

.mensaje-fecha {
    font-size: 0.8rem;
    color: gray;
}
/* Fin personalizacion del espacio de chat aprendiz  */

/* Estilos para el chat de asistencia */
.chat-box {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    background-color: #f8f9fa;
    max-height: 400px;
    overflow-y: auto;
}

.solicitud {
    padding: 10px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    cursor: pointer;
}

.solicitud-resuelta {
    padding: 10px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    background-color: #d4edda;
}

.solicitud-pendiente {
    padding: 10px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    background-color: #fff3cd;
}

.toggle-chat {
    cursor: pointer;
    margin-bottom: 10px;
}

.scrollable-content {
    max-height: 500px;
    overflow-y: auto;
    background-color: #f8f9fa;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: .25rem;
}
/* fin estilos para chat de asistencia  */

/* Estilos para asterisco de campo obligatorio */
.required:after {
    content: " *";
    color: red;
}
/* Fin estilos para asterisco de campo obligatorio */
/* ==========================================================================
   LAYOUT PRINCIPAL — WRAPPER, SIDEBAR Y CONTENIDO
   ========================================================================== */
#wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
}

#sidebar-wrapper {
    min-width: 260px;
    max-width: 260px;
    min-height: 100vh;
    height: 100%;           /* ← agregar */
    position: sticky;       /* ← agregar */
    top: 0;                 /* ← agregar */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow-y: auto;       /* FIX: por si el menú lateral es más largo que la pantalla, que scrollee solo */
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: -260px;
}

#page-content-wrapper {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: hidden;      /* FIX: el scroll vertical NO vive aquí, vive en .scrollable-container */
}

#sidebar-wrapper .list-group-item {
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    border: none !important;
    border-left: 4px solid transparent !important;
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.2s ease;
    background-color: transparent !important;
}

#sidebar-wrapper .list-group-item i {
    width: 20px;
    text-align: center;
    margin-right: 0.6rem;
}

#sidebar-wrapper .list-group-item:hover {
    background-color: rgba(57, 169, 0, 0.12) !important;
    color: #ffffff !important;
    border-left-color: rgba(57, 169, 0, 0.5) !important;
    padding-left: 1.8rem;
}

#sidebar-wrapper .list-group-item.active-nav-item {
    border-left: 4px solid #39A900 !important;
    background-color: rgba(57, 169, 0, 0.15) !important;
    color: #ffffff !important;
    font-weight: 600;
}

#sidebar-wrapper .text-muted {
    color: rgba(255, 255, 255, 0.4) !important;
}

body {
    background-color: #f4f6f9 !important;
}

/* ==========================================================================
   FIX #2: .scrollable-container estaba duplicada (dos reglas distintas).
   Ambas usaban flex:1 0 auto, cuyo flex-shrink:0 impide que el contenedor
   se encoja por debajo del alto de su contenido — como el padre
   (#page-content-wrapper) tiene overflow-y:hidden, el resultado era que el
   contenido excedente se recortaba en vez de generar scroll interno.
   La regla real (ver arriba, FIX #1) usa flex:1 1 auto + min-height:0, que
   es lo que de verdad permite que overflow-y:auto funcione. Esta segunda
   aparición se deja IDÉNTICA a la primera para no tener dos fuentes de
   verdad distintas.
   ========================================================================== */
.scrollable-container {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

/* ==========================================================================
   LOGO BROTA SIDEBAR
   ========================================================================== */
#logo-brota {
    max-width: 130px;
    filter: brightness(0) invert(1);
    display: block;
    margin: 0 auto;
    padding: 0.5rem 0;
}

.sidebar-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   FOOTER INSTITUCIONAL
   ========================================================================== */
.footer-institutional {
    background-color: #ffffff;
    border-top: 1px solid #e3e6f0;
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: auto;
    padding: 1.5rem 0;
    flex-shrink: 0;
}

/* =========================================================================
   ESTILOS INSTRUCTOR – unidad_informacion.php / temas.php
   ========================================================================= */
body {
    background-color: #f4f7f6;
    color: #2d3748;
}

/* ===== PAGE WRAPPER ===== */
.vista-page {
    max-width: 1280px;
    margin: 0 auto;
}

/* ===== BACK BUTTON ===== */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #2d6a4f;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.55rem 1.2rem;
    margin-bottom: 1.5rem;
    text-decoration: none;
    border-radius: 10px;
    background: #f0fdf4;
    border: 1.5px solid #b7e4c7;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(57, 169, 0, 0.08);
    position: relative;
    overflow: hidden;
}
.btn-back i {
    transition: transform 0.25s ease;
    font-size: 0.85rem;
}
.btn-back:hover {
    color: #1b4332;
    background: #d8f3dc;
    border-color: #52b788;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(57, 169, 0, 0.18);
    transform: translateY(-1px);
}
.btn-back:hover i {
    transform: translateX(-4px);
}
.btn-back:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(57, 169, 0, 0.12);
}

/* ===== MIGA DE PAN (BREADCRUMB) ===== */
.miga-pan {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.miga-pan a {
    color: #2d6a4f;
    font-weight: 600;
    text-decoration: none;
}

.miga-pan a:hover {
    color: #38a900;
    text-decoration: underline;
}

.miga-pan .miga-separador {
    color: #adb5bd;
    font-size: 0.7rem;
}

.miga-pan .miga-actual {
    color: #00304D;
    font-weight: 700;
}

/* ===== TITLE ===== */
.titulo-curso {
    font-size: 2rem;
    font-weight: 800;
    color: #00304D;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0;
}

/* ===== COURSE CODE BADGE ===== */
.curso-codigo {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 1rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
    letter-spacing: 0.3px;
}

/* ===== HEADER ROW ===== */
.vista-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e9ecef;
}

.vista-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.vista-header-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2rem;
    font-size: 0.9rem;
    color: #4a5568;
}

.vista-header-right .info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    padding: 0.55rem 1.2rem;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    font-size: 0.88rem;
}

.vista-header-right .info-item i {
    color: #38a900;
    width: 1.2rem;
    text-align: center;
    font-size: 1.05rem;
}

.vista-header-right .info-item strong {
    font-size: 1.05rem;
    color: #00304D;
}

.info-item-categorias {
    flex-wrap: wrap;
    gap: 0.3rem;
    border-left: 1px solid #dee2e6;
    padding-left: 1rem;
}

.badge-categoria {
    display: inline-block;
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    color: #4a148c;
    padding: 0.2rem 0.8rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: 1px solid #ce93d8;
}

.nivel {
    background: #38a900;
    color: #fff;
    padding: 0.3rem 1rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* ===== VIDEO SECTION ===== */
.video-section {
    margin-bottom: 2.5rem;
}

.video-wrapper {
    background: #0a0f1a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    position: relative;
}

.video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 72vh;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.video-container video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    object-fit: contain;
}

.video-badge {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.55);
    color: rgba(255,255,255,0.7);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.78rem;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

/* ===== VIDEO URL INPUT ===== */
.video-input-section {
    margin-bottom: 2rem;
}

.video-input-section .form-control {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    border-radius: 10px;
}

/* ===== ACTION BUTTONS ===== */
.acciones {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.acciones .btn {
    font-size: 0.88rem;
    padding: 0.55rem 1.5rem;
    border-color: #dee2e6;
    color: #4a5568;
    border-radius: 10px;
    transition: all 0.2s;
}

.acciones .btn:hover {
    border-color: #38a900;
    color: #38a900;
    background: #f0fdf4;
}

.acciones .btn i {
    margin-right: 0.4rem;
    color: #38a900;
    font-size: 0.95rem;
}

/* ===== SEPARATOR ===== */
.section-divider {
    border: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, #38a90033, #38a90055, #38a90033, transparent);
    margin: 2rem 0;
}

/* ===== DESCRIPTION + SIDEBAR ===== */
.descripcion-section {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.descripcion-main {
    flex: 1;
    min-width: 0;
}

.descripcion-main h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #00304D;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.descripcion-main p {
    color: #4a5568;
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 0;
}

.descripcion-side {
    width: 300px;
    flex-shrink: 0;
}

.card-lateral {
    background: #fff;
    border-left: 4px solid #38a900;
    padding: 1rem 1.2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-lateral:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.card-lateral i {
    color: #38a900;
    font-size: 1.2rem;
    width: 1.4rem;
    text-align: center;
}

/* ===== MODULE CARDS ===== */
.modulos-section {
    margin-top: 0.5rem;
}

.modulo-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #00304D;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modulo-section-title i {
    color: #38a900;
}

.modulo {
    display: flex;
    gap: 1.8rem;
    margin-bottom: 2rem;
    background: #fff;
    padding: 1.8rem 2.2rem;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s, transform 0.2s;
}

.modulo:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.modulo .numero {
    font-size: 2.4rem;
    font-weight: 800;
    color: #38a900;
    line-height: 1;
    min-width: 56px;
    padding-top: 0.2rem;
}

.modulo .contenido {
    flex: 1;
    min-width: 0;
}

.modulo .contenido h2 {
    margin-top: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #00304D;
    margin-bottom: 0.4rem;
}

.tema-header {
    user-select: none;
}

.tema-toggle-icon {
    color: #38a900;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    transition: transform 0.2s ease;
    display: inline-block;
}

.tema-header.collapsed .tema-toggle-icon {
    transform: rotate(-90deg);
}

.modulo .contenido .mod-subtitle {
    color: #6c757d;
    font-size: 0.88rem;
    margin-bottom: 0.8rem;
}

.modulo .contenido .mod-desc {
    color: #4a5568;
    line-height: 1.7;
    font-size: 0.92rem;
    margin-bottom: 0.8rem;
}

.modulo .contenido ul {
    margin: 0.8rem 0 1rem;
    padding: 0;
    color: #4a5568;
    font-size: 0.92rem;
    list-style: none;
}

.modulo .contenido ul li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.modulo .contenido ul li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #38a900;
    font-weight: 700;
    font-size: 1.1rem;
}

.modulo .contenido ul li .btn-link {
    vertical-align: baseline;
    font-size: 0.9rem;
}

/* Quitar triángulo "▸" de las opciones de pregunta */
.opciones-pregunta,
.opciones-pregunta li {
    padding-left: 0 !important;
}
.opciones-pregunta li::before {
    display: none !important;
    content: none !important;
}

.btn-ver {
    background: #38a900;
    color: #fff;
    border: none;
    padding: 0.6rem 2.2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-ver:hover {
    background: #2d8a00;
    transform: translateY(-1px);
    color: #fff;
}

.btn-success {
    background-color: #38a900 !important;
    border-color: #38a900 !important;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #a0aec0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

/* ===== CONTENIDO TEMA (Rich Text) ===== */
.contenido-tema {
    color: #2d3748;
    line-height: 1.8;
    font-size: 0.95rem;
}
.contenido-tema h1,
.contenido-tema h2,
.contenido-tema h3 {
    color: #00304D;
    margin-top: 1rem;
    margin-bottom: 0.6rem;
    font-weight: 700;
}
.contenido-tema p {
    margin-bottom: 0.8rem;
}
.contenido-tema ul,
.contenido-tema ol {
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
}
.contenido-tema li {
    margin-bottom: 0.3rem;
}
.contenido-tema img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.contenido-tema a {
    color: #38a900;
    text-decoration: underline;
}
.contenido-tema blockquote {
    border-left: 4px solid #38a900;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    background: #f0fdf4;
    border-radius: 0 8px 8px 0;
    color: #2d3748;
}
.contenido-tema pre {
    background: #f4f7f6;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.88rem;
}

/* ===== QUILL OVERRIDES ===== */
.ql-editor {
    min-height: 260px;
    font-family: 'Work Sans', sans-serif;
    font-size: 0.95rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .vista-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .vista-header-left,
    .vista-header-right {
        width: 100%;
    }
    .vista-header-right {
        gap: 0.6rem;
        font-size: 0.82rem;
    }
    .vista-header-right .info-item {
        padding: 0.45rem 0.9rem;
    }
    .info-item-categorias {
        border-left: none;
        border-top: 1px solid #dee2e6;
        padding-left: 0;
        padding-top: 0.6rem;
        margin-top: 0.2rem;
        width: 100%;
    }
    .descripcion-section {
        flex-direction: column;
    }
    .descripcion-side {
        width: 100%;
    }
    .modulo {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1.2rem;
    }
    .modulo .numero {
        font-size: 1.5rem;
        min-width: auto;
    }
    .titulo-curso {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .titulo-curso {
        font-size: 1.2rem;
    }
    .vista-header-right {
        gap: 0.5rem;
    }
    .vista-header-right .info-item {
        flex: 1 1 100%;
        justify-content: flex-start;
    }
}

/* ==========================================================================
   PÁGINA DE LOGIN
   ========================================================================== */
.login-left-panel,
.login-right-panel {
    height: 100vh;
}

.card {
    border-radius: 20px !important;
}

form.user .form-control-user {
   width: 85%!important;   /* Cambia el porcentaje a tu gusto */
    height: 42px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    margin: 0 auto !important;
}

/* Quitar fondo azul del autocompletado */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #6e707e !important;
    box-shadow: 0 0 0 30px white inset !important;
}

/* Responsive: en pantallas pequeñas ambos paneles se apilan bien */
@media (max-width: 767.98px) {
    .login-left-panel,
    .login-right-panel {
        min-height: 50vh;
        height: auto !important;
    }

}

/* --- Overlay carrusel --- */
.carousel-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 48, 77, 0.45);
    z-index: 1;
}

/* --- Contenido sobre carrusel --- */
.carousel-content {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2;
}

/* Forzar altura del carrusel */
#bgCarousel,
#bgCarousel .carousel-inner,
#bgCarousel .carousel-item {
    height: 100%;
}

/* Evitar fondo blanco durante transición slide */
#bgCarousel .carousel-inner {
    background: #00304D;
}

#bgCarousel .carousel-item {
    backface-visibility: hidden;
}

form.user .btn-user {
    width: 85% !important;      /* Largo del botón */
    height: 42px !important;    /* Alto */
    border-radius: 8px !important;
    margin: 0 auto !important;
    display: block;
}
.role-tabs {
  display: flex;
  border-bottom: 1px solid #e3e6f0;
  margin-bottom: 1.5rem;
}
.role-tab {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #858796;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    outline: none;
}
.role-tab:hover {
     color: #38a900;
}
.role-tab.active {
    color: #38a900;
    border-bottom-color: #38a900;
}
   
.login-label{
    display: block;
    width: 85%;
    margin: 0 auto 6px;
    color: #5a5c69;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}

form.user .form-group{
    margin-bottom: 1.3rem;
}

/* ===== BOTÓN VOLVER AL INICIO — LOGIN ===== */
.login-back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 2px solid rgba(255, 255, 255, 0.55);
    color: #ffffff;
    font-size: 16px;
    text-decoration: none;
    transition: background .25s ease, transform .2s ease, border-color .25s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}

.login-back-btn:hover {
    background: rgba(255, 255, 255, 0.42);
    border-color: rgba(255, 255, 255, 0.9);
    color: #ffffff;
    text-decoration: none;
    transform: translateX(-3px);
}