/* ── blog.css — layout del blog (usa components.css) ── */


/* ── LISTADO ── */
.blog-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 120px;
}
.blog-header {
  border-bottom: 1px solid rgba(193,122,92,0.18);
  padding-bottom: 36px;
  margin-bottom: 72px;
}
.blog-tag {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tc);
  margin-bottom: 12px;
  display: block;
}
.blog-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.blog-header .blog-intro {
  font-size: 1.05rem;
  color: var(--gs);
  margin-top: 14px;
  max-width: 480px;
  line-height: 1.75;
}

/* Grid de posts — primera entrada destacada */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px 40px;
}

/* Primera tarjeta ocupa todo el ancho */
.posts-grid .post-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  align-items: center;
}
.posts-grid .post-card:first-child .post-thumb,
.posts-grid .post-card:first-child .post-thumb-placeholder {
  margin-bottom: 0;
  height: 100%;
  min-height: 260px;
}
.posts-grid .post-card:first-child .post-card-body {
  padding: 8px 0;
}
.posts-grid .post-card:first-child .post-title {
  font-size: 1.7rem;
  line-height: 1.25;
}
.posts-grid .post-card:first-child .post-excerpt {
  font-size: 1.02rem;
}

/* Wrapper de texto en tarjetas normales */
.post-card-body { display: flex; flex-direction: column; }

.post-card { text-decoration: none; color: inherit; display: block; overflow: hidden; position: relative; isolation: isolate; }
.post-card:hover .post-title { color: var(--tc); }
.post-card:hover .post-thumb { opacity: 0.92; }
.post-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  margin-bottom: 20px;
  border-radius: 2px;
  transition: opacity 0.3s;
}
.post-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: rgba(193,122,92,0.07);
  margin-bottom: 20px;
  border-radius: 2px;
}
.post-meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gs);
  margin-bottom: 10px;
}
.post-meta .cat { color: var(--tc); }
.post-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 10px;
  transition: color 0.2s;
  color: var(--ng);
}
.post-excerpt {
  font-size: 0.97rem;
  color: var(--gs);
  line-height: 1.75;
  margin-bottom: 16px;
}
.post-read-more {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tc);
  border-bottom: 1px solid rgba(193,122,92,0.35);
  padding-bottom: 2px;
  display: inline-block;
  transition: color 0.2s, border-color 0.2s;
  margin-top: auto;
}
.post-card:hover .post-read-more {
  color: var(--ng);
  border-color: var(--ng);
}

.pagination {
  margin-top: 80px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.pagination a, .pagination span {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  padding: 8px 16px;
  border: 1px solid rgba(193,122,92,0.25);
  text-decoration: none;
  color: var(--gs);
  transition: all 0.2s;
}
.pagination a:hover, .pagination .current {
  background: var(--tc);
  color: var(--bl);
  border-color: var(--tc);
}


/* ── POST INDIVIDUAL ── */
.post-wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 32px 24px 120px;
}

/* Hero image con ratio más cinematográfico */
.post-hero-thumb {
  width: 100%;
  aspect-ratio: 21/9;
  object-fit: cover;
  display: block;
  margin-bottom: 56px;
  border-radius: 2px;
}

.post-header {
  border-bottom: 1px solid rgba(193,122,92,0.18);
  padding-bottom: 36px;
  margin-bottom: 52px;
}
.post-header .post-meta { margin-bottom: 18px; }
.post-header h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--ng);
}
.post-header .post-intro {
  font-size: 1.18rem;
  color: var(--gs);
  font-style: italic;
  line-height: 1.75;
}

/* ── TOC — fix scroll bajo header sticky ── */
/* Fallback CSS: el JS sobreescribe este valor con la altura real del nav
   (incluyendo la barra de admin de WP si está activa).
   100px cubre nav(60) + admin-bar(32) + margen(8). */
.post-content h2,
.post-content h3,
.post-content h4 {
  scroll-margin-top: 100px;
}
/* Sin barra de admin (visitantes): puede reducirse */
body:not(.admin-bar) .post-content h2,
body:not(.admin-bar) .post-content h3,
body:not(.admin-bar) .post-content h4 {
  scroll-margin-top: 80px;
}

/* Contenido del post — tipografía y ritmo */
.post-content { font-size: 1.08rem; color: var(--gs); line-height: 1.9; }
.post-content h2 {
  font-size: 1.55rem;
  font-weight: 600;
  margin: 60px 0 20px;
  color: var(--ng);
  letter-spacing: -0.01em;
}
.post-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 40px 0 14px;
  color: var(--ng);
}
.post-content p { margin-bottom: 24px; }
.post-content a { color: var(--tc); text-decoration: underline; text-underline-offset: 3px; }
.post-content ul, .post-content ol { margin: 0 0 24px 28px; }
.post-content li { margin-bottom: 10px; }
.post-content strong { color: var(--ng); font-weight: 600; }
.post-content img {
  width: 100%;
  height: auto;
  display: block;
  margin: 36px 0;
  border-radius: 2px;
}
.post-content .wp-caption-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: var(--gs);
  text-align: center;
  margin-top: -24px;
  margin-bottom: 36px;
}

/* Separador visual entre secciones */
.post-content hr {
  border: none;
  border-top: 1px solid rgba(193,122,92,0.18);
  margin: 52px 0;
}

/* WordPress blockquote */
.post-content blockquote {
  position: relative;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-style: italic;
  color: var(--ng);
  line-height: 1.55;
  padding: 32px 40px;
  margin: 44px 0;
  border-left: 3px solid var(--tc);
  background: var(--bl);
}
.post-content blockquote::before {
  content: '\201C';
  font-family: 'EB Garamond', serif;
  font-size: 5rem;
  color: rgba(193,122,92,0.15);
  position: absolute;
  top: -10px;
  left: 12px;
  line-height: 1;
}
.post-content blockquote p:last-child { margin-bottom: 0; }

/* Firma del autor al final del post */
.post-author {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid rgba(193,122,92,0.18);
}
.post-author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(193,122,92,0.1);
}
.post-author-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tc);
  display: block;
  margin-bottom: 3px;
}
.post-author-bio {
  font-size: 0.92rem;
  color: var(--gs);
  line-height: 1.6;
}

/* Nav entre posts */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 75px;
  padding-top: 32px;
  /*border-top: 1px solid rgba(193,122,92,0.18);*/
}
.post-nav a {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gs);
  text-decoration: none;
  transition: color 0.2s;
  max-width: 45%;
  line-height: 1.5;
}
.post-nav a:hover { color: var(--tc); }
.post-nav .next { text-align: right; }
.post-nav .nav-label {
  font-size: 0.62rem;
  color: rgba(138,133,120,0.5);
  display: block;
  margin-bottom: 4px;
  letter-spacing: 0.12em;
}

/* Breadcrumb */
.post-breadcrumb {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  color: var(--gs);
  margin-bottom: 28px;
  letter-spacing: 0.01em;
}
.post-breadcrumb a {
  color: var(--gs);
  text-decoration: none;
  transition: color 0.2s;
}
.post-breadcrumb a:hover { color: var(--tc); }
.post-breadcrumb span { margin: 0 6px; opacity: 0.4; }


/* ── RESPONSIVE ── */
@media(max-width: 900px) {
  .posts-grid .post-card:first-child {
    grid-column: auto;
    display: block;
  }
  .posts-grid .post-card:first-child .post-thumb,
  .posts-grid .post-card:first-child .post-thumb-placeholder {
    margin-bottom: 20px;
    min-height: unset;
    height: auto;
    aspect-ratio: 16/9;
  }
  .posts-grid .post-card:first-child .post-title { font-size: 1.35rem; }
}

@media(max-width: 768px) {
  .posts-grid { grid-template-columns: 1fr; gap: 56px; }
  .posts-grid .post-card { contain: layout; }
  .blog-wrap, .post-wrap { padding: 32px 20px 80px; }
  .post-hero-thumb { aspect-ratio: 16/9; margin-bottom: 40px; }
  .post-header h1 { font-size: clamp(1.7rem, 6vw, 2.4rem); }
  .post-content h2 { scroll-margin-top: 80px; font-size: 1.35rem; }
  .post-content h3 { scroll-margin-top: 80px; }
}
