@charset "UTF-8";
/* ==========================================================================
   Methodology (منهجية)
   ========================================================================== */

.methodology {
  position: relative;
  margin-top: var(--section-gap);
  min-height: 526px;
  padding: 59px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--c-white);
  background: var(--c-primary);
}

.methodology__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Rectangle 18110: #003059 @ 60% */
.methodology__overlay {
  position: absolute;
  inset: 0;
  background: var(--c-primary);
  opacity: 0.6;
}

.methodology__inner {
  position: relative;
  width: 1228px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.methodology__title {
  padding: 10px;
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

/* Five 220 x 300 frames, 32px apart; arrows (38.95px) straddle the gaps at y=117 */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-start;
}

.step {
  position: relative;
  flex: 0 0 220px;
  height: 300px;
  padding: 40px 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-top-left-radius: 24px;
  border-bottom-right-radius: 24px;
  /* Gradient stroke: white -> #E6EAEE @ 15% (top to bottom), 4px */
}
.step::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 4px;
  border-radius: inherit;
  background: linear-gradient(to bottom, #ffffff, rgba(230, 234, 238, 0.15));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.step > * {
  opacity: 0;
}
.step:hover {
  background: rgba(255, 255, 255, 0.06);
}

.step__number {
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.2;
  color: var(--c-supportive);
}

.step__title {
  margin-top: 14px;
  font-size: var(--fs-sub1);
  font-weight: 600;
  line-height: 1.2;
}

.step__desc {
  margin-top: 57px;
  width: 179px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.47;
}

.arrow {
  position: relative;
  z-index: 1;
  flex: 0 0 32px;
  height: 300px;
}
.arrow img {
  position: absolute;
  top: 117px;
  left: 0; /* overlaps the previous (right-hand) frame by 7px, as in Figma */
  width: 38.95px;
  height: 38.97px;
  max-width: none;
}

/*
 * Entrance, from the Figma prototype ("منهجية أوج فى خدماتها" component set):
 *  Default -> Variant2 (smart animate, ease-in-out 0.8s): the frames and arrows fade in
 *    while each frame outline turns 180deg; numbers / titles / text stay hidden.
 *  Variant2 holds 0.8s, then -> Variant3 (ease-in-out 0.8s): the outlines turn back
 *    upright, the frame content fades in and the heading changes from
 *    "منهجية أوج فى تقديم خدماتها" to "منهجية أوج فى خدماتها".
 */
.methodology__title {
  display: grid;
}
.methodology__title > span {
  grid-area: 1/1;
}
.methodology__title-to {
  opacity: 0;
}
.steps {
  opacity: 0;
}
.methodology.is-visible .steps {
  animation: meth-fade 0.8s ease-in-out both;
}
.methodology.is-visible .step::before {
  animation: meth-outline 2.4s both;
}
.methodology.is-visible .step > *,
.methodology.is-visible .methodology__title-to {
  animation: meth-fade 0.8s ease-in-out 1.6s both;
}
.methodology.is-visible .methodology__title-from {
  animation: meth-fade-out 0.8s ease-in-out 1.6s both;
}

@keyframes meth-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes meth-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes meth-outline {
  0% { transform: rotate(0deg); animation-timing-function: ease-in-out; }
  33.333% { transform: rotate(180deg); }
  66.667% { transform: rotate(180deg); animation-timing-function: ease-in-out; }
  100% { transform: rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
  .steps, .step > *, .methodology__title-to { opacity: 1 !important; animation: none !important; }
  .methodology__title-from { opacity: 0 !important; animation: none !important; }
  .step::before { animation: none !important; }
}
/* ---------- Responsive ---------- */
@media (max-width: 1260px) {
  .steps {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 32px;
  }
  .arrow {
    display: none;
  }
  .step {
    margin-inline: 16px;
  }
}
@media (max-width: 576px) {
  .step {
    flex-basis: 100%;
    height: auto;
    padding-bottom: 32px;
  }
  .step__desc {
    margin-top: 24px;
  }
}
