/* =========================================================
   Leandro Agromarketing — blog (listado, artículos, categorías)
   Se carga DESPUÉS de landing.css y reutiliza sus variables.
   ========================================================= */

/* ---------- banda superior (reusa .hero) ---------- */
.bhero { padding-bottom: clamp(3rem, 2rem + 4vw, 5.5rem); }
.bhero__in { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s4); max-width: var(--max); }
.bhero__in > * { max-width: 52rem; }
.bhero__in .eyebrow { margin-bottom: 0; }
.bhero__title { font-size: var(--t-h2xl); color: var(--crema); letter-spacing: -.035em; line-height: 1.02; overflow-wrap: break-word; }
.bhero__title em { font-style: normal; color: var(--dorado); }
.bhero__lead { font-size: var(--t-lg); color: var(--sobre-osc); max-width: 40rem; }
.bhero__title--post { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.75rem); line-height: 1.06; }
.bhero--post { padding-bottom: clamp(5rem, 3rem + 6vw, 8rem); }
.bpost:not(.has-cover) .bhero--post { padding-bottom: clamp(3rem, 2rem + 4vw, 5rem); }

/* chips de temas */
.bchips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); max-width: 60rem; }
.bchip {
  display: inline-flex; align-items: center; min-height: 44px; padding: .5em 1.15em; border-radius: var(--r-pill);
  border: 1px solid rgba(249, 250, 250, .28); color: var(--sobre-osc); font-size: var(--t-sm); font-weight: 500; text-decoration: none;
  transition: background-color .25s, color .25s, border-color .25s, transform .35s var(--e-out);
}
.bchip:hover { border-color: var(--dorado); color: var(--dorado); }
.bchip.is-active { background: var(--dorado); border-color: var(--dorado); color: var(--tinta); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .bchip:hover { transform: translateY(-2px); } }

/* migas */
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; font-size: var(--t-xs); font-weight: 500; letter-spacing: .04em; }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--sobre-osc-2); }
.crumbs a { display: inline-flex; align-items: center; min-height: 32px; color: var(--sobre-osc); text-decoration: none; }
.crumbs a:hover { color: var(--dorado); }

/* etiqueta de categoría */
.btag {
  display: inline-block; align-self: flex-start; padding: .32em .9em; border-radius: var(--r-pill);
  background: var(--dorado); color: var(--tinta); font-size: var(--t-xs); font-weight: 600; letter-spacing: .02em; line-height: 1.3; text-decoration: none;
}
a.btag--link { transition: background-color .25s, transform .35s var(--e-out); }
a.btag--link:hover { background: var(--dorado-2); }

/* fecha y lectura */
.bmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .55em; font-size: var(--t-xs); font-weight: 500; letter-spacing: .02em; color: var(--texto-2); }
.bmeta--hero { color: var(--sobre-osc-2); font-size: var(--t-sm); }

/* ---------- listado ---------- */
.blist { background: var(--crema); padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) var(--sec); }
.bgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
.bfeat + .bgrid { margin-top: var(--s5); }
@media (min-width: 640px) { .bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); } }
@media (min-width: 1024px) { .bgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* tarjeta */
.bcard {
  position: relative; display: flex; flex-direction: column; min-width: 0; background: #fff;
  border: 1px solid var(--linea); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1);
  transition: transform .5s var(--e-out), box-shadow .5s var(--e-out), border-color .3s;
}
.bcard__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--campo); }
.bcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--e-out); }
.bcard__media .btag { position: absolute; left: var(--s4); top: var(--s4); z-index: 2; }
.bcard__body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; gap: var(--s3); padding: var(--s5); }
.bcard__title { font-size: var(--t-h3); line-height: 1.2; letter-spacing: -.02em; overflow-wrap: break-word; }
.bcard__title a, .bfeat__title a { text-decoration: none; color: inherit; }
.bcard__title a::after, .bfeat__title a::after { content: ""; position: absolute; inset: 0; z-index: 3; } /* toda la tarjeta es clicable */
.bcard__ex { font-size: var(--t-sm); color: var(--texto-2); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blink { display: inline-flex; align-items: center; gap: .5em; margin-top: auto; padding-top: var(--s2); font-size: var(--t-sm); font-weight: 600; color: var(--verde); }
.blink .ico { transition: transform .35s var(--e-out); }
.bcard:focus-within, .bfeat:focus-within { outline: 3px solid var(--dorado); outline-offset: 3px; }
.bcard a:focus-visible, .bfeat a:focus-visible { outline: none; }
@media (hover: hover) and (pointer: fine) {
  .bcard:hover { transform: translateY(-6px); box-shadow: var(--sh-2); border-color: rgba(234, 172, 28, .65); }
  .bcard:hover .bcard__media img, .bfeat:hover .bfeat__media img { transform: scale(1.06); }
  .bcard:hover .blink .ico, .bfeat:hover .blink .ico { transform: translateX(5px); }
}

/* fondo cuando el artículo no tiene imagen */
.is-ph {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 250' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%239cc25f' stroke-opacity='.4' stroke-width='1.4'%3E%3Cpath d='M-10 150 C 90 110, 190 170, 410 100'/%3E%3Cpath d='M-10 175 C 90 135, 190 195, 410 125'/%3E%3Cpath d='M-10 200 C 90 160, 190 220, 410 150'/%3E%3C/g%3E%3Cpath d='M-10 225 C 90 185, 190 245, 410 175' fill='none' stroke='%23eaac1c' stroke-opacity='.6' stroke-width='1.4'/%3E%3C/svg%3E") center / cover no-repeat,
    radial-gradient(60% 70% at 85% 10%, rgba(234, 172, 28, .22), transparent 70%),
    linear-gradient(135deg, var(--campo-2), var(--campo-3));
}

/* destacado (primer artículo) */
.bfeat {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden;
  border-radius: var(--r-xl); background: var(--campo); color: var(--crema); box-shadow: var(--sh-2);
}
.bfeat__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--campo-3); }
.bfeat__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--e-out); }
.bfeat__media .btag { position: absolute; left: var(--s4); top: var(--s4); z-index: 2; }
.bfeat__body { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: var(--s4); padding: clamp(1.5rem, 1rem + 2.5vw, 3.25rem); }
.bfeat .bmeta { color: var(--sobre-osc-2); }
.bfeat__title { font-size: clamp(1.625rem, 1.1rem + 1.9vw, 2.75rem); line-height: 1.08; letter-spacing: -.03em; color: var(--crema); overflow-wrap: break-word; }
.bfeat__ex { color: var(--sobre-osc); font-size: var(--t-md); display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.bfeat .blink { color: var(--dorado); }
@media (min-width: 900px) {
  .bfeat { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .bfeat__media { aspect-ratio: auto; min-height: 420px; }
}

/* estado vacío */
.bempty { display: flex; flex-direction: column; align-items: center; gap: var(--s4); padding: var(--s9) var(--s4); text-align: center; }
.bempty h2 { font-size: var(--t-h2s); }
.bempty p { color: var(--texto-2); }

/* paginación */
.bpag { margin-top: var(--s8); }
.bpag ul { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); }
.bpag a, .bpag span {
  display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding-inline: 1em; border-radius: var(--r-pill);
  border: 1px solid var(--linea); background: #fff; color: var(--tinta); font-size: var(--t-sm); font-weight: 600; text-decoration: none;
  transition: border-color .25s, background-color .25s, color .25s;
}
.bpag a:hover { border-color: var(--dorado); }
.bpag .current { background: var(--campo); border-color: var(--campo); color: var(--crema); }
.bpag .dots { border-color: transparent; background: transparent; }

/* ---------- llamada a la acción ---------- */
.bcta { padding-block: clamp(3.5rem, 2.5rem + 4vw, 6rem); overflow: hidden; }
.bcta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(45% 80% at 90% 0%, rgba(234, 172, 28, .16), transparent 70%), radial-gradient(40% 70% at 0% 100%, rgba(156, 194, 95, .12), transparent 70%); }
.bcta__in { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s6); }
.bcta__in p:not(.eyebrow) { margin-top: var(--s3); color: var(--sobre-osc); max-width: 34rem; }
.bcta__in .eyebrow { margin-bottom: var(--s3); }
@media (min-width: 900px) { .bcta__in { flex-direction: row; align-items: center; justify-content: space-between; } }

/* ---------- artículo ---------- */
.bpost__cover { position: relative; z-index: 2; margin-top: calc(-1 * clamp(2.5rem, 1.5rem + 5vw, 5rem)); }
.wrap--md { max-width: 980px; }
.wrap--read { max-width: 760px; }
.bpost__cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-xl); box-shadow: var(--sh-2); background: var(--campo); }

.prose { padding-block: clamp(2rem, 1.5rem + 2.5vw, 3.5rem) var(--s6); font-size: 1.125rem; line-height: 1.78; color: var(--texto); overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.3em; }
.prose h2, .prose h3, .prose h4 { color: var(--tinta); scroll-margin-top: calc(var(--hdr-h) + 16px); }
.prose h2 { margin-top: 2.1em; font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.125rem); line-height: 1.15; }
.prose h3 { margin-top: 1.8em; font-size: clamp(1.25rem, 1.1rem + .7vw, 1.5rem); line-height: 1.2; }
.prose h4 { margin-top: 1.6em; font-size: 1.125rem; }
.prose a { color: var(--verde); font-weight: 500; text-decoration: underline; text-decoration-color: var(--dorado); text-decoration-thickness: 2px; text-underline-offset: .2em; }
.prose a:hover { color: var(--campo); background: rgba(234, 172, 28, .22); }
.prose strong { color: var(--tinta); }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .5em; }
.prose ul li::marker { color: var(--dorado); }
.prose ol li::marker { color: var(--verde); font-weight: 600; }
.prose blockquote { margin-inline: 0; padding: .4em 0 .4em 1.4em; border-left: 4px solid var(--dorado); color: var(--tinta); font-size: 1.25em; font-weight: 500; line-height: 1.5; }
.prose blockquote p + p { margin-top: .8em; }
.prose img, .prose video, .prose iframe, .prose svg { max-width: 100%; height: auto; border-radius: var(--r-md); }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.prose figure { margin: 2em 0; }
.prose figcaption { margin-top: .7em; font-size: var(--t-sm); color: var(--texto-2); text-align: center; }
.prose hr { border: 0; height: 1px; background: var(--linea); margin-block: 2.5em; }
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: var(--t-sm); }
.prose th, .prose td { padding: .65em .9em; border: 1px solid var(--linea); text-align: left; }
.prose th { background: var(--arena); color: var(--tinta); }
.prose pre { overflow-x: auto; padding: 1em 1.2em; border-radius: var(--r-sm); background: var(--campo); color: var(--crema); font-size: .9rem; line-height: 1.6; }
.prose :not(pre) > code { padding: .1em .4em; border-radius: 6px; background: var(--arena); font-size: .9em; }
.prose .alignwide, .prose .alignfull, .prose .wp-caption { width: auto !important; max-width: 100%; }
.prose > p > img.aligncenter, .prose img.aligncenter { display: block; margin-inline: auto; }
.prose ol[start] > li > strong:only-child, .prose ol[start] > li > b:only-child { color: var(--tinta); font-size: 1.0625em; line-height: 1.45; }
.prose .aligncenter { margin-inline: auto; text-align: center; }
.prose .alignleft, .prose .alignright { float: none; margin: 1.5em auto; }
@media (min-width: 640px) {
  .prose .alignleft { float: left; margin: .4em 1.5em 1em 0; max-width: 50%; }
  .prose .alignright { float: right; margin: .4em 0 1em 1.5em; max-width: 50%; }
}
.prose::after { content: ""; display: block; clear: both; }
.prose .wp-block-button__link, .prose .wp-element-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .8em 1.5em; border: 0; border-radius: var(--r-pill);
  background: var(--dorado); color: var(--tinta); font-weight: 600; font-size: var(--t-sm); text-decoration: none; transition: background-color .25s, box-shadow .35s var(--e-out);
}
.prose .wp-block-button__link:hover, .prose .wp-element-button:hover { background: var(--dorado-2); box-shadow: var(--sh-gold); color: var(--tinta); }

.btags { display: flex; flex-wrap: wrap; gap: var(--s2); padding-block: var(--s4); }
.btags a { display: inline-flex; align-items: center; min-height: 44px; padding: .4em 1em; border-radius: var(--r-pill); background: var(--arena); color: var(--texto-2); font-size: var(--t-sm); font-weight: 500; text-decoration: none; transition: background-color .25s, color .25s; }
.btags a:hover { background: var(--dorado); color: var(--tinta); }

.bsign { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); margin-block: var(--s5) var(--sec); padding-top: var(--s5); border-top: 1px solid var(--linea); }
.bsign img { width: 150px; }
.bsign p { font-size: var(--t-sm); color: var(--texto-2); }

/* relacionados */
.brel { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); background: var(--arena); }
.brel .h2 { margin-bottom: var(--s6); }

/* botón «volver arriba» del tema (sin sus estilos se vería como texto suelto) */
#ast-scroll-top, .ast-scroll-top-icon, .ast-scroll-to-top-right, .ast-scroll-to-top-left, #scroll-to-top, .scroll-to-top { display: none !important; }

/* ---------- accesibilidad y movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  .bcard, .bcard__media img, .bfeat__media img, .bchip { transition: none; }
}
