/* رحلة المتعلّم — درج صاعد بقطع هوية آفاق */

.nx-path {
  --nx-navy: #163A7A;
  --nx-path-gap: 1.5rem;
  position: relative;
  overflow: clip;
  direction: rtl;
  padding: 3.4rem 0 3.6rem;
  font-family: 'Cairo', 'IBM Plex Sans Arabic', sans-serif;
  background:
    radial-gradient(ellipse 55% 60% at 92% 20%, rgb(91 167 214 / .10), transparent 62%),
    radial-gradient(ellipse 45% 50% at 6% 90%, rgb(245 163 34 / .06), transparent 60%),
    #fff;
}

.nx-path-inner {
  width: min(1180px, calc(100% - 2.4rem));
  margin: 0 auto;
}

.nx-path-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0 auto 2.4rem;
}

.nx-path-kicker {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.75rem;
  color: #7a8ea6;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}
.nx-path-kicker::before,
.nx-path-kicker span {
  content: "";
  width: 1.8rem;
  height: 1.5px;
  background: #E2B33A;
}

.nx-path-title {
  margin: 0;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.nx-path-title-a,
.nx-path-title-b { display: block; }
.nx-path-title-a {
  color: var(--nx-navy);
  font-size: clamp(1.55rem, 2.3vw, 2.05rem);
}
.nx-path-title-b {
  color: #2f6ec0;
  font-size: clamp(1.42rem, 2.1vw, 1.88rem);
}

.nx-path-lead {
  margin: 0.6rem auto 0;
  max-width: 30rem;
  color: #5d738c;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.8;
}

.nx-path-board { position: relative; }

.nx-path-line {
  position: absolute;
  top: 0;
  right: calc((100% - 3 * var(--nx-path-gap)) / 8);
  width: calc(100% - (100% - 3 * var(--nx-path-gap)) / 4);
  height: 9.5rem;
  overflow: visible;
  pointer-events: none;
}
.nx-path-line line {
  stroke: #b9cde4;
  stroke-width: 2;
  stroke-dasharray: 6 7;
  stroke-linecap: round;
}

.nx-path-steps {
  position: relative;
  z-index: 1;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--nx-path-gap);
  align-items: start;
  margin: 0;
  padding: 0;
}

.nx-step {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.nx-step--1 { margin-top: 4.5rem; }
.nx-step--2 { margin-top: 3rem; }
.nx-step--3 { margin-top: 1.5rem; }

.nx-step-piece {
  position: relative;
  display: grid;
  place-items: center;
  width: 7.5rem;
  height: 5rem;
  margin-bottom: 0.9rem;
  filter: drop-shadow(0 12px 18px rgb(22 58 122 / .18));
  transition: transform 0.25s ease;
}
.nx-step-piece svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.nx-step-piece b {
  position: relative;
  color: #fff;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  direction: ltr;
}
.nx-step--3 .nx-step-piece b { color: var(--nx-navy); }
.nx-step--4 .nx-step-piece { filter: drop-shadow(0 12px 18px rgb(245 163 34 / .28)); }

.nx-step-card {
  width: 100%;
  padding: 1.35rem 1.2rem 1.3rem;
  background: #fff;
  border: 1px solid rgb(30 80 150 / .10);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgb(22 58 122 / .07);
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.nx-step:hover .nx-step-card {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgb(22 58 122 / .12);
}
.nx-step:hover .nx-step-piece { transform: translateY(-3px); }

.nx-step-ic {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  margin: 0 auto 0.8rem;
  border-radius: 8px;
  background: #eef4fb;
  color: var(--nx-navy);
}
.nx-step--4 .nx-step-ic { background: #fff5e2; color: #c77a06; }
.nx-step-ic svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nx-step h3 {
  margin: 0;
  color: var(--nx-navy);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.45;
}
.nx-step p {
  margin: 0.45rem 0 0;
  color: #6a8098;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.8;
}

.nx-path-foot {
  display: flex;
  justify-content: center;
  margin-top: 2.4rem;
}
.nx-path-go {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.9rem;
  padding: 0.2rem 1.25rem 0.2rem 0.35rem;
  border-radius: 999px;
  background: var(--nx-navy);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 26px rgb(22 58 122 / .22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.nx-path-go:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgb(22 58 122 / .28);
}
.nx-path-go i {
  position: relative;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: #f5a322;
}
.nx-path-go i::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: translate(-35%, -50%) rotate(45deg);
}

/* لوحي: شبكة 2×2 بدون درج */
@media (max-width: 1080px) {
  .nx-path-line { display: none; }
  .nx-path-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
  .nx-step--1,
  .nx-step--2,
  .nx-step--3 { margin-top: 0; }
}

/* جوال: مسار عمودي */
@media (max-width: 700px) {
  .nx-path { padding: 2.6rem 0 2.8rem; }
  .nx-path-inner { width: calc(100% - 2rem); }
  .nx-path-head { margin-bottom: 1.8rem; }
  .nx-path-title-a { font-size: 1.5rem; }
  .nx-path-title-b { font-size: 1.35rem; }
  .nx-path-lead { font-size: 0.88rem; max-width: 20rem; }

  .nx-path-steps {
    grid-template-columns: 1fr;
    row-gap: 0.9rem;
  }
  .nx-path-steps::before {
    content: "";
    position: absolute;
    top: 1.8rem;
    bottom: 1.8rem;
    right: 2.1rem;
    border-right: 2px dashed #c3d4e8;
    z-index: -1;
  }
  .nx-step {
    display: grid;
    grid-template-columns: 4.2rem minmax(0, 1fr);
    align-items: center;
    gap: 0.8rem;
  }
  .nx-step-piece {
    width: 4.2rem;
    height: 2.9rem;
    margin: 0;
  }
  .nx-step-piece b { font-size: 1.02rem; }
  .nx-step-card {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr);
    column-gap: 0.75rem;
    align-items: start;
    padding: 0.95rem 0.95rem 0.95rem 0.85rem;
    text-align: right;
  }
  .nx-step-ic {
    grid-row: span 2;
    width: 2.4rem;
    height: 2.4rem;
    margin: 0.1rem 0 0;
  }
  .nx-step-ic svg { width: 1.15rem; height: 1.15rem; }
  .nx-step h3 { font-size: 1rem; }
  .nx-step p { margin-top: 0.15rem; font-size: 0.84rem; line-height: 1.7; }
  .nx-path-foot { margin-top: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .nx-step-card,
  .nx-step-piece,
  .nx-path-go { transition: none; }
}
