.rc-project-gallery {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--soft);
}

.rc-project-gallery__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.rc-project-gallery__viewport::-webkit-scrollbar {
  display: none;
}

.rc-project-gallery__track {
  display: flex;
}

.rc-project-gallery__slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.rc-project-gallery__slide img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.rc-project-gallery__slide figcaption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.3;
}

.rc-project-gallery__controls {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.rc-project-gallery__button,
.rc-project-gallery__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-weight: 800;
}

.rc-project-gallery__button {
  border-radius: 999px;
  cursor: pointer;
  pointer-events: auto;
}

.rc-project-gallery__button:hover,
.rc-project-gallery__button:focus-visible {
  background: #fff;
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

.rc-project-gallery__count {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.rc-project-gallery[data-gallery-size="1"] .rc-project-gallery__controls {
  display: none;
}

@media (max-width: 760px) {
  .rc-project-gallery__slide figcaption {
    position: static;
    background: #fff;
  }

  .rc-project-gallery__controls {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .rc-project-gallery__button {
    min-width: 40px;
    min-height: 40px;
  }
}
