/* ============================================================================
   ÍNDICE · blog.css
   ----------------------------------------------------------------------------
   SECCIÓN                                                                LÍNEA
   ----------------------------------------------------------------------------
   0   Parámetros configurables (variables) ------------------------------ 41
   1   Parrilla de Instagram en blog.html -------------------------------- 109
   2   Diapositivas animadas (transición de los posts) ------------------- 138
   3   Visor de cada post de Instagram ----------------------------------- 262
   4   Cabecera de un post de Instagram ---------------------------------- 279
   5   Artículo: contenedor ---------------------------------------------- 315
   6   Imágenes dentro del artículo -------------------------------------- 332
   7   Imagen flotante con texto alrededor ------------------------------- 393
   8   Imagen de cabecera del artículo ----------------------------------- 418
   8b. Artículo · fondo mármol + venas + cabecera page-hero -------------- 446
   9   Índice, avisos, audio y serie ------------------------------------- 534
   10  Anterior / siguiente y enlace de volver --------------------------- 593
   11  Listado del blog: filas compactas --------------------------------- 608
   12  Tablets (hasta 1024 px) ------------------------------------------- 742
   13  Móviles (hasta 640 px) -------------------------------------------- 815
   14  Lightbox (imagen ampliada) ---------------------------------------- 865
   15  Utilidades y movimiento reducido ---------------------------------- 900
   16  Efecto de cuerda oscilante en imágenes ---------------------------- 925
   ============================================================================ */


/* ==========================================================================
   0. PARÁMETROS CONFIGURABLES
   ========================================================================== */
:root {
  --ig-grid-aspect: 9 / 16;
  --ig-grid-fit: contain;
  --ig-grid-position: 50% 100%;
  --ig-grid-cols-tablet: 4;
  --ig-grid-cols-mobile: 3;
  --ig-grid-gap: 8px;
  --ig-grid-aspect-mobile: 9 / 14;
  --ig-grid-fit-mobile: cover;
  --ig-grid-position-mobile: 50% 50%;

  --ig-post-aspect: 1 / 1;
  --ig-post-fit: contain;
  --ig-post-width: 420px;
  --ig-post-width-tablet: 380px;
  --ig-post-width-mobile: 100%;

  --ig-meta-size: .78rem;
  --ig-meta-gap: .9rem;
  --ig-meta-mt: .4rem;
  --ig-meta-mb: .7rem;

  --article-fig-max: 65vh;
  --article-fig-mobile: 74%;
  --article-fig-mobile-max: 58vh;
  --article-fig-margin: 1.6rem;
  --article-fig-margin-mobile: .9rem;
  --article-caption-gap: .55rem;
  --article-caption-gap-mobile: .2rem;
  --article-caption-size: .82rem;
  --article-caption-size-mobile: .75rem;

  --article-hero-h: 400px;
  --article-hero-h-tablet: 340px;
  --article-hero-h-mobile: 240px;

  --list-thumb: 72px;
  --list-thumb-mobile: 60px;
  --list-row-pad: .7rem;
  --list-title-size: 1.05rem;
  --list-meta-size: .78rem;

  --nav-size: .9rem;
  --nav-color: var(--gold);

  --back-font: var(--serif);
  --back-size: 1.3rem;
  --back-color: var(--gold);
  --back-mb: 0.2rem;
}


/* ==========================================================================
   1. PARRILLA DE INSTAGRAM EN blog.html
   ========================================================================== */
.ig-tile.ig-tile--grid {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: var(--ig-grid-aspect);
  overflow: hidden;
  border-radius: var(--r, 12px);
  background: var(--field, #eee);
}

.ig-tile.ig-tile--grid .ig-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: var(--ig-grid-fit);
  object-position: var(--ig-grid-position);
  opacity: 1;
  animation: none;
}

.ig-tile--grid .ig-title { display: none; }


/* ==========================================================================
   2. DIAPOSITIVAS ANIMADAS (transición de los posts)
   ========================================================================== */
.ig-tile {
  --d: 3s;
}

.ig-tile .ig-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: var(--ig-post-fit);
  opacity: 0;
  animation: var(--kf) calc(var(--n) * var(--d)) linear calc(var(--i) * var(--d)) infinite;
}

.ig-tile:hover .ig-frame { animation-play-state: paused; }

@keyframes ig-kf-1 {
  0.00% { opacity: 0; }
  10.00% { opacity: 1; }
  85.00% { opacity: 1; }
  100.00% { opacity: 0; }
}
@keyframes ig-kf-2 {
  0.00% { opacity: 0; }
  5.00% { opacity: 1; }
  42.50% { opacity: 1; }
  50.00% { opacity: 0; }
  100.00% { opacity: 0; }
}
@keyframes ig-kf-3 {
  0.00% { opacity: 0; }
  3.33% { opacity: 1; }
  28.33% { opacity: 1; }
  33.33% { opacity: 0; }
  100.00% { opacity: 0; }
}
@keyframes ig-kf-4 {
  0.00% { opacity: 0; }
  2.50% { opacity: 1; }
  21.25% { opacity: 1; }
  25.00% { opacity: 0; }
  100.00% { opacity: 0; }
}
@keyframes ig-kf-5 {
  0.00% { opacity: 0; }
  2.00% { opacity: 1; }
  17.00% { opacity: 1; }
  20.00% { opacity: 0; }
  100.00% { opacity: 0; }
}
@keyframes ig-kf-6 {
  0.00% { opacity: 0; }
  1.67% { opacity: 1; }
  14.17% { opacity: 1; }
  16.67% { opacity: 0; }
  100.00% { opacity: 0; }
}
@keyframes ig-kf-7 {
  0.00% { opacity: 0; }
  1.43% { opacity: 1; }
  12.14% { opacity: 1; }
  14.29% { opacity: 0; }
  100.00% { opacity: 0; }
}
@keyframes ig-kf-8 {
  0.00% { opacity: 0; }
  1.25% { opacity: 1; }
  10.62% { opacity: 1; }
  12.50% { opacity: 0; }
  100.00% { opacity: 0; }
}
@keyframes ig-kf-9 {
  0.00% { opacity: 0; }
  1.11% { opacity: 1; }
  9.44% { opacity: 1; }
  11.11% { opacity: 0; }
  100.00% { opacity: 0; }
}
@keyframes ig-kf-10 {
  0.00% { opacity: 0; }
  1.00% { opacity: 1; }
  8.50% { opacity: 1; }
  10.00% { opacity: 0; }
  100.00% { opacity: 0; }
}

.ig-tile.ig-n-1 { --n: 1; --kf: ig-kf-1; }
.ig-tile.ig-n-2 { --n: 2; --kf: ig-kf-2; }
.ig-tile.ig-n-3 { --n: 3; --kf: ig-kf-3; }
.ig-tile.ig-n-4 { --n: 4; --kf: ig-kf-4; }
.ig-tile.ig-n-5 { --n: 5; --kf: ig-kf-5; }
.ig-tile.ig-n-6 { --n: 6; --kf: ig-kf-6; }
.ig-tile.ig-n-7 { --n: 7; --kf: ig-kf-7; }
.ig-tile.ig-n-8 { --n: 8; --kf: ig-kf-8; }
.ig-tile.ig-n-9 { --n: 9; --kf: ig-kf-9; }
.ig-tile.ig-n-10 { --n: 10; --kf: ig-kf-10; }

.ig-frame:nth-child(1)  { --i: 0; }
.ig-frame:nth-child(2)  { --i: 1; }
.ig-frame:nth-child(3)  { --i: 2; }
.ig-frame:nth-child(4)  { --i: 3; }
.ig-frame:nth-child(5)  { --i: 4; }
.ig-frame:nth-child(6)  { --i: 5; }
.ig-frame:nth-child(7)  { --i: 6; }
.ig-frame:nth-child(8)  { --i: 7; }
.ig-frame:nth-child(9)  { --i: 8; }
.ig-frame:nth-child(10) { --i: 9; }


/* ==========================================================================
   3. VISOR DE CADA POST DE INSTAGRAM
   ========================================================================== */
.ig-tile.big {
  float: right;
  display: block;
  position: relative;
  width: min(var(--ig-post-width), 45%);
  aspect-ratio: var(--ig-post-aspect);
  margin: 0.5rem 0 1.5rem 2.5rem;
  overflow: hidden;
  border-radius: var(--r, 12px);
  background: var(--field, #eee);
}


/* ==========================================================================
   4. CABECERA DE UN POST DE INSTAGRAM
   ========================================================================== */
.ig-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--ig-meta-gap);
  margin: var(--ig-meta-mt) 0 0;
  font-size: var(--ig-meta-size);
}

.ig-meta .eyebrow { margin: 0; }
.ig-meta time { color: var(--muted); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ==========================================================================
   5. ARTÍCULO: CONTENEDOR
   ========================================================================== */
.article { display: flow-root; }

.article p,
.article blockquote,
.article ul li {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

.article .tags,
.article .related,
.article .article-audio,
.article .serie-banner,
.article .post-actions { clear: both; }


/* ==========================================================================
   6. IMÁGENES DENTRO DEL ARTÍCULO
   ========================================================================== */
.article-fig {
  max-width: 100%;
  margin: var(--article-fig-margin) 0;      
  padding: 0;
  box-sizing: border-box;
}

.article > .article-fig {
  margin-left: auto;
  margin-right: auto;
}

.article-fig img {
  display: block;
  width: 100%;
  height: auto;
  max-height: var(--article-fig-max);       
  margin: 0;
  border-radius: var(--r, 12px);
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, .28);
}

.article-fig figcaption {
  padding: var(--article-caption-gap) .55rem .3rem;   
  font-size: var(--article-caption-size);             
  font-style: italic;
  line-height: 1.45;
  color: var(--muted, #777);
  text-align: center;
  margin-bottom: 1.5rem;
}

.article-fig--small  { max-width: 280px; }
.article-fig--medium { max-width: 380px; }
.article-fig--large  { max-width: 600px; }
.article-fig--full   { max-width: 100%; }

.article-fig--center {
  float: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.article-fig--square img {
  aspect-ratio: 1;
  object-fit: cover;
}


/* ==========================================================================
   7. IMAGEN FLOTANTE CON TEXTO ALREDEDOR
   ========================================================================== */
.article-fig--right {
  float: right;
  margin: 1.7rem 0 0rem 2.5rem !important; 
}

.article-fig--left {
  float: left;
  margin: 1.7rem 2.5rem 0rem 0 !important; 
}

.article-fig figcaption {
  padding-top: 0.5rem;
  margin-bottom: 0;
}

.article p:last-of-type { clear: both; }


/* ==========================================================================
   8. IMAGEN DE CABECERA DEL ARTÍCULO
   ========================================================================== */
.article-hero {
  position: relative;
  width: 100%;
  height: var(--article-hero-h);
  margin: 1rem 0 1.5rem;
  border-radius: var(--r, 12px);
  overflow: hidden;
  background: var(--field, #eee);
  line-height: 0;
}

.article-hero .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  margin: 0;
  cursor: zoom-in;
  transition: transform 400ms ease;
}

.article-hero:hover .hero-img { transform: scale(1.02); }


/* ==========================================================================
   8b. ARTÍCULO · FONDO MÁRMOL + VENAS + CABECERA PAGE-HERO
   ========================================================================== */
.article-wrap {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.article-wrap .marble {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.article-wrap .marble svg {
  width: 100%;
  height: 100%;
  transform: scaleY(-1);
}

.article-page-hero h1 {
  font-size: var(--fs-article-title);
  margin-bottom: .35em;
}

.article-page-hero .lead { margin-bottom: .6em; }

.article-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .4rem 1rem;
  margin: .2rem 0 0;
}

.article-meta-row .muted {
  margin: 0;
  font-size: .82rem;
  color: var(--muted);
}

.article-meta-row .back-link {
  margin: 0;
  font-size: 0.85rem;
  white-space: nowrap;
}

.article-page-hero .article-hero {
  height: clamp(200px, 38vh, 340px);
  margin: 1rem 0 0;
}

.article-page-hero .wrap > div { padding-bottom: .5rem; }
.article-page-hero + .wrap { padding-top: 0; }


/* ==========================================================================
   9. ÍNDICE, AVISOS, AUDIO Y SERIE
   ========================================================================== */
.toc {
  margin: 0 0 1.4rem;
  padding: .6rem 1.4rem;
  border: 1px solid var(--line, #ddd);
  border-radius: var(--r, 12px);
  background: var(--surface, #fff);
}

.toc summary {
  cursor: pointer;
  font-family: var(--sans, sans-serif);
  font-size: .82rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted, #777);
  list-style: none;
}

.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "▾"; float: right; color: var(--gold, #b8860b); }
.toc[open] summary::after { transform: rotate(180deg); }

.toc ol { margin: .8rem 0 0; padding-left: 1.4rem; }
.toc ol li { margin: .35rem 0; }

.toc ol a {
  color: var(--gold, #b8860b);
  text-decoration: none;
}

.callout {
  margin: 1.4rem 0;
  padding: 1rem 1.3rem;
  border-left: 3px solid var(--gold, #b8860b);
  border-radius: 0 var(--r, 12px) var(--r, 12px) 0;
  background: var(--surface, #fff);
  font-size: .95rem;
  line-height: 1.6;
}

.callout--warning { border-left-color: var(--red, #c0392b); }

.article-audio {
  display: block;
  width: 100%;
  margin: 2rem 0 1rem;
  border-radius: var(--r, 12px);
  background: var(--field, #eee);
}

.serie-banner {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1rem;
  align-items: baseline;
  margin: 0 0 1.6rem;
  padding: .8rem 1.2rem;
  border: 1px solid var(--gold, #b8860b);
  border-radius: var(--r, 12px);
  background: var(--surface, #fff);
  font-size: .9rem;
}

.serie-banner a {
  color: var(--gold, #b8860b);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}


/* ==========================================================================
   10. ANTERIOR / SIGUIENTE Y ENLACE DE VOLVER
   ========================================================================== */
.article-footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
  margin: 0rem 0 2rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.footer-col-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

.footer-col-left .related {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 0.95rem;
}

.footer-col-right {
  margin: 0.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: flex-end;
  justify-content: start;
}

.post-nav { display: flex; gap: 0.8rem; margin: 0; }

.post-nav-btn {
  display: inline-block;
  padding: 0.1em 1em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 500 0.8rem var(--sans);
  text-decoration: none;
  white-space: nowrap;
  transition: all 250ms var(--ease);
}

.post-nav-btn:hover {
  border-color: var(--gold);
  color: var(--gold-ink);
  background: var(--field);
}

.footer-col-right .back-link { margin: 0; font-size: 0.82rem; }


/* ==========================================================================
   11. LISTADO DEL BLOG: FILAS COMPACTAS
   ========================================================================== */
.tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 0rem;
}

#articulos > .wrap { padding-top: 0px; }

.tools > .chips { display: contents; }

.tools > input[type=search] {
  flex: 0 1 220px;
  max-width: 280px;
  margin: 0;
  padding: .4em 1.1em;
  font-size: .82rem;
  height: auto;
  border-radius: var(--box-radius);
}

.posts-load-more {
  display: flex;
  justify-content: center;
  margin: 24px 0 8px;
  font-style: italic;
  color: var(--gold);
}

.posts-load-more:has(#load-more-posts[hidden]) { display: none; }
#load-more-posts { padding: .8em 1.8em; font-size: .85rem; }

#instagram .carousel {
  margin: 4px;
  border: 1px solid var(--gold);
  border-radius: var(--box-radius);
  padding: 15px;
}

.carousel { position: relative; margin-top: 1.6rem; }

.arrow {
  position: absolute;
  top: 42%;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--veil);
  color: var(--ink);
  cursor: pointer;
}
.arrow.prev { left: -14px; }
.arrow.next { right: -14px; }

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* ==========================================================================
   12. TABLETS (hasta 1024 px)
   ========================================================================== */



@media (max-width: 1024px) {
  #posts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    max-height: none;
    overflow: visible;
    padding: 0;
    margin-top: 1.4rem;
    border: 0;
    border-radius: 0;
    background: none;
    
  }

  #posts .post-item.card {
    display: grid;
    grid-template-columns: var(--list-thumb) minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 0;
    align-items: center;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: none;
    box-shadow: none;
    overflow: visible;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
  }

  #posts .post-item.card:first-child { border-top: 0; }

  #posts .post-item.card {
    padding: var(--list-row-pad) 8px;
    margin: 0 -8px;
    transition: transform 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94), background-color 500ms ease, border-radius 500ms ease, border-color 500ms ease;
  }

  @media (hover: hover) and (pointer: fine) {
    #posts .post-item.card:hover {
      background-color: var(--bg);
      border-radius: 12px;
      transform: scale(1.02) translateY(-2px);
      z-index: 10;
      border-top-color: transparent;
      box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.15);
    }
    #posts .post-item.card:hover + .post-item.card {
      border-top-color: transparent;
      transform: scale(0.98) translateY(4px);
    }
    #posts .post-item.card:hover + .post-item.card + .post-item.card {
      transform: scale(0.99) translateY(1px);
    }
  }

  #posts .post-item.card .thumb {
    width: var(--list-thumb);
    height: var(--list-thumb);
    aspect-ratio: auto;
    overflow: hidden;
    border-radius: 14px;
    background: var(--field);
  }

  #posts .post-item.card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  #posts .post-item.card .body {
    display: block;
    flex: none;
    min-width: 0;
    padding: 0;
  }

  #posts .post-item.card .cat,
  #posts .post-item.card .muted { display: none; }

  #posts .post-item.card h3 {
    margin: 0 0 .2rem;
    font-size: var(--list-title-size);
    line-height: 1.25;
  }

  #posts .post-item.card .meta {
    display: block;
    font-size: var(--list-meta-size);
    color: var(--muted);
  }

  #posts .post-item.card:hover h3 { color: var(--ink); }

  :root {
    --ig-post-width: var(--ig-post-width-tablet);
    --article-hero-h: var(--article-hero-h-tablet);
  }

  .carousel .arrow { display: none; }

  .carousel .track {
    display: grid;
    grid-template-columns: repeat(var(--ig-grid-cols-tablet), 1fr);
    gap: var(--ig-grid-gap);
    overflow: visible;
    padding: 0;
    scroll-snap-type: none;
  }

  .carousel .track > a.ig-tile--grid {
    flex: none;
    width: 100%;
    aspect-ratio: var(--ig-grid-aspect-mobile);
  }

  .ig-tile.ig-tile--grid .ig-frame {
    object-fit: var(--ig-grid-fit-mobile);
    object-position: var(--ig-grid-position-mobile);
  }

  .article-fig--large { max-width: 100%; }
  
  .article-page-hero .article-hero {
    height: clamp(180px, 32vh, 280px);
  }
}


/* ==========================================================================
   13. MÓVILES (hasta 640 px)
   ========================================================================== */

@media (max-width: 640px) {
  #instagram .wrap > p:has(.hero-link) {
    text-align: center !important;
  }
}



@media (max-width: 640px) {
  :root {
    --ig-post-width: var(--ig-post-width-mobile);
    --article-hero-h: var(--article-hero-h-mobile);
    --list-thumb: var(--list-thumb-mobile);
    --ig-grid-gap: 6px;
  }

  .tools {
    gap: 6px;
    margin-top: 1.6rem;
    justify-content: center;
    row-gap: 8px;
  }
  .tools > input[type=search] {
    flex: 1 1 100%;
    max-width: none;
  }

  #instagram .carousel { margin-top: 16px; }

  .carousel .track {
    grid-template-columns: repeat(var(--ig-grid-cols-mobile), 1fr);
  }

  .article h1 {
    font-size: clamp(1.7rem, 7vw, 2.4rem);
    line-height: 1.15;
  }

  .article-media-wrap .article-fig--right,
  .article-media-wrap .article-fig--left,
  .article-fig--small,
  .article-fig--medium,
  .article-fig--large,
  .article-fig--full {
    float: none !important;
    width: var(--article-fig-mobile) !important;
    max-width: var(--article-fig-mobile) !important;
    margin: var(--article-fig-margin-mobile) auto !important;
  }

  .article-fig img { max-height: var(--article-fig-mobile-max); }

  .article-fig figcaption {
    padding: var(--article-caption-gap-mobile) .4rem 0;
    font-size: var(--article-caption-size-mobile);
  }

  .serie-banner { flex-direction: column; gap: .4rem; }
  .toc { padding: .9rem 1rem; }
  .callout { padding: .9rem 1rem; }
  .post-nav { margin-left: 0; }
  .ig-tile.big { width: var(--ig-post-width-mobile); }

  .article-footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: left;
  }
  .footer-col-left,
  .footer-col-right {
    align-items: flex-start;
  }

  .article-page-hero h1 {
    font-size: clamp(1.7rem, 7vw, 2.4rem);
    line-height: 1.15;
  }
  .article-page-hero .article-hero {
    height: clamp(160px, 28vh, 240px);
    margin-top: .8rem;
  }
  .article-meta-row { gap: .2rem .8rem; }
  .article-page-hero .wrap > div { padding-bottom: .4rem; }
  .ig-tile.big {
    float: none;
    width: 100%;
    margin: 0 auto 1.5rem;
  }
}
@media (max-width: 640px) {
  #posts {
    margin-top: 1.8rem;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface)
  }

  #posts .post-item.card {
    margin: 0;
  }
  
}

/* ==========================================================================
   14. LIGHTBOX (imagen ampliada)
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 200ms;
  cursor: zoom-out;
}

.lightbox.open { opacity: 1; }

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .3);
  cursor: default;
  transform: scale(.95);
  transition: transform 200ms;
}

.lightbox.open img { transform: scale(1); }

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  background: rgba(0, 0, 0, .4);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}


/* ==========================================================================
   15. UTILIDADES Y MOVIMIENTO REDUCIDO
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .ig-tile .ig-frame {
    animation: none;
    opacity: 0;
  }
  .ig-tile .ig-frame:first-child { opacity: 1; }
  .article-hero .hero-img,
  .lightbox,
  .lightbox img { transition: none; }
}


/* ==========================================================================
   16. EFECTO DE CUERDA OSCILANTE EN IMÁGENES
   ========================================================================== */
.img-rope {
  position: absolute;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
  opacity: 1;
  transition: opacity 300ms var(--ease);
}

.img-rope path {
  fill: none;
  stroke: var(--gold-ink);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.article-fig:hover .img-rope { opacity: 1; }
.article-fig:hover .img-rope path { stroke: var(--red); }

/* Subtítulo de la sección Instagram: imita exactamente al .page-hero h1 */
.blog-subhero {
  position: relative;
  font-size: calc(var(--fs-title) * 0.72); /* Igual que .page-hero h1 en base.css */
  line-height: 1.1;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
  font-family: var(--serif);
  font-weight: 500;
  display: inline-block;
  transition: transform 0.8s ease;
  transform-origin: left center;
}

/* Efecto hover igual al del primer h1 */
@media (hover: hover) and (pointer: fine) {
  .blog-subhero:hover {
    transform: scale(1.10);
  }
}

/* Ajustes responsive idénticos a .page-hero h1 en móvil y tablet */
@media (max-width: 820px) {
  .blog-subhero {
    font-size: 2rem;
  }
}

@media (max-width: 640px) {
  .blog-subhero {
    font-size: 1.8rem;
  }
}
/* Visualizaciones y "me gusta" (artículos e Instagram) */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 36px;   /* 36px = espacio entre el botón y la caja (horizontal). Sube o baja este número */
  margin-top: 14px;
}
.contenido-stats {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 10px 18px;
  border: 1px solid transparent;   /* el borde lo pinta la cuerda (SVG) */
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  font-size: .92rem;
}
.contenido-stats .contenido-trazo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}
.contenido-stats .contenido-trazo path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1;
  stroke-linecap: butt;
  stroke-linejoin: miter;
  vector-effect: non-scaling-stroke;
  transition: stroke 350ms;
}
.contenido-stats .cs-like,
.contenido-stats .cs-views {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.contenido-stats svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}
.contenido-stats .cs-like {
  background: none;
  border: 0;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition: color .2s;
}
.contenido-stats .cs-like:hover { color: var(--red); }
.contenido-stats .cs-like.liked { color: var(--red); }
.contenido-stats .cs-like.liked svg { fill: var(--red); stroke: var(--red); }
.contenido-stats .cs-like:active svg { transform: scale(1.2); transition: transform .15s; }
.contenido-stats .cs-like:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.contenido-stats .cs-invita { color: var(--muted); }


/* ==========================================================================
   TAMAÑO DEL TEXTO DE LOS ARTÍCULOS
   Cambia --article-texto para hacerlo más grande o más pequeño (escritorio),
   y el valor de móvil dentro de la media query de abajo.
   ========================================================================== */
.article { --article-texto: 15px; }
.article p,
.article ul li {
  font-size: var(--article-texto);
  line-height: 1.7;
}
@media (max-width: 640px) {
  .article { --article-texto: 14px; }
}
.blog-ig-cta {
  margin: 2rem 0 0;
}

@media (max-width: 640px) {
  .blog-ig-cta {
    display: flex;
    justify-content: center;
    margin: 0 0 0;
  }
}