/* =========================================================
   INSIGHTS · CAPA EDITORIAL
   Se carga después de blog.css en blog.html y articulo.html.
   Jerarquía de revista, historia principal y tema claro.
========================================================= */

/* ---------- Hero: portada real en lugar de formas ---------- */

.blog-hero__visual {
  background:
    linear-gradient(180deg, rgba(3, 5, 3, 0.05) 30%, rgba(3, 5, 3, 0.92) 100%),
    url("../img/blog/tendencias.webp") center / cover no-repeat,
    var(--blog-card);
}

.blog-hero__visual::before,
.blog-hero__visual::after {
  display: none;
}

.blog-hero__number {
  display: none;
}

.blog-hero__visual-content strong,
.blog-hero__visual-content p {
  color: #fff;
}

.blog-hero__visual-content strong {
  font-family: "Poetsen One", "Trebuchet MS", sans-serif;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.blog-hero__visual-content p {
  opacity: 0.82;
}

/* ---------- Kicker de categoría: texto, no píldora ---------- */

.blog-card__category,
.blog-featured-card__category {
  padding: 0 0 0 26px;
  position: relative;
  border-radius: 0;
  background: none;
  letter-spacing: 0.14em;
}

.blog-card__category::before,
.blog-featured-card__category::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 18px;
  height: 2px;
  background: currentColor;
}

/* ---------- Tarjetas del índice: menos caja ---------- */

.blog-grid {
  gap: 56px 34px;
}

.blog-card {
  border: 0;
  border-radius: 0;
  background: none;
  overflow: visible;
}

.blog-card:hover {
  transform: none;
  box-shadow: none;
}

.blog-card__image {
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: var(--blog-radius-sm);
}

.blog-card__image::after {
  background: linear-gradient(to top, rgba(3, 5, 3, 0.25), transparent 45%);
}

.blog-card:hover .blog-card__image img {
  transform: scale(1.04);
}

.blog-card__content {
  padding: 22px 0 0;
}

.blog-card__content h3 {
  margin-top: 14px;
  font-size: 1.45rem;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.blog-card__content h3 a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.35s ease, color var(--blog-transition);
}

.blog-card:hover .blog-card__content h3 a,
.blog-card__content h3 a:focus-visible {
  background-size: 100% 2px;
}

.blog-card__content .blog-card__meta {
  order: -1;
  margin: 10px 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.blog-card__content .blog-card__category {
  order: -2;
}

.blog-card__excerpt {
  font-size: 0.95rem;
}

.blog-card__footer {
  padding-top: 18px;
  border-top: 1px solid var(--blog-border-white);
  margin-top: 20px;
}

/* Historia principal: primera tarjeta del índice */
@media (min-width: 1051px) {
  #blogGrid > .blog-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }

  #blogGrid > .blog-card:first-child .blog-card__image {
    aspect-ratio: 16 / 9.6;
    border-radius: var(--blog-radius-md);
  }

  #blogGrid > .blog-card:first-child .blog-card__content h3 {
    font-size: clamp(2.2rem, 3.2vw, 3rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
  }

  #blogGrid > .blog-card:first-child .blog-card__excerpt {
    max-width: 62ch;
    font-size: 1.05rem;
  }
}

/* ---------- Destacado ---------- */

.blog-featured-card__content h3 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

/* ---------- Artículo ---------- */

.article-content {
  font-size: 1.1rem;
}

.article-content > p:first-child::first-letter {
  float: left;
  margin: 0.08em 0.12em 0 0;
  color: var(--blog-green);
  font-family: "Poetsen One", "Trebuchet MS", sans-serif;
  font-size: 4.2em;
  line-height: 0.8;
}

.article-related-grid .blog-card__image {
  aspect-ratio: 16 / 10;
}

/* =========================================================
   TEMA CLARO
========================================================= */

html[data-theme="light"] body.blog-page {
  --blog-green: #007a00;
  --blog-black: #f6f7f5;
  --blog-black-soft: #eef0ec;
  --blog-card: #ffffff;
  --blog-card-light: #eef0ec;
  --blog-white: #0b0d0b;
  --blog-text: #1a1f1a;
  --blog-muted: #4a524a;
  --blog-border: rgba(0, 122, 0, 0.22);
  --blog-border-white: rgba(0, 0, 0, 0.1);
  --blog-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  background: radial-gradient(circle at 15% 10%, rgba(0, 204, 0, 0.07), transparent 26%), var(--blog-black);
  color: var(--blog-white);
}

html[data-theme="light"] body.blog-page :is(
  .blog-search-box,
  .blog-search-form,
  .blog-newsletter-section,
  .blog-newsletter-form,
  .article-comment-form textarea,
  .article-comment-form input,
  .article-author-card__image
) {
  background: var(--blog-card);
}

html[data-theme="light"] body.blog-page .blog-newsletter-section {
  background: var(--blog-black-soft);
}

html[data-theme="light"] body.blog-page :is(
  .blog-category-button,
  .blog-tag-button,
  .article-tag
) {
  background: var(--blog-card);
  color: #2b312b;
}

html[data-theme="light"] body.blog-page :is(
  .blog-card__meta,
  .blog-featured-card__meta,
  .blog-card__author,
  .article-breadcrumb,
  .article-meta,
  .article-author-card strong,
  .article-comment-form label
) {
  color: #4a524a;
}

html[data-theme="light"] body.blog-page :is(.blog-card__link, .blog-featured-card__link, .article-view-all) {
  color: #007a00;
}

html[data-theme="light"] body.blog-page .article-content {
  color: #2b312b;
}

html[data-theme="light"] body.blog-page :is(input, textarea)::placeholder {
  color: #6b736b;
}

html[data-theme="light"] body.blog-page .blog-category-button.is-active,
html[data-theme="light"] body.blog-page .blog-button--primary,
html[data-theme="light"] body.blog-page .blog-newsletter-form button {
  color: #fff;
  background: #007a00;
}

html[data-theme="light"] body.blog-page .blog-button--primary:hover,
html[data-theme="light"] body.blog-page .blog-newsletter-form button:hover,
html[data-theme="light"] body.blog-page .blog-slider-controls button:hover {
  color: #fff;
  background: #0b0d0b;
}

html[data-theme="light"] body.blog-page .blog-button--secondary {
  border-color: rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.03);
}

html[data-theme="light"] body.blog-page .blog-slider-indicators button {
  background: #c9cfc9;
}

html[data-theme="light"] body.blog-page .blog-slider-indicators button.is-active {
  background: #007a00;
}

html[data-theme="light"] body.blog-page .blog-featured-card__image::after {
  background: linear-gradient(90deg, transparent 60%, rgba(255, 255, 255, 0.35));
}

html[data-theme="light"] body.blog-page :is(.blog-cta, .article-cta) {
  background:
    radial-gradient(circle at 92% 0, rgba(0, 204, 0, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(0, 204, 0, 0.1), #ffffff 52%);
}

html[data-theme="light"] body.blog-page .article-content blockquote {
  background: linear-gradient(135deg, rgba(0, 204, 0, 0.08), #ffffff);
}

html[data-theme="light"] body.blog-page .blog-hero__visual {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}
