/* High-End 3D Roadmap Design System */

#ruta {
  position: relative;
  perspective: 2000px;
  background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05), transparent);
  padding: 120px 0;
  overflow: visible !important;
}

/* Three.js Canvas for Roadmap */
#roadmap-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.roadmap-container {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  margin: 0 auto;
}

/* Step Container */
.route-step {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 120px;
  width: 100%;
  opacity: 0;
  transform-style: preserve-3d;
}

/* The actual 3D Cards */
.route-step_content {
  background: rgba(255, 255, 255, 0.7) !important;
  /* Brighter background for light mode */
  backdrop-filter: blur(25px) saturate(200%);
  -webkit-backdrop-filter: blur(25px) saturate(200%);
  border: 1px solid rgba(0, 0, 0, 0.05);
  /* Subtle dark border for light mode */
  border-radius: 24px;
  padding: 40px;
  width: 45%;
  position: relative;
  box-shadow:
    0 25px 80px -20px rgba(0, 0, 0, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.8);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: translateZ(0);
  overflow: hidden;
}

.route-step_content::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.05),
      transparent);
  transition: 0.5s;
}

.route-step:hover .route-step_content::before {
  left: 100%;
}

.dark .route-step_content {
  background: rgba(15, 15, 20, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 80px -20px rgba(0, 0, 0, 0.6);
}

.route-step_content::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), transparent 60%);
  border-radius: 24px;
  z-index: -1;
  opacity: 0.3;
}

.route-step:hover .route-step_content {
  transform: translateZ(50px) rotateX(2deg) rotateY(2deg);
  box-shadow: 0 40px 80px -20px rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.4);
}

/* Indicators as 3D Orbs */
.route-step_indicator {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateZ(80px);
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #f97316, #d946ef);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  box-shadow:
    0 0 30px rgba(249, 115, 22, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  z-index: 10;
  border: 4px solid rgba(255, 255, 255, 0.2);
}

.route-step_number {
  font-size: 24px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Side Specific Positions */
.route-step:nth-child(even) .route-step_content {
  margin-left: auto;
  transform-origin: left center;
}

.route-step:nth-child(odd) .route-step_content {
  margin-right: auto;
  transform-origin: right center;
}

/* Animations using GSAP-like classes */
.route-step.is-visible {
  animation: stepEntrance 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes stepEntrance {
  0% {
    opacity: 0;
    transform: perspective(1000px) scale(0.8) translateZ(-200px);
  }

  100% {
    opacity: 1;
    transform: perspective(1000px) scale(1) translateZ(0);
  }
}

/* Floating labels for steps */
.step-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, #1e1b4b, #7c3aed);
  /* Much darker for light mode */
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dark .step-title {
  background: linear-gradient(90deg, #fff, #a78bfa);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Connector Spline replacement */
.md\:block.absolute.left-1\/2.bg-border {
  display: none !important;
  /* Managed by Three.js splines now */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .route-step_content {
    width: 85%;
    margin: 0 auto !important;
  }

  .route-step_indicator {
    left: 20px;
    transform: translateX(0) translateZ(30px);
    width: 50px;
    height: 50px;
  }
}