/* AIMS Gallery final 3x3 layout; desktop is 3 across, every album can have unlimited rows. */
main .aims-gallery-dynamic > .wrap {
  width:min(100% - 40px,1130px) !important;
  max-width:1130px !important;
  margin-inline:auto !important;
}
main .aims-gallery-dynamic .aims-gallery-content {
  width:100% !important;
  max-width:1100px !important;
  margin:0 auto !important;
  padding:40px 12px 70px !important;
  box-sizing:border-box !important;
}
main .aims-gallery-dynamic .aims-gallery-grid {
  width:100% !important;
  max-width:none !important;
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:16px !important;
  align-items:stretch !important;
}
main .aims-gallery-dynamic button.aims-gallery-photo {
  display:flex !important;
  flex-direction:column !important;
  width:100% !important;
  min-width:0 !important;
  padding:0 !important;
  height:auto !important;
  overflow:hidden !important;
  border:1px solid #e0e8ef !important;
  border-radius:12px !important;
  background:#fff !important;
  box-shadow:0 5px 18px rgba(22,54,75,.06) !important;
}
main .aims-gallery-dynamic button.aims-gallery-photo > img {
  display:block !important;
  width:100% !important;
  height:195px !important;
  min-height:195px !important;
  max-height:195px !important;
  object-fit:contain !important;
  object-position:center !important;
  background:#f0f3f6 !important;
  margin:0 !important;
  border-radius:0 !important;
  aspect-ratio:auto !important;
}
main .aims-gallery-dynamic button.aims-gallery-photo > span {
  width:100% !important;
  min-height:52px !important;
  max-height:58px !important;
  box-sizing:border-box !important;
  display:-webkit-box !important;
  -webkit-box-orient:vertical !important;
  -webkit-line-clamp:2 !important;
  overflow:hidden !important;
  padding:10px 12px !important;
  margin:0 !important;
  font-size:13px !important;
  font-weight:650 !important;
  line-height:1.4 !important;
  color:#173e52 !important;
  background:white !important;
  text-align:left !important;
  overflow-wrap:anywhere !important;
}
.aims-gallery-lightbox .aims-gallery-lightbox-panel {
  width:min(1040px,100%) !important;
  max-height:94vh !important;
}
.aims-gallery-lightbox .aims-gallery-lightbox-top {
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  flex-wrap:wrap !important;
}
.aims-gallery-lightbox .aims-gallery-viewer-actions {
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
}
.aims-gallery-lightbox .aims-gallery-counter {
  color:#516b80;
  font-size:13px;
  font-variant-numeric:tabular-nums;
  margin-right:5px;
}
.aims-gallery-lightbox .aims-gallery-lightbox-top .aims-gallery-viewer-actions button {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:8px 12px !important;
  font-size:13px !important;
  border:0 !important;
  border-radius:7px !important;
  color:white !important;
  background:#15516f !important;
  cursor:pointer !important;
}
.aims-gallery-lightbox .aims-gallery-lightbox-top .aims-gallery-viewer-actions button:disabled {
  background:#8ca4b2 !important;
  cursor:not-allowed !important;
}
.aims-gallery-lightbox .aims-gallery-lightbox-top .aims-gallery-viewer-actions button:focus-visible {
  outline:3px solid #23b7ed !important;
  outline-offset:2px !important;
}
@media(max-width:860px) {
  main .aims-gallery-dynamic .aims-gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}
@media(max-width:530px) {
  main .aims-gallery-dynamic > .wrap {width:min(100% - 24px,1130px) !important;}
  main .aims-gallery-dynamic .aims-gallery-grid {grid-template-columns:1fr !important;gap:14px !important;}
  main .aims-gallery-dynamic button.aims-gallery-photo > img {height:235px !important;max-height:235px !important;min-height:235px !important;}
  .aims-gallery-lightbox .aims-gallery-lightbox-top {align-items:flex-start !important;}
  .aims-gallery-lightbox .aims-gallery-viewer-actions {width:100%;justify-content:space-between;}
}