/* ========== ESTILOS DEL ACORDEÓN DE SECCIONES Y TEMARIO ========== */
.accordion-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    background-color: #ffffff;
    will-change: transform;
    position: relative;
  }
  .accordion-item:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
    z-index: 5;
  }
/* Efecto hover sencillo para list-group de contenidos */
.list-group-flush .list-group-item {
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.list-group-flush .list-group-item:hover {
  background-color: rgba(13,110,253,0.08); /* azul suave Bootstrap */
  transform: translateX(4px);
}
/* ========== ESTILOS GENERALES DEL BODY ========== */
body {
  font-family: 'Poppins', sans-serif;
  background: #f8f9fa;
}

/* ========== ESTILOS DEL SIDEBAR LATERAL ========== */
#sidebarMenu {
  min-height: 100vh;
  background: #f8f9fa;
  border-right: 1px solid #dee2e6;
  padding-top: 1rem;
}
#sidebarMenu .nav-link {
  position: relative;
  color: #343a40;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  transition: all 0.25s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
}
/* 🔎 Efecto al saltar desde el buscador */
.resaltado-buscador {
  animation: flash-resaltado 2s ease-in-out;
  outline: 3px solid rgba(13,110,253,.35);
  outline-offset: 2px;
  border-radius: 8px;
}
@keyframes flash-resaltado {
  0%   { box-shadow: 0 0 0 rgba(13,110,253,0); }
  15%  { box-shadow: 0 0 0 6px rgba(13,110,253,.25); }
  100% { box-shadow: 0 0 0 rgba(13,110,253,0); }
}
/* Temario Java: usar todo el alto del sidebar y scroll interno si es necesario */
#submenuJavaBasico {
  max-height: calc(100vh - 150px); /* margen para cabecera del menú */
  overflow-y: auto;
}
#sidebarMenu .nav-link:hover {
  background-color: rgba(13, 202, 240, 0.12);
  color: #0d6efd;
  transform: translateX(4px);
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.05);
}
#sidebarMenu .nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 2px;
  background-color: transparent;
  transition: background-color 0.3s ease;
}
#sidebarMenu .nav-link:hover::before {
  background-color: #0d6efd;
}
#sidebarMenu .nav-link.active {
  background-color: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
  font-weight: 600;
}
#sidebarMenu .nav-link.active::before {
  background-color: #0d6efd;
}

/* ========== ESTILOS DE LAS CARDS DE CURSOS Y SECCIONES ========== */
.course-card {
  transition: transform 0.3s, box-shadow 0.3s;
}
.course-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.section-title {
  font-weight: 600;
}

/* ========== ESTILOS RESPONSIVE Y AJUSTES PARA MÓVILES ========== */
@media (max-width: 767px) {
  /* Oculta el sidebar completamente */
  #sidebarMenu {
    display: none !important;
  }
  /* El contenido ocupa todo el ancho sin dejar margen lateral */
  main {
    margin-left: 0 !important;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  /* Navbar más compacto y limpio */
  .navbar {
    padding: 0.4rem 1rem;
  }
  .navbar-brand,
  .navbar .h6 {
    font-size: 0.95rem;
  }
  .navbar .btn {
    padding: 0.3rem 0.7rem;
    font-size: 0.9rem;
  }
  .navbar .fa-wifi {
    font-size: 1rem;
    margin-right: 0.3rem;
  }
  /* Tarjetas de cursos y estadísticas más compactas */
  .course-card {
    font-size: 0.95rem;
    padding: 0.5rem;
  }
  .course-card i {
    font-size: 2.2rem;
  }
  .section-title {
    font-size: 1.2rem;
    text-align: center;
  }
  /* Ajustes para las cards de estadísticas */
  .card .fw-bold {
    font-size: 1.3rem;
  }
  /* Ajuste en los botones de descarga y acciones */
  .btn-sm {
    font-size: 0.85rem;
    padding: 0.35rem 0.7rem;
  }
  /* El acordeón ocupa más espacio visual */
  .accordion-button {
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
  }
  .accordion-body {
    font-size: 0.9rem;
  }
  /* Footer centrado y compacto */
  footer {
    font-size: 0.75rem;
    padding: 1rem;
  }
  #sugerenciasDropdown .list-group-item {
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.45rem 1rem;
  }
  #sugerenciasDropdown .list-group-item:hover {
    background-color: #eaf6ff;
  }
  .navbar-gradient {
    background: linear-gradient(90deg, #007bff, #0056b3);
  }
  #sugerenciasDropdown {
    font-size: 0.85rem;
  }
}

.stats-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 1.2rem;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 2px 8px rgba(0,0,0,0.05);
}
.stats-card:hover .stats-icon {
  transform: scale(1.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 4px 12px rgba(0,0,0,0.08);
}

/* Hover de la tarjeta */
.stats-card {
  transition: transform .2s ease, box-shadow .2s ease;
}
.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
/* ========== ESTILOS DEL BOTÓN FLOTANTE DE IA ========== */
#botonIA {
  position: fixed;
  bottom: 20px;
  right: 25px;
  background-color: #0d6efd;
  color: white;
  padding: 10px 15px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}
#botonIA:hover {
  background-color: #0b5ed7;
  transform: scale(1.05);
}
.texto-ia {
  font-size: 0.85rem;
  line-height: 1.1;
}

/* ========== ESTILOS DEL CHAT IA FLOTANTE ========== */
.chat-container {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 350px;
  max-width: 95vw;
  height: 450px;
  max-height: 90vh;
  background-color: #ffffff;
  border: 2px solid #0d6efd;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  resize: both;
  overflow: auto;
}
.chat-header {
  padding: 10px 15px;
  background-color: #0d6efd;
  color: white;
  font-weight: bold;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  user-select: none;
}
.chat-body {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  font-size: 0.9rem;
}
.chat-msg {
  margin-bottom: 12px;
  line-height: 1.4;
}
.chat-msg.bot {
  background-color: #f1f1f1;
  padding: 10px 14px;
  border-radius: 10px;
  max-width: 90%;
  font-size: 0.9rem;
}
.chat-msg.user {
  background-color: #e0f3ff;
  padding: 10px 14px;
  border-radius: 10px;
  max-width: 90%;
  margin-left: auto;
  font-size: 0.9rem;
}
.chat-input-area {
  display: flex;
  border-top: 1px solid #ddd;
  padding: 10px;
}
#chat-input {
  flex: 1;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.9rem;
  resize: none;
}
#chat-input:focus {
  outline: none;
  border-color: #0d6efd;
}
.chat-input-area button {
  margin-left: 8px;
  background-color: #0d6efd;
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}
.chat-input-area button:hover {
  background-color: #0b5ed7;
}
.close-btn {
  font-size: 1.3rem;
  line-height: 1;
}

/* ========== ESTILOS DEL BOTÓN ENVIAR IA Y ANIMACIONES ========== */
.btn-enviar-ia {
  background: linear-gradient(135deg, #0dcaf0, #6610f2);
  border: none;
  color: white;
  font-size: 14px;
  border-radius: 30px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  cursor: pointer;
}
.btn-enviar-ia:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}
#botonEnviarIA {
  animation: fadeInTooltip 0.3s ease-in-out;
}
@keyframes fadeInTooltip {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* ===== Pantalla completa global ===== */
:fullscreen {
  background: #fff; /* Fondo uniforme */
  padding: 1rem;
  box-sizing: border-box;
}

:-webkit-full-screen {
  overflow-y: auto !important;
}

:-moz-full-screen {
  overflow-y: auto !important;
}

/* Ajuste general del iframe en fullscreen */
:fullscreen iframe {
  width: 100%;
  height: 88vh !important;
  border-radius: 6px;
}

/* Botones en fullscreen */
:fullscreen button {
  z-index: 9999;
  position: relative;
}

/* ===========================
   Componente: Snippet oscuro tipo editor
   =========================== */

/* Paleta (puedes ajustar si quieres) */
:root {
  --code-bg:        #1e1e1e;  /* fondo estilo VS Code */
  --code-topbar:    #2d2d2d;
  --code-border:    #1f2328;
  --code-fg:        #d4d4d4;
  --code-fg-muted:  #9aa0a6;
}

/* Contenedor del snippet */
.codepane-vscode{
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 10px;
  overflow: hidden;           /* recorta bordes al hacer scroll */
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
}

/* Barra superior (sticky para que quede visible al hacer scroll) */
.codepane-topbar{
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  background: var(--code-topbar);
  color: var(--code-fg);
  border-bottom: 1px solid var(--code-border);
  font-size: .85rem;
}

/* Semáforos estilo ventana */
.codepane-topbar .dots{display:inline-flex; gap:6px; align-items:center}
.codepane-topbar .dots span{
  width: 10px; height: 10px; border-radius: 50%;
  background:#ff5f56;
}
.codepane-topbar .dots span:nth-child(2){background:#ffbd2e}
.codepane-topbar .dots span:nth-child(3){background:#27c93f}

.codepane-topbar .filename{
  font-weight: 600;
  opacity: .9;
}

/* Botones claros sobre fondo oscuro */
.codepane-vscode .btn-outline-light{
  --bs-btn-color: #e6edf3;
  --bs-btn-border-color: #6e7681;
  --bs-btn-hover-bg: #363b42;
  --bs-btn-hover-border-color: #8b949e;
  --bs-btn-active-bg: #4b525a;
  --bs-btn-active-border-color: #9aa0a6;
  --bs-btn-focus-shadow-rgb: 230,237,243;
}

/* Área de código: scroll vertical y horizontal si hace falta */
.codepane-body{
  margin: 0;
  padding: 14px 16px;
  background: var(--code-bg);
  color: var(--code-fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .92rem;
  line-height: 1.5;
  white-space: pre;           /* respeta espaciado/carácter */
  overflow: auto;             /* scroll X/Y cuando sea necesario */
  max-height: 420px;          /* altura máxima del panel */
  tab-size: 2;
  -webkit-font-smoothing: antialiased;
}

/* Variante con números de línea (si algún <pre> lleva .with-lines) */
.codepane-body.with-lines{
  counter-reset: line;
  padding-left: 3.2rem;
  position: relative;
}
.codepane-body.with-lines span{
  display: block;
  counter-increment: line;
}
.codepane-body.with-lines span::before{
  content: counter(line);
  position: absolute;
  left: .9rem;
  color: var(--code-fg-muted);
  min-width: 1.6rem;
  text-align: right;
}

/* Responsivo: un poco más bajo en móviles para que no “empuje” el layout */
@media (max-width: 992px){
  .codepane-body{ max-height: 360px; }
}
@media (max-width: 576px){
  .codepane-body{ max-height: 300px; font-size: .88rem; }
}


/************************************************************
 * COMPONENTE: RÚBRICA (Qué aprenderás en esta unidad)
 * ----------------------------------------------------------
 * Uso:
 * <div class="rubrica">
 *   <ul class="rubrica-list">
 *     <li class="rubrica-item">
 *       <span class="rubrica-bullet">✔</span>
 *       <span>Texto de aprendizaje</span>
 *     </li>
 *   </ul>
 * </div>
 ************************************************************/

/* Contenedor general */
.rubrica {
  background: #ffffff;
  border: 1px solid #e5e7eb;     /* gris claro */
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
}

/* Lista sin viñetas, en grid */
.rubrica-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: grid;
  gap: .6rem;
}

/* Cada item: bullet + texto */
.rubrica-item {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  color: #111827;                /* gris muy oscuro */
  font-size: .95rem;
  line-height: 1.4;
}

/* Bullet visual ✔ */
.rubrica-bullet {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: #e7f5ee;           /* verde claro */
  color: #0f5132;                /* verde oscuro */
  font-weight: 700;
  font-size: .8rem;
  line-height: 1;
  margin-top: .15rem;
}

/* Variantes opcionales (puedes usarlas según tema) */
.rubrica-bullet.-info  { background: #e0f2fe; color:#075985; } /* azul claro */
.rubrica-bullet.-warn  { background: #fff7ed; color:#9a3412; } /* naranja */
.rubrica-bullet.-brand { background: #dbeafe; color:#1d4ed8; } /* azul brand */

/* Compacta la rúbrica si quieres menos espacio */
.rubrica.-compact { padding: .75rem; }
.rubrica.-compact .rubrica-list { gap: .45rem; }

