/* Article screenshot gallery — main stage + thumbnail strip */

.fs-shot-gallery {
  margin: 1.25em 0 1.5em;
  padding: 0;
  border: 0;
  max-width: 100%;
}

.fs-shot-gallery__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 20px 52px;
  background: #f3f4f6;
  border-radius: 14px;
  box-sizing: border-box;
}

.fs-shot-gallery__viewport {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 220px;
}

.fs-shot-gallery__slide {
  display: none;
  width: 100%;
  text-align: center;
  line-height: 0;
}

.fs-shot-gallery__slide.is-active {
  display: block;
}

.fs-shot-gallery__slide .fs-img-protect {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  vertical-align: middle;
}

.fs-shot-gallery__img,
.fs-shot-gallery__slide img {
  display: block;
  margin: 0 auto;
  max-width: min(100%, 760px);
  max-height: min(68vh, 640px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.fs-shot-gallery__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(55, 65, 81, 0.72);
  color: #fff;
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.fs-shot-gallery__nav:hover,
.fs-shot-gallery__nav:focus-visible {
  background: rgba(31, 41, 55, 0.9);
  outline: none;
}

.fs-shot-gallery__nav:active {
  opacity: 0.85;
}

.fs-shot-gallery__nav--prev {
  left: 10px;
}

.fs-shot-gallery__nav--next {
  right: 10px;
}

.fs-shot-gallery__nav span {
  display: block;
  margin-top: -2px;
}

.fs-shot-gallery__count {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  user-select: none;
}

.fs-shot-gallery__thumbs {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  align-items: center;
}

.fs-shot-gallery__thumb-item {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fs-shot-gallery__thumb {
  display: block;
  padding: 0;
  margin: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.fs-shot-gallery__thumb img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0;
}

.fs-shot-gallery__thumb:hover,
.fs-shot-gallery__thumb:focus-visible {
  border-color: rgba(37, 99, 235, 0.45);
  outline: none;
}

.fs-shot-gallery__thumb.is-active {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

/* Inside article: kill default img margins / multi-image flex on this block */
.article-content .fs-shot-gallery,
.article-content .fs-shot-gallery .fs-img-protect {
  margin-left: auto;
  margin-right: auto;
}

.article-content .fs-shot-gallery .fs-img-protect {
  margin-top: 0;
  margin-bottom: 0;
}

.article-content .fs-shot-gallery img {
  margin: 0;
}

@media (max-width: 640px) {
  .fs-shot-gallery__stage {
    min-height: 240px;
    padding: 16px 44px;
    border-radius: 12px;
  }

  .fs-shot-gallery__nav {
    width: 34px;
    height: 34px;
    font-size: 24px;
    border-radius: 8px;
  }

  .fs-shot-gallery__nav--prev {
    left: 6px;
  }

  .fs-shot-gallery__nav--next {
    right: 6px;
  }

  .fs-shot-gallery__img,
  .fs-shot-gallery__slide img {
    max-width: min(100%, 300px);
    max-height: min(58vh, 520px);
  }

  .fs-shot-gallery__thumb img {
    width: 56px;
    height: 56px;
  }

  .fs-shot-gallery__thumbs {
    gap: 8px;
  }
}
