/* Custom Horizontal Parallax Section for Jayshree Technosoft */

.parallax-container {
  position: relative;
  width: 100%;
  height: 450vh; /* Scroll length. More height = slower and smoother horizontal flight. */
  background: #ffffff; /* Premium white background */
  overflow: visible;
}

/* Premium subtle grid pattern */
.parallax-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(2, 45, 98, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2, 45, 98, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
  pointer-events: none;
  z-index: 0;
}

.parallax-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8vh 0;
  box-sizing: border-box;
}

/* Background glowing accents */
.parallax-bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(239, 49, 57, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  z-index: 1;
  top: 15%;
  left: 10%;
  will-change: transform;
}

.parallax-bg-glow-2 {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  z-index: 1;
  bottom: 15%;
  right: 10%;
  will-change: transform;
}

/* Header inside sticky container */
.px-header {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  z-index: 10;
  position: relative;
}

.px-header__subtitle {
  color: #ef3139;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 0.85rem;
  margin-bottom: 12px;
  display: block;
}

.px-header__title {
  color: #022d62; /* Institutional Navy */
  font-size: 3rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.15;
  letter-spacing: -1px;
}

.px-header__title span {
  background: linear-gradient(135deg, #022d62 30%, #ef3139 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Track holding the panels */
.parallax-track {
  display: flex;
  height: 52vh;
  padding-left: calc((100vw - 1200px) / 2 + 40px);
  padding-right: 150px;
  align-items: center;
  will-change: transform;
  z-index: 5;
  position: relative;
  box-sizing: border-box;
}

/* Fallback for cases where screen is narrower than 1200px */
@media (max-width: 1280px) {
  .parallax-track {
    padding-left: 60px;
  }
}

/* The Panel container */
.parallax-panel {
  flex: 0 0 540px; /* Snug, compact layout */
  width: 540px;
  height: 100%;
  margin-right: 60px;
  position: relative;
  perspective: 1000px;
}

/* Inner card showing premium glassmorphism */
.panel-card {
  position: relative;
  width: 100%;
  height: 100%;
  background: #ffffff; /* Vibrant white card background for crisp contrast */
  border: 1px solid rgba(2, 45, 98, 0.12);
  border-radius: 20px;
  padding: 35px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 15px 35px rgba(2, 45, 98, 0.07), 0 1px 3px rgba(0, 0, 0, 0.02);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Premium gradient top border */
.panel-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #ef3139 0%, #022d62 100%);
  opacity: 0.85;
  transition: all 0.3s ease;
}

.panel-card:hover {
  transform: translateY(-8px);
  border-color: rgba(239, 49, 57, 0.2);
  box-shadow: 
    0 30px 60px rgba(2, 45, 98, 0.1), 
    0 0 25px rgba(239, 49, 57, 0.05);
}

.panel-card:hover::after {
  height: 6px;
  opacity: 1;
}

/* Panel Background Gradient Glow */
.panel-glow {
  position: absolute;
  top: -40%;
  right: -40%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(239, 49, 57, 0.05) 0%, rgba(239, 49, 57, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

/* Massive Number background indicator with gradient */
.panel-number {
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 8rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  font-family: 'Outfit', sans-serif;
  user-select: none;
  background: linear-gradient(180deg, rgba(239, 49, 57, 0.08) 0%, rgba(2, 45, 98, 0.01) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  transition: all 0.4s ease;
}

.panel-card:hover .panel-number {
  transform: scale(1.08) translateY(-5px);
  background: linear-gradient(180deg, rgba(239, 49, 57, 0.14) 0%, rgba(2, 45, 98, 0.02) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Card layout top - Icon and visual elements */
.panel-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

.panel-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(2, 45, 98, 0.03);
  border: 1px solid rgba(2, 45, 98, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.panel-card:hover .panel-icon-wrapper {
  background: linear-gradient(135deg, #ef3139 0%, #d6242c 100%);
  border-color: #ef3139;
  box-shadow: 0 8px 16px rgba(239, 49, 57, 0.15);
}

.panel-icon-wrapper svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #022d62;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: all 0.3s ease;
}

.panel-card:hover .panel-icon-wrapper svg {
  stroke: #ffffff;
}

.panel-step-tag {
  background: rgba(239, 49, 57, 0.08);
  color: #ef3139;
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 1px solid rgba(239, 49, 57, 0.15);
}

/* Card layout bottom - text description */
.panel-content {
  will-change: transform, opacity;
  margin-top: auto;
  position: relative;
  z-index: 2;
}

.panel-title {
  color: #022d62;
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 10px 0;
  letter-spacing: -0.5px;
}

.panel-desc {
  color: #4a5568; /* Crisp slate gray */
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0;
  font-weight: 400;
}

/* Footer / navigation trackers inside sticky */
.px-footer {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  z-index: 10;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.px-scrollbar {
  width: 300px;
  height: 6px;
  background: rgba(2, 45, 98, 0.06);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.px-scrollbar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #022d62 0%, #ef3139 100%);
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}

/* Route indicators / dots */
.px-route {
  display: flex;
  align-items: center;
  gap: 24px;
}

.px-route__item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.px-route__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(2, 45, 98, 0.15);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid transparent;
}

.px-route__dot.is-active {
  background: #ffffff;
  border-color: #ef3139;
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(239, 49, 57, 0.4);
}

.px-route__label {
  color: rgba(2, 45, 98, 0.5);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.4s ease;
}

.px-route__dot.is-active + .px-route__label {
  color: #ef3139;
}

/* Scroll hint */
.px-scroll-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(2, 45, 98, 0.5);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.px-scroll-hint svg {
  width: 18px;
  height: 18px;
  stroke: #ef3139;
  stroke-width: 2;
  animation: bounceHorizontal 1.6s infinite ease-in-out;
}

@keyframes bounceHorizontal {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}

/* Mobile Responsiveness for Horizontal Scroll */
@media (max-width: 991px) {
  .parallax-panel {
    flex: 0 0 460px;
    width: 460px;
    margin-right: 35px;
  }
  .px-scrollbar {
    width: 180px;
  }
}

@media (max-width: 768px) {
  .parallax-container {
    height: auto !important; /* Disable scroll-pinning on mobile */
    background: #ffffff;
    padding: 60px 16px;
  }
  
  .parallax-sticky {
    position: relative !important;
    height: auto !important;
    padding: 0 !important;
  }

  .px-header {
    padding: 0 0 25px 0;
  }

  .px-header__subtitle {
    font-size: 0.75rem;
    margin-bottom: 6px;
  }

  .px-header__title {
    font-size: 1.8rem;
    line-height: 1.25;
  }

  .parallax-track {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    height: auto !important;
    transform: none !important;
    gap: 25px;
  }

  .parallax-panel {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    margin-right: 0 !important;
  }

  .panel-card {
    height: auto;
    padding: 24px;
    min-height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(2, 45, 98, 0.05);
    background: #ffffff;
    border: 1px solid rgba(2, 45, 98, 0.06);
  }

  .panel-card::after {
    height: 3px;
  }

  .panel-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 10px;
  }

  .panel-icon-wrapper svg {
    width: 22px;
    height: 22px;
  }

  .panel-step-tag {
    padding: 4px 10px;
    font-size: 0.65rem;
  }

  .panel-title {
    font-size: 1.3rem;
    margin-bottom: 8px;
  }

  .panel-desc {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .panel-number {
    font-size: 5rem;
    top: -5px;
    right: 15px;
    opacity: 0.12;
  }

  .px-footer {
    display: none !important;
  }
}
