.gallery-index { --gal-ink: #102348; --gal-muted: #475873; --gal-line: #dfe7f0; --gal-red: #b51e28; padding-bottom: clamp(2rem, 5vw, 4.5rem); }
.gallery-opening { margin-block: .9rem 2rem; border-radius: 14px; overflow: hidden; background: #0d2043; color: #fff; }
.gallery-opening--photo { display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); }
.gallery-opening > div { align-self: center; padding: clamp(1.35rem, 4vw, 3.8rem); }
.gallery-kicker { color: var(--gal-red); font-size: .95rem; font-weight: 700; margin: 0 0 .45rem; }
.gallery-opening .gallery-kicker { color: #ffc484; }
.gallery-opening h1 { color: #fff; font-size: clamp(2.5rem, 5vw, 4.55rem); line-height: 1.2; margin: 0; }
.gallery-opening p:not(.gallery-kicker) { color: #e2ebfa; margin: .7rem 0 1.2rem; line-height: 1.65; font-size: clamp(1rem, 1.5vw, 1.2rem); }
.gallery-opening-links { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1rem; }
.gallery-opening-links a { color: #fff; font-weight: 600; }
.gallery-opening-links .gallery-primary { background: #fff; color: var(--gal-ink); border-radius: 6px; padding: .55rem .8rem; text-decoration: none; }
.gallery-opening-links a:hover { text-decoration: underline; }
.gallery-opening-cover { position: relative; display: block; min-height: 320px; aspect-ratio: 16 / 9; background: #203759; }
.gallery-opening-cover picture, .gallery-opening-cover img { display: block; width: 100%; height: 100%; }
.gallery-opening-cover img { position: absolute; inset: 0; object-fit: cover; }
.gallery-opening-cover > span { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; gap: .75rem; padding: 2.6rem 1rem .85rem; color: #fff; font-weight: 700; background: linear-gradient(transparent, #071631e8); }
.gallery-section { margin-top: clamp(1.6rem, 3vw, 2.8rem); scroll-margin-top: 5.5rem; }
.gallery-section h2 { color: var(--gal-ink); font-size: clamp(1.65rem, 3vw, 2.45rem); }
.gallery-albums, .gallery-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.8rem, 2vw, 1.6rem); }
.gallery-albums > a { display: flex; flex-direction: column; color: var(--gal-ink); text-decoration: none; border-bottom: 1px solid var(--gal-line); }
.gallery-albums > a:hover h3 { color: var(--gal-red); text-decoration: underline; }
.gallery-albums picture, .gallery-albums img { display: block; width: 100%; }
.gallery-albums img { aspect-ratio: 16 / 9; object-fit: cover; border-radius: 9px; }
.gallery-albums > a div { display: flex; flex: 1; justify-content: space-between; align-items: baseline; gap: .55rem; padding: .65rem 0; }
.gallery-albums h3 { font-size: clamp(1.06rem, 1.65vw, 1.38rem); line-height: 1.45; margin: 0; color: var(--gal-ink); }
.gallery-albums span { color: var(--gal-red); font-size: .88rem; font-weight: 600; flex-shrink: 0; }
.gallery-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.gallery-section-head > span { color: var(--gal-muted); white-space: nowrap; }
.gallery-filter { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; padding: .85rem; margin-bottom: 1.15rem; border: 1px solid var(--gal-line); border-radius: 8px; background: #f3f7fc; }
.gallery-filter label { flex: 1 1 12rem; display: grid; gap: .2rem; font-size: .93rem; font-weight: 600; color: var(--gal-ink); min-width: 0; }
.gallery-filter input, .gallery-filter select { min-height: 44px; min-width: 0; background: #fff; color: var(--gal-ink); border: 1px solid #adbdd2; border-radius: 6px; padding: .45rem .6rem; }
.gallery-filter button, .gallery-pagination a { min-height: 44px; display: inline-flex; align-items: center; padding: .45rem .8rem; border: 0; border-radius: 6px; background: var(--gal-ink); color: #fff; font-weight: 600; text-decoration: none; }
.gallery-filter > a { padding: .45rem 0; color: var(--gal-red); }
.gallery-photo { margin: 0; min-width: 0; padding-bottom: .7rem; border-bottom: 1px solid var(--gal-line); scroll-margin-top: 5.5rem; }
.gallery-photo-zoom { display: block; position: relative; border-radius: 9px; overflow: hidden; cursor: zoom-in; background: #e7eef7; }
.gallery-photo-zoom picture, .gallery-photo-zoom img { display: block; width: 100%; }
.gallery-photo-zoom img { aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-photo-zoom > span { position: absolute; right: .55rem; bottom: .55rem; display: grid; place-items: center; width: 2rem; height: 2rem; color: #fff; background: #102348e8; border-radius: 6px; }
.gallery-photo figcaption { display: grid; gap: .2rem; margin-top: .5rem; color: var(--gal-muted); line-height: 1.55; }
.gallery-photo figcaption strong { color: var(--gal-ink); font-size: clamp(1rem, 1.35vw, 1.18rem); }
.gallery-photo figcaption > a { color: var(--gal-red); font-weight: 600; width: fit-content; }
.gallery-photo figcaption small { overflow-wrap: anywhere; }
.gallery-photo figcaption small a { color: inherit; }
.gallery-pagination { display: flex; justify-content: center; align-items: center; gap: .75rem; margin-top: 1.2rem; }
.gallery-album-detail header { padding-bottom: .75rem; margin-bottom: 1rem; border-bottom: 1px solid var(--gal-line); }
.gallery-album-detail header h1 { font-size: clamp(2rem, 4.8vw, 3.7rem); line-height: 1.25; color: var(--gal-ink); }
.gallery-album-detail header p:last-child { margin-bottom: 0; color: var(--gal-muted); }
.gallery-viewer { color: #fff; background: #101c32; border: 0; border-radius: 12px; width: min(96vw, 1200px); max-width: none; max-height: 93dvh; padding: .8rem; overflow: auto; }
.gallery-viewer::backdrop { background: #050a13e0; }
.gallery-viewer [hidden] { display: none; }
.gallery-viewer-bar, .gallery-viewer-links { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.gallery-viewer-bar { padding-left: .3rem; }
.gallery-viewer button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #50617e; background: #223553; color: #fff; border-radius: 6px; font-size: 1.65rem; line-height: 1; }
.gallery-viewer button:hover { background: #374b6c; }
.gallery-viewer-image { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: .45rem; margin: .35rem 0; }
.gallery-viewer-image img { display: block; width: 100%; height: min(65dvh, 850px); object-fit: contain; touch-action: pan-y pinch-zoom; }
#lb-prev { grid-column: 1; grid-row: 1; }
#lb-img { grid-column: 2; grid-row: 1; }
#lb-next { grid-column: 3; grid-row: 1; }
.gallery-viewer-info { text-align: center; }
.gallery-viewer-info p { margin: 0 0 .5rem; font-size: .95rem; }
.gallery-viewer-links { justify-content: center; flex-wrap: wrap; }
.gallery-viewer-links a { color: #ffcf96; }
@media (max-width: 800px) {
  .gallery-opening--photo { grid-template-columns: minmax(0, 1fr); }
  .gallery-opening-cover { min-height: 0; }
  .gallery-albums, .gallery-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-albums > a div { flex-direction: column; gap: .15rem; }
}
@media (max-width: 440px) {
  .gallery-photo-grid { grid-template-columns: minmax(0, 1fr); }
  .gallery-viewer { padding: .45rem; }
  .gallery-viewer-image { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: .3rem; }
  #lb-img { grid-column: 1 / -1; grid-row: 1; height: min(57dvh, 540px); }
  #lb-prev { grid-column: 1; grid-row: 2; justify-self: end; }
  #lb-next { grid-column: 2; grid-row: 2; }
}
