/*-------------------------------------------------------------
ESTRUCTURA PRINCIPAL TEMA
---------------------------------------------------------------
*/
/* ----- Layout ----- */
@media (min-width: 768px) {
    .layout {
        display: grid;
        grid-template-columns: 7fr 3fr;
        gap: .7rem;
        height: 100vh;
        padding: 1rem;
    }
    .main {
        overflow-y: scroll;
        height: calc(100vh - 2rem);
        display: flex
;
        flex-direction: column;
        justify-content: flex-start;
        position: relative;
        gap: 7px;
    }
}

@media (max-width: 767px) {
    .main {
        width: 100%;
        max-width: 95%;
        margin: auto;
    }
}





/*-------------------------------------------------------------
ESTILOS FUNCIONALIDAD DE LA ESTRUCTURA PRINCIPAL DE TEMAS
---------------------------------------------------------------
*/
/* ----- Estilos Base ----- */
.tab-panel {
    display: none;
    padding: .7rem 0;
}

@media (min-width: 768px) {
    .tab-panel.active {
        display: block;
    }
}

.tab-panel.active_mobile {
    display: block;
}


/* ----- Escritorio ----- */
.desktop-tabs {
    display: flex
;
    justify-content: space-evenly;
    height: 2rem;
    background: var(--color-background-1);
    border-radius: 10px 10px 0px 0px;
}

.tab-btn {
    width: 100%;
    color: var(--color-text-5);
    border-bottom: 2px solid var(--color-background-1);
}

.tab-btn.active {
        border-bottom: 2px solid var(--progress-color);
}

@media (min-width: 768px) {
    .mobile-tabs {
        display: none !important;
    }
    
    .tab-panel.active_mobile {
        display: none !important;
    }
}


/* ----- Móvil ----- */
@media (max-width: 767px) {
    .desktop-tabs {
        display: none;
    }

    .mobile-tabs {
        display: flex
;
        justify-content: space-evenly;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        flex-direction: row-reverse;
        height: 2.5rem;
        background: var(--color-background-1);
    }

    .mobile-btn {
        width: 100%;
        color: var(--color-text-5);
        border-bottom: 2px solid var(--color-background-1);
    }

    .mobile-btn.active {
        border-bottom: 2px solid var(--progress-color);
    }

    .icon-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .tab-panel {
        position: fixed;
        bottom: 2.5rem;
        left: 0;
        right: 0;
        background: var(--color-background-0);
        border-radius: 7px 7px 0 0;
        padding: .7rem;
                box-shadow: inset 0 14px 8px -8px #97c5ec4a;
    }
}


/*-------------------------------------------------------------
SCROLL AUTOMATICO - COURSE NAV
---------------------------------------------------------------
*/
/* ----- escritorio ----- */
.course-nav, .topic-item-content {
    overflow-y: scroll;
    max-height: calc(100vh - 7.9rem);
    height: 100%;
    /* config para scroll*/
    padding-right: 1rem;
    margin-right: -10px;
    scrollbar-width: thin;
    scrollbar-color: var(--color-background-3) transparent;
}

/* ----- movil ----- */
@media (max-width: 767px) {
.course-nav, .topic-item-content {
    max-height: calc(70vh - 6.4rem);
}
}

/*-------------------------------------------------------------
ENCABEZADO PROGRESO DEL CURSO EN TEMAS
---------------------------------------------------------------
*/
/* ----- Encabezado de contendido de curso ----- */
.course-nav-header, .topic-item-header {
    align-items: center;
    height: 2.5rem;
}

@media (max-width: 767px) {
    .course-nav-header, .topic-item-header {
        align-items: start;
        display: grid;
        grid-template-columns: 8.7fr 1.3fr;
        column-gap: 7px;
    }
}

/* -----  ----- */
.silla-bus-header {
    display: grid;
    grid-template-columns: 30px 1fr;
    grid-template-areas:
        "badge title"
        "badge progress";
    column-gap: .5rem;
    align-items: center;
}
.silla-bus-badge {
    grid-area: badge;
}
.silla-bus-title {
    grid-area: title;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-progress-container {
    grid-area: progress;    
}


/* ----- Progreso del curso en temas ----- */
.course-progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--tx7);
    font-size: .8rem;
}

.course-progress-percentage {
    white-space: nowrap;
}

.course-progress-text {
    white-space: nowrap;
}

.course-progress-bar {
    height: 4px;
    background-color: var(--do4);
    border-radius: 5px;
    overflow: hidden;
    flex-grow: 1;
}

.course-progress-fill {
    height: 100%;
    background-color: #0ae98a;
    transition: width 0.3s ease;
}



/*-------------------------------------------------------------
BOTON CERRAR PANEL EN TEMAS MOVIL
---------------------------------------------------------------
*/
/* ----- Botón cerrar panel movil ----- */
.close-btn-container {
    display: grid;
    margin-right: 7px;
    justify-items: end;
} 

.close-btn {
    color: var(--color-text-10);
    font-size: 1.2rem;
}


@media (min-width: 768px) {
    .close-btn-container {
        display: none;
    }
}

/*-------------------------------------------------------------
NAVEGACIÓN E INFO DEL CURSO
---------------------------------------------------------------
*/

/* ----- Info ----- */


@media (min-width: 768px) {
    .info {
        display: grid;
        grid-template-columns: 7fr 3fr;
        order: 1;
    }
    .topic-video{
            order: 2;
    }
}

.info-items {
    display: grid
;
    grid-template-columns: 40px 1fr;
    grid-template-areas:
        "badge global"
        "badge title";
    column-gap: .5rem;
    align-items: center;
}

@media (max-width: 767px) {
    .info-items {
        display: none;
    }
}

.course-info-badge{
    grid-area: badge;
}

.course-info-global {
    grid-area: global;
    font-size: var(--text-sm);
    color: var(--color-text-7);
}
.course-info-topic-title {
    grid-area: title;
    font-size: 1.1rem;
    font-weight: 600;
}

/* ----- Navegación ----- */
.navigation {
    display: flex
;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
}

.btn-nav {
    background: var(--do5);
    padding: 6px 14px;
    border-radius: 5px;
    color: var(--tx3);
    cursor: pointer;
    height: 30px;
}
.btn-nav i {
    color: var(--tx3);
}
.btn-nav:hover {
    filter: brightness(120%);

}




























