/* =========================================================
   ARTÍCULOS: /articulos/, /articulos/<slug>/, /temas/<slug>/
   Se carga después de estilos.css. No redefine nada de la base:
   solo clases nuevas con prefijo art-, idx-, tarjeta, tema-enlace,
   migas y signo-grande.
   Colores por tema con data-tema (el nombre exacto del tema).
   ========================================================= */

/* ---------- Color de cada tema ---------- */
[data-tema] { --tema: var(--rojo); }
[data-tema="Liderar equipos"] { --tema: #FF314F; }
[data-tema="Mentalidad del líder"] { --tema: #0050C9; }
[data-tema="Comunicación e influencia"] { --tema: #FE51B8; }
[data-tema="Crecer como emprendedor"] { --tema: #00A2FB; }

/* ---------- Ruta de navegación ---------- */
.migas { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 15px; font-weight: 600; color: var(--suave); }
.migas a { color: var(--azul); text-decoration: none; border-bottom: 2px solid transparent; transition: border-color .18s ease, color .18s ease; }
.migas a:hover { color: var(--rojo); border-bottom-color: var(--rojo); }
.migas span { color: #A3A6B5; }

/* ---------- Signo grande: la letra gigante de Venissa, en clave de pregunta ---------- */
.signo-grande { position: absolute; pointer-events: none; }
.signo-grande__disco { position: absolute; border-radius: 50%; background: var(--celeste); }
.signo-grande__q { position: absolute; font-family: var(--angosta); font-weight: 800; line-height: .8; color: var(--rojo); }
.signo-grande__mota { position: absolute; border-radius: 50%; }
.signo-grande__mota--a { background: var(--rojo); }
.signo-grande__mota--b { background: var(--azul); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .signo-grande__q { background-image: linear-gradient(160deg, #FF314F 20%, #FE51B8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
}

/* =========================================================
   PÁGINA DE UN ARTÍCULO
   ========================================================= */
.art-cabeza { position: relative; overflow: hidden; padding: 26px var(--m) 30px; background: var(--blanco); border-bottom: 1px solid var(--linea); }
.art-h1 { position: relative; z-index: 2; margin-top: 18px; font-size: clamp(34px, 9.4vw, 44px); line-height: 1.02; letter-spacing: -.04em; color: var(--azul); text-wrap: balance; }
.art-autor { position: relative; z-index: 2; margin-top: 18px; display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; color: var(--suave); }
.art-autor::before { content: ""; flex: none; width: 34px; height: 4px; background: linear-gradient(90deg, #FF314F, #FE51B8); }
.art-autor a { color: var(--azul); font-weight: 800; text-decoration: none; }
.art-autor a:hover { color: var(--rojo); }
.art-cabeza .signo-grande { display: none; }

/* Respuesta corta + video */
.art-intro { padding: 30px var(--m) 8px; background: var(--blanco); }
.art-respuesta { position: relative; margin: 0 12px 12px 0; }
.art-respuesta::before { content: ""; position: absolute; inset: 12px -12px -12px 12px; background: var(--azul); }
.art-respuesta__caja { position: relative; padding: 24px 22px 26px; background: var(--palido); border-left: 8px solid var(--rojo); }
.art-respuesta__etiqueta { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--celeste); }
.art-respuesta__etiqueta::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--celeste); }
.art-respuesta__texto { margin-top: 12px; font-size: 19px; line-height: 1.5; font-weight: 600; letter-spacing: -.012em; color: var(--azul); }

.art-video { position: relative; margin-top: 34px; border-left: 12px solid var(--rojo); background: var(--azul); }
.art-video__lienzo { position: relative; aspect-ratio: 16 / 9; }
.art-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Cuerpo del artículo: tipografía de lectura */
.art-lectura { padding: 40px var(--m) 56px; background: var(--blanco); }
.art-lado { display: none; }
.art-cuerpo { max-width: 40em; font-size: 18px; line-height: 1.68; color: var(--gris); }
.art-cuerpo > * + * { margin-top: 20px; }
.art-cuerpo > p:first-child { font-size: 21px; line-height: 1.5; font-weight: 500; letter-spacing: -.012em; color: var(--azul); }
.art-cuerpo h2 { margin-top: 52px; font-size: 28px; line-height: 1.12; letter-spacing: -.03em; color: var(--azul); text-wrap: balance; }
.art-cuerpo h2::before { content: ""; display: block; width: 42px; height: 6px; margin-bottom: 16px; background: linear-gradient(90deg, #FF314F, #FE51B8); }
.art-cuerpo h3 { margin-top: 36px; font-size: 22px; line-height: 1.2; letter-spacing: -.02em; color: var(--azul); }
.art-cuerpo h2 + *, .art-cuerpo h3 + * { margin-top: 14px; }
.art-cuerpo strong { font-weight: 800; color: var(--azul); }
.art-cuerpo em { font-style: italic; }
.art-cuerpo a { color: var(--celeste); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; transition: color .18s ease; }
.art-cuerpo a:hover { color: var(--rojo); }
.art-cuerpo ul, .art-cuerpo ol { padding: 0; list-style: none; }
.art-cuerpo li { position: relative; padding-left: 30px; }
.art-cuerpo li + li { margin-top: 12px; }
.art-cuerpo ul > li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 10px; height: 10px; border-radius: 50%; background: var(--rojo); }
.art-cuerpo ol { counter-reset: art; }
.art-cuerpo ol > li { counter-increment: art; padding-left: 40px; }
.art-cuerpo ol > li::before { content: counter(art); position: absolute; left: 0; top: -.08em; font-family: var(--angosta); font-weight: 800; font-size: 30px; line-height: 1; color: var(--celeste); }
.art-cuerpo li > ul, .art-cuerpo li > ol { margin-top: 12px; }
.art-cuerpo blockquote { margin-block: 34px; padding: 4px 0 4px 20px; border-left: 4px solid var(--rojo); font-size: 22px; line-height: 1.42; font-weight: 600; letter-spacing: -.015em; color: var(--azul); }
.art-cuerpo blockquote p + p { margin-top: 12px; }
.art-cuerpo hr { height: 1px; margin-block: 40px; border: 0; background: var(--linea); }
.art-cuerpo img { height: auto; }

/* Bloque plegable "Soy una IA" */
.art-ia { max-width: 40em; margin-top: 52px; border: 1.5px solid var(--azul); background: var(--blanco); }
.art-ia summary { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 14px 18px; cursor: pointer; list-style: none; font-weight: 800; font-size: 17px; line-height: 1.25; letter-spacing: -.01em; color: var(--azul); }
.art-ia summary::-webkit-details-marker { display: none; }
.art-ia__icono { position: relative; flex: none; display: grid; place-items: center; width: 38px; height: 38px; background: var(--azul); color: var(--blanco); font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.art-ia__icono::after { content: ""; position: absolute; right: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--rojo); }
.art-ia__signo { position: relative; flex: none; width: 18px; height: 18px; margin-left: auto; }
.art-ia__signo::before, .art-ia__signo::after { content: ""; position: absolute; left: 0; top: 8px; width: 18px; height: 2.5px; background: var(--rojo); transition: transform .2s ease; }
.art-ia__signo::after { transform: rotate(90deg); }
.art-ia[open] .art-ia__signo::after { transform: rotate(0); }
.art-ia[open] summary { border-bottom: 1px solid var(--linea); }
.art-ia__lista { padding: 18px 18px 4px; }
.art-ia__lista li { position: relative; padding: 10px 0 10px 26px; border-top: 1px solid var(--linea); font-size: 16px; line-height: 1.45; color: var(--gris); }
.art-ia__lista li:first-child { border-top: 0; }
.art-ia__lista li::before { content: ""; position: absolute; left: 2px; top: 18px; width: 9px; height: 9px; background: var(--celeste); }
.art-ia__md { padding: 6px 18px 20px; }
.art-ia__md a { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--celeste); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.art-ia__md a:hover { color: var(--rojo); }

/* Pregunta final: banda azul con el signo gigante */
.art-pregunta { position: relative; overflow: hidden; padding: 54px var(--m) 58px; background: var(--azul); border-top: 10px solid var(--rojo); }
.art-pregunta__signo { position: absolute; z-index: 0; right: 10px; top: 50%; transform: translateY(-50%); font-family: var(--angosta); font-weight: 800; font-size: 200px; line-height: .8; color: var(--celeste); opacity: .4; pointer-events: none; }
.art-pregunta__texto { position: relative; z-index: 1; max-width: 15em; font-family: var(--angosta); font-weight: 800; font-size: clamp(40px, 11.6vw, 50px); line-height: 1; letter-spacing: -.005em; color: var(--blanco); text-wrap: balance; }
.art-pregunta__linea { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; margin-top: 28px; }
.art-pregunta__linea::before { content: ""; width: 62px; height: 10px; background: linear-gradient(90deg, #FF314F, #FE51B8); }
.art-pregunta__linea::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #00A2FB; }

/* Relacionados */
.art-rel { padding: 52px 0 0; background: var(--blanco); }
.art-rel > h2 { padding: 0 var(--m) 26px; }

/* =========================================================
   TARJETA DE ARTÍCULO (sin foto: marca gráfica por tema)
   ========================================================= */
.tarjetas { border-top: 1px solid var(--linea); }
.tarjeta { position: relative; display: flex; flex-direction: column; padding: 28px var(--m) 30px; border-bottom: 1px solid var(--linea); background: var(--blanco); transition: background-color .2s ease; }
.tarjeta__marca { position: relative; display: block; width: 84px; height: 12px; margin-bottom: 20px; }
.tarjeta__marca::before { content: ""; position: absolute; left: 0; top: 1px; width: 62px; height: 10px; background: var(--tema, var(--rojo)); transition: width .25s ease; }
.tarjeta__marca::after { content: ""; position: absolute; right: 0; top: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--azul); }
.tarjeta__tema { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--suave); }
.tarjeta__t { margin-top: 10px; font-size: 24px; line-height: 1.12; letter-spacing: -.03em; color: var(--azul); text-wrap: balance; }
.tarjeta__t a { text-decoration: none; }
.tarjeta__t a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.tarjeta__resumen { margin-top: 12px; font-size: 16px; line-height: 1.5; color: var(--suave); }
.tarjeta__leer { display: inline-flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 20px; font-size: 15px; font-weight: 800; color: var(--azul); }
.tarjeta__leer svg { width: 18px; height: 18px; fill: none; stroke: var(--rojo); stroke-width: 2.4; transition: transform .2s ease; }
.tarjeta:hover { background: var(--palido); }
.tarjeta:hover .tarjeta__marca::before { width: 72px; }
.tarjeta:hover .tarjeta__leer svg { transform: translateX(4px); }
.tarjeta:focus-within { outline: 3px solid var(--celeste); outline-offset: -3px; }
.tarjeta__t a:focus-visible { outline: none; }

/* =========================================================
   ÍNDICE /articulos/ Y TEMA /temas/<slug>/
   ========================================================= */
.idx-cabeza { position: relative; overflow: hidden; padding: 26px var(--m) 30px; background: var(--blanco); }
.idx-cabeza .migas { margin-bottom: 18px; }
.idx-h1 { position: relative; z-index: 2; font-size: clamp(40px, 11.4vw, 52px); line-height: .98; letter-spacing: -.045em; color: var(--azul); text-wrap: balance; }
.idx-intro { position: relative; z-index: 2; margin-top: 18px; max-width: 34em; font-size: 18px; line-height: 1.5; }
.idx-cabeza .signo-grande { display: none; }

/* Enlaces a los temas */
.idx-temas { position: relative; padding: 0 var(--m) 30px; background: var(--blanco); border-bottom: 1px solid var(--linea); }
.idx-temas ul { display: flex; flex-wrap: wrap; gap: 10px; }
.tema-enlace { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px 8px 12px; border: 1.5px solid var(--azul); background: var(--blanco); color: var(--azul); font-size: 15px; font-weight: 700; line-height: 1.2; text-decoration: none; transition: background-color .18s ease, color .18s ease; }
.tema-enlace__punto { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--tema, var(--rojo)); }
.tema-enlace__cuenta { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; background: var(--palido); font-size: 13px; font-weight: 800; color: var(--azul); }
.tema-enlace:hover { background: var(--azul); color: var(--blanco); }
.tema-enlace:hover .tema-enlace__cuenta { background: var(--blanco); }

.idx-rejilla { background: var(--blanco); }
.idx-volver { padding: 34px var(--m) 56px; background: var(--blanco); }
.idx-volver .btn { width: 100%; }

/* =========================================================
   Tableta: 720 px en adelante
   ========================================================= */
@media (min-width: 720px) {
  .art-h1 { font-size: 52px; max-width: 14em; }
  .art-respuesta__caja { padding: 30px 32px 32px; }
  .art-respuesta__texto { font-size: 21px; }
  .art-cuerpo { font-size: 19px; }
  .art-cuerpo h2 { font-size: 32px; }
  .art-pregunta__texto { font-size: 60px; }
  .art-pregunta__signo { font-size: 300px; }
  .tarjetas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tarjeta:nth-child(odd) { border-right: 1px solid var(--linea); }
  .idx-h1 { font-size: 64px; max-width: 12em; }
  .idx-volver .btn { width: auto; }
}

/* =========================================================
   Pantalla ancha: se alinea a la retícula de cuatro columnas
   ========================================================= */
@media (min-width: 1000px) {
  /* Cabecera del artículo: título en tres columnas, signo en la cuarta */
  .art-cabeza { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: clamp(48px, 7vh, 80px) 0 clamp(44px, 6vh, 64px); min-height: 440px; align-content: center; }
  .art-cabeza .migas, .art-h1, .art-autor { grid-column: 1 / span 3; padding-inline: var(--m); }
  .art-h1 { margin-top: 26px; font-size: clamp(54px, 4.9vw, 78px); line-height: 1; max-width: 13em; }
  .art-autor { margin-top: 26px; font-size: 17px; }
  .art-cabeza .signo-grande { display: block; right: 0; top: 0; bottom: 0; width: 25%; }
  .signo-grande__disco { width: 72%; aspect-ratio: 1; left: 18%; top: 50%; transform: translateY(-46%); }
  .signo-grande__q { font-size: clamp(250px, 21vw, 340px); left: 26%; top: 50%; transform: translateY(-58%); }
  .signo-grande__mota--a { width: 28px; height: 28px; left: 10%; top: 16%; }
  .signo-grande__mota--b { width: 14px; height: 14px; left: 18%; top: 11%; }

  /* Respuesta (columnas 1-2) y video (3-4). Sin video, la respuesta va en 2-4 */
  .art-intro { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 56px 0 8px; background: none; }
  .art-respuesta { grid-column: 2 / -1; margin: 0 calc(var(--m) + 14px) 14px var(--m); max-width: 52em; }
  .art-respuesta::before { inset: 14px -14px -14px 14px; }
  .art-respuesta__caja { padding: 34px 40px 38px; }
  .art-respuesta__texto { font-size: 23px; line-height: 1.45; }
  .art-intro:has(.art-video) .art-respuesta { grid-column: 1 / span 2; align-self: center; max-width: none; }
  .art-video { grid-column: 3 / -1; margin: 0 var(--m) 0 var(--m); align-self: center; }

  /* Lectura: columna 1 con el tema (fija al bajar), texto en 2-4 */
  .art-lectura { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; padding: 64px 0 96px; background: none; }
  .art-lado { display: grid; gap: 22px; grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 40px; padding: 8px var(--m) 20px; background: var(--blanco); }
  .art-lado__rotulo { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--suave); }
  .art-lado .tema-enlace { min-height: 0; padding: 8px 12px 8px 10px; font-size: 14px; }
  .art-lado__volver { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--azul); text-decoration: none; }
  .art-lado__volver svg { width: 16px; height: 16px; fill: none; stroke: var(--rojo); stroke-width: 2.4; }
  .art-lado__volver:hover { color: var(--rojo); }
  .art-cuerpo, .art-ia { grid-column: 2 / -1; margin-inline: var(--m); }
  .art-cuerpo { padding: 0 0 8px; background: var(--blanco); box-shadow: 0 0 0 var(--m) var(--blanco); font-size: 20px; line-height: 1.7; max-width: 38em; }
  .art-cuerpo > p:first-child { font-size: 24px; line-height: 1.48; }
  .art-cuerpo h2 { margin-top: 64px; font-size: clamp(32px, 2.6vw, 40px); }
  .art-cuerpo h3 { font-size: 25px; }
  .art-cuerpo blockquote { font-size: 26px; padding-left: 26px; }
  .art-ia { max-width: 38em; margin-top: 64px; }
  .art-ia summary { padding: 16px 24px; font-size: 18px; }
  .art-ia__lista { padding: 20px 24px 4px; }
  .art-ia__lista li { font-size: 17px; }
  .art-ia__md { padding: 6px 24px 24px; }

  /* Pregunta final */
  .art-pregunta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: clamp(84px, 11vh, 120px) 0; }
  .art-pregunta__texto, .art-pregunta__linea { grid-column: 2 / span 3; padding-inline: var(--m); }
  .art-pregunta__texto { max-width: 14em; font-size: clamp(64px, 5.6vw, 92px); line-height: .96; }
  .art-pregunta__signo { right: 5%; font-size: clamp(340px, 27vw, 440px); opacity: .55; }
  .art-pregunta__linea { margin-top: 36px; }

  /* Relacionados: título en la columna 1, tres tarjetas en 2-4 */
  .art-rel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: clamp(84px, 11vh, 120px) 0 0; background: none; }
  .art-rel > h2 { grid-column: 1; padding: 0 var(--m); background: var(--blanco); align-self: start; }
  .art-rel > h2.t2 { font-size: clamp(40px, 3.3vw, 52px); line-height: 1; }
  .art-rel .tarjetas { grid-column: 2 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* Tarjetas: una por columna de la retícula */
  .tarjetas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tarjeta, .tarjeta:nth-child(odd) { border-right: 1px solid var(--linea); min-height: 380px; padding: 36px var(--m) 34px; }
  .tarjeta__t { font-size: clamp(24px, 1.9vw, 30px); }

  /* Índice y tema */
  .idx-cabeza { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-content: center; min-height: clamp(460px, 62vh, 620px); padding: 56px 0; }
  .idx-cabeza .migas, .idx-h1, .idx-intro { grid-column: 1 / span 3; padding-inline: var(--m); }
  .idx-cabeza .migas { margin-bottom: 26px; }
  .idx-h1 { font-size: clamp(72px, 6.6vw, 112px); max-width: 9.5em; }
  .idx-intro { margin-top: 26px; font-size: 21px; max-width: 32em; }
  .idx-intro { grid-column: 1 / span 2; }
  .idx-cabeza .signo-grande { display: block; right: 0; top: 0; bottom: 0; width: 34%; }
  .idx-cabeza .signo-grande__disco { width: 64%; left: 24%; }
  .idx-cabeza .signo-grande__q { font-size: clamp(300px, 26vw, 420px); left: 32%; }
  .idx-temas { padding: 0 var(--m) 44px; border-bottom: 0; }
  .idx-temas ul { gap: 12px; }
  .tema-enlace { font-size: 16px; padding: 10px 16px 10px 14px; }
  .idx-rejilla { background: none; }
  .idx-volver { padding: 56px var(--m) 110px; background: none; }
}

/* =========================================================
   SOLO CELULAR (hasta 719 px)
   ========================================================= */
@media (max-width: 719px) {
  /* Cabecera compacta: sin signo, el título manda */
  .art-cabeza .signo-grande { display: none; }

  /* La caja de respuesta llega al borde para ganar ancho */
  .art-intro { padding: 26px var(--m) 4px; }
  .art-respuesta { margin-right: 10px; }
  .art-respuesta::before { inset: 10px -10px -10px 10px; }
  .art-respuesta__caja { padding: 20px 18px 22px; border-left-width: 6px; }
  .art-respuesta__texto { font-size: 18px; }
  .art-video { margin: 30px calc(var(--m) * -1) 0; border-left-width: 8px; }

  /* Lectura: líneas cómodas para el pulgar */
  .art-lectura { padding: 34px var(--m) 48px; }
  .art-cuerpo { font-size: 18px; line-height: 1.66; }
  .art-cuerpo > p:first-child { font-size: 20px; }
  .art-cuerpo h2 { margin-top: 44px; font-size: 27px; }
  .art-cuerpo h2::before { width: 36px; height: 5px; margin-bottom: 14px; }
  .art-cuerpo blockquote { font-size: 20px; padding-left: 16px; }
  .art-cuerpo .m-p + .m-p { margin-top: 12px; }
  .art-ia { margin-top: 44px; }
  .art-ia summary { padding: 12px 14px; font-size: 16px; }
  .art-ia__lista { padding: 14px 14px 2px; }
  .art-ia__md { padding: 6px 14px 18px; }

  .art-pregunta { padding: 48px var(--m) 54px; }

  .art-rel { padding-top: 46px; }
  .art-rel > h2.t2 { font-size: 38px; }

  /* Tarjetas en lista: sin altura fija */
  .tarjeta { padding: 26px var(--m) 28px; }
  .tarjeta__marca { margin-bottom: 16px; }
  .tarjeta__t { font-size: 23px; }

  /* Índice y tema: el signo pequeño, entero, en la esquina */
  .idx-cabeza .signo-grande { display: block; right: var(--m); top: 22px; width: 64px; height: 84px; }
  .idx-cabeza .signo-grande__disco { width: 56px; height: 56px; right: 0; top: 18px; }
  .idx-cabeza .signo-grande__q { font-size: 92px; right: 14px; top: 2px; }
  .idx-cabeza .signo-grande__mota--a, .idx-cabeza .signo-grande__mota--b { display: none; }
  .idx-cabeza .migas, .idx-h1 { padding-right: 72px; }
  .idx-temas { padding-bottom: 26px; }
  .idx-temas ul { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .tema-enlace { width: 100%; justify-content: flex-start; }
  .tema-enlace__cuenta { margin-left: auto; }
}
