/* =================================================================
   PPA — analisis.css
   Sección Análisis (fusión Institucional + Expectativas)
   Mobile-first, paleta tresempanadas
   ================================================================= */

.body-analisis { background: var(--papel); }

/* Nav de categorías — scrolleable horizontal */
.an-nav-cats {
  background: var(--papel);
  border-bottom: 1px solid var(--linea);
  padding: 8px 0 8px 16px;
  position: sticky;
  top: 52px;  /* debajo de la cabecera sticky */
  z-index: 90;
}
.an-nav-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
}
.an-nav-scroll::-webkit-scrollbar { display: none; }
.an-nav-scroll a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gris);
  white-space: nowrap;
  padding: 3px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.an-nav-scroll a:hover { color: var(--rojo); border-color: var(--rojo); }
.an-nav-scroll a svg {
  width: 12px; height: 12px;
  stroke: currentColor; stroke-width: 2.2;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
}

/* Header de la sección */
.an-main { padding: 20px 0 48px; }

.an-header {
  padding-bottom: 14px;
  border-bottom: 2px solid var(--tinta);
  margin-bottom: 20px;
}
.an-titulo-seccion {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 4px;
}
.an-sub {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gris);
  margin-bottom: 4px;
}
.an-total {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 10px;
  color: var(--grisclaro, #C4A882);
}

/* Destacados */
.an-destacados {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--linea);
}
.an-destacado {
  margin-bottom: 16px;
}
.an-cat {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gris);
  display: block;
  margin-bottom: 5px;
}
.an-titulo-grande {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: clamp(18px, 3.5vw, 24px);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 6px;
}
.an-titulo-grande a { color: var(--tinta); }
.an-titulo-grande a:hover { color: var(--rojo); }
.an-bajada {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  color: var(--gris);
  line-height: 1.5;
  margin-bottom: 6px;
}
.an-dest-rest {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) { .an-dest-rest { grid-template-columns: 1fr; } }

/* Cuerpo: secciones por categoría */
.an-cuerpo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 768px) {
  .an-cuerpo {
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
  }
}

/* Sección por categoría */
.an-seccion {
  padding: 14px 0;
  border-bottom: 1px solid var(--linea);
}
.an-seccion-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.an-ic svg, .an-ic {
  width: 13px; height: 13px;
  stroke: var(--gris); stroke-width: 2.2;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
  display: inline-block;
}
.an-seccion-nombre {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tinta);
}

/* Notas dentro de la sección */
.an-notas { display: flex; flex-direction: column; }

.an-nota {
  padding: 7px 0;
  border-bottom: 1px dotted var(--linea);
}
.an-nota:last-child { border-bottom: none; }

.an-titulo {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 3px;
}
.an-titulo a { color: var(--tinta); }
.an-titulo a:hover { color: var(--rojo); }

.an-meta {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 9px;
  color: var(--grisclaro, #C4A882);
}
.an-fuente { font-weight: 600; color: var(--gris); }
.an-hora { color: var(--grisclaro, #C4A882); }

.an-vacio {
  font-family: 'IBM Plex Sans', sans-serif;
  font-style: italic;
  color: var(--gris);
  padding: 20px 0;
  font-size: 13px;
}

/* =================================================================
   IMAGEN DE CABECERA POR CATEGORÍA
   ================================================================= */
.cat-imagen-header {
  width: 100%;
  height: 90px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 4px;
  margin-bottom: 10px;
  opacity: 0.85;
}

@media (min-width: 768px) {
  .cat-imagen-header { height: 110px; }
}
