/* ===== Variables & Base ===== */
.mealplanet-scroll-carousel-wrapper {
  --green-primary: #22c55e;
  --green-dark: #15803d;
  --green-light: #4ade80;
  --bg-dark-green: #0f2e1e;
  --bg-dark-gray: #1a1a1a;
  --phone-width: 280px;
  --phone-height: 560px;
  --phone-radius: 50px;
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --mealplanet-gap: 40px;
}

.mealplanet-scroll-carousel-wrapper * {
  box-sizing: border-box;
}

/* ===== Scroll Journey ===== */
.mealplanet-scroll-carousel-journey {
  height: 450vh; /* Creates scroll space for the carousel */
  position: relative;
}

.mealplanet-scroll-carousel-section {
  position: relative;
  height: 100%;
  min-height: 100vh;
}

.mealplanet-scroll-carousel-placeholder {
  height: 0;
  pointer-events: none;
}

.mealplanet-scroll-carousel-sticky {
  position: sticky;
  top: 0;
  min-height: 100vh;
  background-size: 200% 100%;
  background-position: 0% 50%;
  transition: background-position 1.5s var(--transition-smooth);
  padding: 60px 0 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* justify-content: center; */
}

.admin-bar .mealplanet-scroll-carousel-sticky {
  top: 32px;
}

.mealplanet-scroll-carousel-header {
  text-align: center;
  margin-bottom: 0;
  padding: 0 20px;
}

.mealplanet-scroll-carousel-title {
  color: white;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(30px);
  animation: mealplanetTitleReveal 1s var(--transition-smooth) 0.3s forwards;
}

/* ===== Carousel ===== */
.mealplanet-scroll-carousel-container {
  position: relative;
  overflow: hidden;
  padding: 0 60px;
  width: 100%;
  max-width: 100%;
}

.mealplanet-scroll-carousel-track {
  display: flex;
  gap: var(--mealplanet-gap);
  padding: 20px 0;
  transition: transform 0.8s var(--transition-smooth);
  will-change: transform;
  justify-content: flex-start;
}

/* ===== Image Steps ===== */
.mealplanet-scroll-carousel-step {
  flex: 0 0 var(--phone-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.6;
  transform: scale(0.9);
  transition: all 0.6s var(--transition-smooth);
}

.mealplanet-scroll-carousel-step.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.mealplanet-scroll-carousel-image {
  width: var(--phone-width);
  height: var(--phone-height);
  object-fit: cover;
  border-radius: 50px;
  display: block;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.5s var(--transition-smooth);
}

.mealplanet-scroll-carousel-step.active .mealplanet-scroll-carousel-image {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* ===== Image Captions ===== */
.mealplanet-scroll-carousel-caption,
.step-caption {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 20px;
  text-align: center;
  opacity: 0.7;
  transition: opacity 0.3s;
  max-width: 65%;
  line-height: 1.2em;
}

.mealplanet-scroll-carousel-step.active .mealplanet-scroll-carousel-caption,
.mealplanet-scroll-carousel-step.active .step-caption {
  opacity: 1;
  color: white;
}

/* ===== Scroll Lock State ===== */
body.mealplanet-scroll-locked {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* ===== Keyframe Animations ===== */
@keyframes mealplanetTitleReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .mealplanet-scroll-carousel-container {
    padding: 0 50px;
  }

  .mealplanet-scroll-carousel-step {
    flex: 0 0 240px !important;
  }

  .mealplanet-scroll-carousel-image {
    width: 240px !important;
    height: 480px !important;
  }
}

@media (max-width: 480px) {
  .mealplanet-scroll-carousel-container {
    padding: 0 30px;
  }

  .mealplanet-scroll-carousel-step {
    flex: 0 0 200px !important;
  }

  .mealplanet-scroll-carousel-image {
    width: 200px !important;
    height: 400px !important;
  }
}
