/* =========================================================
   HOW WE WORK / PROCESS SECTION
   ========================================================= */

.mersad-process {
  position: relative;
  isolation: isolate;

  width: 100%;

  /*
   * مهم للـSticky:
   * overflow: hidden كان بيمنع العمود الشمال من الثبات.
   */
  overflow: visible;

  padding: 132px 0 140px;

  background:
    radial-gradient(
      circle at 16% 18%,
      rgba(211, 242, 0, 0.05),
      transparent 28%
    ),
    linear-gradient(
      180deg,
      #050505 0%,
      #070707 52%,
      #050505 100%
    );

  border-bottom:
    1px solid rgba(255, 255, 255, 0.055);
}

.mersad-process::before {
  content: "";

  position: absolute;
  inset: 0;
  z-index: -3;

  pointer-events: none;

  opacity: 0.25;

  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px
    );

  background-size: 48px 48px;

  -webkit-mask-image:
    linear-gradient(
      to bottom,
      transparent,
      black 15%,
      black 85%,
      transparent
    );

  mask-image:
    linear-gradient(
      to bottom,
      transparent,
      black 15%,
      black 85%,
      transparent
    );
}

/* =========================================================
   BACKGROUND GLOWS
   ========================================================= */

.mersad-process__glow {
  position: absolute;
  z-index: -2;

  pointer-events: none;

  border-radius: 50%;

  filter: blur(12px);
}

.mersad-process__glow--left {
  top: 150px;
  left: -320px;

  width: 650px;
  height: 650px;

  background:
    radial-gradient(
      circle,
      rgba(211, 242, 0, 0.065),
      transparent 70%
    );
}

.mersad-process__glow--right {
  right: -340px;
  bottom: 60px;

  width: 720px;
  height: 720px;

  background:
    radial-gradient(
      circle,
      rgba(211, 242, 0, 0.04),
      transparent 72%
    );
}

/* =========================================================
   CONTAINER
   ========================================================= */

.mersad-process__container {
  position: relative;
  z-index: 2;

  width: min(100% - 48px, 1280px);
  margin-inline: auto;

  display: grid;
  grid-template-columns:
    minmax(0, 0.84fr)
    minmax(540px, 1.16fr);

  gap: clamp(76px, 9vw, 145px);

  /*
   * يمنع عمود الـIntro من التمدد بطول العمود الثاني.
   */
  align-items: start;
}

/* =========================================================
   INTRO — STICKY LEFT COLUMN
   ========================================================= */

.mersad-process__intro {
  position: sticky;
  top: 130px;

  align-self: start;

  width: 100%;
  height: fit-content;
  min-height: 0;

  /*
   * يحافظ على العمود فوق عناصر الخلفية أثناء الثبات.
   */
  z-index: 3;
}

.mersad-process__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  margin-bottom: 24px;

  color: #d3f200;

  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mersad-process__eyebrow::before {
  content: "";

  width: 7px;
  height: 7px;

  flex: 0 0 auto;

  border-radius: 50%;

  background: #d3f200;

  box-shadow:
    0 0 17px rgba(211, 242, 0, 0.45);
}

.mersad-process__title {
  max-width: 610px;
  margin: 0;

  color: #f7f7f5;

  font-family: "Inter", sans-serif;
  font-size: clamp(46px, 5vw, 72px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.055em;

  text-wrap: balance;
}

.mersad-process__title span {
  display: block;

  color: #d3f200;
}

.mersad-process__description {
  max-width: 560px;
  margin: 30px 0 0;

  color: #9c9c9c;

  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.78;
}

.mersad-process__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;

  min-height: 52px;
  margin-top: 38px;
  padding: 0 24px;

  color: #050505;
  background: #d3f200;

  border: 1px solid #d3f200;
  border-radius: 10px;

  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;

  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.mersad-process__cta svg {
  width: 18px;
  height: 18px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;

  transition:
    transform 180ms ease;
}

.mersad-process__cta:hover {
  transform: translateY(-2px);

  background: #e0ff00;
  border-color: #e0ff00;

  box-shadow:
    0 16px 34px rgba(211, 242, 0, 0.12);
}

.mersad-process__cta:hover svg {
  transform: translateX(4px);
}

/* =========================================================
   FORMULA
   ========================================================= */

.mersad-process__formula {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;

  margin-top: 48px;

  color: #696969;

  font-family: "Inter", sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.mersad-process__formula i {
  color: #d3f200;

  font-style: normal;
  font-size: 13px;
  font-weight: 500;
}

/* =========================================================
   PROCESS JOURNEY
   ========================================================= */

.mersad-process__journey {
  position: relative;

  min-width: 0;

  padding-left: 72px;
}

/* =========================================================
   PROGRESS RAIL
   ========================================================= */

.mersad-process__rail {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 22px;

  width: 1px;

  overflow: hidden;

  background:
    rgba(255, 255, 255, 0.11);
}

.mersad-process__rail > span {
  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 0%;

  background:
    linear-gradient(
      to bottom,
      #d3f200,
      rgba(211, 242, 0, 0.35)
    );

  box-shadow:
    0 0 12px rgba(211, 242, 0, 0.35);

  transition:
    height 220ms ease;
}

/* =========================================================
   PROCESS STEP
   ========================================================= */

.mersad-process-step {
  position: relative;

  min-height: 470px;
  padding-bottom: 40px;

  opacity: 0.4;

  transform:
    translateY(22px);

  transition:
    opacity 360ms ease,
    transform 360ms ease;
}

.mersad-process-step:last-child {
  min-height: auto;
  padding-bottom: 0;
}

.mersad-process-step.is-active {
  opacity: 1;

  transform:
    translateY(0);
}

/* =========================================================
   STEP MARKER
   ========================================================= */

.mersad-process-step__marker {
  position: absolute;
  top: 26px;
  left: -72px;

  width: 50px;

  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 11px;
}

.mersad-process-step__dot {
  position: relative;
  z-index: 3;

  width: 12px;
  height: 12px;

  border: 2px solid #383838;
  border-radius: 50%;

  background: #080808;

  transition:
    border-color 260ms ease,
    background-color 260ms ease,
    box-shadow 260ms ease,
    transform 260ms ease;
}

.mersad-process-step.is-active
.mersad-process-step__dot {
  transform: scale(1.15);

  border-color: #d3f200;

  background: #d3f200;

  box-shadow:
    0 0 0 6px rgba(211, 242, 0, 0.08),
    0 0 18px rgba(211, 242, 0, 0.42);
}

.mersad-process-step__number {
  color: #555555;

  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;

  transition:
    color 260ms ease;
}

.mersad-process-step.is-active
.mersad-process-step__number {
  color: #d3f200;
}

/* =========================================================
   STEP CARD
   ========================================================= */

.mersad-process-step__card {
  position: relative;

  padding: 40px 42px 42px;

  overflow: hidden;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.023),
      rgba(255, 255, 255, 0.006)
    ),
    #0b0b0b;

  border: 1px solid #272727;
  border-radius: 18px;

  transition:
    border-color 280ms ease,
    background-color 280ms ease,
    box-shadow 280ms ease,
    transform 280ms ease;
}

.mersad-process-step__card::before {
  content: "";

  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 2px;

  background:
    linear-gradient(
      90deg,
      #d3f200,
      rgba(211, 242, 0, 0.15),
      transparent 70%
    );

  transform: scaleX(0);
  transform-origin: left;

  transition:
    transform 420ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mersad-process-step__card::after {
  content: "";

  position: absolute;
  right: -130px;
  bottom: -150px;

  width: 310px;
  height: 310px;

  pointer-events: none;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(211, 242, 0, 0.07),
      transparent 70%
    );

  opacity: 0;

  transition:
    opacity 280ms ease;
}

.mersad-process-step.is-active
.mersad-process-step__card {
  transform:
    translateX(5px);

  border-color:
    rgba(211, 242, 0, 0.27);

  background-color:
    #0d0d0d;

  box-shadow:
    0 26px 62px rgba(0, 0, 0, 0.28),
    0 0 35px rgba(211, 242, 0, 0.035);
}

.mersad-process-step.is-active
.mersad-process-step__card::before {
  transform:
    scaleX(1);
}

.mersad-process-step.is-active
.mersad-process-step__card::after {
  opacity: 1;
}

/* =========================================================
   STEP CONTENT
   ========================================================= */

.mersad-process-step__kicker {
  display: block;

  margin-bottom: 14px;

  color: #6e6e6e;

  font-family: "Inter", sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;

  transition:
    color 260ms ease;
}

.mersad-process-step.is-active
.mersad-process-step__kicker {
  color: #a4a4a4;
}

.mersad-process-step__title {
  margin: 0;

  color: #d7d7d5;

  font-family: "Inter", sans-serif;
  font-size: clamp(34px, 3.2vw, 48px);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.048em;

  transition:
    color 260ms ease,
    transform 260ms ease;
}

.mersad-process-step.is-active
.mersad-process-step__title {
  transform:
    translateX(3px);

  color: #f5f5f2;
}

.mersad-process-step__description {
  max-width: 650px;
  margin: 24px 0 0;

  color: #909090;

  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.76;
}

.mersad-process-step__items {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 12px 22px;

  margin: 27px 0 0;
  padding: 0;

  list-style: none;
}

.mersad-process-step__items li {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  color: #c0c0c0;

  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.mersad-process-step__items li > span {
  width: 6px;
  height: 6px;

  flex: 0 0 auto;

  margin-top: 6px;

  border-radius: 50%;

  background: #d3f200;

  box-shadow:
    0 0 9px rgba(211, 242, 0, 0.25);
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {
  .mersad-process {
    overflow: hidden;

    padding: 108px 0;
  }

  .mersad-process__container {
    grid-template-columns: 1fr;
    gap: 76px;
  }

  /*
   * بعد التحول لعمود واحد، نوقف الـSticky.
   */
  .mersad-process__intro {
    position: relative;
    top: auto;

    align-self: auto;

    height: auto;

    z-index: auto;
  }

  .mersad-process__title {
    max-width: 840px;
  }

  .mersad-process__description {
    max-width: 700px;
  }

  .mersad-process__journey {
    max-width: 850px;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {
  .mersad-process {
    overflow: hidden;

    padding: 84px 0 82px;
  }

  .mersad-process__container {
    width: min(100% - 24px, 560px);
    gap: 58px;
  }

  .mersad-process__intro {
    position: relative;
    top: auto;

    height: auto;
  }

  .mersad-process__eyebrow {
    margin-bottom: 18px;

    font-size: 10px;
  }

  .mersad-process__title {
    font-size:
      clamp(38px, 11vw, 52px);

    line-height: 1.02;
    letter-spacing: -0.045em;
  }

  .mersad-process__description {
    margin-top: 22px;

    font-size: 15px;
    line-height: 1.7;
  }

  .mersad-process__cta {
    width: 100%;
    margin-top: 30px;
  }

  .mersad-process__formula {
    display: none;
  }

  .mersad-process__journey {
    padding-left: 39px;
  }

  .mersad-process__rail {
    left: 9px;
  }

  .mersad-process-step {
    min-height: 0;
    padding-bottom: 30px;

    opacity: 1;
    transform: none;
  }

  .mersad-process-step__marker {
    top: 24px;
    left: -39px;

    width: 20px;
  }

  .mersad-process-step__number {
    display: none;
  }

  .mersad-process-step__card {
    padding: 30px 23px 32px;

    border-radius: 15px;
  }

  .mersad-process-step.is-active
  .mersad-process-step__card {
    transform: none;
  }

  .mersad-process-step__title {
    font-size:
      clamp(29px, 8vw, 38px);
  }

  .mersad-process-step.is-active
  .mersad-process-step__title {
    transform: none;
  }

  .mersad-process-step__description {
    margin-top: 20px;

    font-size: 14px;
    line-height: 1.7;
  }

  .mersad-process-step__items {
    grid-template-columns: 1fr;

    gap: 10px;

    margin-top: 22px;
  }

  .mersad-process-step__items li {
    font-size: 12px;
  }
}
/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .mersad-process-step,
  .mersad-process-step__dot,
  .mersad-process-step__number,
  .mersad-process-step__card,
  .mersad-process-step__card::before,
  .mersad-process-step__card::after,
  .mersad-process-step__kicker,
  .mersad-process-step__title,
  .mersad-process__rail > span,
  .mersad-process__cta,
  .mersad-process__cta svg {
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   FIXED PROCESS INTRO — DESKTOP
   ========================================================= */

html,
body {
  overflow-x: clip;
}

#main-content {
  overflow: visible !important;
}

@media (min-width: 1101px) {
  .mersad-process {
    position: relative;

    overflow: visible !important;
  }

  .mersad-process__container {
    position: relative;

    display: grid !important;

    grid-template-columns:
      minmax(0, 0.84fr)
      minmax(540px, 1.16fr) !important;

    align-items: start !important;

    overflow: visible !important;
  }

  /*
   * العمود الشمال يفضل محجوز في أول Column
   * حتى لما يتحول إلى position: fixed.
   */
  .mersad-process__intro {
    grid-column: 1 !important;
    grid-row: 1 !important;

    align-self: start !important;

    width: 100%;
    height: fit-content;
    min-height: 0;

    max-height: calc(100vh - 64px);

    z-index: 20;
  }

  /*
   * يمنع خطوات الـProcess من الانتقال
   * إلى مكان العمود الشمال.
   */
  .mersad-process__journey {
    grid-column: 2 !important;
    grid-row: 1 !important;

    min-width: 0;
  }

  .mersad-process__intro.is-fixed {
    position: fixed !important;

    margin: 0 !important;

    pointer-events: auto;

    will-change: top;
  }

  .mersad-process__intro.is-at-section-end {
    will-change: top;
  }

  /*
   * تصغير المحتوى نسبيًا ليظل كاملًا
   * داخل ارتفاع الشاشة.
   */
  .mersad-process__title {
    max-width: 560px;

    font-size: clamp(42px, 4.1vw, 61px);
    line-height: 0.98;
  }

  .mersad-process__description {
    margin-top: 22px;

    font-size: 15px;
    line-height: 1.65;
  }

  .mersad-process__cta {
    min-height: 48px;
    margin-top: 26px;
  }

  .mersad-process__formula {
    margin-top: 28px;
  }
}

/* =========================================================
   TABLET / MOBILE RESET
   ========================================================= */

@media (max-width: 1100px) {
  .mersad-process {
    overflow: hidden !important;
  }

  .mersad-process__container {
    grid-template-columns: 1fr !important;
  }

  .mersad-process__intro,
  .mersad-process__intro.is-fixed,
  .mersad-process__intro.is-at-section-end {
    position: relative !important;

    grid-column: auto !important;
    grid-row: auto !important;

    top: auto !important;
    left: auto !important;

    width: auto !important;
    height: auto !important;
    max-height: none !important;

    margin: 0 !important;

    z-index: auto !important;
  }

  .mersad-process__journey {
    grid-column: auto !important;
    grid-row: auto !important;
  }
}