/* ==========================================================================
   Roadmap Section — matched to Figma
   Desktop ≥1024  : zig-zag, 1120 content / center timeline
   Tablet  768–1023: stacked (mobile layout), desktop fonts
   Mobile  ≤767    : stacked, mobile fonts
   ========================================================================== */

.roadmap-section {
  padding: 80px 20px;
}

.roadmap-section .inner-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* —— Header —— */
.roadmap-section .inner-wrap .top-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.roadmap-section .inner-wrap .top-content h2 {
  margin: 0;
  color: #fff;
  font-size: 54px;
  font-weight: 500;
  font-style: italic;
  line-height: 64px;
  letter-spacing: 0;
  text-align: center;
  text-transform: capitalize;
}

.roadmap-section .inner-wrap .top-content .wysiwyg-content {
  max-width: 804px;
  margin: 0 auto;
  color: #fff;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
}

.roadmap-section .inner-wrap .top-content .wysiwyg-content p {
  margin: 0;
  color: #fff;
  font-size: 16px;
  line-height: 24px;
}

/* —— Timeline list —— */
.roadmap-section .inner-wrap .repeater-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

/*
  Figma row = 1120px → [ card half | 80 circle | card half ]
  Measured from Figma: circle → arrow tip ≈ 20px, arrow ≈ 20px, circle → card ≈ 40px
*/
.roadmap-section .inner-wrap .repeater-inner-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr);
  column-gap: 40px;
  align-items: center;
  position: relative;
  width: 100%;
  z-index: 1;
}

/* Figma mb-[-32px] overlap between rows */
.roadmap-section .inner-wrap .repeater-inner-wrap:not(:last-child) {
  margin-bottom: -32px;
}

.roadmap-section .inner-wrap .repeater-inner-wrap .icon-wrap {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
}

/* Odd → card right of center */
.roadmap-section .inner-wrap .repeater-inner-wrap:nth-child(odd) .details-wrap {
  grid-column: 3;
  grid-row: 1;
  width: 100%;
  justify-self: stretch;
}

/* Even → card left of center */
.roadmap-section .inner-wrap .repeater-inner-wrap:nth-child(even) .details-wrap {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  justify-self: stretch;
}

/* —— Center timeline line —— */
.roadmap-section .inner-wrap .repeater-inner-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  background: #006E55;
  top: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
}

.roadmap-section .inner-wrap .repeater-inner-wrap:first-child::before {
  top: 50%;
}

/* Stop at center of last circle — do not extend past last item */
.roadmap-section .inner-wrap .repeater-inner-wrap:last-child::before {
  bottom: 50%;
}

.roadmap-section .inner-wrap .repeater-inner-wrap:only-child::before {
  content: none;
}

.roadmap-section .inner-wrap .repeater-inner-wrap::after {
  content: none;
}

/* —— Circle —— */
.roadmap-section .inner-wrap .icon-wrap {
  width: 80px;
  height: 80px;
  min-width: 80px;
  box-sizing: border-box;
  border-radius: 50%;
  background: #EEC433;
  color: #143830;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Times New Roman", Times, serif;
  font-weight: 700;
  font-size: 60px;
  line-height: 60px;
  text-align: center;
  position: relative;
  z-index: 2;
}

/* —— Card —— */
.roadmap-section .repeater-inner-wrap .details-wrap {
  position: relative;
  box-sizing: border-box;
  margin: 0;
  padding: 32px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 6px 40px rgba(0, 0, 0, 0.06);
  z-index: 1;
}

.roadmap-section .repeater-inner-wrap .details-wrap hr {
  display: none;
}

.roadmap-section .repeater-inner-wrap .details-wrap h4 {
  margin: 0 0 10px;
  padding: 0;
  color: #020202;
  font-weight: 700;
  font-size: 26px;
  line-height: 34px;
  letter-spacing: 0;
  text-transform: capitalize;
}

.roadmap-section .repeater-inner-wrap .details-wrap p,
.roadmap-section .repeater-inner-wrap .details-wrap li {
  margin: 0;
  padding: 0;
  color: #454545;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
}

.roadmap-section .repeater-inner-wrap .details-wrap p + p {
  margin-top: 12px;
}

.roadmap-section .repeater-inner-wrap .details-wrap ul {
  margin: 0;
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/*
  Arrow is 20px deep inside the 40px column-gap,
  leaving ~20px clear between circle edge and tip (matches Figma).
*/
.roadmap-section .repeater-inner-wrap .details-wrap::before {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  z-index: 2;
  pointer-events: none;
}

/* Even (left card) → arrow on right */
.roadmap-section .repeater-inner-wrap:nth-child(even) .details-wrap::before {
  right: -20px;
  left: auto;
  border-top: 21px solid transparent;
  border-bottom: 21px solid transparent;
  border-left: 20px solid #fff;
  border-right: none;
}

/* Odd (right card) → arrow on left */
.roadmap-section .repeater-inner-wrap:nth-child(odd) .details-wrap::before {
  left: -20px;
  right: auto;
  border-top: 21px solid transparent;
  border-bottom: 21px solid transparent;
  border-right: 20px solid #fff;
  border-left: none;
}

/* —— Outro —— */
.roadmap-section .bottom-content,
.roadmap-section .bottom-content .wysiwyg-content,
.roadmap-section .bottom-content * {
  margin: 0;
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
}

.roadmap-section .bottom-content strong {
  font-weight: 700;
}

.roadmap-section .bottom-content a {
  color: #fff;
  text-decoration: underline;
}

/* ==========================================================================
   Tablet 768–1023 — stacked (Figma mobile structure), desktop type
   ========================================================================== */
@media screen and (max-width: 1023px) {
  .roadmap-section {
    padding: 60px 20px;
  }

  .roadmap-section .inner-wrap {
    gap: 40px;
    max-width: 100%;
  }

  .roadmap-section .inner-wrap .repeater-wrap {
    gap: 20px;
  }

  .roadmap-section .inner-wrap .repeater-inner-wrap,
  .roadmap-section .inner-wrap .repeater-inner-wrap:nth-child(odd),
  .roadmap-section .inner-wrap .repeater-inner-wrap:nth-child(even) {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    grid-template-columns: none;
    column-gap: normal;
    /* Figma mobile: gap 10px circle→content; card inset 15px; arrow 20px */
    gap: 10px;
    margin-bottom: 0;
    width: 100%;
  }

  .roadmap-section .inner-wrap .repeater-inner-wrap .icon-wrap,
  .roadmap-section .inner-wrap .repeater-inner-wrap:nth-child(odd) .details-wrap,
  .roadmap-section .inner-wrap .repeater-inner-wrap:nth-child(even) .details-wrap {
    grid-column: auto;
    grid-row: auto;
    justify-self: auto;
  }

  /* Line through left-side circles; stop at last circle center */
  .roadmap-section .inner-wrap .repeater-inner-wrap::before {
    left: 40px;
    transform: none;
  }

  .roadmap-section .inner-wrap .repeater-inner-wrap:first-child::before {
    top: 40px;
  }

  .roadmap-section .inner-wrap .repeater-inner-wrap:last-child::before {
    top: 0;
    bottom: auto;
    height: 40px;
  }

  .roadmap-section .inner-wrap .repeater-inner-wrap:not(:last-child)::before {
    bottom: -20px;
  }

  .roadmap-section .repeater-inner-wrap .details-wrap,
  .roadmap-section .inner-wrap .repeater-inner-wrap:nth-child(odd) .details-wrap,
  .roadmap-section .inner-wrap .repeater-inner-wrap:nth-child(even) .details-wrap {
    flex: 1 1 auto;
    width: auto;
    max-width: 100%;
    margin: 0;
    /* Figma: content starts after 10px gap; card inset 15–20px with arrow in that inset */
    margin-left: 20px;
    padding: 20px;
    border-radius: 12px;
  }

  /* All arrows point left — tip lands ~10px from circle (gap 10 + margin 20 − arrow 20) */
  .roadmap-section .repeater-inner-wrap .details-wrap::before,
  .roadmap-section .repeater-inner-wrap:nth-child(odd) .details-wrap::before,
  .roadmap-section .repeater-inner-wrap:nth-child(even) .details-wrap::before {
    left: -20px;
    right: auto;
    top: 30px;
    transform: none;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 20px solid #fff;
    border-left: none;
  }
}

/* ==========================================================================
   Mobile ≤767 — Figma mobile
   ========================================================================== */
@media screen and (max-width: 767px) {
  .roadmap-section {
    padding: 40px 20px;
  }

  .roadmap-section .inner-wrap {
    gap: 40px;
  }

  .roadmap-section .inner-wrap .top-content h2 {
    font-size: 38px;
    line-height: 46px;
  }

  .roadmap-section .inner-wrap .top-content .wysiwyg-content {
    max-width: 100%;
  }

  .roadmap-section .inner-wrap .icon-wrap {
    width: 60px;
    height: 60px;
    min-width: 60px;
    font-size: 36px;
    line-height: 36px;
  }

  .roadmap-section .inner-wrap .repeater-inner-wrap::before {
    left: 30px;
    width: 4px;
  }

  .roadmap-section .inner-wrap .repeater-inner-wrap:first-child::before {
    top: 30px;
  }

  .roadmap-section .inner-wrap .repeater-inner-wrap:last-child::before {
    height: 30px;
  }

  .roadmap-section .repeater-inner-wrap .details-wrap h4 {
    font-size: 24px;
    line-height: 32px;
  }

  .roadmap-section .repeater-inner-wrap .details-wrap::before,
  .roadmap-section .repeater-inner-wrap:nth-child(odd) .details-wrap::before,
  .roadmap-section .repeater-inner-wrap:nth-child(even) .details-wrap::before {
    top: 24px;
  }

  .roadmap-section .bottom-content,
  .roadmap-section .bottom-content .wysiwyg-content,
  .roadmap-section .bottom-content * {
    text-align: left;
  }
}
