/* Fotogalerie nové reference; ostatní stránky zůstávají beze změny. */
.ref { scroll-margin-top: 100px; }
.ref figure a { display: block; height: 100%; }
.ref .gallery-link { margin: 24px 0 0; }
.reference-gallery { margin: 32px 0 64px; scroll-margin-top: 100px; }
.reference-gallery .gallery { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.reference-gallery .gallery a { display: block; border: 1px solid var(--line); background: var(--zinc-2); }
.reference-gallery .gallery a:hover { border-color: var(--red-strong); }
.reference-gallery .gallery img { transition: opacity .15s; }
.reference-gallery .gallery a:hover img { opacity: .85; }
@media (max-width: 560px) {
  .ref dl { grid-template-columns: 1fr; gap: 2px; }
  .ref dd { margin-bottom: 10px; }
}

/* Přehled obsahuje pouze karty; galerie je samostatný detail. */
.ref + .ref { margin-top: 40px; }
.reference-title { color: inherit; text-decoration: none; }
.reference-title:hover { color: var(--red-strong); }
.reference-detail .page-head .wrap { padding-bottom: 40px; }
.reference-detail .page-head h1 { max-width: 30ch; }
