/* ===== Buscador ===== */
.aprende-buscador-wrap { margin-bottom: 18px; }
.aprende-buscador {
  width: 100%; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff;
  padding: 14px 18px; font-size: .9rem; font-family: inherit; color: #0f172a;
  box-shadow: 0 12px 30px rgba(15,23,42,.08); transition: box-shadow .2s ease, border-color .2s ease;
}
.aprende-buscador:focus { outline: none; border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.15); }

.aprende-cargando, .aprende-vacio {
  text-align: center; color: #9ca3af; font-size: .85rem; font-weight: 600;
  background: #fff; border-radius: 16px; padding: 40px 20px; box-shadow: 0 20px 40px rgba(15,23,42,.08);
}

/* ===== Layout maestro-detalle ===== */
.aprende-layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
@media (min-width: 1024px) {
  .aprende-layout { grid-template-columns: 360px 1fr; }
  .aprende-lectura { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; }
}

/* ===== Sidebar: categorías ===== */
.aprende-sidebar { display: flex; flex-direction: column; gap: 12px; }

.aprende-categoria {
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 16px 34px -12px rgba(15,23,42,.14), 0 0 0 1px rgba(15,23,42,.04);
}

.aprende-categoria-head {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; background: linear-gradient(135deg, #0f172a, #1e293b);
  border: none; cursor: pointer; text-align: left; font-family: inherit;
  transition: background .2s ease;
}
.aprende-categoria-head:hover { background: linear-gradient(135deg, #1e293b, #27364d); }

.aprende-categoria-nombre { flex: 1; color: #fff; font-weight: 800; font-size: .92rem; letter-spacing: .01em; }
.aprende-categoria-count {
  background: rgba(255,255,255,.12); color: #fff; font-size: .66rem; font-weight: 800;
  padding: 3px 10px; border-radius: 999px;
}
.aprende-chevron { color: #fff; flex-shrink: 0; transition: transform .3s ease; }
.aprende-categoria-head.abierta .aprende-chevron { transform: rotate(180deg); }

.aprende-categoria-body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .35s cubic-bezier(.2,.8,.2,1);
}
.aprende-categoria-body.abierta { grid-template-rows: 1fr; }
.aprende-categoria-body-inner { overflow: hidden; }

/* ===== Sidebar: filas de contenido (por fecha) ===== */
.aprende-item-fila {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 13px 18px; background: #fff; border: none; border-top: 1px solid #f1f5f9;
  cursor: pointer; text-align: left; font-family: inherit; transition: background .2s ease;
}
.aprende-item-fila:hover { background: #fef2f2; }
.aprende-item-fila.activo { background: #fee2e2; box-shadow: inset 3px 0 0 #dc2626; }

.aprende-item-icono { font-size: 1rem; flex-shrink: 0; }
.aprende-item-fila-texto { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aprende-item-fila-titulo {
  font-weight: 700; font-size: .84rem; color: #0f172a;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.aprende-item-fila.activo .aprende-item-fila-titulo { color: #b91c1c; }
.aprende-item-fila-fecha { font-size: .68rem; font-weight: 600; color: #94a3b8; text-transform: capitalize; }

/* ===== Panel de lectura (derecha) ===== */
.aprende-lectura {
  background: #fff; border-radius: 18px; padding: 28px 30px;
  box-shadow: 0 20px 44px -14px rgba(15,23,42,.16), 0 0 0 1px rgba(15,23,42,.04);
  min-height: 320px;
}

.aprende-lectura-vacio {
  height: 100%; min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: #9ca3af; font-size: .85rem; font-weight: 600; text-align: center;
}
.aprende-lectura-vacio-icono { font-size: 2rem; }

.aprende-lectura-cabeza { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.aprende-lectura-cat { font-size: .74rem; font-weight: 700; color: #64748b; }
.aprende-lectura-titulo { font-size: 1.5rem; font-weight: 800; color: #0f172a; line-height: 1.25; margin-bottom: 6px; }
.aprende-lectura-fecha { font-size: .74rem; font-weight: 600; color: #94a3b8; margin-bottom: 20px; text-transform: capitalize; }

.aprende-item-tag {
  font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: #dc2626; background: #fee2e2; padding: 3px 9px; border-radius: 999px; flex-shrink: 0;
}

.aprende-item-portada {
  width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; margin-bottom: 18px;
}
.aprende-item-resumen { font-size: .92rem; color: #475569; font-weight: 600; margin-bottom: 16px; line-height: 1.6; }
.aprende-item-parrafo { font-size: .9rem; color: #334155; line-height: 1.8; margin-bottom: 14px; }
.aprende-item-parrafo:last-child { margin-bottom: 0; }

.aprende-video-wrap {
  position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden;
  background: #0f172a; box-shadow: 0 12px 28px rgba(15,23,42,.18);
}
.aprende-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.aprende-doc-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #dc2626; color: #fff; font-weight: 700; font-size: .84rem;
  padding: 12px 20px; border-radius: 10px; text-decoration: none;
  box-shadow: 0 10px 22px rgba(220,38,38,.25); transition: background .2s ease, transform .2s ease;
}
.aprende-doc-btn:hover { background: #b91c1c; transform: translateY(-2px); }

@media (max-width: 480px) {
  .aprende-categoria-head { padding: 14px 15px; }
  .aprende-categoria-nombre { font-size: .86rem; }
  .aprende-item-fila { padding: 11px 15px; }
  .aprende-lectura { padding: 20px 18px; }
  .aprende-lectura-titulo { font-size: 1.2rem; }
}
