.gvk-news-gallery {
  --gvk-gallery-accent: var(--theme, #264490);
  --gvk-gallery-surface: #f2f5fa;
  margin: 0 0 28px;
}

.gvk-news-gallery__source > .xfieldimagegallery {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.gvk-news-gallery__source > .xfieldimagegallery > li {
  display: block !important;
  margin: 0 !important;
  min-width: 0;
  list-style: none !important;
}

.gvk-news-gallery__source > .xfieldimagegallery > li:first-child {
  grid-column: 1 / -1;
}

.gvk-news-gallery__source > .xfieldimagegallery a,
.gvk-news-gallery__source > .xfieldimagegallery img {
  display: block;
  width: 100%;
}

.gvk-news-gallery__source > .xfieldimagegallery img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 10px;
}

.gvk-news-gallery__source > .xfieldimagegallery > li:first-child img {
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: var(--gvk-gallery-surface);
  border-radius: 16px;
}

.gvk-news-gallery.is-ready .gvk-news-gallery__source {
  display: none;
}

.gvk-news-gallery__stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--gvk-gallery-surface);
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(21, 43, 88, .12);
}

.gvk-news-gallery__open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.gvk-news-gallery__main-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gvk-news-gallery__zoom,
.gvk-news-gallery__nav,
.gvk-news-gallery__counter {
  position: absolute;
  z-index: 2;
  color: #fff;
  background: rgba(13, 24, 47, .72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gvk-news-gallery__zoom {
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  pointer-events: none;
}

.gvk-news-gallery__counter {
  top: 16px;
  right: 16px;
  padding: 7px 11px;
  border-radius: 999px;
  font: 700 13px/1 "Montserrat", Arial, sans-serif;
}

.gvk-news-gallery__nav {
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  transform: translateY(-50%);
  transition: background-color .2s ease, transform .2s ease;
}

.gvk-news-gallery__nav:hover,
.gvk-news-gallery__nav:focus-visible {
  background: var(--gvk-gallery-accent);
  transform: translateY(-50%) scale(1.06);
}

.gvk-news-gallery__nav--prev { left: 16px; }
.gvk-news-gallery__nav--next { right: 16px; }

.gvk-news-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.gvk-news-gallery__thumb {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--gvk-gallery-surface);
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.gvk-news-gallery__thumb:hover,
.gvk-news-gallery__thumb:focus-visible,
.gvk-news-gallery__thumb.is-active {
  border-color: var(--gvk-gallery-accent);
  box-shadow: 0 8px 22px rgba(21, 43, 88, .15);
  transform: translateY(-2px);
}

.gvk-news-gallery__thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.gvk-news-gallery button:focus-visible {
  outline: 3px solid rgba(38, 68, 144, .35);
  outline-offset: 3px;
}

@media (max-width: 767px) {
  .gvk-news-gallery,
  .gvk-news-gallery__source > .xfieldimagegallery {
    margin-bottom: 22px;
  }

  .gvk-news-gallery__stage,
  .gvk-news-gallery__source > .xfieldimagegallery > li:first-child img {
    aspect-ratio: 4 / 3;
    border-radius: 12px;
  }

  .gvk-news-gallery__thumbs,
  .gvk-news-gallery__source > .xfieldimagegallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .gvk-news-gallery__nav {
    width: 40px;
    height: 40px;
  }

  .gvk-news-gallery__nav--prev { left: 10px; }
  .gvk-news-gallery__nav--next { right: 10px; }
  .gvk-news-gallery__counter { top: 10px; right: 10px; }
  .gvk-news-gallery__zoom { right: 10px; bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .gvk-news-gallery__nav,
  .gvk-news-gallery__thumb {
    transition: none;
  }
}
