/* ============================================================
   BLOG POST — Estilos visuales mejorados
   Se carga en todos los blog-*.html además de styles.css
   ============================================================ */

/* ── Barra de progreso de lectura ─────────────────────────── */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #2a7a45);
  z-index: 9999;
  transition: width .1s linear;
  border-radius: 0 2px 2px 0;
}

/* ── Hero banner mejorado ─────────────────────────────────── */
.post-hero-banner {
  width: 100%;
  aspect-ratio: 21/9;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}
.post-hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 20% 50%, var(--hero-c1, #3aab6d22) 0%, transparent 70%),
    radial-gradient(ellipse 50% 70% at 80% 30%, var(--hero-c2, #2a7a4511) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 60% 80%, var(--hero-c3, #5c8a7a18) 0%, transparent 60%);
  z-index: 0;
}
.post-hero-banner > * {
  position: relative;
  z-index: 1;
}
.post-hero-banner svg {
  filter: drop-shadow(0 4px 24px var(--hero-c1, #3aab6d44));
}

/* ── Meta + título ────────────────────────────────────────── */
.post-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
  font-size: .8rem;
  color: var(--ink-mute);
}
.post-cat {
  padding: .3rem .85rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.post-read-time {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.post-read-time::before {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-mute);
  opacity: .5;
}
.post-title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  color: var(--ink);
  letter-spacing: -.01em;
}
.post-intro {
  font-size: 1.1rem;
  color: var(--ink-2);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

/* ── Cuerpo del artículo ──────────────────────────────────── */
.post-body {
  font-size: 1rem;
  color: var(--ink-2);
  line-height: 1.85;
}

/* Drop cap en el primer párrafo */
.post-body > p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 3.8rem;
  font-weight: 500;
  line-height: .8;
  float: left;
  margin: .08em .12em 0 0;
  color: var(--accent);
}

/* Párrafos */
.post-body p {
  margin-bottom: 1.35rem;
}

/* Headings con acento */
.post-body h2 {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 500;
  color: var(--ink);
  margin: 3rem 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  line-height: 1.3;
}
.post-body h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  margin: 2rem 0 .7rem;
}
.post-body h4 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 1.5rem 0 .5rem;
}

/* Links */
.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-underline-offset: 3px;
  transition: text-decoration-color .2s;
}
.post-body a:hover {
  text-decoration-color: var(--accent);
}

/* Strong / em */
.post-body strong {
  font-weight: 600;
  color: var(--ink);
}
.post-body em {
  font-style: italic;
  color: color-mix(in srgb, var(--ink) 80%, var(--accent));
}

/* Listas */
.post-body ul,
.post-body ol {
  margin: 1rem 0 1.4rem 0;
  padding-left: 0;
  list-style: none;
}
.post-body ul li,
.post-body ol li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: .6rem;
  line-height: 1.7;
}
.post-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.post-body ol {
  counter-reset: post-ol;
}
.post-body ol li {
  counter-increment: post-ol;
}
.post-body ol li::before {
  content: counter(post-ol);
  position: absolute;
  left: 0;
  top: .1em;
  font-family: var(--serif);
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.4;
}

/* Blockquote mejorado */
.post-body blockquote {
  position: relative;
  border-left: none;
  background: var(--bg-2);
  border-radius: 16px;
  padding: 2rem 2rem 1.5rem 3rem;
  margin: 2rem 0;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.7;
  box-shadow: inset 4px 0 0 var(--accent);
}
.post-body blockquote::before {
  content: '\201C';
  position: absolute;
  top: .5rem;
  left: .8rem;
  font-family: var(--serif);
  font-size: 4rem;
  line-height: 1;
  color: var(--accent);
  opacity: .35;
}

/* Imágenes */
.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  margin: 1.5rem 0;
  display: block;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
}

/* Tablas */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .9rem;
}
.post-body th {
  background: var(--bg-2);
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  padding: .75rem 1rem;
  border-bottom: 2px solid var(--accent);
}
.post-body td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
.post-body tr:hover td {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

/* Horizontal rule */
.post-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin: 2.5rem 0;
  opacity: .35;
}

/* ── Callout box (para párrafos destacados) ───────────────── */
.post-callout {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-2));
  border-left: 3px solid var(--accent);
  border-radius: 0 16px 16px 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-size: .95rem;
  color: var(--ink-2);
  line-height: 1.7;
}
.post-callout strong {
  color: var(--accent);
}

/* ── Autor ────────────────────────────────────────────────── */
.post-author {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 3rem 0;
  padding: 1.4rem 1.6rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.post-author-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-2));
  border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
}
.post-author-name {
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink);
}
.post-author-role {
  font-size: .78rem;
  color: var(--ink-mute);
}

/* ── Related posts ────────────────────────────────────────── */
.related-posts {
  border-top: 1px solid var(--line);
  padding-top: 2.5rem;
  margin-top: 1rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.1rem;
  margin-top: 1.25rem;
}
.related-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--ink-2);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: block;
}
.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.07);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.related-card-label {
  font-size: .7rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .5rem;
}
.related-card-title {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.35;
}

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb-bar {
  padding: .9rem 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--ink-mute);
}
.breadcrumb a {
  color: var(--ink-mute);
  text-decoration: none;
  transition: color .2s;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { opacity: .4; }
.breadcrumb-current { color: var(--ink); font-weight: 500; }

/* ── Post section padding ─────────────────────────────────── */
.post-section {
  padding: 3rem 0 5rem;
}
