/* ───────────────────────────────────────────────────────────
   Blog VisualNACert — propuesta 2026
   Estructura inspirada en sierra.ai/es/blog · branding VisualNACert
   Portadas: mallas de color del mundo agro (agua, cultivo, tierra, cosecha)
   ─────────────────────────────────────────────────────────── */

/* Cabecera */
.bl-head { padding-top: 170px; padding-bottom: 44px; }
.bl-head__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 6.4vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 16px 0 0;
}
.bl-head__title em { font-style: normal; color: var(--orange); }
.bl-head__lead {
  max-width: 620px; margin-top: 22px;
  font-size: 17.5px; line-height: 1.6; color: var(--mute);
}

/* ── Barra de filtros en píldora ── */
.bl-bar {
  display: flex; align-items: center; gap: 6px;
  background: var(--cream);
  border-radius: 999px;
  padding: 8px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.bl-chip {
  border: 0; background: transparent;
  font-family: var(--font-sans);
  font-size: 14.5px; font-weight: 500;
  color: var(--mute);
  padding: 11px 22px; border-radius: 999px;
  cursor: none; transition: all .25s ease;
  white-space: nowrap;
}
.bl-chip:hover { color: var(--ink); }
.bl-chip.is-active {
  background: var(--orange-soft);
  color: var(--orange-deep);
  font-weight: 600;
}
.bl-bar__search {
  margin-left: auto;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; cursor: none;
  border-radius: 50%; color: var(--mute);
  transition: all .2s ease;
}
.bl-bar__search:hover { background: var(--paper); color: var(--ink); }

/* ── Rejilla de artículos ── */
.bl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
  padding-bottom: 8px;
}
.bl-card { display: block; text-decoration: none; color: inherit; }
/* El display:block de arriba gana al [hidden] del navegador, así que el
   filtro de categorías no ocultaba nada. Hace falta esta regla. */
.bl-grid .bl-card[hidden] { display: none; }

/* Portada: imagen SVG generada (manchas deformadas + grano de película) */
.bl-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  isolation: isolate;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.bl-card:hover .bl-cover { transform: translateY(-4px); }

.bl-cover__txt {
  position: relative; z-index: 2;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 26px rgba(0, 0, 0, .38);
  max-width: 13ch;
}

/* ── Variantes: cada una su portada generada ── */
.bl-cover--1 { background-color: #0E4257; background-image: url("img/covers/agua.svg"); }
.bl-cover--2 { background-color: #4E6B1E; background-image: url("img/covers/cultivo.svg"); }
.bl-cover--3 { background-color: #B85B0C; background-image: url("img/covers/marca.svg"); }
.bl-cover--4 { background-color: #26305C; background-image: url("img/covers/dato.svg"); }
.bl-cover--5 { background-color: #8A6014; background-image: url("img/covers/cosecha.svg"); }
.bl-cover--6 { background-color: #5C4030; background-image: url("img/covers/tierra.svg"); }
.bl-cover--7 { background-color: #8F4A06; background-image: url("img/covers/citrico.svg"); }
.bl-cover--8 { background-color: #1F4B4A; background-image: url("img/covers/red.svg"); }
.bl-cover--9 { background-color: #3F4A21; background-image: url("img/covers/olivo.svg"); }
.bl-cover--10 { background-color: #6B4A5B; background-image: url("img/covers/almendro.svg"); }
.bl-cover--11 { background-color: #7A5326; background-image: url("img/covers/secano.svg"); }
.bl-cover--12 { background-color: #2C3A6B; background-image: url("img/covers/senal.svg"); }
.bl-cover--13 { background-color: #4A3A2A; background-image: url("img/covers/raiz.svg"); }

/* Cuerpo de la tarjeta */
.bl-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.32;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 20px 0 10px;
}
.bl-card:hover .bl-card__title { color: var(--orange-deep); }
.bl-card__lead {
  font-size: 15px; line-height: 1.6;
  color: var(--mute); margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.bl-card__date { font-size: 13.5px; color: var(--mute-light); }

/* ── Paginación ── */
.bl-pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 56px 0 96px; flex-wrap: wrap;
}
.bl-pager__count { font-size: 14px; color: var(--mute); }
.bl-pager__nums { display: flex; gap: 8px; align-items: center; }
.bl-pager__num {
  min-width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--line-strong);
  background: transparent; font-size: 14px; font-weight: 500;
  color: var(--ink); cursor: none; font-family: var(--font-sans);
  transition: all .2s ease;
}
.bl-pager__num:hover:not([disabled]) { border-color: var(--ink); }
.bl-pager__num.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.bl-pager__num[disabled] { opacity: .3; }

/* ── Suscripción ── */
.bl-sub {
  background: var(--cream);
  border-radius: 24px;
  padding: 52px;
  margin-bottom: 40px;
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: 40px; align-items: center;
}
.bl-sub h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(23px, 2.6vw, 30px); line-height: 1.2;
  letter-spacing: -0.02em; margin: 0 0 12px; color: var(--ink);
}
.bl-sub p { color: var(--mute); font-size: 15.5px; line-height: 1.6; margin: 0; }
.bl-sub__form { display: flex; gap: 10px; flex-wrap: wrap; }
.bl-sub__form input {
  flex: 1 1 220px; padding: 15px 20px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--paper);
  font-family: var(--font-sans); font-size: 15px; color: var(--ink);
}
.bl-sub__form input:focus { outline: none; border-color: var(--orange); }
.bl-sub__fine { font-size: 13px; color: var(--mute); margin-top: 12px; }

/* ── Artículo ── */
.art-hero { padding-top: 165px; }
.art-hero__crumb { font-size: 13px; color: var(--mute); margin-bottom: 24px; display: block; }
.art-hero__crumb a { color: var(--mute); text-decoration: none; }
.art-hero__crumb a:hover { color: var(--orange-deep); }
.art-hero__cat {
  display: inline-block; font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--orange-deep); margin-bottom: 16px;
}
.art-hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(32px, 4.6vw, 58px); line-height: 1.06;
  letter-spacing: -0.03em; color: var(--ink); margin: 0; max-width: 20ch;
}
.art-hero__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 13px;
  margin-top: 26px; font-size: 14px; color: var(--mute);
}
.art-hero__sep { width: 4px; height: 4px; border-radius: 50%; background: var(--mute-light); }
/* portada del artículo: mismo lenguaje de degradado */
.art-hero__cover {
  margin-top: 44px;
  border-radius: 22px;
  aspect-ratio: 21 / 8;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; isolation: isolate;
  background-size: cover; background-position: center;
}
.art-hero__cover span {
  position: relative; z-index: 2;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(24px, 3.4vw, 44px); line-height: 1.12;
  letter-spacing: -0.02em; color: #fff; text-align: center;
  text-shadow: 0 1px 26px rgba(90, 40, 0, .26); max-width: 18ch; padding: 0 24px;
}

.art-layout {
  display: grid; grid-template-columns: 210px 1fr;
  gap: 68px; padding-top: 64px; padding-bottom: 40px; align-items: start;
}
.art-toc { position: sticky; top: 118px; }
.art-toc__label {
  font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--mute); display: block; margin-bottom: 14px;
}
.art-toc a {
  display: block; font-size: 14px; line-height: 1.45; color: var(--mute);
  text-decoration: none; padding: 7px 0 7px 14px;
  border-left: 2px solid var(--line); transition: all .2s ease;
}
.art-toc a:hover, .art-toc a.is-active { color: var(--ink); border-left-color: var(--orange); }

.art-prose { max-width: 72ch; }
.art-prose > p { font-size: 17.5px; line-height: 1.75; color: var(--ink-soft); margin: 0 0 24px; }
.art-prose > p:first-child { font-size: 20px; line-height: 1.65; color: var(--ink); }
.art-prose h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(23px, 2.5vw, 31px); line-height: 1.2;
  letter-spacing: -0.02em; color: var(--ink);
  margin: 50px 0 18px; scroll-margin-top: 118px;
}
.art-prose strong { color: var(--ink); font-weight: 600; }
.art-prose a { color: var(--orange-deep); }

.art-figure { margin: 38px 0; }
.art-figure img { width: 100%; border-radius: 16px; border: 1px solid var(--line); display: block; }
.art-figure figcaption { margin-top: 12px; font-size: 13.5px; color: var(--mute); line-height: 1.5; }
.art-figure--pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.art-callout {
  background: var(--cream); border-left: 3px solid var(--orange);
  border-radius: 0 14px 14px 0; padding: 24px 28px; margin: 34px 0;
}
.art-callout p { margin: 0; font-size: 16.5px; line-height: 1.65; color: var(--ink-soft); }

.art-cta {
  background: var(--ink); border-radius: 24px;
  padding: 54px; margin: 60px 0 88px; color: var(--paper);
}
.art-cta h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(23px, 2.9vw, 33px); line-height: 1.2;
  letter-spacing: -0.02em; margin: 0 0 14px; color: var(--paper); max-width: 22ch;
}
.art-cta p { color: rgba(255,255,255,.72); font-size: 16.5px; line-height: 1.6; margin: 0 0 26px; max-width: 55ch; }

.art-related { border-top: 1px solid var(--line); padding-top: 60px; padding-bottom: 96px; }
.art-related__label {
  font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--mute); margin-bottom: 26px; display: block;
}
.art-related__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }

/* ── Responsive ── */
@media (max-width: 1080px) {
  .bl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .art-layout { grid-template-columns: 1fr; gap: 0; }
  .art-toc { display: none; }
  .bl-sub { grid-template-columns: 1fr; padding: 38px; }
}
@media (max-width: 720px) {
  .bl-head { padding-top: 132px; padding-bottom: 32px; }
  .bl-grid { grid-template-columns: 1fr; gap: 32px; }
  .bl-bar { border-radius: 20px; }
  .bl-bar__search { display: none; }
  .art-cta { padding: 34px 26px; border-radius: 20px; }
  .art-figure--pair { grid-template-columns: 1fr; }
  .art-related__grid { grid-template-columns: 1fr; }
  .bl-pager { justify-content: center; }
  .art-hero__cover { aspect-ratio: 16 / 10; }
}

/* ───────────────────────────────────────────────────────────
   Sala de prensa — portadas fotográficas con velo y título
   ─────────────────────────────────────────────────────────── */
.pr-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 26px;
  isolation: isolate;
  background: var(--ink);
}
.pr-cover img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-position: center 32%;   /* al recortar, prioriza la parte alta */
  object-fit: cover;
  z-index: 0;
  transition: transform .8s cubic-bezier(.22,1,.36,1);
}
.bl-card:hover .pr-cover img { transform: scale(1.05); }
/* velo oscuro degradado, para que el título siempre se lea */
.pr-cover::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(12,10,7,.05) 0%, rgba(12,10,7,.42) 52%, rgba(12,10,7,.84) 100%);
}
.pr-cover__txt {
  position: relative; z-index: 2;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.24;
  letter-spacing: -0.015em;
  color: #fff;
  text-shadow: 0 1px 18px rgba(0,0,0,.35);
}
.pr-cover__tag {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  background: rgba(255,255,255,.94);
  color: var(--ink);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 7px 13px; border-radius: 999px;
}
/* portada del artículo de prensa */
.pr-hero__cover {
  /* Sin proporción fija: la caja se adapta a la foto, así una vertical no
     queda encajada dentro de una panorámica con franjas a los lados. */
  margin: 44px auto 0;
  border-radius: 22px;
  position: relative; overflow: hidden;
  width: fit-content; max-width: 100%;
  background: var(--ink);
  line-height: 0;
}
.pr-hero__cover img {
  display: block;
  width: auto; height: auto;
  max-width: 100%; max-height: 560px;
  z-index: 0;
}
.pr-hero__cover::before { content: none; }
@media (max-width: 720px) {
  .pr-hero__cover img { max-height: 380px; }
}

/* En táctil no hay cursor propio, así que devolvemos el nativo.
   Mismo criterio que styles.css: el sitio oculta el cursor del sistema en
   escritorio y dibuja el suyo; poner `pointer` aquí lo hacía reaparecer
   sobre estos elementos y parpadear al entrar y salir. */
@media (hover: none), (pointer: coarse) {
  .bl-chip,
  .bl-bar__search,
  .bl-pager__num { cursor: pointer; }
  .bl-pager__num[disabled] { cursor: not-allowed; }
}
