/* Front Publicaciones — tipografía editorial */
.pub-page {
  --pub-ink: #1c1917;
  --pub-muted: #57534e;
  --pub-line: #e7e5e4;
  --pub-accent: #9a3412;
  color: var(--pub-ink);
}

.pub-page .pub-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.pub-page .pub-hero {
  position: relative;
  width: 100%;
  min-height: 42vh;
  max-height: 560px;
  overflow: hidden;
  background: #292524;
  margin-bottom: 2.5rem;
}
.pub-page .pub-hero img {
  width: 100%;
  height: 100%;
  min-height: 42vh;
  max-height: 560px;
  object-fit: cover;
  display: block;
  animation: pub-fade-in 0.9s ease both;
}

.pub-page .pub-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pub-muted);
  margin: 0 0 0.75rem;
}

.pub-page .pub-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  animation: pub-rise 0.7s ease both;
}

.pub-page .pub-lead {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--pub-muted);
  margin: 0 0 1.5rem;
}

.pub-page .pub-meta {
  font-size: 0.9rem;
  color: var(--pub-muted);
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--pub-line);
}

.pub-page .pub-body {
  font-size: 1.08rem;
  line-height: 1.75;
}
.pub-page .pub-body h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.65rem;
  font-weight: 600;
  margin: 2.25rem 0 0.85rem;
}
.pub-page .pub-body h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin: 1.75rem 0 0.65rem;
}
.pub-page .pub-body p { margin: 0 0 1.1rem; }
.pub-page .pub-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
}
.pub-page .pub-body a.pub-cta,
.pub-page .pub-body a[href*="detalleproducto"],
.pub-page .pub-body a[href*="/libro/"] {
  display: inline-block;
  margin: 0.35rem 0 1.25rem;
  padding: 0.55rem 1rem;
  background: var(--pub-accent);
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}
.pub-page .pub-body a.pub-cta:hover,
.pub-page .pub-body a[href*="detalleproducto"]:hover,
.pub-page .pub-body a[href*="/libro/"]:hover {
  background: #7c2d12;
  transform: translateY(-1px);
}

.pub-index-head {
  max-width: 960px;
  margin: 0 auto 2rem;
  padding: 1.5rem 1.25rem 0;
}
.pub-index-head h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.pub-index-head p {
  color: var(--pub-muted);
  margin: 0;
  max-width: 36rem;
}

.pub-grid {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem 1.5rem;
}

.pub-card-link {
  display: block;
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.25s ease;
}
.pub-card-link:hover { transform: translateY(-3px); }
.pub-card-link .thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #e7e5e4;
  margin-bottom: 0.85rem;
}
.pub-card-link .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}
.pub-card-link:hover .thumb img { transform: scale(1.04); }
.pub-card-link h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  line-height: 1.25;
  color: var(--pub-ink);
}
.pub-card-link .excerpt {
  color: var(--pub-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 0.5rem;
}
.pub-card-link .date {
  font-size: 0.8rem;
  color: #a8a29e;
  letter-spacing: 0.04em;
}

.pub-empty {
  max-width: 760px;
  margin: 2rem auto;
  padding: 0 1.25rem;
  color: var(--pub-muted);
}

@keyframes pub-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pub-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .pub-page .pub-hero,
  .pub-page .pub-hero img {
    min-height: 28vh;
    max-height: 320px;
  }
}
