.gallery-fullwidth {
    width: clamp(300px, 95vw, 950px);
    margin-left: calc(50% - min(47.5vw, 475px));
}

.my-gallery {
  columns: 5;
  column-gap: 4px;
}

@media (max-width: 1000px) {
  .my-gallery {
    columns: 4;
  }
}

@media (max-width: 750px) {
  .my-gallery {
    columns: 3;
  }
}

@media (max-width: 500px) {
  .my-gallery {
    columns: 2;
  }
}

.pswp-gallery__item {
  display: block;
  break-inside: avoid;
  margin: 0;
  padding: 0;
  line-height: normal !important; /* Override parent's line-height: 0 */
}

.pswp-gallery__item img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  break-inside: avoid; /* Prevent column breaks inside captions */
  line-height: normal !important; /* Override parent's line-height: 0 */
}

/* Ensure captions respect HTML formatting (bold, <br>, etc.) */
.pswp-caption-content {
  white-space: pre-line; /* Preserve line breaks */
}

