/* Smooth Slide Transition System */

/* Page container for slide transitions */
body {
  overflow-x: hidden; /* Prevent horizontal scroll during transitions */
}

/* Slide transition styles */
.page-transition-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: visible; /* FIXED: Changed from hidden to visible - allows sticky positioning */
  overflow-x: hidden; /* Keep horizontal scroll prevention */
}

/* Page slide animations */
.page-slide-out-left {
  animation: slideOutLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.page-slide-out-right {
  animation: slideOutRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.page-slide-in-left {
  animation: slideInLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.page-slide-in-right {
  animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Slide animations */
@keyframes slideOutLeft {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(-100%);
    opacity: 0.3;
  }
}

@keyframes slideOutRight {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0.3;
  }
}

@keyframes slideInLeft {
  0% {
    transform: translateX(-100%);
    opacity: 0.3;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  0% {
    transform: translateX(100%);
    opacity: 0.3;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}





/* Mobile optimizations */
@media (max-width: 768px) {
  /* Faster transitions on mobile for better performance */
  .page-slide-out-left,
  .page-slide-out-right,
  .page-slide-in-left,
  .page-slide-in-right {
    animation-duration: 0.3s;
  }
  
  /* Reduce motion for better mobile performance */
  @media (prefers-reduced-motion: reduce) {
    .page-slide-out-left,
    .page-slide-out-right,
    .page-slide-in-left,
    .page-slide-in-right {
      animation: none;
      opacity: 1;
      transform: none;
    }
  }
}

/* Hardware acceleration for smooth animations */
.page-slide-out-left,
.page-slide-out-right,
.page-slide-in-left,
.page-slide-in-right {
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Prevent text selection during transitions */
.page-transitioning {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Touch action optimization for mobile */
@media (max-width: 768px) {
  body {
    touch-action: manipulation;
  }
}