/* Estilos específicos para el visualizador de cursos */
.course-viewer-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Sidebar con capítulos */
.course-sidebar {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.course-sidebar h2 {
    margin-bottom: 1.25rem;
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 0.5rem;
}

.chapter {
    margin-bottom: 1.5rem;
}

.chapter-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #2c3e50;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background-color: #ecf0f1;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.chapter-title:hover {
    background-color: #e0e7e9;
}

.chapter-title:after {
    content: '▼';
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.chapter.collapsed .chapter-title:after {
    transform: rotate(-90deg);
}

.chapter.collapsed .videos-list {
    display: none;
}

.videos-list {
    list-style: none;
}

.video-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 0.5rem;
}

.video-item:hover {
    background-color: #ecf0f1;
}

.video-item.active {
    background-color: #e1f0fa;
    border-left: 3px solid #3498db;
}

.video-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #bdc3c7;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.video-status.watched {
    background-color: #2ecc71;
}

.video-title {
    flex: 1;
    font-size: 0.9rem;
}

.video-duration {
    font-size: 0.8rem;
    color: #7f8c8d;
}

.video-item.watched .video-title {
    color: #7f8c8d;
}

/* Contenedor de video */
.video-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    background-color: #2c3e50;
}

#video-player, 
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

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

#video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.2rem;
}

.video-info {
    padding: 1.5rem;
}

.video-info h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.video-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.btn-nav {
    flex: 1;
}

.marked {
    background-color: #2ecc71;
}

.marked:hover {
    background-color: #27ae60;
}

/* Estilos para la descripción del video */
.video-description {
    background-color: #f8f9fa;
    border-left: 3px solid #3498db;
    padding: 1rem;
    margin: 0.5rem 0 1.5rem 0;
    border-radius: 0 4px 4px 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #2c3e50;
}

/* Asegurarnos de que la navegación tenga margen adecuado */
.video-navigation {
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 900px) {
    .course-viewer-container {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }
    
    /* Invertir el orden para que el video aparezca primero en móviles */
    .video-container {
        order: 1;
        margin-bottom: 1.5rem;
    }
    
    .course-sidebar {
        order: 2;
        max-height: none;
    }
}

@media (max-width: 600px) {
    .video-navigation {
        flex-direction: column;
    }
    
    .btn-nav, .btn-primary {
        margin-bottom: 0.5rem;
    }
    
    .video-description {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
}

/* Modo oscuro: títulos con tipografía más compacta y color de alto contraste */
.theme-dark .course-sidebar h2 {
    color: #60a5fa;
    font-size: 1.05rem;
    line-height: 1.25;
    font-weight: 600;
}

.theme-dark .video-info h3 {
    color: #60a5fa;
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 600;
}

.theme-dark .video-status.watched {
    background-color: #60a5fa;
}
