/* Subtítulo de la página principal */
.home-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  color: #3a4a5a;
  text-align: center;
  margin-top: -0.5rem;
  margin-bottom: 2.5rem;
  line-height: 1.6;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* más espacio debajo de la barra superior */
.navbar {
  padding-bottom: 2rem;
}

header,
.header {
  padding-top: 2rem;
}

/* contenedor general */
.blog-grid.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* grid de tarjetas */
.cards-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* tarjeta */
.post-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.03);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
  display: flex;
  flex-direction: column;
  transition: transform .15s ease-out, box-shadow .15s ease-out;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0,0,0,.06);
}

/* imagen */
.post-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f3f4f6;
  overflow: hidden;
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* cuerpo */
.post-card__body {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.post-card__body h2 {
  margin: 0;
  font-size: 1.1rem;
}

.post-card__body p {
  margin: 0;
}

.post-card__meta {
  font-size: .75rem;
  color: #9ca3af;
}

.post-card__link {
  margin-top: .75rem;
  font-weight: 500;
  text-decoration: none;
  color: #111827;
}
.post-card__link:hover {
  text-decoration: underline;
}

/* móvil */
@media (max-width: 640px) {
  .blog-grid.container {
    padding-inline: .75rem;
  }
}

/* ============================================================
   BLOQUES DE CÓDIGO (Añadido por ChatGPT)
   ============================================================ */

/* Estilo base de bloques de código */
pre,
pre code,
.chroma {
  background-color: transparent;   /* sin fondo aquí */
  border-radius: 0;
  padding: 0;
  overflow-x: auto;
  font-size: 0.95rem;
  line-height: 1.5;
}


/* Código inline dentro de texto */
p code,
li code {
  background-color: #dadbdd;   /* un gris un poco más suave */
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.95em;
}
/* ============================================================
   BLOQUES DE CÓDIGO EN POSTS: CUADRO GRIS COMPLETO
   ============================================================ */

/* Contenedor completo del bloque de código dentro del artículo */
.post-body pre,
.post-body .highlight,
.post-body .chroma,
.post-body table.lntable {
  background-color: #f7f7f8;     /* gris muy clarito, tipo tarjeta */
  padding: 1.25rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  overflow-x: auto;
}



/* Evitamos fondos “a trozos” dentro del bloque */
.post-body pre,
.post-body pre code,
.post-body pre span,
.post-body .chroma *,
.post-body table.lntable * {
  background-color: transparent !important;
}

/* Código inline dentro del texto (p, li) */
.post-body p code,
.post-body li code {
  background-color: #e4e5e7;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.95em;
}

/* ==========================
   PAGINACIÓN LISTADO HOME
   ========================== */

.pagination {
  margin: 3rem auto 1rem;
  display: flex;
  justify-content: center;
}

.pagination__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.pagination__item {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.pagination__item a,
.pagination__item span {
  display: block;
  min-width: 2.25rem;
  padding: 0.4rem 0.75rem;
  text-align: center;
  font-size: 0.9rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  text-decoration: none;
  color: #111827;
}

.pagination__item + .pagination__item a,
.pagination__item + .pagination__item span {
  border-left: none; /* que parezca una sola tira de botones */
}

.pagination__item--current span {
  background: #111827;
  color: #ffffff;
  font-weight: 600;
}

.pagination__item--disabled span {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: default;
}

/* ==========================
   INDICE DENTRO DE UN POST
   ========================== */

/* Caja del índice (TOC) */
.toc-box {
  border: 2px solid #e5e7eb;      /* borde visible */
  background: #fafafa;
  padding: 1.1rem 1.3rem;
  border-radius: 12px;
  font-size: 0.85rem;             /* un poco más pequeño */
  line-height: 1.45;
  
  /* scroll independiente para el índice */
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

/* Título del índice */
.toc-box h2 {
  margin: 0 0 0.75rem 0;
  font-size: 0.95rem;
  font-weight: 400;               /* sin negrita */
}

/* Listas del índice */
.toc-box ul {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}

.toc-box a {
  text-decoration: none;
  color: #0b3d20;
}

.toc-box a:hover {
  text-decoration: underline;
}

/* Subniveles */
.toc-box ul ul {
  margin-top: 0.3rem;
}

/* Zona de texto del artículo con scroll propio */
.post-body {
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding-right: 0.5rem;   /* deja sitio al scroll */
}


/*  Tamaño del texto dentro del artículo o posts */
/* Tamaño del texto del contenido del post */
.post-body {
  font-size: 1rem;   /* baja un poco (por defecto 1rem = 16px) */
  line-height: 1.6;     /* mantiene buena legibilidad */
}

/* Igualar títulos de sidebar (Últimos artículos) y del índice */
.toc-box h2,
.post-sidebar h2 {
  font-size: 1.25rem !important;   /* mismo tamaño que usa el tema en la sidebar */
  font-weight: 600 !important;      /* misma intensidad visual */
  margin-bottom: 0.75rem;
}


/*  Para poner notas en los posts */

.note {
  background: #eef6ff;
  border-left: 4px solid #3b82f6;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  line-height: 1.55;
  display: flex;
  gap: .5rem;
  align-items: flex-start;
}

.note-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

