/* COURSE HERO */
.course-hero {
  padding: 7rem 1.5rem 3rem;
  background: linear-gradient(135deg, rgba(66,45,255,0.18) 0%, var(--bg) 60%);
  border-bottom: 1px solid var(--border);
}
.course-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}
.course-hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}
.course-hero h1 em { font-style: normal; color: var(--green); }
.course-hero-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 1.5rem;
}
.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.course-meta-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.course-meta-item i { color: var(--accent2); font-size: 0.8rem; }

/* PLAYER LAYOUT */
.course-player-section {
  padding: 0;
  background: var(--bg);
}
.player-layout {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 120px);
}

@media (min-width: 900px) {
  .player-layout {
    flex-direction: row;
    align-items: flex-start;
  }
}

/* VIDEO SIDE */
.player-main {
  flex: 1;
  background: #000;
  position: sticky;
  top: 65px;
}
.player-video-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
}
.player-video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
}
.player-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.player-empty-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(66,45,255,0.1);
  border: 1px solid rgba(66,45,255,0.25);
  display: flex; align-items: center; justify-content: center;
}
.player-info {
  padding: 1.25rem 1.5rem;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.player-module-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 0.35rem;
}
.player-lesson-name {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}
.player-nav-btns {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.9rem;
}
.player-nav-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.player-nav-btn:hover:not(:disabled) {
  background: rgba(66,45,255,0.12);
  border-color: rgba(66,45,255,0.35);
  color: var(--text);
}
.player-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* SIDEBAR */
.player-sidebar {
  width: 100%;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  overflow-y: auto;
}
@media (min-width: 900px) {
  .player-main { position: sticky; top: 65px; align-self: flex-start; }
  .player-sidebar { width: 360px; flex-shrink: 0; max-height: calc(100vh - 65px); }
}

.sidebar-header {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.sidebar-progress {
  font-size: 0.72rem;
  color: var(--accent2);
  font-weight: 500;
}

/* MODULES */
.module-block { border-bottom: 1px solid var(--border); }

.module-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}
.module-header:hover { background: rgba(255,255,255,0.03); }

.module-num {
  font-family: 'Oswald', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: rgba(66,45,255,0.25);
  line-height: 1;
  min-width: 2rem;
}
.module-info { flex: 1; }
.module-title {
  font-family: 'Oswald', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.module-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.module-chevron {
  color: var(--muted);
  font-size: 0.75rem;
  transition: transform 0.25s;
}
.module-block.open .module-chevron { transform: rotate(180deg); }

/* LESSONS */
.module-lessons { display: none; }
.module-block.open .module-lessons { display: block; }

.lesson-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem 0.75rem 1.5rem;
  cursor: pointer;
  transition: background 0.15s;
  border-top: 1px solid rgba(255,255,255,0.04);
  position: relative;
}
.lesson-item:hover { background: rgba(255,255,255,0.03); }
.lesson-item.active {
  background: rgba(66,45,255,0.1);
  border-left: 3px solid var(--accent);
  padding-left: calc(1.5rem - 3px);
}
.lesson-item.active .lesson-title { color: var(--text); }

.lesson-play {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.lesson-item:hover .lesson-play,
.lesson-item.active .lesson-play {
  background: var(--accent);
  border-color: var(--accent);
}
.lesson-play i { font-size: 0.55rem; color: var(--muted); margin-left: 2px; }
.lesson-item:hover .lesson-play i,
.lesson-item.active .lesson-play i { color: #fff; }

.lesson-title {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.4;
  flex: 1;
}
.lesson-num {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.2);
  min-width: 1.2rem;
  text-align: right;
}

/* ── RESPONSIVE — MÓVIL ── */
@media (max-width: 899px) {
  .course-hero   { padding: 5.5rem 1.25rem 2.5rem; }
  .player-main   { position: static; top: auto; }
  .player-info   { padding: 1rem 1.25rem; }
  .player-nav-btns { flex-wrap: wrap; }
  .player-sidebar {
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: 60vh;
    overflow-y: auto;
  }
  .sidebar-header { position: sticky; top: 0; background: var(--bg2); z-index: 5; }
}
