.newsx-post-content .go-post-gallery,
.go-gs-gallery.go-post-gallery,
.go-gf-gallery.go-post-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 18px;
  width: 100%;
  margin: 32px 0;
  padding: 0;
  overflow: visible;
  border-radius: 0;
  background: none;
}

.go-post-gallery br {
  display: none;
}

.go-post-gallery .wp-block-image,
.go-post-gallery .blocks-gallery-item,
.go-post-gallery .gallery-item,
.go-post-gallery .go-gs-gallery-item,
.go-post-gallery .go-gf-gallery-item,
.go-post-gallery .go-post-gallery__item {
  display: block;
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.go-post-gallery .gallery-icon,
.go-post-gallery .wp-block-image > a,
.go-post-gallery .go-post-gallery__link {
  display: block;
}

.go-post-gallery .gallery-icon {
  border: 0;
}

.go-post-gallery__image,
.go-post-gallery .gallery-item img,
.go-post-gallery .wp-block-image img,
.go-post-gallery .go-gs-gallery-item img,
.go-post-gallery .go-gf-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
  background: #0f1115;
  box-shadow: 0 18px 38px rgba(6, 10, 18, 0.12);
}

.newsx-post-content .go-post-image-can-zoom,
.go-gs-gallery-item img.go-post-image-can-zoom,
.go-gf-gallery-item img.go-post-image-can-zoom {
  cursor: zoom-in;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.go-post-gallery__item:hover .go-post-image-can-zoom,
.go-post-gallery__item:focus-within .go-post-image-can-zoom,
.go-gs-gallery-item:hover img.go-post-image-can-zoom,
.go-gf-gallery-item:hover img.go-post-image-can-zoom {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(6, 10, 18, 0.18);
}

.go-post-gallery figcaption,
.go-post-gallery .gallery-caption,
.go-post-lightbox__caption {
  margin: 10px 0 0;
  padding: 0 6px;
  border: 0;
  background: none;
  color: rgba(16, 19, 26, 0.72);
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}

.go-post-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 4, 8, 0.97);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.go-post-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.go-post-lightbox__dialog {
  width: min(96vw, 1680px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.go-post-lightbox__toolbar,
.go-post-lightbox__toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.go-post-lightbox__toolbar {
  justify-content: space-between;
  min-height: 46px;
}

.go-post-lightbox__counter {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.go-post-lightbox__tool,
.go-post-lightbox__close,
.go-post-lightbox__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(9, 14, 24, 0.92);
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.go-post-lightbox__tool[data-go-action="zoom-reset"] {
  width: auto;
  min-width: 72px;
  padding: 0 14px;
  font-size: 13px;
}

.go-post-lightbox__tool:hover,
.go-post-lightbox__tool:focus-visible,
.go-post-lightbox__close:hover,
.go-post-lightbox__close:focus-visible,
.go-post-lightbox__nav:hover,
.go-post-lightbox__nav:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.go-post-lightbox__tool:disabled {
  opacity: 0.38;
  cursor: default;
  transform: none;
}

.go-post-lightbox__stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 0;
}

.go-post-lightbox__nav.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.go-post-lightbox__viewport {
  max-height: calc(100vh - 132px);
  overflow: auto;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #04070d;
}

.go-post-lightbox.is-zoomed .go-post-lightbox__viewport {
  cursor: grab;
}

.go-post-lightbox__viewport.is-dragging {
  cursor: grabbing;
}

.go-post-lightbox__figure {
  min-width: 100%;
  min-height: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 1.4vw, 18px);
}

.go-post-lightbox__image {
  display: block;
  width: auto;
  max-width: min(100%, 1520px);
  max-height: calc(100vh - 170px);
  margin: 0 auto;
  border-radius: 22px;
  object-fit: contain;
  background: #04070d;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.go-post-lightbox.is-zoomed .go-post-lightbox__figure {
  display: block;
  min-width: auto;
  min-height: auto;
  padding: 24px;
}

.go-post-lightbox.is-zoomed .go-post-lightbox__image {
  margin: 0;
  user-select: none;
}

.go-post-lightbox__caption {
  margin: 0;
  padding: 0 4px;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
}

body.go-post-lightbox-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .newsx-post-content .go-post-gallery,
  .go-gs-gallery.go-post-gallery,
  .go-gf-gallery.go-post-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .newsx-post-content .go-post-gallery,
  .go-gs-gallery.go-post-gallery,
  .go-gf-gallery.go-post-gallery {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 24px 0;
  }

  .go-post-gallery__image,
  .go-post-gallery .gallery-item img,
  .go-post-gallery .wp-block-image img,
  .go-post-gallery .go-gs-gallery-item img,
  .go-post-gallery .go-gf-gallery-item img {
    border-radius: 18px;
  }

  .go-post-lightbox {
    padding: 14px;
  }

  .go-post-lightbox__dialog {
    gap: 12px;
  }

  .go-post-lightbox__toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .go-post-lightbox__toolbar-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .go-post-lightbox__stage {
    grid-template-columns: 1fr;
  }

  .go-post-lightbox__nav {
    order: 2;
  }

  .go-post-lightbox__viewport {
    order: 1;
    max-height: calc(100vh - 186px);
  }

  .go-post-lightbox__nav--prev,
  .go-post-lightbox__nav--next {
    position: fixed;
    bottom: 18px;
  }

  .go-post-lightbox__nav--prev {
    left: 18px;
  }

  .go-post-lightbox__nav--next {
    right: 18px;
  }

  .go-post-lightbox__image {
    max-width: min(100%, 96vw);
    max-height: calc(100vh - 220px);
    border-radius: 18px;
  }
}
