/* Product Showcase Scroll Narrative - Sticky Stack Implementation */

.product-scroll-gallery {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  z-index: 10;
}

.psg-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.psg-scroll-area {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
  padding: 0;
  display: block;
}

.psg-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(40px) scale(0.96);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  padding: 0;
}

.psg-slide.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  z-index: 2;
}

/* Internal Content Styling */
.benefit-section {
  width: 100%;
  max-width: 1400px; /* Increased from 1200px */
  margin: 0 auto;
  padding: 0 clamp(24px, 6vw, 48px);
  display: grid;
  grid-template-columns: 1fr 1.2fr; /* Changed from minmax(0, 1.1fr) minmax(0, 1fr) to give image more space */
  gap: clamp(28px, 5vw, 64px); /* Increased gap */
  align-items: center;
  height: 100%;
}

.benefit-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  color: #f8fafc;
  pointer-events: auto;
  z-index: 10;
}

.benefit-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(16px, 2vw, 20px);
}

.benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  border: none;
  background: none;
  color: #f97316;
  margin-bottom: 0;
  flex-shrink: 0;
}

.benefit-icon img {
  width: 60px;
  height: 60px;
  display: block;
}

.benefit-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #f9fafb;
  font-weight: 700;
}

.benefit-list {
  list-style: none;
  margin: 0 0 24px 0;
  padding: 0;
  display: grid;
  gap: 12px;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.55;
  color: rgba(229, 231, 235, 0.88);
}

.benefit-list li {
  position: relative;
  padding-left: 1.65rem;
}

.benefit-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #f97316);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.benefit-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--secondary-color);
  color: var(--primary-color);
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  width: fit-content;
}

.benefit-cta:hover,
.benefit-cta:focus-visible {
  transform: translateY(-1px);
  opacity: 0.95;
}

.benefit-media {
  width: 100%;
  pointer-events: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.benefit-image-wrapper {
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  transform: translate3d(0, 0, 0); 
}

.benefit-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: saturate(1.05) contrast(1.02);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
  .benefit-section {
    padding: 0 clamp(20px, 5vw, 40px);
    gap: clamp(24px, 4vw, 40px);
  }
}

@media (max-width: 1024px) {
  .benefit-title {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
  }
}

@media (max-width: 900px) {
  .benefit-section {
    grid-template-columns: 1fr;
    align-content: center;
    justify-items: center;
    text-align: center;
  }
  
  .benefit-content {
    align-items: center;
  }
  
  .benefit-list {
    text-align: left;
  }
}

/* Mobile Fallback */
@media (max-width: 767px) {
  .product-scroll-gallery {
    height: auto !important; /* Override JS height */
    padding: 80px 0;
  }

  .psg-sticky {
    position: relative;
    height: auto;
    top: auto;
    display: block;
  }

  .psg-scroll-area {
    display: flex;
    flex-direction: column;
    gap: 64px;
    height: auto;
  }

  .psg-slide {
    position: relative;
    height: auto;
    width: 100%;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    padding: 0 20px;
  }

  .benefit-section {
    height: auto;
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0;
  }

  .benefit-content {
    align-items: center;
    text-align: center;
  }

  .benefit-title {
    font-size: clamp(1.75rem, 6vw, 2.2rem);
  }

  .benefit-cta {
    margin-top: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .psg-slide {
    transition: none !important;
  }
}

/* Navigation Dots */
.psg-navigation {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 20;
  pointer-events: none;
}

.psg-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.psg-dot.is-active {
  background-color: #f97316;
  transform: scale(1.5);
}

@media (max-width: 767px) {
  .psg-navigation {
    display: none;
  }
}
