/* Photo additions inherit the site's Manrope, navy, red and rounded corners. */
.gallery-intro { max-width: 56ch; margin: 18px 0 0; color: var(--muted); }
.gallery-preview { margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.gallery-preview a { display: block; overflow: hidden; border-radius: var(--r-md); }
.gallery-preview img { width: 100%; height: 100%; aspect-ratio: 4/5; object-fit: cover; }
.gallery-actions { margin-top: 30px; }
.photo-collection { padding-top: 48px; }
.photo-grid { columns: 3; column-gap: 22px; }
.photo-grid figure { break-inside: avoid; margin-bottom: 22px; }
.photo-grid a { display: block; overflow: hidden; border-radius: var(--r-md); background: var(--blue-tint); }
.photo-grid img { width: 100%; height: auto; }
.photo-grid figcaption { padding-top: 8px; color: var(--muted); font-size: .78rem; }
[data-gallery-image]:focus-visible, .social-links a:focus-visible { outline: 3px solid var(--red); outline-offset: 5px; }
.social-links { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 22px; }
.social-links a { font-size: .85rem; font-weight: 700; text-decoration: underline; text-underline-offset: 5px; }
.social-links a:hover { color: var(--red); }
.site-footer .social-links a { color: #c9d6f2; }
.social-feature { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.social-feature h3 { color: var(--blue-900); font-size: 1.2rem; }
.social-feature p { margin: 8px 0 18px; color: var(--muted); }
.photo-viewer-open { overflow: hidden; }
.photo-viewer { margin: auto; width: min(1100px, 96vw); max-width: 96vw; max-height: 96dvh; padding: 18px; border: 0; border-radius: var(--r-md); color: var(--ink); background: white; }
.photo-viewer::backdrop { background: rgba(7, 27, 78, .88); }
.photo-toolbar, .photo-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.photo-toolbar { margin-bottom: 12px; }
.photo-toolbar a { color: var(--blue-900); font-size: .85rem; text-decoration: underline; }
.photo-viewer button { background: var(--blue-tint); color: var(--blue-900); border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px; cursor: pointer; font: 700 .85rem var(--font); }
.photo-viewer button:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.photo-viewer img { width: 100%; height: min(70dvh, 800px); object-fit: contain; }
.photo-controls { margin-top: 14px; }
#photo-caption { font-size: .8rem; text-align: center; }
.gallery-nav { display: flex; }
@media (max-width: 760px) {
  .gallery-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .photo-grid { columns: 2; column-gap: 14px; }
  .photo-grid figure { margin-bottom: 16px; }
  .gallery-nav { gap: 16px; }
  .gallery-nav a { font-size: .8rem; }
}
@media (max-width: 480px) {
  .photo-grid { columns: 1; }
  .photo-viewer { padding: 12px; }
  .photo-controls { flex-wrap: wrap; }
  #photo-caption { order: -1; flex-basis: 100%; }
  .gallery-page .header-inner { gap: 12px; flex-wrap: wrap; }
  .gallery-page .header-inner > .btn { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
