/* ==========================================================================
   OUR JOURNEY - INFINITE 3D VERTICAL SWIPE COVERFLOW ENGINE
   ========================================================================== */

#gallery-screen {
  justify-content: center;
  align-items: center;
  padding: 0;
  overflow: hidden;
  position: relative;
  touch-action: none;
  width: 100vw;
  height: 100vh;
}

/* 3D Scene Viewport with Vertical Perspective */
.gallery-viewport {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  perspective: 1200px;
  perspective-origin: 50% 50%;
  overflow: visible;
  touch-action: none;
}

/* 3D Vertical Stage Container */
.gallery-stage {
  width: min(88vw, 360px);
  height: min(65vh, 480px);
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

/* Vertical 3D Cards */
.memory-card {
  position: absolute;
  border-radius: var(--radius-lg);
  background: var(--bg-deep);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  cursor: pointer;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  will-change: transform, opacity;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  contain: layout style paint;
  max-width: min(88vw, 360px);
  max-height: min(62vh, 460px);
}

.memory-card.active {
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.95), 0 0 35px rgba(255, 255, 255, 0.15);
}

.card-img-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #0e0e14;
  display: flex;
  align-items: center;
  justify-content: center;
  contain: strict;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transform: translateZ(0);
}

/* Specular Sheen */
.card-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.02) 35%,
    transparent 65%
  );
  pointer-events: none;
}

/* Right-side Vertical Pagination Indicator */
.gallery-bottom-controls {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
  pointer-events: none;
}

.pagination-dots {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-height: 50vh;
  overflow: visible;
  padding: 8px 4px;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: height 0.25s ease, background 0.25s ease;
  cursor: pointer;
  flex-shrink: 0;
  pointer-events: auto;
}

.dot.active {
  height: 16px;
  border-radius: 3px;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* Media Queries for Large Screens */
@media (min-width: 600px) {
  .gallery-stage {
    width: 440px;
    height: 520px;
  }
  
  .memory-card {
    max-width: 440px;
    max-height: 520px;
  }
}
