/* ============================================================
   Trunimal Novedades — blog list + article styles.
   Shares brand tokens and card primitives with shop.css.
   ============================================================ */

.news-main {
  padding-bottom: 0;
}

/* ============================================================
   Card grid (list page + "Otras novedades")
   ============================================================ */
.news-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

@media (min-width: 768px)  { .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; } }

.news-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--shop-line, rgba(73, 42, 125, 0.12));
  box-shadow: var(--shop-card-shadow, 0 2px 8px rgba(73, 42, 125, 0.08));
  transition: transform .25s ease, box-shadow .25s ease;
}

.news-card:hover,
.news-card:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--shop-card-shadow-hover, 0 8px 28px rgba(73, 42, 125, 0.18));
}

.news-card-media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  background: #f8f5fb;
}

.news-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  flex: 1;
}

.news-card-date {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--shop-red, #DC2626);
}

.news-card-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--shop-ink, #492A7D);
}

.news-card-title a { text-decoration: none; color: inherit; }
.news-card-title a:hover { text-decoration: underline; }

.news-card-excerpt {
  color: var(--shop-ink-soft, rgba(73, 42, 125, 0.7));
  font-size: 0.95rem;
  line-height: 1.55;
}

.news-card-cta {
  margin-top: auto;
  padding-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--shop-ink, #492A7D);
  text-decoration: none;
}

.news-card-cta:hover { color: var(--shop-red, #DC2626); }

/* First card on page 1 spans the full row on large screens. */
@media (min-width: 1024px) {
  .news-card.is-featured {
    grid-column: 1 / -1;
    flex-direction: row;
  }
  .news-card.is-featured .news-card-media {
    flex: 0 0 55%;
    aspect-ratio: auto;
    min-height: 360px;
  }
  /* The featured column is as tall as the text beside it, so cover-fit
     would zoom and crop; letterbox on the card background instead. */
  .news-card.is-featured .news-card-media img {
    object-fit: contain;
  }
  .news-card.is-featured .news-card-body {
    justify-content: center;
    padding: 2.5rem;
  }
  .news-card.is-featured .news-card-title { font-size: 1.9rem; }
  .news-card.is-featured .news-card-excerpt { font-size: 1.05rem; }
}

/* ============================================================
   Article
   ============================================================ */
.news-cover {
  margin: -3.5rem 0 2rem;
  position: relative;
  z-index: 2;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shop-card-shadow-hover, 0 8px 28px rgba(73, 42, 125, 0.18));
  background: #f8f5fb;
}

.news-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.news-lead {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--shop-ink, #492A7D);
  font-weight: 500;
  margin: 1.5rem 0;
}

.post-body {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #2b2140;
  overflow-wrap: anywhere;
}

.post-body p { margin: 1rem 0; }

.post-body h2,
.post-body h3,
.post-body h4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--shop-ink, #492A7D);
  line-height: 1.25;
  margin: 2rem 0 0.75rem;
}

.post-body h2 { font-size: 1.75rem; }
.post-body h3 { font-size: 1.35rem; }
.post-body h4 { font-size: 1.15rem; }

.post-body ul,
.post-body ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li { margin: 0.35rem 0; }

.post-body a {
  color: var(--shop-purple, #492A7D);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-body a:hover { color: var(--shop-red, #DC2626); }

.post-body strong { font-weight: 700; }

.post-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--shop-lilac, #C4A8D8);
  background: #f8f5fb;
  border-radius: 0 0.75rem 0.75rem 0;
  font-style: italic;
  color: var(--shop-ink, #492A7D);
}

.post-body hr {
  border: 0;
  border-top: 1px solid var(--shop-line, rgba(73, 42, 125, 0.12));
  margin: 2rem 0;
}

.post-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
  border-radius: 0.75rem;
}

.post-body figure { margin: 1.5rem 0; }
.post-body figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--shop-ink-muted, rgba(73, 42, 125, 0.55));
  margin-top: 0.5rem;
}

.post-body pre,
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: #f3effa;
  border-radius: 0.35rem;
}

.post-body code { padding: 0.1em 0.35em; }
.post-body pre { padding: 1rem; overflow-x: auto; }

/* Share row */
.news-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--shop-line, rgba(73, 42, 125, 0.12));
  color: var(--shop-ink-soft, rgba(73, 42, 125, 0.7));
  font-weight: 600;
}

.news-share a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: #f3effa;
  color: var(--shop-ink, #492A7D);
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}

.news-share a:hover {
  background: var(--shop-purple, #492A7D);
  color: #fff;
}

/* Products band under the article */
.news-products {
  background: linear-gradient(180deg, #f8f5fb 0%, #ffffff 100%);
  border-top: 1px solid var(--shop-line, rgba(73, 42, 125, 0.12));
}
