/**
 * ==============================================================================
 * SHERYL'S ROMANTIC BIRTHDAY WEB APP — 3D COVERFLOW & CARD STACK GALLERY
 * ==============================================================================
 */

/* 3D Showcase Stage */
.coverflow-section {
  position: relative;
  width: 100%;
  padding: 1.5rem 0 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.coverflow-stage {
  position: relative;
  width: 100%;
  max-width: 860px;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  transform-style: preserve-3d;
  user-select: none;
  touch-action: pan-y pinch-zoom;
}

/* Individual 3D Card */
.coverflow-card {
  position: absolute;
  width: min(320px, 72vw);
  height: min(440px, 68vh);
  border-radius: 28px;
  overflow: hidden;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.25), 0 0 25px rgba(232, 122, 144, 0.15);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), 
              opacity 0.6s ease, 
              box-shadow 0.6s ease,
              filter 0.6s ease;
  will-change: transform, opacity, filter;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.coverflow-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.coverflow-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s ease;
}

.coverflow-card:hover .coverflow-img {
  transform: scale(1.04);
}

/* Gradients and Details Overlay */
.coverflow-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(30, 15, 25, 0.85) 0%,
    rgba(30, 15, 25, 0.35) 45%,
    rgba(0, 0, 0, 0) 75%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: #ffffff;
  transition: opacity 0.3s ease;
}

.coverflow-badge {
  align-self: flex-start;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-full, 9999px);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: #FFF0F5;
}

.coverflow-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.35rem;
  color: #FFFFFF;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.coverflow-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.coverflow-zoom-hint {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.95rem;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.coverflow-card.is-center:hover .coverflow-zoom-hint {
  opacity: 1;
  transform: scale(1);
}

/* 3D Transform States */
.coverflow-card.is-center {
  transform: translateX(0) translateZ(80px) scale(1) rotateY(0deg);
  z-index: 20;
  opacity: 1;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.35), 0 0 35px rgba(212, 175, 55, 0.4);
  border-color: rgba(212, 175, 55, 0.8);
  filter: brightness(1);
}

.coverflow-card.is-prev-1 {
  transform: translateX(-56%) translateZ(-40px) scale(0.86) rotateY(28deg);
  z-index: 10;
  opacity: 0.88;
  filter: brightness(0.88);
}

.coverflow-card.is-next-1 {
  transform: translateX(56%) translateZ(-40px) scale(0.86) rotateY(-28deg);
  z-index: 10;
  opacity: 0.88;
  filter: brightness(0.88);
}

.coverflow-card.is-prev-2 {
  transform: translateX(-95%) translateZ(-120px) scale(0.72) rotateY(38deg);
  z-index: 5;
  opacity: 0.55;
  filter: brightness(0.7);
}

.coverflow-card.is-next-2 {
  transform: translateX(95%) translateZ(-120px) scale(0.72) rotateY(-38deg);
  z-index: 5;
  opacity: 0.55;
  filter: brightness(0.7);
}

.coverflow-card.is-hidden {
  transform: translateX(0) translateZ(-250px) scale(0.5);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

/* Arrow Navigation Buttons */
.coverflow-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #78283B;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12), 0 0 15px rgba(212, 175, 55, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.coverflow-nav-btn:hover {
  background: #FFFFFF;
  color: #E87A90;
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 12px 30px rgba(232, 122, 144, 0.3), 0 0 20px rgba(212, 175, 55, 0.4);
}

.coverflow-btn-prev {
  left: max(1rem, calc((100% - 860px) / 2 + 1rem));
}

.coverflow-btn-next {
  right: max(1rem, calc((100% - 860px) / 2 + 1rem));
}

/* Pagination Dots Indicator */
.coverflow-dots-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 1.75rem;
}

.coverflow-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full, 9999px);
  background: rgba(212, 175, 55, 0.3);
  border: 1px solid rgba(212, 175, 55, 0.5);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.coverflow-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
}

.coverflow-dot.is-active {
  width: 28px;
  background: linear-gradient(135deg, #E87A90 0%, #D4AF37 100%);
  box-shadow: 0 0 12px rgba(232, 122, 144, 0.5);
  border-color: #D4AF37;
}

/* "Lihat Semua" Button (Matching reference design) */
.btn-lihat-semua-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 0.5rem;
}

.btn-lihat-semua {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 2.5rem;
  background: linear-gradient(135deg, #CFD9DF 0%, #E2EBF0 100%);
  color: #2B2D42;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-lihat-semua:hover {
  transform: translateY(-3px) scale(1.03);
  background: linear-gradient(135deg, #E2EBF0 0%, #FFFFFF 100%);
  box-shadow: 0 15px 35px -5px rgba(232, 122, 144, 0.3), 0 0 20px rgba(212, 175, 55, 0.3);
  color: #78283B;
  border-color: rgba(212, 175, 55, 0.5);
}

.btn-lihat-semua i {
  font-size: 0.95rem;
  color: #78283B;
  transition: transform 0.3s ease;
}

.btn-lihat-semua:hover i {
  transform: translateY(3px);
}

/* Scrapbook Grid Toggle Visibility */
.scrapbook-full-section {
  width: 100%;
  transition: all 0.6s ease;
}

.scrapbook-full-section.is-collapsed {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .coverflow-stage {
    height: 400px;
  }
  .coverflow-card {
    width: min(280px, 78vw);
    height: min(380px, 62vh);
    border-radius: 22px;
  }
  .coverflow-card.is-prev-1 {
    transform: translateX(-48%) translateZ(-30px) scale(0.84) rotateY(22deg);
  }
  .coverflow-card.is-next-1 {
    transform: translateX(48%) translateZ(-30px) scale(0.84) rotateY(-22deg);
  }
  .coverflow-btn-prev {
    left: 0.5rem;
  }
  .coverflow-btn-next {
    right: 0.5rem;
  }
}

@media (max-width: 380px) {
  .coverflow-stage {
    height: 350px;
  }
  .coverflow-card {
    width: min(250px, 80vw);
    height: min(340px, 60vh);
    border-radius: 18px;
  }
}
