.journey-steps-block .journey-mobile-path {
  display: none;
}

.thee-journey-mobile-section {
  display: none;
}

@media (max-width: 767px) {
  .thee-journey-mobile-section {
    display: block;
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
  }

  .elementor .e-con.thee-journey-mobile-intro {
    margin-block-end: 0 !important;
  }

  /* Override Elementor's absolute offsets and the desktop alignment script. */
  .elementor .thee-journey-mobile-section > .elementor-widget-html {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }

  .elementor .e-con:has(> .elementor-widget-html .journey-steps-block) {
    padding-inline: 16px;
  }

  /* Override the mobile display:none in the saved Elementor HTML widget. */
  .elementor-widget-html .journey-steps-block {
    display: block !important;
    padding: 24px 0;
    overflow: visible;
  }

  .journey-steps-block .journey-steps-inner {
    --journey-path-width: 168px;
    --journey-circle-size: 64px;
    width: 100%;
    max-width: 480px;
    aspect-ratio: auto;
  }

  .journey-steps-block .journey-path {
    display: none;
  }

  .journey-steps-block .journey-step {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: var(--journey-path-width) minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    width: 100%;
    min-height: 140px;
    aspect-ratio: auto;
    transform: none;
    opacity: 1;
    /* The saved desktop widget animates the parent too; keep it steady here. */
    animation: none !important;
  }

  .journey-steps-block .journey-mobile-path {
    position: absolute;
    display: block;
    top: 0;
    left: 0;
    width: var(--journey-path-width);
    height: 100%;
    overflow: visible;
    pointer-events: none;
  }

  .journey-steps-block .journey-mobile-path .journey-arc {
    stroke-width: 24px;
    opacity: 1;
    stroke-dashoffset: 0;
    animation: none;
  }

  .journey-steps-block .journey-step .journey-number {
    inset: auto;
    left: calc((var(--journey-path-width) - var(--journey-circle-size)) / 2);
    top: calc(50% - var(--journey-circle-size) / 2);
    width: var(--journey-circle-size);
    height: var(--journey-circle-size);
    opacity: 1;
    transform: none;
    animation: none;
  }

  .journey-steps-block .journey-number-main {
    font-size: 21px;
  }

  .journey-steps-block .journey-number-label {
    font-size: 9px;
    margin-top: 4px;
  }

  .journey-steps-block .journey-step .journey-copy {
    position: relative;
    inset: auto;
    grid-column: 2;
    width: auto;
    max-width: none;
    padding: 16px 0;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
    overflow-wrap: anywhere;
    opacity: 1;
    transform: none;
    animation: none;
  }

  .journey-steps-block .journey-copy br {
    display: none;
  }

  @media (max-width: 380px) {
    .journey-steps-block .journey-steps-inner {
      --journey-path-width: 140px;
      --journey-circle-size: 52px;
    }

    .journey-steps-block .journey-step {
      min-height: 112px;
      gap: 12px;
    }
  }

  @media (prefers-reduced-motion: no-preference) {
    .journey-steps-block[data-mobile-journey]:not(.is-mobile-started) .journey-step .journey-arc {
      animation: none;
      stroke-dashoffset: 1;
      opacity: 0;
    }

    .journey-steps-block[data-mobile-journey]:not(.is-mobile-started) .journey-step .journey-number,
    .journey-steps-block[data-mobile-journey]:not(.is-mobile-started) .journey-step .journey-copy {
      animation: none;
      opacity: 0;
    }

    .journey-steps-block[data-mobile-journey].is-mobile-started .journey-step .journey-arc {
      animation: journeyDraw .62s ease both;
      animation-delay: var(--journey-mobile-delay);
    }

    .journey-steps-block[data-mobile-journey].is-mobile-started .journey-step .journey-number {
      animation: journeyNumberIn .42s cubic-bezier(.2, .9, .3, 1.25) both;
      animation-delay: calc(var(--journey-mobile-delay) + .23s);
    }

    .journey-steps-block[data-mobile-journey].is-mobile-started .journey-step .journey-copy {
      animation: theeJourneyMobileText .38s ease both;
      animation-delay: calc(var(--journey-mobile-delay) + .38s);
    }
  }
}

@keyframes theeJourneyMobileText {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
