/* =====================================================================
   escapa.es — Hoja de estilo v2 (extensiones)
   ---------------------------------------------------------------------
   Cargar DESPUÉS de escapa-tema.css. Añade:
   - Ideas clave numeradas
   - Mapa conceptual (preformatted)
   - Examen oficial (variante de exam-question)
   - Conexiones con el temario
   - Cuestionario interactivo (estados vacío + relleno)
   - Referencias normativas
   - Override del chrome de WordPress
   ===================================================================== */

/* =========================================================
   1. IDEAS CLAVE — numeración decorativa grande (01, 02...)
   ========================================================= */
.ideas-clave {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: var(--gap-md) 0;
  padding: 0;
  list-style: none;
  counter-reset: idea;
}
.ideas-clave > li,
.ideas-clave > .idea {
  counter-increment: idea;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 22px 20px 22px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink);
}
.ideas-clave > li::before,
.ideas-clave > .idea::before {
  content: counter(idea, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.8rem;
  color: var(--terracota);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

/* =========================================================
   2. MAPA CONCEPTUAL — texto preformateado tipo árbol
   ========================================================= */
.mapa-conceptual {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin: var(--gap-md) 0;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.mapa-conceptual::-webkit-scrollbar { height: 8px; }
.mapa-conceptual::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* =========================================================
   3. EXAMEN OFICIAL — variante destacada de exam-question
   ---------------------------------------------------------
   Usar para preguntas de exámenes REALES (OPE oficial),
   distintas de la autoevaluación.
   ========================================================= */
.examen-oficial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--terracota);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: var(--gap-md) 0;
  box-shadow: var(--shadow-sm);
}
.examen-oficial .meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--terracota);
  margin-bottom: 12px;
  padding: 4px 10px;
  background: var(--terracota-bg);
  border-radius: var(--radius-pill);
}
.examen-oficial .enunciado {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
  margin: 0 0 14px;
}
.examen-oficial ol,
.examen-oficial ul {
  margin: 0 0 14px;
  padding-left: 24px;
}
.examen-oficial li { margin-bottom: 6px; line-height: 1.5; }

/* =========================================================
   4. CONEXIONES CON EL TEMARIO
   ========================================================= */
.conexiones-temario {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: var(--gap-md) 0;
}
.conexiones-temario h3 {
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.conexiones-temario ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.conexiones-temario li {
  position: relative;
  padding: 10px 14px 10px 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.92rem;
  margin: 0;
}
.conexiones-temario li::before {
  content: '↗';
  position: absolute;
  left: 14px;
  top: 10px;
  color: var(--terracota);
  font-weight: 700;
}
.conexiones-temario li a { color: var(--ink); }
.conexiones-temario li a:hover { color: var(--terracota); }

/* =========================================================
   5. ESTRATEGIA DE ESTUDIO — sección final compuesta
   ========================================================= */
.estrategia-estudio {
  margin: var(--gap-xl) 0 var(--gap-lg);
  padding-top: var(--gap-lg);
  border-top: 2px solid var(--border);
}
.estrategia-estudio h2 {
  border: 0;
  padding: 0;
  margin-bottom: var(--gap-md);
}

/* =========================================================
   6. CUESTIONARIO INTERACTIVO — estado básico decoroso
   ---------------------------------------------------------
   El JS del cuestionario rellena los .stat-value. La CSS
   garantiza que en estado vacío también se vea bien.
   ========================================================= */
.quiz-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: var(--gap-md) 0;
  box-shadow: var(--shadow-sm);
}
.quiz-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 20px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
@media (max-width: 540px) {
  .quiz-stats { grid-template-columns: repeat(2, 1fr); }
}
.quiz-stat {
  text-align: center;
}
.quiz-stat .value {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--terracota);
  line-height: 1;
  margin-bottom: 6px;
}
.quiz-stat .label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.quiz-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.quiz-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--terracota);
  color: white;
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}
.quiz-btn:hover { background: var(--ink); }
.quiz-btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.quiz-btn.secondary:hover { background: var(--bg-alt); border-color: var(--ink-soft); }

/* =========================================================
   7. REFERENCIAS NORMATIVAS
   ========================================================= */
.referencias {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: var(--gap-lg) 0;
  font-size: 0.9rem;
  line-height: 1.55;
}
.referencias h2,
.referencias h3 {
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  border: 0;
  padding: 0;
}
.referencias ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.referencias li {
  padding: 10px 0 10px 28px;
  border-top: 1px solid var(--border);
  position: relative;
}
.referencias li:first-child { border-top: 0; }
.referencias li::before {
  content: '§';
  position: absolute;
  left: 0;
  top: 10px;
  color: var(--terracota);
  font-weight: 700;
  font-family: var(--font-display);
}

/* =========================================================
   8. METADATA del tema (categoría, norma base, preparador)
   ---------------------------------------------------------
   Bloque tras el h1 con datos contextuales (📚 Categoría,
   📖 Norma base, ✍️ Preparador, 📅 Actualización).
   ========================================================= */
.tema-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 24px;
  margin: var(--gap-md) 0 var(--gap-lg);
  padding: 18px 22px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  font-size: 0.88rem;
}
.tema-meta div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tema-meta .label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tema-meta .value { color: var(--ink); font-weight: 500; }

/* =========================================================
   9. OVERRIDE WORDPRESS — silenciar chrome del theme
   ---------------------------------------------------------
   Estos selectores apuntan al chrome típico que añade
   WordPress alrededor del contenido. Ajustar selectores
   exactos al theme activo.
   ========================================================= */

/* Tabla de contenidos auto-generada (TOC plugin) — la ocultamos
   porque ya tenemos nuestro .index-section interno */
/* ToC override - disabled; enable if you want to hide plugin ToC
.ez-toc-v2_0_72,
#ez-toc-container,
.toc_container,
.lwptoc {
  display: none !important;
}
*/

/* "Tema anterior / Tema siguiente" — simplificar visualmente */
.post-nav,
.nav-links {
  margin-top: var(--gap-xl);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
}

/* Breadcrumbs — discretos */
.breadcrumbs,
.breadcrumb {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-bottom: var(--gap-md);
}

/* "Tiempo de lectura / Actualizado" — píldora en lugar de texto */
.reading-time,
.updated-date {
  display: inline-block;
  padding: 3px 10px;
  background: var(--bg-alt);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  color: var(--ink-soft);
}

/* =========================================================
   FIN v2
   ========================================================= */
