:root {
  --gallery-gap: 0.75rem;
  --thumb-size: 72px;
  --thumb-gap: 0.5rem;
}

.project-gallery {
  max-width: 100%;
  margin: 1rem 0;
}

.project-gallery__viewer {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: transparent;
}

.project-gallery__slides {
  position: relative;
  min-height: 240px;
}

.project-gallery__slide {
  display: none;
  width: 100%;
}

.project-gallery__slide.active {
  display: block;
}

.project-gallery__slide img {
  display: block; /* ensure full-bleed inside this component */
  width: 100%;
  height: auto;
}


.project-gallery__control {
  position: relative;
  top: auto;
  bottom: auto;
  transform: none;
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  z-index: 10;
  border-radius: 4px;
}
.project-gallery__control.prev, .project-gallery__control.next { flex: 0 0 auto }

.project-gallery__play {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 20;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.project-gallery__play .play-icon {
  font-size: 0.9rem;
}

.project-gallery__play .progress {
  display: none;
  width: 80px;
  height: 6px;
  background: rgba(255,255,255,0.12);
  border-radius: 4px;
  overflow: hidden;
}
.project-gallery__play .progress__bar {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--accent-color, #1fa936);
  transition: width 0s linear;
}

.project-gallery.autoplay-active .project-gallery__play .play-icon { display: none }
.project-gallery.autoplay-active .project-gallery__play .progress { display: block }



.project-gallery__thumbs {
  margin-top: 0.75rem;
  display: flex;
  gap: var(--thumb-gap);
  overflow-x: auto;
  padding-bottom: 0.25rem;
  justify-content: center;
}

.project-gallery__thumb {
  background: none;
  border: 2px solid transparent;
  padding: 0;
  width: var(--thumb-size);
  height: var(--thumb-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
}

.project-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-gallery__thumb[aria-selected="true"] {
  border-color: var(--accent-color, #1fa936);
}

@media (max-width: 600px) {
  .project-gallery__thumbs { gap: 0.4rem }
  .project-gallery__control { padding: 0.35rem 0.5rem }
}

/* controls wrapper to align arrows and thumbs */
.project-gallery__controls {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
}
.project-gallery__controls .project-gallery__thumbs {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  gap: var(--thumb-gap);
  overflow-x: auto;
}


