/* ==========================
TEMA ORO / GRAFITO PREMIUM
========================== */


:root {
--oro: #d4af37;
--oro-oscuro: #b38f2e;
--grafito: #2f2f2f;
--grafito-claro: #3a3a3a;
--grafito-mas-claro: #4a4a4a;
--fondo: #f5f5f5;
--texto: #e5e5e5;
--blanco: #ffffff;
}


/* ==========================
BASE
========================== */
body {
font-family: 'Inter', sans-serif;
margin: 0;
background: var(--fondo);
color: var(--grafito);
}


/* ==========================
CABECERA PREMIUM
========================== */
.top-bar {
position: sticky;
top: 0;
z-index: 200;
width: 100%;
background: rgba(47,47,47,0.92);
backdrop-filter: blur(10px);
border-bottom: 2px solid var(--oro);
padding: 14px 32px;

/* NUEVO: distribución en 3 columnas */
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
box-shadow: 0 4px 18px rgba(0,0,0,0.35);
animation: fadeInDown 0.5s ease-out;
}


/* LOGO */
.logo {
display: flex;
align-items: center;
gap: 12px;
color: var(--oro);
font-weight: 800;
font-size: 1.1rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}


.logo img {
height: 60px;
width: auto;
display: block;
}


/* ENLACES (ESCRITORIO) */
.top-links {
  justify-self: center;
  display: flex;
  gap: 22px;
}


.top-links a {
color: var(--texto);
font-size: 0.95rem;
font-weight: 600;
text-decoration: none;
transition: color 0.2s;
}


.top-links a:hover {
color: var(--oro);
}


/* HAMBURGUESA (MÓVIL) */
.hamburger {
display: none;
flex-direction: column;
gap: 5px;
cursor: pointer;
padding: 6px;
}


.hamburger span {
width: 26px;
height: 3px;
background: var(--texto);
border-radius: 4px;
transition: transform 0.3s;
}

/* CONTENEDOR DERECHA */
.top-right {
justify-self: end;
display: flex;
align-items: center;
gap: 18px;
}


/* ICONOS DERECHA */
.top-icon {
font-size: 1.2rem;
color: var(--texto);
text-decoration: none;
transition: color .2s;
display: flex;
align-items: center;
}


/* FIX: ICONOS SVG INVISIBLES */

.top-icon svg {
width: 26px;
height: 26px;
display: block;
fill: currentColor;
}


.top-icon:hover {
color: var(--oro);
} 

.top-icon {
font-size: 1.2rem;
color: var(--texto);
text-decoration: none;
transition: color .2s;
}
.top-icon:hover {
color: var(--oro);
}

/* DROPDOWN PERFIL */
.profile-menu {
position: relative;
}
.profile-dropdown {
display: none;
position: absolute;
right: 0;
top: 32px;
background: var(--grafito);
border: 1px solid var(--oro);
border-radius: 10px;
padding: 10px;
min-width: 160px;
box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}
.profile-dropdown a {
display: block;
padding: 8px;
color: var(--texto);
text-decoration: none;
font-size: .9rem;
}
.profile-dropdown a:hover {
background: rgba(212,175,55,0.15);
}
.profile-menu:hover .profile-dropdown {
display: block;
}


/* MENÚ MÓVIL */
.mobile-menu {
display: none;
position: fixed;
top: 70px;
right: 20px;
background: rgba(47,47,47,0.96);
backdrop-filter: blur(10px);
border: 2px solid var(--oro);
border-radius: 14px;
padding: 18px;
flex-direction: column;
gap: 12px;
min-width: 180px;
box-shadow: 0 8px 22px rgba(0,0,0,0.45);
animation: fadeInDown 0.3s ease-out;
}


.mobile-menu a {
color: var(--texto);
font-weight: 600;
text-decoration: none;
font-size: 1rem;
}


body.menu-open .mobile-menu {
display: flex;
}

/* RESPONSIVE */
@media(max-width: 600px) {
.top-links {
display: none;
}
.hamburger {
display: flex;
}
}

/* ==========================
HERO
========================== */
.hero {
background: radial-gradient(circle at top left, var(--oro-oscuro), var(--grafito) 45%, var(--grafito-claro));
color: var(--oro);
padding: 70px 20px 50px;
border-bottom: 4px solid var(--oro);
animation: fadeInDown 0.6s ease-out;
}


.hero-inner {
width: 90%;
max-width: 1100px;
margin: 0 auto;
}


.hero h1 {
margin: 0;
font-size: 2.8rem;
font-weight: 800;
color: var(--texto);
}


.hero p {
font-size: 1.2rem;
margin-top: 15px;
color: var(--texto);
}

/* ==========================
CONTENEDORES
========================== */
.container {
width: 90%;
max-width: 1100px;
margin: 30px auto 40px;
}


.layout {
display: grid;
grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
gap: 32px;
align-items: flex-start;
width: 100%;
}

/* ==========================
   LAYOUT DE LECCIÓN PREMIUM
   ========================== */

.lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(250px, 1fr);
  gap: 40px;
  align-items: start;
  margin-top: 30px;
}

/* Columna izquierda */
.lesson-main {
  width: 100%;
}

/* Sidebar */
.lesson-sidebar {
  background: #ffffff;
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  position: sticky;
  top: 120px;
  height: fit-content;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
}

/* Título del sidebar */
.lesson-sidebar h3 {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--grafito);
}

/* Lista del sidebar */
.sidebar-lessons {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-lessons li {
  padding: 10px 6px;
  border-bottom: 1px solid #e5e5e5;
}

.sidebar-lessons li:last-child {
  border-bottom: none;
}

.sidebar-lessons li a {
  text-decoration: none;
  color: var(--grafito);
  font-size: 0.95rem;
  font-weight: 500;
  display: block;
}

/* Lección activa */
.sidebar-lessons li.active {
  background: rgba(212,175,55,0.15);
  border-left: 4px solid var(--oro);
}

.sidebar-lessons li.active a {
  color: var(--oro-oscuro);
  font-weight: 700;
}

.sidebar-lessons .duracion {
    font-size: 0.8rem;
    color: #888;
}

.sidebar-lessons .completa {
    color: var(--oro);
    font-weight: bold;
    margin-left: 8px;
}

/* LAYOUT RESPONSIVE PARA MÓVIL */
@media (max-width: 900px) {
    .lesson-layout {
        grid-template-columns: 1fr;
    }

    .lesson-sidebar {
        position: static;
        max-height: none;
        margin-top: 20px;
    }
}


/* TARJETA LATERAL */
.side-card {
background: var(--blanco);
border-radius: 14px;
padding: 22px;
box-shadow: 0 12px 28px rgba(0,0,0,0.18);
border: 1px solid rgba(212,175,55,0.4);
position: sticky;
top: 100px;
animation: fadeInUp 0.5s ease-out;
}


.price {
font-size: 1.8rem;
font-weight: 800;
color: var(--grafito);
}


.old-price {
text-decoration: line-through;
color: #888;
font-size: 0.9rem;
margin-left: 8px;
}


.btn-primary {
background: var(--oro);
color: var(--grafito);
padding: 14px 20px;
border-radius: 999px;
font-weight: 700;
text-align: center;
display: block;
width: 90%;
margin-top: 18px;
box-shadow: 0 8px 18px rgba(0,0,0,0.25);
transition: 0.2s;
}
.btn-primary:hover {
background: var(--oro-oscuro);
transform: translateY(-1px);
}


.btn-secondary {
border: 1px solid var(--grafito-claro);
border-radius: 999px;
padding: 10px 16px;
text-align: center;
display: block;
width: 90%;
margin-top: 12px;
text-decoration: none;
color: var(--grafito-claro);
}
.btn-secondary:hover {
border-color: var(--oro);
color: var(--oro-oscuro);
}


/* ==========================
LISTA DE LECCIONES
========================== */
.lessons-list {
list-style: none;
padding: 0;
border: 1px solid var(--grafito-claro);
border-radius: 12px;
background: #ffffff;
overflow: hidden;
box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}


.lessons-list li {
padding: 16px 18px;
border-bottom: 1px solid #ececec;
display: flex;
justify-content: space-between;
align-items: center;
}


.lesson-info {
display: flex;
gap: 12px;
align-items: center;
}


.lesson-icon {
width: 28px;
height: 28px;
border-radius: 50%;
border: 1px solid rgba(47,47,47,0.3);
display: flex;
align-items: center;
justify-content: center;
background: #fafafa;
}


.lesson-title {
font-weight: 600;
color: var(--grafito);
}


.lesson-meta { 
  font-size: 0.85rem;
  color: #777;
}

/* ==========================
   ENCABEZADO PREMIUM LECCIÓN
========================== */

.lesson-header-premium {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(212,175,55,0.3);
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--grafito-claro);
  margin-bottom: 8px;
}

.breadcrumb a {
  color: var(--oro);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Contenedor breadcrumb + badge */
.breadcrumb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

/* Badge circular de progreso */
.progress-badge {
  background: linear-gradient(135deg, var(--oro), var(--oro-oscuro));
  color: var(--grafito);
  font-weight: 800;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  font-size: 0.9rem;
  border: 2px solid #ffffff;
}

/* Ajuste en móvil: que el badge baje debajo del breadcrumb */
@media (max-width: 600px) {
  .breadcrumb-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

.lesson-title-premium {
  margin: 5px 0 8px 0;
  font-size: 2rem;
  font-weight: 800;
  color: var(--grafito);
}

.lesson-meta-info {
  font-size: 0.95rem;
  color: var(--grafito-claro);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.lesson-completed {
  background: rgba(50, 200, 50, 0.15);
  color: #2e8b2e;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.lesson-description {
  font-size: 1rem;
  color: var(--grafito);
}

/* NAV PREMIUM ANTERIOR / SIGUIENTE */

.btn-nav {
  background: var(--grafito);
  color:#fff;
  padding:10px 20px;
  border-radius:999px;
  text-decoration:none;
  font-weight:600;
  text-align:center;
  min-width:180px;
  box-shadow:0 6px 15px rgba(0,0,0,0.25);
  display:flex;
  flex-direction:column;
  gap:4px;
}

.btn-nav span {
  font-size:0.8rem;
  font-weight:400;
  opacity:0.85;
}

.btn-nav-prev {
  align-items:flex-start;
}

.btn-nav-next {
  align-items:flex-end;
}

.btn-nav:hover{
  background:var(--oro);
  color:var(--grafito);
}

/* SIDEBAR DETALLES EXTRA */

.sidebar-lessons li a {
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.sidebar-lessons .duracion {
  font-size:0.8rem;
  color:#888;
  margin-left:8px;
}

.sidebar-lessons .completa {
  color:var(--oro);
  font-weight:bold;
  margin-left:6px;
}

/* CAJA COMPLETADA */

.lesson-complete-box {
  margin-top:15px;
}

.completed-tag {
  display:inline-block;
  padding:6px 12px;
  border-radius:999px;
  background:rgba(50,200,50,0.1);
  color:#2e8b2e;
  font-size:0.9rem;
  font-weight:600;
}

/* VIDEO: DETALLE VISUAL EXTRA */

.video-container{
  position:relative;
  aspect-ratio:16/9;
  max-width:780px;
  margin:20px auto;
  border:2px solid rgba(212,175,55,0.6);
  border-radius:14px;
  box-shadow:0 12px 30px rgba(0,0,0,0.35);
  overflow:hidden;
  background: radial-gradient(circle at top left, #444, #000);
}

/* ===============================================================
   PROGRESO GLOBAL PREMIUM (ORO / GRAFITO)
================================================================*/

.global-progress-wrapper {
    margin: 25px 0 35px;
    padding: 18px 22px;
    background: linear-gradient(135deg, rgba(47,47,47,0.85), rgba(30,30,30,0.85));
    border: 1px solid rgba(212,175,55,0.4);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    animation: fadeInDown 0.4s ease-out;
}

.global-progress-top {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--texto);
}

.global-progress-top strong {
    color: var(--oro);
    font-size: 1.1rem;
}

.global-progress-bar {
    width: 100%;
    height: 14px;
    background: #444;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.35);
}

.global-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--oro), var(--oro-oscuro));
    width: 0;
    border-radius: 999px;
    transition: width 0.5s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================================
   BARRA FIJA BAJO CABECERA
==================================== */
.header-progress-bar {
    position: sticky;
    top: 70px;
    height: 6px;
    width: 100%;
    background: #333;
    z-index: 199;
}
.header-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--oro), var(--oro-oscuro));
    width: 0;
    transition: width .5s ease-out;
}

/* ====================================
   MINI BARRAS DE PROGRESO SIDEBAR
==================================== */
.sidebar-progress-bar {
    width: 100%;
    height: 6px;
    background: #ddd;
    border-radius: 8px;
    margin-top: 6px;
    overflow: hidden;
}
.sidebar-progress-fill {
    height: 100%;
    background: var(--oro);
    width: 0;
    transition: width .4s ease-out;
}


.lesson-transition {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lesson-transition.show {
    opacity: 1;
}


/* FIN ARCHIVO */