/* =====================================
1. GLOBAL STYLES & CONFIGURATIONS
===================================== */
:root {
    --primary-font: "Poppins", sans-serif;
    --text-dark: rgba(0, 0, 0, 0.98);
    --text-muted: rgba(0, 0, 0, 0.54);
    
    /* Material file type colors */
    --material-pdf: #dc2626;
    --material-word: #2563eb;
    --material-excel: #16a34a;
    --material-powerpoint: #ea580c;
    --material-archive: #7c3aed;
    --material-video: #ec4899;
    --material-image: #06b6d4;
    --material-default: #6b7280;
}

iframe{
    border: none;
    border-radius: 20px;
}

.avatar {
    width: 40px;
    height: 40px;
}

.nav-link{
    color: #007add;
}

.text-primary{
    color: #007add!important;
}

.bg-primary{
    background-color: #007add!important;
}

.btn-burguer{
    font-size: 32px!important;
    color: black!important;
    border: none !important;
    background-color: transparent !important;
    padding: 0;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--primary-font);
    font-weight: 400;
    background: #fff;
    color: var(--text-dark);
}

.navbar-brand {
    position: relative;
}

.navbar-brand .brand-pro-badge {
    position: absolute;
    top: 2px;
    right: 16px;
    font-size: 0.85rem;
}

.app-footer {
    border: none;
    background: initial;
    color: var(--text-muted);
}

.app-footer a {
    color: var(--text-muted);
}

.app-footer a:hover {
    color: var(--text-dark);
}


/* =====================================
2. TEXT UTILITIES
===================================== */
.text-regular {
    font-weight: 400;
}

.text-black-secondary {
    color: var(--text-muted);
}

.text-black {
    color: var(--text-dark);
}

.text-gold {
    color: #F2994A;
}

.text-silver {
    color: #7D8488;
}

.text-bronce {
    color: #795548;
}

.text-accent {
    color: #BFDF12;
}

.text-accent-2 {
    color: #2DB1FF;
}

.text-light-gray {
    color: lightgray;
}

.text-size-lead {
    font-size: 1.15rem;
}


/* =====================================
3. LINKS & NAVIGATION
===================================== */
a {
    color: #2DB1FF;
    transition: color 0.3s ease;
}

.clickable {
    cursor: pointer;
}

.clickable.nav-title:hover {
    background-color: rgba(38, 50, 56, 0.12);
}

.list-group-item.list-group-item-menu.list-group-item-action {
    text-transform: uppercase;
    font-size: 0.8rem;
}

.list-group-item.list-group-item-menu.active {
    background: #fff;
    color: #BFDF12;
    border-color: rgba(0, 0, 0, 0.125);
}


/* =====================================
4. BUTTONS
===================================== */
.btn {
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background-color: #BFDF12;
    color: var(--text-dark);
    border-color: #afcc10;
}

.btn-success:hover {
    background-color: #afcc10;
    border-color: #9eb90e;
    box-shadow: 0 4px 8px rgba(191, 223, 18, 0.2);
}

.btn-outline-success {
    color: #BFDF12;
    border-color: #afcc10;
    background-color: transparent;
}

.btn-outline-success:hover {
    background-color: #afcc10;
    color: var(--text-dark);
}

.btn-primary {
    background-color: #007add;
    border-color: #007add;
    color: white;
}

.btn-primary:hover {
    background-color: #0096ef;
    border-color: #0085d8;
}

.btn.btn-primary:active, .btn.btn-primary:focus  {
    background-color: #006bc3;
    border-color: #007add;
}

.btn-outline-primary {
    border-color: #007add;
    color: #007add;
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: #007add;
    color: white;
}

.btn.disabled {
    opacity: 0.6;
    /*color: #007add;*/
    border-color: #007add;
}

.btn.active{
    background-color: #007add;
    border-color: #007add;
    color: white;
}

.btn .btn-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    padding: 4px 8px;
    font-size: 0.7rem;
    border-radius: 12px;
    background: #2DB1FF;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-group-toggle.btn-group-definir .btn-outline-dark {
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-group-toggle.btn-group-definir .btn-outline-dark:hover {
    color: #2f353a;
    border-color: #2f353a;
    background: #ccc;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    text-transform: uppercase;
    font-weight: 500;
    border: 2px solid;
    border-color: #5a6268;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #4e555b;
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.2);
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
    background-color: transparent;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}
/* =====================================
5. BACKGROUNDS, ICONS & UTILITIES
===================================== */
.bg-circles {
    background-image: url("../../images/bg-brand-login.png");
    background-repeat: no-repeat;
    background-size: contain;
}

.card.card-clean {
    border: none;
    border-radius: 20px;
}

.bg-circles-h {
    background-image: url("../../images/bg-brand-login-h.png");
    background-repeat: no-repeat;
    background-size: contain;
}

.bg-azul {
    background: #003460;
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.bg-azul.bg-register-rigth {
    border-top-right-radius: 0.25rem;
    border-top-left-radius: 0;
    border-bottom-right-radius: 0.25rem;
    border-bottom-left-radius: 0;
}

.bg-azul.bg-register-top {
    border-top-right-radius: 0.25rem;
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0;
}

.bg-gris {
    background-color: #e9ecef;
}

.dot {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    font-size: 0.9rem;
    padding-top: 2px;
    background-color: rgba(255, 255, 255, 0.12);
}

.dot.dot-success {
    background-color: #BFDF12;
}

.dot.dot-black-secondary {
    background-color: var(--text-muted);
}

.nav-link.nav-register {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: #D8D8D8;
    color: white;
    padding: 1rem 1rem 1rem 1.2rem;
}

.nav-link.active .text-muted {
    color: rgba(255, 255, 255, 0.78) !important;
}

.nav-link.nav-register.side-icon {
    position: absolute;
    left: -2.4rem;
    padding: 1.1rem 0 0 0;
}

.nav-link.nav-register.active {
    background: #0275D8 !important;
}

.nav-link.nav-register:hover {
    color: #D8D8D8;
    background: #0275D8 !important;
}


/* =====================================
6. IMAGE CONTAINERS
===================================== */
.img-container-md {
    width: 160px;
    height: 160px;
    overflow: hidden;
    margin: 0 auto;
    text-align: center;
}

.img-container-md img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.img-container-md.img-container-wide {
    width: 220px;
    height: 170px;
}

.img-container-md.img-container-wide img {
    width: 220px;
    height: 170px;
}

.img-container-sm {
    width: 48px;
    height: 48px;
    overflow: hidden;
    margin: 0 auto;
    text-align: center;
}

.img-container-sm img {
    object-fit: cover;
    width: 48px;
    height: 48px;
}

.img-container-xs {
    width: 32px;
    height: 32px;
    overflow: hidden;
    margin: 0 auto;
    text-align: center;
}

.img-container-xs img {
    object-fit: cover;
    width: 32px;
    height: 32px;
}

.img-container-xxs {
    width: 24px;
    height: 24px;
    overflow: hidden;
    margin: 0 auto;
    text-align: center;
}

.img-container-xxs img {
    object-fit: cover;
    width: 24px;
    height: 24px;
}

.img-container-md .img-edit-hover {
    display: none;
    position: absolute;
    width: 120px;
    height: 120px;
    background: rgba(38, 50, 56, 0.26);
    color: rgba(255, 255, 255, 0.7);
    padding: 1rem;
    text-align: center;
}

.img-container-md:hover .img-edit-hover {
    display: block;
}


/* =====================================
7. TABS & PILLS
===================================== */
.nav-tabs {
    text-transform: uppercase;
}

.nav-tabs .nav-link {
    font-size: 0.8rem;
    border: none;
    border-bottom: 3px solid transparent;
}

.nav-tabs .nav-link .badge {
    background: var(--text-muted);
    color: white;
    margin-left: 4px;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-link.active:focus {
    color: #007add;
    border-bottom-color: #007add;
    background: none;
}

.nav-tabs .nav-link.active .badge,
.nav-tabs .nav-link.active:focus .badge {
    background: #007add;
    color: white;
    margin-left: 4px;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: #007add;
}


/* =====================================
7b. BADGES
===================================== */

.bg-primary-light {
    background-color: #C5DEFE;
    color: #0066cc;
    border-radius: 10px;
}

.bg-success-light {
    background-color: #DEFCE8;
    color: #155724;
    border: 1px solid #21C55E;
    border-radius: 10px;
}

.bg-danger-light {
    background-color: #f8d7da;
    color: #a11c2a;
    border: 1px solid #EF4444;
    border-radius: 10px;
}

/* =====================================
8. CARDS & RELATED COMPONENTS
===================================== */


.card {
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid #ddd;
    transition: transform 0.2s ease-in-out;
}


.card.card-accent {
    background: #007add;
    border-color: #19a9ff;
    color: white;
}

.card-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #007add;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: bold;
    z-index: 1;
}

a.card.area-conocimiento-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 4px rgba(38, 50, 56, 0.12);
}

.area-conocimiento-card {
    color: rgba(38, 50, 56, 0.87);
    text-decoration: none;
}

.area-conocimiento-card .card-area-bg {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    overflow: hidden;
}

.area-conocimiento-card .card-area-bg.card-area-bg-accent-2 {
    background-color: #2DB1FF;
}

.area-conocimiento-card .card-area-bg.card-area-bg-accent {
    background-color: #BFDF12;
}

.area-conocimiento-card .card-area-bg.card-area-bg-primary {
    background-color: #003460;
}

.area-conocimiento-card .card-area-bg.card-area-bg-secondary {
    background-color: #dee2e6;
}

.area-conocimiento-card .img-container {
    text-align: center;
    height: 160px;
    overflow: hidden;
    margin: 0 auto;
}

.area-conocimiento-card .img-container img {
    object-fit: cover;
}

.area-conocimiento-card .progress {
    border-radius: 0;
}

.area-conocimiento-card .card-icon-bg {
    color: rgba(255, 255, 255, 0.2);
    font-size: 7rem;
    position: absolute;
    left: 16px;
    top: -16px;
}

.area-conocimiento-card .card-icon {
    font-size: 3rem;
}

.area-conocimiento-card .area-conocimiento-title-card {
    padding: 1rem;
    height: 4.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
}







/* =====================================
9. COLLAPSIBLES & LISTS
===================================== */
.collapse-lecciones {
    font-size: 0.94rem;
}

.collapse-lecciones .collapse-header {
    padding: 12px 16px;
    color: var(--text-dark);
}

.collapse-lecciones .collapse-header:hover {
    background-color: #e9ecef;
    text-decoration: none;
}

.collapse-lecciones .list-group-clases .list-group-item {
    font-size: 0.94rem;
    text-transform: initial;
    color: var(--text-dark);
}

/* List group items */
.list-group-item.active {
    background: #BFDF12;
    border-color: rgba(255, 255, 255, 0.125);
    color: var(--text-dark);
}


/* =====================================
10. PROGRESS COMPONENTS
===================================== */
.progress-md {
    height: 8px;
}

.progress-bar-accent {
    background-color: #BFDF12;
}

.progress-bar.bg-accent {
    background-color: #BFDF12;
}

.progress-bar.bg-accent-2 {
    background-color: #2DB1FF;
}

/* =====================================
10. PROGRESS COMPONENTS
===================================== */
.progress-md {
    height: 8px;
}

.progress-bar-accent {
    background-color: #BFDF12;
}

.progress-bar.bg-accent {
    background-color: #BFDF12;
}

.progress-bar.bg-accent-2 {
    background-color: #2DB1FF;
}


/* =====================================
11. CALENDAR & SCHEDULE
===================================== */
.e-schedule .e-month-view .e-current-date .e-date-header,
.e-schedule .e-month-agenda-view .e-current-date .e-date-header {
    background-color: #BFDF12;
    color: var(--text-dark);
}

.e-schedule .e-month-view .e-appointment {
    background-color: #2DB1FF;
}


/* =====================================
12. FORM ELEMENTS
===================================== */
.custom-file-label {
    overflow: hidden;
}


/* =====================================
13. FOOTER
===================================== */
.app-footer {
    border: none;
    background: initial;
    color: var(--text-muted);
}

.app-footer a {
    color: var(--text-muted);
}

.app-footer a:hover {
    color: var(--text-dark);
}


/* =====================================
14. BADGES
===================================== */
.badge {
    font-weight: 500;
    font-size: 85%;
}

.badge.badge-md {
    text-transform: uppercase;
    padding: 6px 16px;
}

.badge.badge-black-secondary {
    background: var(--text-muted);
}

.badge.badge-active {
    background: rgba(38, 50, 56, 0.12);
}

.badge.badge-accent {
    background: #BFDF12;
}

.badge.badge-primary {
    background: #2DB1FF;
}

.badge.badge-admin {
    background: #FBBF24;
    color: #78350F;
}


/* =====================================
15. TOASTS (MESSAGES)
===================================== */
.toast {
    width: 350px;
    backdrop-filter: none;
}

.toast.toast-dark {
    background-color: var(--text-dark);
    color: white;
}

.toast.toast-dark .toast-header {
    background-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
}

.toast.toast-dark .toast-header .close {
    color: white;
    text-shadow: none;
}

/* =====================================
   16. HEADER & SIDEBAR
===================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    z-index: 1050;
    border-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    height: calc(100vh - 60px);
    background-color: #f8f9fa;
    overflow-y: auto;
    z-index: 1040;
    width: 260px; /* Ajusta seg�n el dise�o */
    transition: width 0.3s ease;
}

.sidebar.sidebar-main {
    height: calc(100vh - 60px);
    background-color: #f8f9fa;
    border-right: 2px solid #ddd;
    border-top: 2px solid #ddd;
    overflow-y: auto;
    border-top-right-radius: 20px;
    z-index: 1040;
    width: 260px; /* Ajusta seg�n el dise�o */
    transition: width 0.3s ease;
    scrollbar-width: none;
}

.sidebar.sidebar-clase {
    position:sticky;
    height: calc(100vh - 85px);
    background-color: #f8f9fa;
    border: 2px solid #ddd;
    overflow-y: auto;
    border-radius: 20px;
    z-index: 1040;
    width: 290px; /* Ajusta seg�n el dise�o */
    transition: width 0.3s ease;
    scrollbar-width: none;
}

.sidebar.sidebar-modal{
    margin-left: 0!important;
    border-right: none;
    position: relative;
    width: 100%;
    margin-top: 0;
}


.sidebar-modal .sidebar-nav {
    width: 100%;
    padding-left: 0;
}


.sidebar.show {
    display: block !important;
}

.sidebar-nav {
    list-style: none;
    margin-bottom: 0;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    width: 100%;
    padding: 10px 15px;
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: wrap;
}

.sidebar .nav-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    margin-right: 14px;
}

.sidebar-text {
    opacity: 0;
    font-size: 0.9rem;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sidebar.show .sidebar-text {
    opacity: 1;
    transform: translateX(0);
}

.nav-header {
    padding: 10px 15px;
    font-weight: bold;
    color: #666;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-top: 10px;
}

.sidebar .nav-link.active {
    background-color: #007add;
    color: white !important;
    border-radius: 4px;
}

.sidebar .nav-link:hover:not(.active) {
    background-color: rgba(0, 122, 221, 0.1);
    color: #007add;
}

.sidebar .nav-link.active .nav-icon {
    color: white !important;
}

.sidebar.sidebar-narrow {
    width: 80px;
    z-index: 1040;
    transition: width 0.3s ease;
}

.sidebar.sidebar-narrow .sidebar-text {
    display: none;
}


.layout-wrapper {
    display: flex;
    margin-top: 60px;
}

.main-content {
    flex-grow: 1;
    margin-left: 258px;
    padding: 20px;
    transition: margin-left 0.3s ease !important;
}

.sidebar-collapsed .main-content {
    margin-left: 80px;
}

/* =====================================
17. CAROUSEL
===================================== */
.carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 1000px;
    margin: auto;
}

.carousel-inner {
    position: relative;
}

.carousel-item {
    display: none;
    width: 100%;
}

.carousel-item.active {
    display: block;
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.carousel-indicators li {
    width: 10px;
    height: 10px;
    background: #ccc;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
}

.carousel-indicators li.active {
    background: #333;
}


/* =====================================
18. SCROLLBAR CUSTOMIZATION
===================================== */
::-webkit-scrollbar {
    width: 5px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f8f8f8;
    border-radius: 5px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #b0b0b0, #888888);
    border-radius: 5px;
    border: 2px solid #f8f8f8;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #999999, #666666);
}

::-webkit-scrollbar-button {
    display: none;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #b0b0b0 #f8f8f8;
}


/* =====================================
19. MODULE COMPONENTS
===================================== */
.module-container {
    padding: 20px;
    background-color: #f8f9fa;
}

.module-card {
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: none;
}

.module-card-body {
    padding: 20px;
}

.module-img-container {
    width: 150px;
    height: 100px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
}

.module-title {
    font-weight: bold;
    color: #333;
}

.module-progress {
    height: 8px;
    border-radius: 5px;
    overflow: hidden;
    background-color: #e9ecef;
}

.module-progress-bar {
    background-color: #007bff;
    transition: width 0.6s ease;
}

.module-btn {
    border-radius: 5px;
    font-weight: bold;
}

.module-btn-primary {
    background-color: #007bff;
    border: none;
}

.module-btn-outline-primary {
    border-color: #007bff;
    color: #007bff;
}

.module-btn-primary:hover,
.module-btn-outline-primary:hover {
    opacity: 0.8;
}

.module-section {
    margin-top: 15px;
}

.module-admin-section .module-btn-primary {
    background-color: #28a745;
    border-color: #28a745;
}

.module-text-secondary {
    color: #6c757d;
}

.module-ml-auto {
    margin-left: auto;
}

.module-mt-3 {
    margin-top: 1rem;
}


/* =====================================
20. CLASS CONTENT CONTAINER
===================================== */
#class-content {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

@media (max-width: 1200px) {
    #class-content {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    #class-content {
        max-width: 720px;
    }
}

@media (max-width: 768px) {
    #class-content {
        max-width: 540px;
    }
}

@media (max-width: 576px) {
    #class-content {
        max-width: 100%;
    }
}

/* =====================================
21. UTILITY CLASSES
===================================== */
.w-inherit {
    width: inherit;
}

.clickable {
    cursor: pointer;
}

.list-text-primary {
    font-size: 0.9rem;
}

.list-material > li:last-child .border-bottom {
    border-color: transparent !important;
}

.list-material > li a {
    color: var(--text-dark);
}

.list-material > li a:hover {
    background-color: rgba(38, 50, 56, 0.12);
    text-decoration: none;
}

.tab-content.tab-content-clear {
    background: none;
    border: none;
    padding: 0;
}

.tab-content.tab-content-clear .tab-pane {
    padding: 0;
}

.img-leccion {
    background-color: #dee2e6;
    border-bottom-left-radius: 8px;
    border-top-left-radius: 8px;
}

.breadcrumb {
    background-color: transparent;
}

.col-aspirante {
    min-width: 70px;
}

.bg-fixed {
    background-color: #fafafa;
}

.embed-responsive {
    background-color: #333;
}

.list-group-comentarios .list-group-item {
    background-color: transparent;
}

.list-group-comentarios .list-group-item.list-group-item-action:hover {
    background-color: rgba(38, 50, 56, 0.12);
}


/* =====================================
ESTILOS ESPEC�FICOS PARA LA VISTA DE DETALLE DE M�DULO
===================================== */
.modulo-detalle .card {
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.modulo-detalle .img-container-md {
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
}

.modulo-detalle .img-container-md img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.modulo-detalle h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #003460;
    margin-bottom: 1rem;
}

.modulo-detalle p {
    font-size: 1rem;
    color: rgba(38, 50, 56, 0.87);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modulo-detalle .progress {
    height: 10px;
    border-radius: 5px;
    background-color: #e9ecef;
    margin-bottom: 0.5rem;
}

.modulo-detalle .progress-bar {
    background-color: #BFDF12;
}

.modulo-detalle .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.modulo-detalle .btn-outline-primary {
    border-color: #007add;
    color: #007add;
}

.modulo-detalle .btn-outline-primary:hover {
    background-color: #007add;
    color: white;
}

.modulo-detalle .btn-primary {
    background-color: #007add;
    border-color: #007add;
}

.modulo-detalle .btn-primary:hover {
    background-color: #0066b3;
    border-color: #0066b3;
}

.modulo-detalle .card.text-center {
    background-color: #f8f9fa;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.modulo-detalle .card.text-center h4 {
    font-size: 1.5rem;
    color: #003460;
    margin-bottom: 1rem;
}

.modulo-detalle .card.text-center img {
    max-width: 100px;
    margin-bottom: 1rem;
}

/* =====================================
22. MODERN MATERIALS UI
===================================== */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.material-card {
    position: relative;
    display: block;
    background: #F0F8FF;
    border-radius: 20px;
    border: 2px solid #E0E0E0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    overflow: hidden;
}

.material-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    text-decoration: none;
}

.material-card-inner {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.material-icon-wrapper {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-shrink: 0;
}

.material-icon {
    font-size: 24px;
    color: white;
    z-index: 2;
    position: relative;
}

.material-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    transform: translate(-50%, -50%);
    opacity: 0;
    background: white;
}

.material-card:hover .material-ripple {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        width: 0;
        height: 0;
        opacity: 0.5;
    }
    100% {
        width: 150%;
        height: 150%;
        opacity: 0;
    }
}

.material-content {
    flex: 1;
    min-width: 0;
}

.material-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.material-type {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.material-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.material-card:hover .material-action {
    background: #e5e7eb;
    color: #374151;
    transform: scale(1.1);
}

.material-action i {
    font-size: 16px;
}

/* File type specific colors */
.material-pdf .material-icon-wrapper {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.material-word .material-icon-wrapper {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.material-excel .material-icon-wrapper {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.material-powerpoint .material-icon-wrapper {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.material-archive .material-icon-wrapper {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.material-video .material-icon-wrapper {
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
}

.material-image .material-icon-wrapper {
    background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
}

.material-default .material-icon-wrapper {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

/* Empty state */
.materials-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.materials-empty-icon {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.materials-empty-icon i {
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.materials-empty-title {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.materials-empty-text {
    font-size: 14px;
    color: #9ca3af;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .materials-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px 0;
    }

    .material-card-inner {
        padding: 16px;
    }

    .material-icon-wrapper {
        width: 48px;
        height: 48px;
    }

    .material-icon {
        font-size: 20px;
    }

    .material-title {
        font-size: 14px;
    }

    .materials-empty {
        padding: 40px 20px;
    }

    .materials-empty-icon {
        font-size: 48px;
    }
}

/* =====================================
23. RESPONSIVE LAYOUT FOR MOBILE
===================================== */

/* Backdrop for mobile sidebar */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1035;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* Mobile optimizations for touch targets */
.header .avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
}

.header .nav-link {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tablet and mobile responsive breakpoints */
@media (max-width: 991px) {
    /* Header adjustments for tablets */
    .header {
        padding: 0 0.75rem;
    }

    /* Sidebar becomes overlay on tablets */
    .sidebar.sidebar-main {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1040;
        pointer-events: none; /* No bloquear clicks cuando está oculto */
    }

    .sidebar.sidebar-main.show {
        transform: translateX(0);
        pointer-events: auto; /* Permitir clicks cuando está visible */
    }

    /* Main content takes full width */
    .main-content {
        margin-left: 0 !important;
        padding: 15px;
    }

    .layout-wrapper.sidebar-collapsed .main-content {
        margin-left: 0 !important;
    }

    /* Always show sidebar text when open on mobile */
    .sidebar .sidebar-text {
        opacity: 1;
        transform: translateX(0);
    }

    .sidebar.sidebar-narrow .sidebar-text {
        display: block;
        opacity: 1;
    }

    /* Disable narrow mode on mobile */
    .sidebar.sidebar-narrow {
        width: 260px;
    }
}

@media (max-width: 767px) {
    /* Header mobile optimizations */
    .header {
        padding: 0 0.5rem;
        height: 60px;
    }

    .header .navbar-brand img {
        height: 32px;
    }

    /* Sidebar mobile drawer */
    .sidebar.sidebar-main {
        position: fixed;
        top: 60px;
        left: 0;
        width: 280px;
        max-width: 85vw;
        height: calc(100vh - 60px);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
        z-index: 1040;
        pointer-events: none; /* No bloquear clicks cuando está oculto */
    }

    .sidebar.sidebar-main.show {
        transform: translateX(0);
        pointer-events: auto; /* Permitir clicks cuando está visible */
    }

    /* Prevent body scroll when sidebar is open */
    body.sidebar-open {
        overflow: hidden;
    }

    /* Main content full width on mobile */
    .main-content {
        margin-left: 0 !important;
        padding: 12px;
        width: 100%;
    }

    /* Dropdown menu improvements for mobile */
    .dropdown-menu {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }

    .dropdown-item {
        padding: 12px 16px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Improve button touch targets */
    .btn {
        min-height: 44px;
        padding: 10px 16px;
    }

    .btn-sm {
        min-height: 36px;
        padding: 6px 12px;
    }

    /* Card adjustments for mobile */
    .card {
        margin-bottom: 1rem;
    }

    /* Sidebar navigation improvements */
    .sidebar .nav-link {
        padding: 12px 15px;
        min-height: 48px;
    }

    .sidebar .nav-icon {
        font-size: 1.3rem;
        width: 28px;
        margin-right: 16px;
    }

    .sidebar-text {
        font-size: 0.95rem;
    }

    /* Avatar improvements */
    .avatar {
        width: 44px;
        height: 44px;
    }

    .avatar-img {
        width: 44px;
        height: 44px;
        object-fit: cover;
    }
}

@media (max-width: 575px) {
    /* Extra small mobile devices */
    .header {
        padding: 0 0.5rem;
    }

    .header .navbar-brand img {
        height: 28px;
    }

    .sidebar.sidebar-main {
        width: 260px;
        max-width: 80vw;
    }

    .main-content {
        padding: 10px;
    }

    /* Compact navigation on very small screens */
    .sidebar .nav-link {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    /* Smaller cards for mobile */
    .card {
        border-radius: 12px;
    }

    /* Adjust modal and dropdown sizes */
    .dropdown-menu {
        font-size: 0.9rem;
    }
}

/* Landscape mode optimizations */
@media (max-width: 991px) and (orientation: landscape) {
    .sidebar.sidebar-main {
        width: 240px;
    }

    .header {
        height: 56px;
    }

    .sidebar.sidebar-main {
        top: 56px;
        height: calc(100vh - 56px);
    }

    .layout-wrapper {
        margin-top: 56px;
    }
}

/* High DPI displays optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .sidebar .nav-link,
    .dropdown-item,
    .btn {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .sidebar.sidebar-main,
    .sidebar-backdrop,
    .main-content {
        transition: none !important;
    }
}

/* =====================================
23. PROFILE FORM RESPONSIVE
===================================== */

/* Profile aside navigation touch targets */
.list-group-item.list-group-item-menu.list-group-item-action {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 12px 16px;
}

/* Form section headers */
.form-section-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Form inputs on mobile - prevent iOS zoom on focus */
@media (max-width: 767px) {
    .form-control,
    .form-select {
        font-size: 16px;
    }
}

/* Profile aside: horizontal tabs only on mobile (inside d-block d-md-none wrapper) */
@media (max-width: 767px) {
    .d-block.d-md-none .list-group-menu {
        flex-direction: row;
        border: 1px solid rgba(0, 0, 0, 0.125);
        border-radius: 8px;
        overflow: hidden;
    }

    .d-block.d-md-none .list-group-menu .list-group-item {
        flex: 1;
        text-align: center;
        border: none;
        border-bottom: 3px solid transparent;
        border-radius: 0;
        padding: 12px 8px;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .d-block.d-md-none .list-group-menu .list-group-item.active {
        border-bottom-color: var(--cui-primary, #007add);
        background-color: rgba(0, 122, 221, 0.05);
        color: var(--cui-primary, #007add);
    }
}

/* Profile header card on very small screens */
@media (max-width: 575px) {
    .container .card-body h2 {
        font-size: 1.25rem;
    }
}

/* =====================================
24. LAYOUT DE CLASE ESTILO UDEMY
===================================== */

/* Wrapper principal del layout de clase */
.clase-layout-wrapper {
    display: flex;
    min-height: calc(100vh - 60px);
    position: relative;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Override del main-content del layout principal cuando está en página de clase */
.main-content:has(.clase-layout-wrapper) {
    margin-left: 258px !important;
    padding: 0 !important;
    max-width: 100% !important;
}

.sidebar-collapsed .main-content:has(.clase-layout-wrapper) {
    margin-left: 80px !important;
}

/* Contenido principal (video + descripción + tabs) */
.clase-main-content {
    flex: 1;
    min-width: 0; /* Permite que el flex item se reduzca */
    background: #fff;
    display: flex;
    flex-direction: column;
}

/* Video container con aspect ratio 16:9 */
.clase-video-container {
    position: relative;
    width: 100%;
}

.clase-video-container .container-fluid {
    max-width: 1400px;
    padding: 0 2rem;
}

.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    width: 100%;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Sección de contenido de la clase */
.clase-content-section {
    padding: 2rem 0;
}

.clase-content-section .container-fluid {
    max-width: 1400px;
    padding: 0 2rem;
}

/* Título de la clase */
.clase-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

/* Divider personalizado */
.clase-divider {
    height: 4px;
    border: none;
    border-radius: 2px;
    background: linear-gradient(to right, #1E90FF, #00c6ff, #1E90FF);
    margin: 1.5rem 0;
    opacity: 0.7;
}

/* Avatar del maestro */
.clase-maestro-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.clase-maestro-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Descripción de la clase */
.clase-description {
    color: #4a5568;
    line-height: 1.7;
    font-size: 1rem;
}

/* Tabs personalizadas */
.clase-tabs {
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.clase-tabs .nav-link {
    color: #718096;
    font-weight: 500;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

.clase-tabs .nav-link:hover {
    color: #007add;
    background: rgba(0, 122, 221, 0.05);
}

.clase-tabs .nav-link.active {
    color: #007add;
    border-bottom-color: #007add;
    background: transparent;
}

.clase-tabs .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Tab content */
.clase-tab-content {
    padding: 1.5rem 0;
}

/* Sidebar derecho (índice del módulo) */
.sidebar-clase-modulo {
    width: 260px !important;
    background: #f8f9fa;
    border-left: 2px solid #ddd;
    border-right: none !important;
    border-top: 2px solid #ddd;
    border-top-left-radius: 20px !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    height: calc(100vh - 60px) !important;
    position: fixed !important;
    top: 60px !important;
    right: 0 !important;
    left: auto !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    flex-shrink: 0;
    z-index: 1025 !important;
    pointer-events: none;
}

/* Desktop: sidebar visible y sticky */
@media (min-width: 992px) {  
    .sidebar-clase-modulo {
        position: sticky !important;
        transform: translateX(0) !important;
        z-index: auto;
        pointer-events: auto;
    }
}

/* Scrollbar mejorada para mejor usabilidad en trackpads */
.sidebar-clase-modulo {
    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: #a0aec0 #f1f1f1;
    /* Forzar scroll siempre visible para mejor discoverability */
    overflow-y: scroll !important;
}

.sidebar-clase-modulo::-webkit-scrollbar {
    width: 10px;
}

.sidebar-clase-modulo::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

.sidebar-clase-modulo::-webkit-scrollbar-thumb {
    background: #a0aec0;
    border-radius: 5px;
    border: 2px solid #f1f1f1;
}

.sidebar-clase-modulo::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

.sidebar-clase-modulo::-webkit-scrollbar-thumb:active {
    background: #4a5568;
}

/* Navegación del sidebar */
.sidebar-clase-modulo .sidebar-nav {
    padding: 0;
}

.sidebar-clase-modulo .nav {
    padding: 0;
}

/* Items de lección (folders) */
.modulo-leccion-item {
    border-bottom: 1px solid #dee2e6;
}

.modulo-leccion-item > .nav-link {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: #2d3748;
    background: #e9ecef;
    border: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    white-space: normal;
}

.modulo-leccion-item > .nav-link:hover {
    background: #dee2e6;
    color: #007add;
}

.modulo-leccion-item > .nav-link i {
    font-size: 1rem;
    color: #6c757d;
}

.modulo-leccion-item > .nav-link:hover i {
    color: #007add;
}

/* Items de elemento (clases/evaluaciones) */
.modulo-elemento-item .nav-link {
    padding: 0.75rem 1.25rem 0.75rem 2.5rem;
    font-size: 0.875rem;
    color: #4a5568;
    border: none;
    background: #f8f9fa;
    transition: all 0.2s ease;
    line-height: 1.5;
}

/* Asegurar que los clicks en elementos internos lleguen al enlace padre */
.modulo-elemento-item .nav-link * {
    pointer-events: none;
}

.modulo-elemento-item .nav-link:hover {
    background: #e9ecef;
    color: #007add;
}

/* Asegurar que los clicks en botones e íconos internos funcionen correctamente en móvil */
@media (max-width: 991px) {
    /* Los iconos y spans dentro de enlaces y botones no deben bloquear el click */
    a[href] i,
    a[href] span,
    a[asp-action] i,
    a[asp-action] span,
    button[type="submit"] i,
    button[type="submit"] span {
        pointer-events: none;
    }
}

.modulo-elemento-item .nav-link.active {
    background: #007add;
    color: #ffffff;
    border-left: 4px solid #0056b3;
    font-weight: 600;
}

.modulo-elemento-item .nav-link.active .modulo-estado-icon {
    color: #ffffff !important;
}

.modulo-elemento-item .nav-link.active .modulo-elemento-tipo {
    color: rgba(255, 255, 255, 0.9);
}

.modulo-elemento-item .nav-link.active .modulo-elemento-titulo {
    color: #ffffff;
}

/* Título del elemento */
.modulo-elemento-titulo {
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    word-wrap: break-word;
    white-space: normal;
}

/* Tipo de elemento */
.modulo-elemento-tipo {
    font-size: 0.75rem;
    color: #718096;
    display: flex;
    align-items: center;
}

/* Icono de estado (completado/pendiente) */
.modulo-estado-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

/* Collapse animation */
.modulo-leccion-item .collapse {
    transition: height 0.2s ease;
}

/* Empty state */
.modulo-leccion-item .nav-link.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Header del sidebar */
.sidebar-modulo-header {
    padding: 1.25rem;
    border-bottom: 2px solid #ddd;
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-modulo-titulo {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    align-items: center;
}

.sidebar-modulo-header .btn-close {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
}

/* Botón flotante para abrir sidebar en móvil */
.btn-floating-sidebar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1020;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    align-items: center;
    transition: all 0.3s ease;
}

.btn-floating-sidebar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 221, 0.3);
}

/* Backdrop reutilizado */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1019;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* =====================================
   RESPONSIVE BREAKPOINTS
===================================== */

/* Estado abierto del sidebar */
.sidebar-clase-modulo.show {
    transform: translateX(0) !important;
    pointer-events: auto;
}

/* Tablets y menores - < 992px */
@media (max-width: 991px) {
    /* Override del main-content en móvil/tablet */
    .main-content:has(.clase-layout-wrapper) {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    /* Sidebar permanece como overlay con ajustes */
    .sidebar-clase-modulo {
        max-width: 85vw;
        box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
    }

    /* Mostrar botón flotante */
    .btn-floating-sidebar {
        display: flex !important;
    }

    /* Contenido principal usa todo el ancho */
    .clase-main-content {
        width: 100%;
    }

    /* Ajustar padding del video */
    .clase-video-container .container-fluid {
        padding: 0 1.5rem;
    }

    /* Ajustar padding del contenido */
    .clase-content-section .container-fluid {
        padding: 0 1.5rem;
    }

    /* Prevenir scroll cuando sidebar está abierto */
    body.sidebar-clase-open {
        overflow: hidden;
    }
}

/* Móviles - < 768px */
@media (max-width: 767px) {
    /* Sidebar más estrecho en móvil */
    .sidebar-clase-modulo {
        width: 300px !important;
        max-width: 85vw;
    }

    /* Video más compacto */
    .clase-video-container .container-fluid {
        padding: 0 1rem;
    }

    /* Contenido más compacto */
    .clase-content-section {
        padding: 1.5rem 0;
    }

    .clase-content-section .container-fluid {
        padding: 0 1rem;
    }

    /* Título más pequeño */
    .clase-title {
        font-size: 1.5rem;
    }

    /* Tabs con scroll horizontal */
    .clase-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .clase-tabs::-webkit-scrollbar {
        display: none;
    }

    .clase-tabs .nav-link {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    /* Botón flotante más compacto */
    .btn-floating-sidebar {
        padding: 10px 20px;
        font-size: 0.85rem;
        bottom: 16px;
        right: 16px;
    }

    .btn-floating-sidebar span {
        display: none;
    }

    .btn-floating-sidebar i {
        margin-right: 0;
    }

    /* Stack del maestro en móvil */
    .clase-maestro-avatar {
        width: 40px;
        height: 40px;
    }
}

/* Extra small móviles - < 576px */
@media (max-width: 575px) {
    .sidebar-clase-modulo {
        width: 280px !important;
        max-width: 80vw;
    }

    .clase-video-container .container-fluid {
        padding: 0 0.75rem;
    }

    .clase-content-section .container-fluid {
        padding: 0 0.75rem;
    }

    .clase-title {
        font-size: 1.25rem;
    }

    .btn-floating-sidebar {
        padding: 8px 16px;
        bottom: 12px;
        right: 12px;
    }
}

/* Landscape móvil */
@media (max-width: 991px) and (orientation: landscape) {
    .sidebar-clase-modulo {
        width: 280px !important;
        top: 56px !important;
        height: calc(100vh - 56px) !important;
    }

    .clase-video-container {
        max-height: 60vh;
    }
}

/* Desktop grande - > 1400px */
@media (min-width: 1400px) {
    .clase-content-section .container-fluid {
        max-width: 1400px;
        padding: 0 3rem;
    }

    .clase-video-container .container-fluid {
        max-width: 1400px;
        padding: 0 3rem;
    }
}

/* ============================================
   Sidebar End - Collapsible (Desktop)
   ============================================ */

/* Botón para colapsar el sidebar (dentro del header) */
.btn-collapse-sidebar {
    background: transparent;
    border: none;
    color: #718096;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.btn-collapse-sidebar i{
    position: relative;
    top: -3px;
}

.btn-collapse-sidebar:hover {
    background: #e2e8f0;
    color: #2d3748;
}

.btn-collapse-sidebar:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.5);
}

/* Botón para restaurar el sidebar (flotante en el borde) */
.btn-restore-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 2px solid #ddd;
    border-right: none;
    color: #718096;
    padding: 1rem 0.5rem;
    cursor: pointer;
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.btn-restore-sidebar.visible {
    opacity: 1;
    visibility: visible;
}

.btn-restore-sidebar:hover {
    background: #f7fafc;
    color: #2d3748;
    padding-left: 0.75rem;
}

.btn-restore-sidebar:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.5);
}

/* Estado colapsado del sidebar */
@media (min-width: 992px) {
    .sidebar-clase-modulo.sidebar-collapsed {
        width: 0 !important;
        min-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .clase-layout-wrapper.sidebar-end-collapsed .clase-main-content {
        max-width: 100%;
        flex: 1;
    }

    /* Transición suave para el contenido principal */
    .clase-main-content {
        transition: max-width 0.3s ease, flex 0.3s ease;
    }

    .sidebar-clase-modulo {
        transition: width 0.3s ease, opacity 0.3s ease, visibility 0.3s ease, padding 0.3s ease;
    }
}

/* Simulacro sidebar notification dot */
.sidebar-notification-dot {
    width: 10px;
    height: 10px;
    background-color: #2DB1FF;
    border-radius: 50%;
    margin-left: auto;
    flex-shrink: 0;
    animation: pulse-notification 1.5s ease-in-out infinite;
}

@keyframes pulse-notification {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(45, 177, 255, 0.7);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(45, 177, 255, 0);
    }
}

.sidebar-narrow .sidebar-notification-dot {
    position: absolute;
    top: 6px;
    right: 12px;
    margin-left: 0;
    width: 8px;
    height: 8px;
}

.sidebar-narrow .nav-item {
    position: relative;
}

/* =====================================
   RESULTADO SIMULACRO
===================================== */

.resultado-page {
    background: #f0f0f0;
    min-height: 100vh;
    padding-bottom: 3rem;
}

/* ---- Header bar ---- */
.resultado-header {
    background: #fff;
    border-bottom: 3px solid #e5e5e5;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
}

.resultado-header-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #3c3c3c;
}

.resultado-header-sub {
    font-size: .82rem;
    color: #afafaf;
    font-weight: 600;
}

.resultado-header-logo {
    display: flex;
    align-items: center;
    padding-right: .75rem;
    border-right: 2px solid #e5e5e5;
}

.resultado-header-logo img {
    display: block;
}

/* ---- Score hero ---- */
.resultado-hero {
    background: #fff;
    border-radius: 16px;
    border: 2px solid #e5e5e5;
    border-bottom: 4px solid #e5e5e5;
    padding: 2rem 2.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.resultado-score-ring {
    position: relative;
    display: inline-block;
    margin-bottom: .5rem;
}

.resultado-score-ring svg {
    transform: rotate(-90deg);
}

.resultado-score-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.resultado-score-number {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1;
    font-family: var(--primary-font);
}

.resultado-score-label {
    font-size: .8rem;
    color: #afafaf;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 4px;
}

.resultado-score-fraction {
    font-size: 1.3rem;
    font-weight: 700;
    color: #3c3c3c;
}

.resultado-score-fraction span {
    font-weight: 600;
    color: #afafaf;
}

/* Stats row */
.resultado-stats-row {
    display: flex;
    gap: .75rem;
    justify-content: center;
    margin: 1.5rem 0 1rem;
}

.resultado-stat {
    flex: 1;
    max-width: 180px;
    background: #fff;
    border: 2px solid #e5e5e5;
    border-bottom: 4px solid #e5e5e5;
    border-radius: 16px;
    padding: 1rem .5rem;
    text-align: center;
}

.resultado-stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.resultado-stat-label {
    font-size: .75rem;
    font-weight: 700;
    color: #afafaf;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-top: .3rem;
}

.resultado-stat-correct { border-color: #007add; border-bottom-color: #006bc3; }
.resultado-stat-correct .resultado-stat-value { color: #007add; }

.resultado-stat-incorrect { border-color: #FF4B4B; border-bottom-color: #e53535; }
.resultado-stat-incorrect .resultado-stat-value { color: #FF4B4B; }

.resultado-stat-skipped { border-color: #e5e5e5; }
.resultado-stat-skipped .resultado-stat-value { color: #afafaf; }

/* Progress bar - chunky Duo style */
.resultado-progress-track {
    width: 100%;
    max-width: 500px;
    height: 16px;
    background: #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto 1rem;
}

.resultado-progress-fill {
    height: 100%;
    transition: width 1s ease;
}

.resultado-progress-fill-correct { background: #007add; }
.resultado-progress-fill-incorrect { background: #FF4B4B; }

/* Message banner */
.resultado-mensaje {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .7rem 1.2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: .9rem;
    border: 2px solid;
}

.resultado-mensaje-excellent { background: #dbeafe; color: #007add; border-color: #007add; }
.resultado-mensaje-good { background: #ddf4ff; color: #1cb0f6; border-color: #1cb0f6; }
.resultado-mensaje-keep { background: #fff3cd; color: #FF9600; border-color: #FF9600; }
.resultado-mensaje-try { background: #ffdfe0; color: #FF4B4B; border-color: #FF4B4B; }

/* ---- Section titles ---- */
.resultado-section-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #3c3c3c;
    display: flex;
    align-items: center;
    gap: .5rem;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* ---- Resumen por Materia — bar chart ---- */
.resultado-resumen-card {
    background: #fff;
    border-radius: 16px;
    border: 2px solid #e5e5e5;
    border-bottom: 4px solid #e5e5e5;
    padding: 1.5rem 1.8rem;
    margin-bottom: 1.5rem;
}

.resultado-resumen-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .45rem 0;
}

.resultado-resumen-name {
    width: 140px;
    flex-shrink: 0;
    font-weight: 600;
    font-size: .9rem;
    color: #3c3c3c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resultado-resumen-bar-track {
    flex: 1;
    height: 14px;
    background: #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
}

.resultado-resumen-bar-fill {
    height: 100%;
    background: #007add;
    border-radius: 10px;
    transition: width .8s ease;
}

.resultado-resumen-fraction {
    width: 50px;
    flex-shrink: 0;
    font-weight: 700;
    font-size: .9rem;
    color: #3c3c3c;
    text-align: right;
}

/* ---- Materias a Reforzar ---- */
.resultado-reforzar-card {
    background: #fff;
    border-radius: 16px;
    border: 2px solid #e5e5e5;
    border-bottom: 4px solid #e5e5e5;
    padding: 1.5rem 1.8rem;
    margin-bottom: 1.5rem;
}

.resultado-reforzar-materia {
    background: #fafafa;
    border: 2px solid #e5e5e5;
    border-radius: 14px;
    padding: 1rem 1.2rem;
    margin-bottom: .75rem;
}

.resultado-reforzar-materia:last-child {
    margin-bottom: 0;
}

.resultado-reforzar-materia-header {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.resultado-reforzar-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.resultado-reforzar-materia-name {
    font-weight: 700;
    font-size: 1rem;
    color: #3c3c3c;
    flex: 1;
    min-width: 0;
}

.resultado-reforzar-score {
    font-weight: 800;
    font-size: .95rem;
    flex-shrink: 0;
}

.resultado-reforzar-subtemas {
    margin-top: .6rem;
    padding-top: .5rem;
}

.resultado-reforzar-subtemas-label {
    font-size: .78rem;
    font-weight: 600;
    color: #afafaf;
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: .4rem;
}

.resultado-reforzar-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.resultado-reforzar-pill {
    background: #f0f0f0;
    color: #555;
    font-size: .8rem;
    font-weight: 600;
    padding: .3rem .7rem;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* ---- Materia card (PorMateria wrapper) ---- */
.resultado-materia-card {
    background: #fff;
    border-radius: 16px;
    border: 2px solid #e5e5e5;
    border-bottom: 4px solid #e5e5e5;
}

/* ---- Subtemas (PorMateria view) ---- */
.resultado-subtema-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem 0;
    font-size: .85rem;
}

.resultado-subtema-row:not(:last-child) {
    border-bottom: 2px solid #f7f7f7;
}

.resultado-subtema-name {
    flex: 1;
    min-width: 0;
    color: #3c3c3c;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resultado-subtema-stats {
    display: flex;
    gap: .35rem;
    align-items: center;
    font-size: .8rem;
    flex-shrink: 0;
    font-weight: 700;
}

.resultado-subtema-stats .correct { color: #007add; }
.resultado-subtema-stats .incorrect { color: #FF4B4B; }
.resultado-subtema-stats .sep { color: #d5d5d5; }

.resultado-subtema-bar {
    width: 90px;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    background: #e5e5e5;
    display: flex;
    flex-shrink: 0;
}

.resultado-subtema-bar-correct { background: #007add; }
.resultado-subtema-bar-incorrect { background: #FF4B4B; }

/* ---- Carreras — Duo card style ---- */
.resultado-carrera-card {
    background: #fff;
    border-radius: 16px;
    border: 2px solid #e5e5e5;
    border-bottom: 4px solid #e5e5e5;
    padding: .85rem 1.1rem;
    margin-bottom: .75rem;
    display: flex;
    align-items: center;
    gap: .85rem;
    transition: border-color .2s;
}

.resultado-carrera-card:hover {
    border-color: #cecece;
}

.resultado-carrera-card.alcanzable {
    border-color: #007add;
    border-bottom-color: #006bc3;
}

.resultado-carrera-card.no-alcanzable {
    border-color: #e5e5e5;
}

.resultado-carrera-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    font-weight: 700;
}

.resultado-carrera-card.alcanzable .resultado-carrera-icon {
    background: #dbeafe;
    color: #007add;
}

.resultado-carrera-card.no-alcanzable .resultado-carrera-icon {
    background: #f0f0f0;
    color: #afafaf;
}

.resultado-carrera-info {
    flex: 1;
    min-width: 0;
}

.resultado-carrera-nombre {
    font-weight: 700;
    font-size: .9rem;
    color: #3c3c3c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resultado-carrera-puntaje {
    font-size: .78rem;
    color: #afafaf;
    font-weight: 600;
    margin-top: 1px;
}

.resultado-carrera-badge {
    font-size: .78rem;
    font-weight: 800;
    padding: .35rem .75rem;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.resultado-carrera-card.alcanzable .resultado-carrera-badge {
    background: #dbeafe;
    color: #007add;
}

.resultado-carrera-card.no-alcanzable .resultado-carrera-badge {
    background: #f0f0f0;
    color: #afafaf;
}

/* ---- Animations ---- */
@keyframes resultado-fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.resultado-animate {
    animation: resultado-fadeInUp .4s ease forwards;
    opacity: 0;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .resultado-hero { padding: 1.5rem 1rem; }
    .resultado-score-ring svg { width: 160px; height: 160px; }
    .resultado-score-number { font-size: 2.4rem; }
    .resultado-stats-row { flex-wrap: wrap; }
    .resultado-stat { max-width: none; }
    .resultado-stat-value { font-size: 1.4rem; }
    .resultado-resumen-card { padding: 1rem; }
    .resultado-resumen-name { width: 100px; font-size: .8rem; }
    .resultado-resumen-fraction { font-size: .8rem; }
    .resultado-reforzar-card { padding: 1rem; }
    .resultado-reforzar-pill { max-width: 140px; }
    .resultado-carrera-card { flex-wrap: wrap; }
    .resultado-carrera-badge { width: 100%; text-align: center; margin-top: .3rem; }
    .resultado-progress-track { max-width: 100%; }
}

/* === Reaction styles === */
.reaccion-wrapper {
    display: inline-block;
}

.btn-reaccion {
    transition: all 0.2s ease;
}

.btn.btn-light.btn-reaccion.activa {
    background-color: rgba(13, 110, 253, 0.08) !important;
    border-color: rgba(13, 110, 253, 0.15);
}

.btn-reaccion:active {
    transform: scale(0.95);
}

.reaccion-popover {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: white;
    border-radius: 2rem;
    padding: 0.4rem 0.6rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    gap: 0.2rem;
    z-index: 100;
    animation: popoverFadeIn 0.2s ease;
}

@keyframes popoverFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.reaccion-opcion {
    background: none;
    border: none;
    font-size: 1.5rem;
    padding: 0.2rem 0.3rem;
    cursor: pointer;
    transition: transform 0.15s ease;
    line-height: 1;
}

.reaccion-opcion:hover {
    transform: scale(1.3);
}

.reacciones-resumen {
    cursor: default;
}

.reacciones-iconos {
    font-size: 1.1rem;
    letter-spacing: -0.1rem;
    margin-right: 0.6rem;
}