.blum-post-gallery {
  margin: 2rem 0;
}

/* Individual WordPress image blocks stay inline with the article, but use the
   same visual language as the gallery cards. */
.single-post .entry-content > .wp-block-image > img,
.single-post .entry-content > .wp-block-image > a > img {
  border-radius: 6px;
}

.blum-post-gallery__grid {
  column-count: var(--blum-post-gallery-columns, 3);
  column-gap: 14px;
}

.blum-post-gallery__item {
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin: 0 0 14px;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}

.blum-post-gallery button.blum-post-gallery__open {
  display: block;
  width: 100%;
  padding: 0 !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
  cursor: zoom-in;
}

.blum-post-gallery button.blum-post-gallery__open:hover { background: transparent !important; color: inherit !important; }

.blum-post-gallery__open img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .25s ease;
}

.blum-post-gallery__open:hover img,
.blum-post-gallery__open:focus-visible img {
  transform: scale(1.025);
}

.blum-post-gallery__open:focus-visible {
  outline: 3px solid #006039;
  outline-offset: -3px;
}

.blum-post-gallery__item figcaption,
.blum-post-gallery__group-caption {
  padding: .55rem .7rem .65rem;
  color: #23563f;
  font-size: .82rem;
  line-height: 1.35;
}

.blum-post-gallery__item figcaption { text-align: center; }

.blum-post-gallery__group-caption {
  display: block;
  padding: .65rem 0 0;
  color: inherit;
  font-size: .95rem;
}

.blum-post-gallery-lightbox {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgb(8 15 11 / 92%);
}

.blum-post-gallery-lightbox[hidden] { display: none; }
.blum-post-gallery-lightbox__figure { width: min(1200px, calc(100vw - 10rem)); max-height: 100%; margin: 0; }
.blum-post-gallery-lightbox__image { display: block; max-width: 100%; max-height: calc(100vh - 7rem); margin: 0 auto; border-radius: 6px; object-fit: contain; }
.blum-post-gallery-lightbox__caption { margin-top: .8rem; color: #fff; text-align: center; }
.blum-post-gallery-lightbox__close { position: fixed; top: 1rem; right: 1rem; width: 2.65rem; height: 2.65rem; border: 1px solid rgb(255 255 255 / 50%); border-radius: 6px; color: #fff; background: rgb(0 96 57 / 92%); font-size: 1.75rem; line-height: 1; cursor: pointer; }
.blum-post-gallery-lightbox__previous,
.blum-post-gallery-lightbox__next { position: fixed; top: 50%; width: 2.65rem; height: 3.4rem; transform: translateY(-50%); border: 1px solid rgb(255 255 255 / 50%); border-radius: 6px; color: #fff; background: rgb(0 96 57 / 92%); font-size: 2.5rem; line-height: 1; cursor: pointer; }
.blum-post-gallery-lightbox__previous { left: 1rem; }
.blum-post-gallery-lightbox__next { right: 1rem; }

@media (max-width: 800px) { .blum-post-gallery__grid { column-count: min(var(--blum-post-gallery-columns, 3), 2); } }
@media (max-width: 600px) { .blum-post-gallery-lightbox__figure { width: calc(100vw - 6rem); } .blum-post-gallery-lightbox__previous { left: .5rem; } .blum-post-gallery-lightbox__next { right: .5rem; } }
@media (max-width: 480px) { .blum-post-gallery__grid { column-count: 1; } .blum-post-gallery-lightbox { padding: 1rem; } .blum-post-gallery-lightbox__figure { width: calc(100vw - 5.5rem); } }
