/* RESET BÁSICO */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Lato', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    height: 100vh;
    overflow: hidden;
}

.course-container {
    display: flex;
    height: 100%;
    width: 100%;
    position: relative;
}

/* SIDEBAR */
.sidebar {
    width: 320px;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 100;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease-in-out;
}

.course-header {
    padding: 30px 25px;
    background-color: #2c3e50;
    color: white;
}

.sidebar-logo {
    display: block;
    max-width: 250px;
    height: auto;
    margin: 0 auto 25px;
    border-radius: 4px;
}

.course-header h3 {
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.progress-bar {
    background-color: rgba(255,255,255,0.2);
    height: 6px;
    border-radius: 3px;
    margin-bottom: 8px;
    overflow: hidden;
}

.progress-fill { background-color: #e67e22; height: 100%; }
.progress-text { font-size: 0.75rem; opacity: 0.8; text-transform: uppercase; font-weight: 700; }

.course-nav { flex: 1; overflow-y: auto; padding: 20px 0; }
.unit-group { margin-bottom: 20px; }
.unit-title { padding: 10px 25px; font-size: 0.85rem; text-transform: uppercase; color: #888; font-weight: 700; letter-spacing: 1px; }
.course-nav ul { list-style: none; }
.course-nav li { padding: 12px 25px; cursor: pointer; font-size: 0.95rem; color: #444; transition: all 0.2s ease; border-left: 4px solid transparent; }
.course-nav li:hover { background-color: #f8f9fa; color: #000; }
.course-nav li.active { background-color: #f0f4f8; border-left: 4px solid #e67e22; color: #2c3e50; font-weight: 700; }

/* CONTENIDO */
.content-area {
    flex: 1;
    background-color: #fbfbfb;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 0;
    position: relative;
    width: 100%;
}

.content-header {
    background-color: #fff;
    padding: 60px 10% 40px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.lesson-tag { display: block; font-size: 0.75rem; color: #e67e22; font-weight: 700; margin-bottom: 10px; letter-spacing: 2px; }
.content-header h1 { font-family: 'Merriweather', serif; font-size: 2.5rem; color: #2c3e50; }

.topic-content {
    display: none;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px 50px;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #4a4a4a;
    animation: fadeIn 0.4s ease-in-out;
}
.topic-content.active { display: block; }

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background-color: #000;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    margin: 35px 0;
}
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

.video-summary {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-left: 5px solid #2c3e50;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
}
.video-summary h3 { font-family: 'Merriweather', serif; color: #2c3e50; margin-bottom: 15px; font-size: 1.3rem; }

.topic-content h2 { font-family: 'Merriweather', serif; font-size: 1.8rem; color: #2c3e50; margin: 40px 0 20px; }
.topic-content p { margin-bottom: 20px; }

/* === BOTÓN SIGUIENTE TEMA (ACTUALIZADO) === */
.content-footer {
    margin-top: 50px;        /* Distancia de 50px del último elemento */
    border-top: none;        /* Quitamos la línea para que quede más limpio con la pastilla */
    display: flex;
    justify-content: center; /* Centrado horizontal */
    width: 100%;
}

.nav-btn {
    background-color: #2c3e50; /* Fondo Azul Oscuro */
    color: #e67e22;            /* Texto Naranja */
    padding: 18px 45px;        /* Padding generoso para forma de pastilla */
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;       /* Bordes totalmente redondeados (Pastilla) */
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); /* Sombra para darle relieve */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-btn:hover {
    background-color: #34495e; /* Un poco más claro al pasar el mouse */
    color: #fff;               /* Texto blanco al pasar el mouse */
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* RESPONSIVO */
.menu-toggle {
    display: none;
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 200;
    background: white;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.menu-toggle span { display: block; width: 25px; height: 3px; margin-bottom: 5px; background-color: #2c3e50; border-radius: 2px; }
.menu-toggle span:last-child { margin-bottom: 0; }

.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 90; display: none; opacity: 0; transition: opacity 0.3s;
}
.overlay.active { display: block; opacity: 1; }

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .sidebar { position: fixed; left: 0; top: 0; height: 100%; transform: translateX(-100%); width: 85%; max-width: 320px; }
    .sidebar.open { transform: translateX(0); }
    .content-header { padding: 80px 5% 30px; }
    .content-header h1 { font-size: 1.8rem; }
    .topic-content { padding: 0 15px 80px; }
    
    .nav-btn {
        width: 100%; /* En celular ocupa todo el ancho */
        border-radius: 12px; /* Menos redondeado en celular para aprovechar espacio */
    }
}

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

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }