/* =========================================================
   INGENIUS ACADEMY - LOBBY ESTUDIANTE CSS
   Palette: Black (#070707), Panel (#0f0f0f), Gold (#e6b200),
            Wine (#7b0a1e), Accent/Red (#e50914)
   ========================================================= */

:root {
  --bg: #070707;
  --panel: #0f0f0f;
  --muted: #bfbfbf;
  --gold: #e6b200;
  --wine: #7b0a1e;
  --accent: #e50914;
  --sidebar-w: 200px;
}

/* RESET GENERAL */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
}

/* =========================================================
   HEADER / NAVEGACIÓN SUPERIOR
   ========================================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: linear-gradient(180deg, #000000, #0b0b0b);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  z-index: 800;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 48px;
  display: block;
  border: 2px solid #ffffff;
  border-radius: 12px;
}

.hamburger {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 22px;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  display: none;
}
/* --- CORRECCIÓN DE VISIBILIDAD PARA EL BOTÓN DE MENÚ (HAMBURGUESA) --- */
.hamburger {
  background: transparent;
  border: none;
  color: #fff; /* Por defecto blanco para modo oscuro */
  font-size: 20px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Cuando el modo claro está activo, el icono de la hamburguesa cambia a oscuro para contrastar con el header blanco */
body.light .hamburger {
  color: #0f172a !important;
}

body.light .hamburger:hover {
  background: rgba(0, 0, 0, 0.08) !important;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buscador en Header */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 18px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.search-form {
  display: flex;
  align-items: center;
  background: #0b0b0b;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.search-form input {
  background: transparent;
  border: 0;
  color: #ffffff;
  padding: 8px 12px;
  width: 220px;
  outline: none;
}

.search-form button {
  background: var(--gold);
  border: 0;
  padding: 8px 12px;
  color: #000000;
  cursor: pointer;
  border-radius: 0 999px 999px 0;
}

.nav-icon {
  color: #ffffff;
  text-decoration: none;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

/* =========================================================
   BANDEJA DE NOTIFICACIONES (ESTILO PREMIUM / GLASSMORPHISM)
   ========================================================= */
.header-notification-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.header-notification-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-notification-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--gold);
  transform: translateY(-2px);
  color: var(--gold);
}

.header-notification-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--accent);
  color: #ffffff;
  border-radius: 999px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid #070707;
  box-shadow: 0 2px 6px rgba(229, 9, 20, 0.5);
  animation: pulseBadge 2s infinite;
}

.header-notification-badge.show {
  display: flex;
}

@keyframes pulseBadge {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.header-notification-dropdown {
  position: absolute;
  top: 54px;
  right: 0;
  width: 360px;
  max-width: calc(100vw - 24px);
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 1200;
  overflow: hidden;
  transform-origin: top right;
  animation: dropdownFadeIn 0.25s ease-out forwards;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.header-notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-notification-header strong {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-notification-header strong i {
  color: var(--gold);
}

.header-notification-header .mark-all-read {
  font-size: 12px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.header-notification-header .mark-all-read:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.header-notification-list {
  display: flex;
  flex-direction: column;
  max-height: 380px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.header-notification-list::-webkit-scrollbar {
  width: 5px;
}

.header-notification-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.header-notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  text-decoration: none;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  transition: background 0.2s ease;
  position: relative;
}

.header-notification-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.header-notification-item.unread {
  background: rgba(230, 178, 0, 0.06);
}

.header-notification-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gold);
}

.header-notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
  flex-shrink: 0;
  font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.header-notification-icon.success {
  background: rgba(22, 163, 74, 0.15);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.3);
}

.header-notification-icon.warning {
  background: rgba(217, 119, 6, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.header-notification-icon.info {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.header-notification-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.header-notification-body strong {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.header-notification-body span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.header-notification-empty {
  padding: 30px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.header-notification-empty i {
  font-size: 28px;
  color: rgba(255, 255, 255, 0.2);
}

/* =========================================================
   SIDEBAR GLOBAL
   ========================================================= */
.menu_side {
  position: fixed;
  top: 64px;
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - 64px);
  background: #000000;
  border-right: 1px solid #111111;
  padding: 18px 10px;
  overflow-y: auto;
  z-index: 800;
  transition: transform 0.28s ease;
}

.menu_side .name_page {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 20px;
}

.menu_side .name_page i {
  font-size: 22px;
  color: var(--gold);
}

.menu_side .name_page h4 {
  font-size: 14px;
  font-weight: 600;
}

.options_menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu_side a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #ffffff;
  border-radius: 8px;
  padding: 12px 14px;
  transition: background 0.2s ease, color 0.2s ease;
}

.menu_side a .option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.menu_side a:hover,
.menu_side a.selected {
  background: #111111;
  color: var(--gold);
}

.unread-total-badge {
  margin-left: auto;
  background: var(--accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
}

.unread-total-badge.show {
  display: flex;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 700;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* =========================================================
   CONTENIDO PRINCIPAL Y BANNER
   ========================================================= */
.content {
  margin-top: 64px;
  margin-left: var(--sidebar-w);
  padding: 26px;
  min-height: calc(100vh - 64px - 80px);
  transition: margin-left 0.25s ease;
}

.anniversary-tagline {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 auto 22px;
  padding: 10px 22px 10px 12px;
  border: 1px solid rgba(230, 178, 0, 0.42);
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 50% 0, rgba(230, 178, 0, 0.12), transparent 70%),
    rgba(15, 23, 42, 0.62);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16), inset 0 1px rgba(255, 255, 255, 0.06);
  color: #f5d36f;
  text-align: center;
}

.anniversary-years {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: #ffe8a3;
  white-space: nowrap;
}

.anniversary-years strong {
  background: linear-gradient(145deg, #fff4c2 5%, #f5cf61 48%, #c78d17 100%);
  background-clip: text;
  color: transparent;
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 1;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.anniversary-years span {
  color: #e8c86d;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.anniversary-copy {
  padding-left: 14px;
  border-left: 1px solid rgba(245, 211, 111, 0.4);
  color: #f8fafc;
  font-size: clamp(0.82rem, 1.7vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.035em;
}

.anniversary-decor {
  display: inline-flex;
  min-width: 62px;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.anniversary-skull {
  color: #f0c77a;
  font-size: 1.25rem;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.anniversary-colada {
  width: 31px;
  height: 38px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.28));
}

.anniversary-guagua {
  width: 39px;
  height: 49px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.28));
}

body.light .anniversary-tagline {
  border-color: rgba(184, 134, 11, 0.35);
  background:
    radial-gradient(ellipse at 50% 0, rgba(230, 178, 0, 0.13), transparent 72%),
    #fffdf6;
  box-shadow: 0 7px 20px rgba(100, 75, 12, 0.1), inset 0 1px #fff;
}

body.light .anniversary-copy {
  color: #263248;
}

@media (max-width: 520px) {
  .anniversary-tagline {
    gap: 7px;
    margin-bottom: 16px;
    padding: 8px 10px;
  }

  .anniversary-decor {
    min-width: 42px;
    gap: 2px;
  }

  .anniversary-skull {
    font-size: 1rem;
  }

  .anniversary-colada {
    width: 24px;
    height: 31px;
  }

  .anniversary-guagua {
    width: 30px;
    height: 40px;
  }

  .anniversary-copy {
    padding-left: 8px;
    font-size: clamp(0.68rem, 3.2vw, 0.86rem);
    letter-spacing: 0;
  }

  .anniversary-years strong {
    font-size: 29px;
  }

  .anniversary-years span {
    font-size: 0.68rem;
  }

}

@media (max-width: 360px) {
  .anniversary-tagline {
    gap: 5px;
    padding-right: 7px;
    padding-left: 7px;
  }

  .anniversary-decor {
    min-width: 34px;
  }

  .anniversary-colada {
    width: 20px;
  }

  .anniversary-guagua {
    width: 26px;
  }
}

.banner-carrusel {
  position: relative;
  margin-bottom: 28px;
}

.carrusel {
  position: relative;
  height: 50vh;
  border-radius: 12px;
  overflow: hidden;
  background: #111111;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.banner-info {
  position: absolute;
  left: 40px;
  bottom: 40px;
  z-index: 3;
  max-width: 50%;
  background: linear-gradient(180deg, rgba(0,0,0,0.4), rgba(0,0,0,0.8));
  padding: 22px;
  border-radius: 10px;
}

.banner-info h1 {
  font-size: 26px;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.banner-news-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.banner-info p {
  color: #dddddd;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}

.btn-primary:hover {
  background: #b80710;
}

.banner-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: 0;
  color: #ffffff;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  z-index: 5;
}

.banner-nav.prev { left: 12px; }
.banner-nav.next { right: 12px; }

/* =========================================================
   CARRUSELES TIPO NETFLIX & TARJETAS DE CURSO
   ========================================================= */
.clases-recomendadas {
  margin-bottom: 26px;
}

.contenedor-titulo-controles h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #ffffff;
}
/* Permitir que el contenedor del carrusel no corte la tarjeta cuando se expanda */
.contenedor-principal {
  overflow: visible !important;
  padding: 20px 0 !important;
}

.contenedor-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px 0;
}

.contenedor-carousel::-webkit-scrollbar {
  display: none;
}

.card-curso {
  min-width: 200px;
  max-width: 200px;
  background: #141414;
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 auto;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.card-curso img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}

.card-curso:hover {
  transform: scale(1.06);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.card-caption {
  padding: 8px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Estadísticas de la tarjeta (Vistas y Likes) */
.card-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px 8px 8px;
  font-size: 11px;
  color: var(--muted);
}

.card-views, .card-likes {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-likes {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.card-likes i {
  transition: transform 0.2s ease;
}

.card-likes:hover i, .card-likes.liked i {
  transform: scale(1.2);
  color: var(--accent);
}

.card-likes.liked {
  color: var(--accent);
}

.flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.7);
  border: 0;
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 20;
  transition: background 0.2s;
}

.flecha:hover {
  background: rgba(0,0,0,0.9);
}

.flecha-left { left: 0; }
.flecha-right { right: 0; }

footer {
  background: #000000;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,0.03);
  margin-top: 24px;
}



/* =========================================================
   SOPORTE PARA MODO CLARO (LIGHT MODE)
   ========================================================= */
body.light {
  --bg: #ffffff;
  --panel: #f2f2f2;
  --muted: #475569;
  --gold: #b8860b;
  color: #111827;
  background: var(--bg);
}

body.light .header {
  background: #ffffff;
  border-bottom: 1px solid #dddddd;
}

body.light .header .nav-icon,
body.light .header .search-icon {
  color: #111827;
}

body.light .search-form {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Forzar que el texto escrito y el placeholder se vean oscuros y claros */
body.light .search-form input {
  color: #0f172a !important; /* Color de texto oscuro bien legible */
}

body.light .search-form input::placeholder {
  color: #64748b !important; /* Color gris para el texto de ayuda */
  opacity: 1;
}

body.light .menu_side {
  background: #000000;
  color: #f09090;
}

body.light .contenedor-titulo-controles h3,
body.light .card-caption {
  color: #111827;
}

body.light .card-curso {
  background: #e9e9e9;
}

body.light .banner-info {
  background: rgba(255, 255, 255, 0.85);
}

body.light .banner-info h1,
body.light .banner-info p {
  color: #111827;
}

body.light .header-notification-btn {
  background: #ffffff;
  color: #111827;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

body.light .header-notification-dropdown {
  background: rgba(255, 255, 255, 0.98);
  color: #111827;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

body.light .header-notification-header {
  background: #f8fafc;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light .header-notification-header strong,
body.light .header-notification-body strong {
  color: #111827;
}

body.light .header-notification-item {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

body.light .header-notification-item:hover {
  background: #f1f5f9;
}

body.light .header-notification-item.unread {
  background: #fffbeb;
}

body.light .header-notification-body span {
  color: #475569;
}

/* =========================================================
   DISEÑO RESPONSIVO (MÓVILES Y TABLETS)
   ========================================================= */
@media (max-width: 1024px) {
  :root { --sidebar-w: 180px; }
  .menu_side { width: var(--sidebar-w); }
  .content { margin-left: var(--sidebar-w); padding: 18px; }
  .banner-info { max-width: 65%; }
}

@media (max-width: 760px) {
  .hamburger { display: block; }
  .search-form { display: none; }
  .search-icon { display: block; }

  .menu_side {
    position: fixed;
    top: 64px;
    width: 260px;
    height: calc(100vh - 64px);
    padding: 22px;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
  }

  .menu_side.show {
    transform: translateX(0);
  }

  .content {
    margin-left: 0;
    padding: 16px;
  }

  .banner-info {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: unset;
  }

  .carrusel {
    height: 38vh;
  }

  .card-curso {
    min-width: 140px;
    max-width: 140px;
  }

  .card-curso img {
    height: 90px;
  }

  .flecha {
    display: none;
  }
}

@media (max-width: 420px) {
  .banner-info h1 { font-size: 18px; }
  .banner-info p { font-size: 13px; }
  .card-curso { min-width: 120px; max-width: 120px; }
}

/* --- CORRECCIÓN DE FOTO DE PERFIL EN NOTIFICACIONES --- */
.notification-item img, 
.notification-avatar img, 
.notif-user-img {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block;
}

/* Contenedor de la notificación para alinear bien la imagen y el texto */
.notification-item, 
.notif-card {
  display: flex;
  align-items: center;
  gap: 12px;
}