.nvest-roadmap-widget {
  position: relative;
  width: 100%;
  min-height: var(--nvest-min-height, 820px);
  padding: clamp(24px, 3vw, 38px);
  padding-bottom: clamp(44px, 5vw, 72px);
  overflow: hidden;
  background: var(--nvest-section-bg, transparent);
}

.nvest-roadmap-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.nvest-roadmap-path {
  fill: none;
  stroke: var(--nvest-path-color, #ff7a1a);
  stroke-width: var(--nvest-path-width, 5px);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--nvest-dash-length, 12) var(--nvest-dash-gap, 8);
  vector-effect: non-scaling-stroke;
}

.nvest-roadmap-path-bg {
  opacity: var(--nvest-path-opacity, 0.35);
}

.nvest-roadmap-path-active {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(255, 122, 26, 0.38));
}

.nvest-roadmap-reveal-path {
  vector-effect: non-scaling-stroke;
}

.nvest-roadmap-runner {
  fill: var(--nvest-path-color, #ff7a1a);
  opacity: 0;
  filter: drop-shadow(0 0 10px rgba(255, 122, 26, 0.55));
  vector-effect: non-scaling-stroke;
}

.nvest-roadmap-arrow {
  fill: var(--nvest-path-color, #ff7a1a);
  opacity: 0;
  filter: drop-shadow(0 0 10px rgba(255, 122, 26, 0.4));
}

.nvest-roadmap-widget.is-static-progress .nvest-roadmap-runner,
.nvest-roadmap-widget.is-static-progress .nvest-roadmap-arrow {
  opacity: 1;
}

.nvest-roadmap-steps {
  padding-bottom: clamp(24px, 3vw, 40px);
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: clamp(170px, 17vw, 300px);
  row-gap: clamp(54px, 8vw, 120px);
  align-items: start;
}

.nvest-roadmap-step {
  display: inline-flex;
  align-items: flex-start;
  gap: 20px;
  width: min(100%, 460px);
}

.nvest-roadmap-step.side-right {
  flex-direction: row-reverse;
}

.nvest-roadmap-step.step-1 {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  margin-top: 18px;
}

.nvest-roadmap-step.step-2 {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  margin-top: 92px;
}

.nvest-roadmap-step.step-3 {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
  margin-top: 28px;
}

.nvest-roadmap-step.step-4 {
  grid-column: 2;
  grid-row: 3;
  justify-self: end;
  margin-top: 8px;
  margin-bottom: 8px;
}

.nvest-roadmap-card-wrap {
  flex: 0 0 auto;
}

.nvest-roadmap-card {
  position: relative;
  width: var(--nvest-card-size, 92px);
  height: var(--nvest-card-size, 92px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--nvest-card-radius, 20px);
  background: var(--nvest-card-bg, #111827);
  border: 1px solid var(--nvest-card-border, rgba(255, 122, 26, 0.45));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.nvest-roadmap-badge {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--nvest-badge-bg, #ff7a1a);
  color: var(--nvest-badge-text, #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(255, 122, 26, 0.32);
}

.nvest-roadmap-icon {
  color: var(--nvest-icon-color, #ff7a1a);
  font-size: clamp(28px, 2.4vw, 34px);
  line-height: 1;
}

.nvest-roadmap-icon i,
.nvest-roadmap-icon svg {
  width: 1em;
  height: 1em;
  display: block;
}

.nvest-roadmap-content {
  max-width: var(--nvest-content-max, 280px);
}

.nvest-roadmap-title {
  margin: 0 0 10px;
  color: var(--nvest-heading-color, #ffffff);
  font-size: clamp(22px, 2.1vw, 36px);
  line-height: 1.08;
  font-weight: 700;
}

.nvest-roadmap-description {
  color: var(--nvest-text-color, #94a3b8);
  font-size: clamp(15px, 1.05vw, 18px);
  line-height: 1.55;
}

@media (max-width: 1180px) {
  .nvest-roadmap-widget {
    min-height: max(700px, calc(var(--nvest-min-height, 820px) - 60px));
  }

  .nvest-roadmap-steps {
  padding-bottom: clamp(24px, 3vw, 40px);
    grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr);
    column-gap: clamp(90px, 10vw, 160px);
    row-gap: clamp(44px, 5vw, 76px);
  }

  .nvest-roadmap-step {
    width: min(100%, 390px);
    gap: 16px;
  }

  .nvest-roadmap-step.step-2 {
    margin-top: 78px;
  }

  .nvest-roadmap-content {
    max-width: min(var(--nvest-content-max, 280px), 240px);
  }

  .nvest-roadmap-card {
    width: clamp(76px, 7vw, var(--nvest-card-size, 92px));
    height: clamp(76px, 7vw, var(--nvest-card-size, 92px));
  }
}

@media (max-width: 767px) {
  .nvest-roadmap-widget.mobile-stack {
    min-height: auto;
    padding: 10px 0;
  }

  .nvest-roadmap-widget.mobile-stack .nvest-roadmap-svg {
    display: none;
  }

  .nvest-roadmap-widget.mobile-stack .nvest-roadmap-steps {
  padding-bottom: clamp(24px, 3vw, 40px);
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 24px;
    column-gap: 0;
  }

  .nvest-roadmap-widget.mobile-stack .nvest-roadmap-step,
  .nvest-roadmap-widget.mobile-stack .nvest-roadmap-step.side-right {
    width: 100%;
    max-width: none;
    margin: 0 !important;
    flex-direction: row;
    align-items: flex-start;
    justify-self: stretch;
  }

  .nvest-roadmap-widget.mobile-stack .nvest-roadmap-card {
    width: 72px;
    height: 72px;
  }

  .nvest-roadmap-widget.mobile-stack .nvest-roadmap-badge {
  color: var(--nvest-badge-text, #ffffff);
    width: 30px;
    height: 30px;
    top: -10px;
    right: -10px;
    font-size: 14px;
  }

  .nvest-roadmap-widget.mobile-stack .nvest-roadmap-content {
    max-width: none;
  }

  .nvest-roadmap-widget.mobile-stack .nvest-roadmap-title {
    font-size: 24px;
  }

  .nvest-roadmap-widget.mobile-stack .nvest-roadmap-description {
    font-size: 16px;
  }
}
