/* ========================================
   SISTEMA DE CURSOS - PANTALLA COMPLETA RESPONSIVE
   ======================================== */

/* Contenedor principal - PANTALLA COMPLETA */
.curso-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.curso-header {
    width: 100%;
    padding: 30px 20px;
    margin: 0;
    text-align: center;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.curso-imagen-destacada {
    width: 100%;
    padding: 20px;
    margin: 0;
    text-align: center;
    background: #f8f9fa;
}

.curso-imagen-destacada img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-height: 300px;
    object-fit: cover;
}

/* Layout principal - Flex pantalla completa */
.curso-contenido-principal {
    display: flex;
    gap: 0;
    width: 100%;
    min-height: calc(100vh - 200px);
}

/* Sidebar - Menú lateral fijo */
.curso-sidebar {
    width: 320px;
    flex-shrink: 0;
    background: #f8f9fa;
    border-right: 2px solid #dee2e6;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    position: sticky;
    top: 0;
    padding: 15px;
}

/* Área de contenido - Ocupa todo el espacio restante */
.curso-content {
    flex: 1;
    width: 100%;
    padding: 30px 40px;
    background: white;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Título del curso */
.curso-titulo {
    text-align: center;
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    color: #ffffff;
    font-weight: 700;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.5);
    letter-spacing: 1.5px;
}

/* Menú lateral */
#menu-curso {
    box-shadow: none;
    padding: 0;
    margin: 0;
    background: transparent;
}

.curso-sidebar-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    text-align: center;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

#menu-curso ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#menu-curso li {
    position: relative;
    margin-bottom: 5px;
}

#menu-curso a {
    display: block;
    padding: 12px 40px 12px 15px;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    border-radius: 4px;
    background: white;
    color: #333;
    font-size: 14px;
}

#menu-curso a:hover,
#menu-curso a.active {
    background-color: #e9ecef;
    border-left-color: #667eea;
    color: #667eea;
    transform: translateX(3px);
}

/* Botones de toggle */
#menu-curso .toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    background-color: #667eea;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 10;
    border: none;
    font-family: monospace;
    font-size: 18px;
    padding: 0;
    line-height: 1;
    transition: all 0.2s ease;
}

#menu-curso .toggle-btn:hover {
    background-color: #764ba2;
    transform: translateY(-50%) scale(1.1);
}

#menu-curso .submenu {
    display: none;
    padding-left: 15px;
    margin-top: 5px;
}

/* Contenidos de secciones y bloques */
.seccion-contenido, 
.bloque-contenido {
    display: none;
    width: 100%;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.seccion-contenido {
    border-left: 5px solid #667eea;
    background-color: #f8f9fa;
}

.bloque-contenido {
    border-left: 5px solid #ff9800;
    background-color: #fff8e1;
    margin-left: 0;
}

.seccion-contenido h2 {
    color: #667eea;
    border-bottom: 2px solid #667eea;
    padding-bottom: 12px;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: clamp(20px, 3vw, 28px);
}

.bloque-contenido h3 {
    color: #ff9800;
    border-bottom: 2px solid #ff9800;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 18px;
    font-size: clamp(18px, 2.5vw, 24px);
}

.seccion-imagen, 
.bloque-imagen {
    margin-bottom: 20px;
    text-align: center;
}

.seccion-imagen img, 
.bloque-imagen img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Imágenes dentro del contenido */
.seccion-contenido img, 
.bloque-contenido img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Tablas responsive */
.seccion-contenido table, 
.bloque-contenido table {
    width: 100% !important;
    max-width: 100%;
    overflow-x: auto;
    display: block;
    border-collapse: collapse;
}

.seccion-contenido table td,
.seccion-contenido table th,
.bloque-contenido table td,
.bloque-contenido table th {
    padding: 10px;
    border: 1px solid #dee2e6;
}

/* Videos responsive */
.seccion-contenido iframe,
.bloque-contenido iframe,
.seccion-contenido video,
.bloque-contenido video {
    max-width: 100%;
    height: auto;
    aspect-ratio: 16/9;
}

/* Mostrar primera sección por defecto */
.seccion-contenido:first-child {
    display: flex;
}

/* Estilos específicos para niveles del menú */
#menu-curso > ul > li > a {
    font-weight: 600;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

#menu-curso > ul > li > ul > li > a {
    font-weight: normal;
    background: white;
}

/* ========================================
   RESPONSIVE - TABLET (max-width: 1024px)
   ======================================== */
@media (max-width: 1024px) {
    .curso-sidebar {
        width: 280px;
    }
    
    .curso-content {
        padding: 25px 30px;
    }
}

/* ========================================
   RESPONSIVE - MÓVIL (max-width: 768px)
   ======================================== */
@media (max-width: 768px) {
    .curso-contenido-principal {
        flex-direction: column;
    }
    
    .curso-sidebar {
        width: 100%;
        max-height: none;
        position: static;
        border-right: none;
        border-bottom: 2px solid #dee2e6;
        padding: 15px;
    }
    
    .curso-content {
        padding: 20px 15px;
    }
    
    #menu-curso {
        position: static;
    }
    
    .bloque-contenido {
        margin-left: 0;
    }
    
    .curso-imagen-destacada img {
        max-height: 200px;
    }
}

/* ========================================
   RESPONSIVE - MÓVIL PEQUEÑO (max-width: 480px)
   ======================================== */
@media (max-width: 480px) {
    .curso-header {
        padding: 15px 10px;
    }
    
    .curso-content {
        padding: 15px 10px;
    }
    
    .seccion-contenido,
    .bloque-contenido {
        padding: 15px;
    }
    
    #menu-curso a {
        padding: 10px 35px 10px 10px;
        font-size: 13px;
    }
}
