/* ---------- page shell (delete this part when dropping the component into your own site) ---------- */

* { box-sizing: border-box; }

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 0px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 16px;
}

/* ---------- slideshow component ---------- */

.slideshow {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  outline: none;
}

.slideshow-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.slideshow-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease;
  z-index: 1;
}

.slideshow-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

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

.slideshow-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 64px 18px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.45) 55%, rgba(0, 0, 0, 0) 100%);
}

.slideshow-caption h2 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.slideshow-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 10px;
  letter-spacing: 0.02em;
}

.slideshow-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.slideshow-arrow:hover { background: rgba(0, 0, 0, 0.7); }
.slideshow-arrow:focus-visible { outline: 2px solid #4da3ff; outline-offset: 2px; }
.slideshow-arrow.prev { left: 12px; }
.slideshow-arrow.next { right: 12px; }

.slideshow-thumbs {
  display: flex;
  gap: 6px;
  padding: 8px;
  background: #111;
  overflow-x: auto;
  scrollbar-width: thin;
}

.slideshow-thumb {
  flex: 0 0 92px;
  height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease, border-color 0.2s ease;
  background: none;
}

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

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

.slideshow-thumb.active {
  opacity: 1;
  border-color: #4da3ff;
}

@media (max-width: 480px) {
  .slideshow-caption h2 { font-size: 15px; }
  .slideshow-arrow { width: 32px; height: 32px; font-size: 14px; }
  .slideshow-thumb { flex-basis: 72px; height: 46px; }
}
