/* ============================================================
   acuaponia.com — Plantilla de Blog
   Fiel al Figma de Gina (QKODTxNhsZ33nBmUgU42GU, página "Plantilla Blogs",
   frame "Desktop" 220:115, 1440×4683). Reusa tokens de /styles.css.
   Móvil: no hay frame en el Figma — adaptación responsiva propia
   (índice → acordeón, tabla → scroll horizontal, imágenes apiladas).
   ============================================================ */

.blog-shell {
  width: 100%;
  max-width: calc(1272px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Breadcrumbs ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 20px 24px;
  font-size: 13px;
  font-weight: 500;
  color: var(--steel);
}
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { color: var(--navy); }

/* ---------- Hero del artículo (tarjeta bruma) ---------- */
.art-hero {
  background: var(--mist);
  border-radius: 38px;
  padding: 37px clamp(20px, 3vw, 43px) 43px;
}
.art-hero__pill {
  display: inline-block;
  background: var(--lime);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--r-pill);
  padding: 6px 14px;
}
.art-hero h1 {
  margin-top: 16px;
  font-size: clamp(30px, 3.75vw, 54px);
  font-weight: 900;
  line-height: 1.15;
  color: var(--navy);
}
.art-hero__sub {
  margin-top: 12px;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.3;
  color: var(--ink);
  max-width: 62ch;
}
.art-hero__author { margin-top: 24px; }
.art-hero__author strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}
.art-hero__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink);
}
.art-hero__meta i {
  width: 4px; height: 4px;
  border-radius: 2px;
  background: var(--steel);
}
.art-hero__img {
  margin-top: 36px;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--white);
}
.art-hero__img img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- Zona superior: texto + índice lateral ---------- */
.art-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: start;
  padding-top: 54px;
}
.art-cols > .art-main { min-width: 0; }

/* Índice (TOC) */
.toc {
  position: sticky;
  top: 96px;
  background: var(--white);
  border: 1px solid #E2EAF0;
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.toc h2 { font-size: 18px; font-weight: 700; color: var(--navy); }
.toc ol { margin-top: 22px; display: grid; gap: 16px; list-style: none; margin-inline: 0; padding: 0; }
.toc a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.45;
}
.toc a::before {
  content: "";
  flex: 0 0 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.2s var(--ease);
}
.toc a:hover, .toc a.is-active { font-weight: 700; color: var(--navy); }
.toc a.is-active::before { background: var(--lime); }
.toc__rule { height: 1px; background: #E2EAF0; margin: 24px 0; }
.toc__share p { font-size: 13px; font-weight: 700; color: var(--steel); text-transform: capitalize; }
.toc__icons { display: flex; gap: 12px; margin-top: 12px; }
.toc__icons a, .toc__icons button {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--lime-wash);
  color: var(--navy);
  transition: background 0.2s var(--ease);
}
.toc__icons a:hover, .toc__icons button:hover { background: var(--lime-soft); }
.toc__icons svg { width: 16px; height: 16px; fill: currentColor; }

/* El TOC móvil (acordeón) sólo existe en pantallas chicas */
.toc-mobile { display: none; }

/* ---------- Cuerpo del artículo ---------- */
.art-main p, .art-wide > p {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
}
.art-main > * + *, .art-wide > * + * { margin-top: 28px; }
.art-main h2, .art-wide h2 {
  margin-top: 44px;
  font-size: clamp(26px, 2.5vw, 36px);
  font-weight: 800;
  line-height: 1.3;
  color: var(--steel);
  scroll-margin-top: 110px;
}
.art-main a:not([class]), .art-wide a:not([class]) {
  color: var(--steel);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.art-main ul, .art-wide ul {
  list-style: disc;
  padding-left: 22px;
  display: grid;
  gap: 10px;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink);
}
.art-wide { padding-top: 8px; }

/* Resaltado */
.highlight {
  background: var(--lime-wash);
  border: 1px solid var(--lime);
  border-radius: var(--r-lg);
  padding: 24px;
}
.highlight strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #7ea62c;
}
.highlight p { margin-top: 8px; font-size: 16px; line-height: 1.35; color: var(--navy); }

/* Cita */
.art-quote {
  border-top: 2px solid var(--lime);
  margin-top: 40px;
  padding-top: 22px;
}
.art-quote blockquote {
  margin: 0;
  border-left: 4px solid var(--lime);
  padding-left: 24px;
  font-size: clamp(19px, 1.7vw, 24px);
  font-weight: 700;
  font-style: italic;
  line-height: 1.4;
  color: var(--navy);
}

/* Par de imágenes */
.art-imgs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
}
.art-imgs figure { min-width: 0; }
.art-imgs img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-lg);
}
.art-imgs figcaption {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

/* Tabla comparativa */
.art-table {
  margin-top: 20px;
  border: 1px solid #E2ECE9;
  border-radius: var(--r-md);
  overflow-x: auto;
}
.art-table table { width: 100%; border-collapse: collapse; min-width: 640px; }
.art-table th, .art-table td {
  padding: 16px;
  text-align: left;
  font-size: 14px;
  line-height: 1.45;
  vertical-align: top;
}
.art-table thead th { background: var(--navy); color: var(--white); font-weight: 700; }
.art-table tbody tr:nth-child(even) { background: var(--mist); }
.art-table tbody th { font-weight: 700; color: var(--navy); }
.art-table tbody td { color: var(--ink); }

/* Video */
.art-video { margin-top: 48px; }
.art-video__frame {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--navy);
  aspect-ratio: 16 / 9;
}
.art-video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.art-video figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 700;
  color: var(--steel);
}

/* FAQ */
.faq { margin-top: 56px; }
.faq > h2 { color: var(--navy); }
.faq details {
  margin-top: 16px;
  background: var(--lime-wash);
  border-radius: 15px;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 25px;
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 700;
  color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: 0 0 22px;
  width: 22px; height: 22px;
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 5h2v14h-2z"/><path d="M5 11h14v2H5z"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 5h2v14h-2z"/><path d="M5 11h14v2H5z"/></svg>') center / contain no-repeat;
  transition: transform 0.2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); -webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 11h14v2H5z"/></svg>'); mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 11h14v2H5z"/></svg>'); transform: none; }
.faq details p {
  padding: 0 25px 25px;
  font-size: clamp(15px, 1.3vw, 18.5px);
  line-height: 1.5;
  color: var(--ink);
}

/* CTA de reparto (newsletter / ecosistema) */
.art-cta {
  margin-top: 56px;
  background: var(--navy);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 40px);
  color: var(--white);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.art-cta h2 { margin: 0; font-size: clamp(20px, 2vw, 26px); font-weight: 700; color: var(--white); }
.art-cta p { margin-top: 6px; font-size: 15.5px; line-height: 1.45; color: var(--mist); max-width: 52ch; }
.art-cta__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.art-cta__btns a {
  display: inline-block;
  border-radius: 10px;
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 700;
}
.art-cta__btns a:first-child { background: var(--lime); color: var(--navy); }
.art-cta__btns a:last-child { border: 1.6px solid var(--lime); color: var(--lime); }

/* Conoce más artículos */
.more { margin-top: 64px; padding-bottom: 24px; }
.more > h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  padding-bottom: 12px;
  border-bottom: 3px solid var(--lime);
}
.more__card {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 387px minmax(0, 1fr);
  background: var(--white);
  border: 1.4px solid #EAEAEA;
  border-radius: 28px;
  overflow: hidden;
  transition: box-shadow 0.2s var(--ease);
}
.more__card:hover { box-shadow: var(--shadow-soft); }
.more__card img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; }
.more__body { padding: 33px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.more__row { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.more__pill {
  background: var(--lime-wash);
  color: var(--navy);
  border-radius: var(--r-pill);
  padding: 5px 14px;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
}
.more__read { font-size: 16px; color: var(--steel); }
.more__body h3 { font-size: 24px; font-weight: 700; color: var(--steel); line-height: 1.4; }
.more__body p { font-size: 18.5px; line-height: 1.4; color: var(--ink); }
.more__link { margin-top: auto; padding-top: 10px; font-size: 19px; font-weight: 700; color: var(--lime); }
.more__link:hover { text-decoration: underline; }

/* Índice del blog (listado) */
.blog-index__head { padding: 44px 0 8px; }
.blog-index__head h1 { font-size: clamp(32px, 3.4vw, 48px); font-weight: 900; color: var(--navy); }
.blog-index__head p { margin-top: 10px; font-size: 18px; color: var(--ink); max-width: 68ch; line-height: 1.5; }
.blog-index .more__card { margin-top: 26px; }

/* ---------- Móvil / tablet ---------- */
@media (max-width: 960px) {
  .art-cols { grid-template-columns: 1fr; gap: 0; padding-top: 34px; }
  .toc { display: none; }

  .toc-mobile {
    display: block;
    margin-bottom: 28px;
    background: var(--white);
    border: 1px solid #E2EAF0;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
  }
  .toc-mobile summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
  }
  .toc-mobile summary::-webkit-details-marker { display: none; }
  .toc-mobile summary::after {
    content: "";
    width: 12px; height: 12px;
    border-right: 2.5px solid var(--steel);
    border-bottom: 2.5px solid var(--steel);
    transform: rotate(45deg) translateY(-3px);
    transition: transform 0.2s var(--ease);
  }
  .toc-mobile[open] summary::after { transform: rotate(225deg) translateY(-2px); }
  .toc-mobile ol { margin: 0; padding: 0 22px 18px; display: grid; gap: 12px; list-style: none; }
  .toc-mobile a { font-size: 14.5px; font-weight: 500; color: var(--ink); }
  .toc-mobile__share { display: flex; gap: 12px; padding: 0 22px 18px; }
  .toc-mobile__share a, .toc-mobile__share button {
    display: grid; place-items: center;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--lime-wash);
    color: var(--navy);
  }
  .toc-mobile__share svg { width: 16px; height: 16px; fill: currentColor; }

  .art-hero { border-radius: 26px; padding: 24px 18px 26px; }
  .art-hero__img { margin-top: 22px; border-radius: var(--r-lg); }
  .crumbs { padding-inline: 4px; }

  .more__card { grid-template-columns: 1fr; }
  .more__card img { aspect-ratio: 16 / 9; min-height: 0; }
  .more__body { padding: 22px; }
  .more__body h3 { font-size: 20px; }
  .more__body p { font-size: 16px; }
  .more__pill, .more__read, .more__link { font-size: 14.5px; }
}

@media (max-width: 620px) {
  .art-imgs { grid-template-columns: 1fr; }
  .art-hero h1 { font-size: 27px; }
  .art-table th, .art-table td { padding: 12px; font-size: 13.5px; }
  .art-cta { flex-direction: column; align-items: flex-start; }
}
