/* Galería del CMS: mismos colores y tipografías de Historias. */
.story-gallery { margin-bottom: 4rem; scroll-snap-align: start; }
.story-gallery-heading h2, .story-archive-title { margin: 0 0 1rem; font: 500 clamp(2rem, 5vw, 3.5rem)/1.1 var(--font-serif); color: #171511; }
.story-gallery-heading p { margin: 0 0 1.5rem; max-width: 50ch; color: #62594e; line-height: 1.6; }
.story-gallery-filters { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.story-gallery-filters button, .story-gallery-more { min-height: 44px; padding: .65rem 1.2rem; border: 1px solid #8c8378; border-radius: 999px; background: transparent; color: #171511; font: 500 1rem var(--font-sans); cursor: pointer; }
.story-gallery-filters button[aria-pressed="true"] { background: #21150e; border-color: #21150e; color: #fffaf1; }
.story-gallery-status { color: #62594e; font: 400 .9rem/1.5 var(--font-sans); margin: 0 0 1.25rem; }
.story-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.story-gallery-card { display: flex; flex-direction: column; text-align: start; padding: 0; overflow: hidden; border: 1px solid #c9c0b3; border-radius: 16px; background: #f7f4ed; color: #171511; font-family: var(--font-sans); cursor: pointer; }
.story-gallery-media { position: relative; display: block; width: 100%; aspect-ratio: 4/3; overflow: hidden; background: #21150e; }
.story-gallery-media img { width: 100%; height: 100%; object-fit: cover; }
.story-gallery-kind { position: absolute; inset-inline-start: .75rem; bottom: .75rem; padding: .35rem .6rem; border-radius: 999px; color: #fffaf1; background: #21150e; font-size: .8rem; }
.story-gallery-card-title { padding: 1rem; font-size: 1rem; line-height: 1.45; font-weight: 600; }
.story-gallery-more { display: block; margin: 1.5rem auto 0; }
.story-gallery-more[hidden] { display: none; }
.story-gallery button:focus-visible { outline: 2px solid #21150e; outline-offset: 4px; }
.story-archive-title { margin-bottom: 1.5rem; }
/* La galería debe poder recorrerse libremente antes de las historias largas. */
html.blog-feed:has(.story-gallery) { scroll-snap-type: y proximity; }
@media (max-width: 900px) {
  .story-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .story-gallery-grid { grid-template-columns: 1fr; gap: 1rem; }
  .story-gallery-card { display: grid; grid-template-columns: minmax(90px, 32%) 1fr; align-items: center; }
  .story-gallery-media { height: 100%; min-height: 132px; aspect-ratio: auto; }
  .story-gallery-kind { inset-inline-start: .4rem; bottom: .4rem; padding: .3rem .4rem; font-size: .75rem; }
  .story-gallery-card-title { padding: .9rem; font-size: .95rem; }
}
