.slideshow-gallery {
  padding: 72px var(--container-padding);
  font-family: var(--font-body);
}

.slideshow-gallery__inner {
  width: min(100%, var(--container-max));
  margin: 0 auto;
}

.slideshow-gallery__heading {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(2rem, 3vw, 2.5rem);
  color: var(--color-text-primary);
  margin: 0 0 12px;
  text-align: center;
}

.slideshow-gallery__description {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0 auto 32px;
  text-align: center;
  max-width: 640px;
}

.slideshow-gallery__grid {
  display: grid;
  gap: 16px;
}

.slideshow-gallery__grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.slideshow-gallery__grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.slideshow-gallery__grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

.slideshow-gallery__card {
  display: block;
  position: relative;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  font-family: inherit;
}

.slideshow-gallery__card-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  transition: transform 0.4s ease, filter 0.3s ease;
}

.slideshow-gallery__card:hover .slideshow-gallery__card-img {
  transform: scale(1.05);
  filter: brightness(0.85);
}

.slideshow-gallery__card-label {
  position: absolute;
  left: 12px;
  bottom: 10px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.slideshow-gallery__lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slideshow-gallery__lightbox[hidden] {
  display: none;
}

.slideshow-gallery__lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 14, 0.92);
}

.slideshow-gallery__lightbox-inner {
  position: relative;
  z-index: 1;
  width: min(94vw, 960px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slideshow-gallery__close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.slideshow-gallery__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.slideshow-gallery__stage {
  position: relative;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.slideshow-gallery__toolbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px;
}

.slideshow-gallery__playpause {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
}

.slideshow-gallery__playpause-icon {
  width: 10px;
  height: 12px;
  display: inline-block;
  background:
    linear-gradient(#fff, #fff) left / 3px 100% no-repeat,
    linear-gradient(#fff, #fff) right / 3px 100% no-repeat;
}

.slideshow-gallery__playpause--paused .slideshow-gallery__playpause-icon {
  width: 0;
  height: 0;
  background: none;
  border-left: 11px solid #fff;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

.slideshow-gallery__stage-nav {
  display: flex;
  gap: 6px;
}

.slideshow-gallery__nav {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.slideshow-gallery__nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.slideshow-gallery__stage-img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #000;
}

.slideshow-gallery__filmstrip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.slideshow-gallery__thumb {
  flex: 0 0 auto;
  width: 70px;
  height: 47px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 3px;
  background: none;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.55;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

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

.slideshow-gallery__thumb:hover {
  opacity: 0.85;
}

.slideshow-gallery__thumb--active {
  opacity: 1;
  border-color: var(--color-brand-orange);
}

@media (max-width: 767px) {
  .slideshow-gallery {
    padding: 56px var(--container-padding);
  }

  .slideshow-gallery__grid--cols-3,
  .slideshow-gallery__grid--cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 479px) {
  .slideshow-gallery__grid--cols-2,
  .slideshow-gallery__grid--cols-3,
  .slideshow-gallery__grid--cols-4 {
    grid-template-columns: 1fr;
  }
}
