/* Gallery CSS – responsive slideshow */

.gallery {
  --gold: var(--gold, #F5C542);
  --ink: var(--ink, #0A0A0C);
  --panel: var(--panel, #15151A);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.gallery__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--ink);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.gallery__slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.gallery__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.gallery__slide.active {
  opacity: 1;
}

.gallery__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.gallery__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.gallery__nav {
  display: flex;
  gap: 0.5rem;
}

.gallery__nav-btn {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.gallery__nav-btn:hover,
.gallery__nav-btn:focus {
  background: var(--gold);
  color: var(--ink);
  outline: none;
}

.gallery__nav-btn:active {
  transform: scale(0.95);
}

.gallery__counter {
  color: var(--gold);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  min-width: 3rem;
  text-align: center;
}

.gallery__dots {
  display: flex;
  gap: 0.375rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.gallery__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(245, 197, 66, 0.4);
  border: 1px solid var(--gold);
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery__dot.active {
  background: var(--gold);
  transform: scale(1.2);
}

.gallery__dot:hover {
  background: var(--gold);
}

/* Touch-friendly on mobile */
@media (max-width: 640px) {
  .gallery {
    gap: 1rem;
  }

  .gallery__stage {
    aspect-ratio: 3 / 2;
    border-radius: 0.375rem;
  }

  .gallery__nav-btn {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
  }

  .gallery__counter {
    font-size: 0.75rem;
  }

  .gallery__dot {
    width: 0.375rem;
    height: 0.375rem;
  }
}

/* Reduce motion support */
@media (prefers-reduced-motion: reduce) {
  .gallery__slide {
    transition: opacity 0.1s ease-in-out;
  }

  .gallery__nav-btn,
  .gallery__dot {
    transition: background 0.1s ease;
  }

  .gallery__dot.active {
    transform: none;
  }

  .gallery__nav-btn:active {
    transform: none;
  }
}

/* Keyboard focus styles */
.gallery__nav-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.gallery__dot:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
