/* OSystems · Blog
   ---------------------------------------------------------------------
   Hoja aparte, a proposito: styles.css es de la portada y no se toca.
   Todo lo de aqui reusa los mismos tokens (--accent, --border, --radius)
   asi que el blog hereda la marca sin repetir ningun valor. */

.article-section {
  padding-top: 120px;
}

.article,
.blog-index {
  max-width: 780px;
}

.article-title {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin-bottom: 12px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

/* «En corto»: lo que se lleva quien no va a leer todo -------------- */

.article-resumen {
  margin-bottom: 24px;
  padding: 28px 32px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg-alt);
}

.article-resumen-titulo {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.article-resumen ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.article-resumen li {
  position: relative;
  padding-left: 20px;
  font-size: 0.97rem;
  color: var(--text);
}

.article-resumen li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.article-resumen strong {
  font-weight: 700;
}

/* Cuerpo del articulo ------------------------------------------------ */

.article-body {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.article-body h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 44px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.article-body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.article-body h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 28px 0 8px;
}

.article-body p,
.article-body li {
  color: var(--text-dim);
  font-size: 1rem;
}

.article-body p {
  margin-bottom: 16px;
}

.article-body strong {
  color: var(--text);
  font-weight: 600;
}

.article-body a {
  color: var(--accent);
  font-weight: 500;
}

.article-body a:hover {
  text-decoration: underline;
}

.article-body ul,
.article-body ol {
  margin: 0 0 20px;
  padding-left: 0;
  list-style: none;
  counter-reset: paso;
}

.article-body li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
}

.article-body ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.article-body ol li::before {
  counter-increment: paso;
  content: counter(paso);
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}

.article-body code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--text);
}

/* La cita se usa para las notas al margen: el dato que el lector se
   lleva aunque no lea el resto. */
.article-body blockquote {
  margin: 24px 0;
  padding: 18px 22px;
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Ojo: sin separar estas dos reglas, el «margin: 0» del parrafo interno
   pisaba el margen inferior de la cita y el texto siguiente se le pegaba. */
.article-body blockquote {
  color: var(--text);
  font-size: 0.98rem;
}

.article-body blockquote p {
  margin: 0;
}

.article-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

/* Llamado al final --------------------------------------------------- */

.article-cta {
  margin-top: 36px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
}

.article-cta-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.article-cta p {
  color: var(--text-dim);
  font-size: 0.97rem;
  margin-bottom: 20px;
}

.article-cta .btn {
  display: inline-flex;
}

/* Indice ------------------------------------------------------------- */

.blog-intro {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 60ch;
  margin-bottom: 40px;
}

.post-list {
  display: grid;
  gap: 16px;
}

.post-card {
  display: block;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.post-card-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.post-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-bottom: 8px;
}

.post-card-desc {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.post-card-meta {
  display: flex;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .article-body,
  .article-cta,
  .post-card {
    padding: 26px 20px;
  }
  .article-resumen {
    padding: 24px 20px;
  }
  .article-section {
    padding-top: 100px;
  }
}
