/* ==========================================
   Advanced Parallax Layers Effect
   ایجاد افکت پارالاکس لایه‌ای حرفه‌ای
========================================== */

/* Parallax Banner Container */
.parallax-banner {
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  background: #000;
  
  /* Smooth fade in on load */
  opacity: 0;
  transition: opacity 0.5s ease;
}

.parallax-banner.is-ready {
  opacity: 1;
}

/* Individual Parallax Layers */
.parallax-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  
  /* Critical for smooth parallax */
  will-change: transform;
  transform: translate3d(0, 0, 0);
  pointer-events: none;
  user-select: none;
  
  /* Smooth transitions */
  transition: opacity 0.3s ease;
}

/* Sky Layer (Background) */
.parallax-layer.sky {
  z-index: 1;
  object-fit: cover;
}

/* Mountains Layer (Foreground) */
.parallax-layer.mountains {
  z-index: 2;
  object-fit: contain;
  object-position: bottom center;
}

/* Content on top of parallax */
.parallax-content {
  position: relative;
  z-index: 10;
  padding: 10vh 6vw;
  color: #fff;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.parallax-content h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.parallax-content p {
  font-size: clamp(1rem, 2vw, 1.5rem);
  line-height: 1.6;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Responsive: Show/Hide Desktop vs Mobile Images */
.is-mobile {
  display: none;
}

@media (max-width: 767px) {
  .is-desktop {
    display: none;
  }
  
  .is-mobile {
    display: block;
  }
  
  .parallax-banner {
    min-height: 50vh;
  }
  
  .parallax-content {
    padding: 5vh 5vw;
  }
}

/* Additional styling for better integration */
.parallax-banner + section {
  position: relative;
  z-index: 5;
}

/* Optional: Add gradient overlay */
.parallax-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  z-index: 3;
  pointer-events: none;
}
