/* How It Work — rocket timeline section */

.rx-how-it-work {
  position: relative;
  background: #0a0a0a;
  overflow: hidden;
}

.rx-how-it-work__inner {
  position: relative;
  z-index: 1;
}

.rx-how-it-work__head {
  max-width: 900px;
  margin: 0 auto 60px;
}

.rx-how-it-work__title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.rx-how-it-work__subtitle {
  font-size: clamp(17px, 2vw, 20px);
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  line-height: 1.5;
}

/* Timeline container */
.rx-how-it-work__timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 40px;
}

/* Center path + rocket */
.rx-how-it-work__path-wrap {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 202px;
  height: 100%;
  min-height: 720px;
  z-index: 1;
  pointer-events: none;
}

.rx-how-it-work__path {
  display: block;
  width: 100%;
  height: auto;
  color: #fff;
}

.rx-how-it-work__path-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  overflow: hidden;
  transition: height 0.1s linear;
}

.rx-how-it-work__path-progress svg {
  display: block;
  width: 202px;
  height: 744px;
}

.rx-how-it-work__rocket {
  position: absolute;
  top: 0;
  left: 50%;
  width: 48px;
  height: 48px;
  z-index: 10;
  transform: translate(-50%, -50%) rotate(140deg);
  will-change: transform, top, left;
}

.rx-how-it-work__rocket svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 12px rgba(241, 107, 39, 0.5));
}

/* Rows */
.rx-how-it-work__row {
  position: relative;
  display: block;
  width: 100%;
  min-height: 200px;
  margin-bottom: 24px;
}

@media (min-width: 992px) {
  .rx-how-it-work__row {
    min-height: 280px;
    margin-bottom: 0;
  }

  .rx-how-it-work__card-wrap--left,
  .rx-how-it-work__card-wrap--right {
    position: relative;
    top: 30%;
  }
}

.rx-how-it-work__row:last-child {
  margin-bottom: 0;
}

.rx-how-it-work__card-wrap {
  width: 40%;
  max-width: 420px;
}

.rx-how-it-work__card-wrap--left {
  margin-right: auto;
  padding-right: 8%;
}

.rx-how-it-work__card-wrap--right {
  margin-left: auto;
  padding-left: 8%;
}

/* Card */
.rx-how-it-work__card {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid transparent;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rx-how-it-work__card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(241, 107, 39, 0.35), rgba(255, 255, 255, 0.08));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.rx-how-it-work__card:hover {
  border-color: rgba(241, 107, 39, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.rx-how-it-work__card-body {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 32px 28px;
}

.rx-how-it-work__card-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rx-how-it-work__card-icon img {
  max-width: 56px;
  max-height: 56px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(58%) sepia(89%) saturate(1200%) hue-rotate(346deg) brightness(101%) contrast(95%);
}

.rx-how-it-work__card-title {
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 10px;
}

.rx-how-it-work__card-title a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.rx-how-it-work__card-title a:hover {
  color: var(--theme, #F16B27);
}

.rx-how-it-work__card-sub {
  display: block;
  font-size: 17px;
  font-weight: 400;
  color: var(--theme, #F16B27);
  line-height: 1.5;
}

.rx-how-it-work__card-num {
  position: absolute;
  bottom: 8px;
  left: 28px;
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
  user-select: none;
}

/* Step badge on path */
.rx-how-it-work__step-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
}

.rx-how-it-work__step-badge span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1199px) {
  .rx-how-it-work__card-wrap {
    width: 44%;
  }
}

@media (max-width: 991px) {
  .rx-how-it-work__path-wrap {
    display: none;
  }

  .rx-how-it-work__row {
    min-height: auto;
    margin-bottom: 32px;
  }

  .rx-how-it-work__card-wrap,
  .rx-how-it-work__card-wrap--left,
  .rx-how-it-work__card-wrap--right {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
  }

  .rx-how-it-work__step-badge {
    display: none;
  }

  .rx-how-it-work__card-num {
    font-size: 48px;
  }
}

@media (max-width: 575px) {
  .rx-how-it-work__card-body {
    flex-direction: column;
    padding: 24px 20px;
    gap: 16px;
  }

  .rx-how-it-work__head {
    margin-bottom: 40px;
  }
}
