/* ===== Gallery Page ===== */
.gallery-page {
  min-height: calc(100vh - 65px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 0 24px;
  overflow: hidden;
}

/* Title area */
.gallery-title-section {
  text-align: center;
  margin-bottom: 32px;
}

.gallery-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #9ca3af;
  margin-bottom: 8px;
}

.gallery-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.gallery-subtitle {
  font-size: 14px;
  color: #9ca3af;
}

/* Filter chips */
.gallery-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}

.gallery-chip {
  padding: 8px 20px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #6b7280;
  transition: all 0.2s;
  cursor: pointer;
}

.gallery-chip:hover {
  border-color: #000;
  color: #000;
}

.gallery-chip.active {
  background: #000;
  border-color: #000;
  color: #fff;
}

/* ===== Carousel Container ===== */
.carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.carousel-stage {
  position: relative;
  width: 100%;
  height: 560px;
  perspective: 1200px;
  overflow: visible;
}

/* ===== Carousel Slides ===== */
.carousel-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 480px;
  height: 480px;
  border-radius: 16px;
  overflow: hidden;
  background: #f8f9fa;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              filter 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
  will-change: transform, opacity;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Active / center slide */
.carousel-slide[data-pos="0"] {
  transform: translate(-50%, -50%) scale(1) translateZ(0);
  z-index: 10;
  opacity: 1;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2), 0 0 0 3px rgba(0,0,0,0.06);
  filter: brightness(1);
}

/* 1 step away */
.carousel-slide[data-pos="1"] {
  transform: translate(calc(-50% + 400px), -50%) scale(0.75) translateZ(-80px);
  z-index: 8;
  opacity: 0.7;
  filter: brightness(0.85);
}
.carousel-slide[data-pos="-1"] {
  transform: translate(calc(-50% - 400px), -50%) scale(0.75) translateZ(-80px);
  z-index: 8;
  opacity: 0.7;
  filter: brightness(0.85);
}

/* 2 steps away */
.carousel-slide[data-pos="2"] {
  transform: translate(calc(-50% + 700px), -50%) scale(0.55) translateZ(-160px);
  z-index: 6;
  opacity: 0.4;
  filter: brightness(0.7);
}
.carousel-slide[data-pos="-2"] {
  transform: translate(calc(-50% - 700px), -50%) scale(0.55) translateZ(-160px);
  z-index: 6;
  opacity: 0.4;
  filter: brightness(0.7);
}

/* 3 steps away */
.carousel-slide[data-pos="3"] {
  transform: translate(calc(-50% + 920px), -50%) scale(0.4) translateZ(-240px);
  z-index: 4;
  opacity: 0.2;
  filter: brightness(0.6);
}
.carousel-slide[data-pos="-3"] {
  transform: translate(calc(-50% - 920px), -50%) scale(0.4) translateZ(-240px);
  z-index: 4;
  opacity: 0.2;
  filter: brightness(0.6);
}

/* Hidden (beyond 3) */
.carousel-slide[data-pos="hidden"] {
  transform: translate(-50%, -50%) scale(0.3) translateZ(-300px);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

/* ===== Caption ===== */
.carousel-caption {
  text-align: center;
  margin-top: 24px;
  min-height: 48px;
  transition: opacity 0.4s;
}

.carousel-caption-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.carousel-caption-meta {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
}

/* ===== Navigation Arrows ===== */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.carousel-nav:hover {
  background: #000;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.carousel-nav:active {
  transform: translateY(-50%) scale(0.9);
}

.carousel-nav svg {
  transition: stroke 0.2s;
}

.carousel-nav:hover svg {
  stroke: #fff;
}

.carousel-nav--prev {
  left: 24px;
}

.carousel-nav--next {
  right: 24px;
}

/* ===== Dots ===== */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  padding: 0;
}

.carousel-dot:hover {
  background: #9ca3af;
  transform: scale(1.2);
}

.carousel-dot.active {
  background: #000;
  transform: scale(1.3);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.15);
}

/* ===== Counter ===== */
.carousel-counter {
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
  font-family: 'Courier New', monospace;
  color: #9ca3af;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .carousel-stage { height: 420px; }
  .carousel-slide { width: 360px; height: 360px; }

  .carousel-slide[data-pos="1"]  { transform: translate(calc(-50% + 300px), -50%) scale(0.72) translateZ(-80px); }
  .carousel-slide[data-pos="-1"] { transform: translate(calc(-50% - 300px), -50%) scale(0.72) translateZ(-80px); }
  .carousel-slide[data-pos="2"]  { transform: translate(calc(-50% + 500px), -50%) scale(0.5) translateZ(-160px); }
  .carousel-slide[data-pos="-2"] { transform: translate(calc(-50% - 500px), -50%) scale(0.5) translateZ(-160px); }
  .carousel-slide[data-pos="3"],
  .carousel-slide[data-pos="-3"] { opacity: 0; pointer-events: none; }
}

@media (max-width: 767px) {
  .gallery-page { padding: 24px 0 16px; }
  .gallery-title { font-size: 28px; }
  .carousel-stage { height: 320px; }
  .carousel-slide { width: 280px; height: 280px; }

  .carousel-slide[data-pos="1"]  { transform: translate(calc(-50% + 220px), -50%) scale(0.7) translateZ(-60px); }
  .carousel-slide[data-pos="-1"] { transform: translate(calc(-50% - 220px), -50%) scale(0.7) translateZ(-60px); }
  .carousel-slide[data-pos="2"],
  .carousel-slide[data-pos="-2"],
  .carousel-slide[data-pos="3"],
  .carousel-slide[data-pos="-3"] { opacity: 0; pointer-events: none; }

  .carousel-nav { width: 40px; height: 40px; }
  .carousel-nav--prev { left: 8px; }
  .carousel-nav--next { right: 8px; }
}
