﻿/* ==========================================================
   ebmnt1 — how we work (3 steps)
   ========================================================== */

.ebmnt1-how-we-work {
  overflow: hidden;
  background-color: var(--ebmnt1-how-we-work-background-color);
}

.ebmnt1-how-we-work__decor {
  position: absolute;
  top: 2rem;
  inset-inline-start: 0;
  z-index: 0;
  width: clamp(5.5rem, 18vw, 16rem);
  pointer-events: none;
}

.ebmnt1-how-we-work__steps {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5em;
}

.ebmnt1-how-we-work__step {
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
  cursor: default;
}

.ebmnt1-how-we-work__number {
  position: relative;
  z-index: 2;
  width: 3.4rem;
  height: 3.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--ebmnt1-how-we-work-number-background-color);
  color: var(--ebmnt1-how-we-work-number-text-color);
  box-shadow: 0 0 0 0.5em var(--ebmnt1-how-we-work-number-halo-color);
  font-family: var(--ebmnt1-font-heading);
  font-size: var(--ebmnt1-fs-md);
  font-weight: 700;
  transition: background-color 0.4s ease-in-out, color 0.4s ease-in-out;
}

.ebmnt1-how-we-work__photo-wrap {
  width: clamp(8rem, 40vw, 10.5rem);
  aspect-ratio: 1;
  padding: 0.5em;
  border: 1px solid var(--ebmnt1-how-we-work-photo-border-color);
  border-radius: 50%;
  transition: border-color 0.4s ease-in-out;
}

.ebmnt1-how-we-work__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.ebmnt1-how-we-work__title {
  font-size: var(--ebmnt1-fs-xl);
  font-weight: 600;
  color: var(--ebmnt1-how-we-work-step-title-color);
  transition: color 0.4s ease-in-out;
}

.ebmnt1-how-we-work__text {
  max-width: 17em;
  font-size: var(--ebmnt1-fs-sm);
  color: var(--ebmnt1-how-we-work-step-text-color);
}

.ebmnt1-how-we-work__step.ebmnt1-is-active .ebmnt1-how-we-work__number,
.ebmnt1-how-we-work__step:hover .ebmnt1-how-we-work__number {
  background-color: var(--ebmnt1-how-we-work-number-active-background-color);
  color: var(--ebmnt1-how-we-work-number-active-text-color);
}

.ebmnt1-how-we-work__step.ebmnt1-is-active .ebmnt1-how-we-work__photo-wrap,
.ebmnt1-how-we-work__step:hover .ebmnt1-how-we-work__photo-wrap {
  border-color: var(--ebmnt1-how-we-work-photo-active-border-color);
}

.ebmnt1-how-we-work__step.ebmnt1-is-active .ebmnt1-how-we-work__title,
.ebmnt1-how-we-work__step:hover .ebmnt1-how-we-work__title {
  color: var(--ebmnt1-how-we-work-step-title-active-color);
}

/* connectors between steps */

/* ---------- mobile: dashed line + plane (down) + faint chevron (down) between steps ---------- */

.ebmnt1-how-we-work__steps {
  gap: 6em;
}

.ebmnt1-how-we-work__connector {
  position: absolute;
  top: calc(100% + 2.2em);
  inset-inline: 0;
  text-align: center;
  color: var(--ebmnt1-how-we-work-plane-color);
  font-size: 1.2rem;
  line-height: 1.6;
}

/* vertical flow on mobile: plane points down */

.ebmnt1-how-we-work__connector i {
  display: inline-block;
  transform: rotate(90deg);
}

/* keep decor visible and behind content on small screens */

.ebmnt1-how-we-work__steps,
.ebmnt1-how-we-work .ebmnt1-section__inner {
  z-index: 1;
}

.ebmnt1-how-we-work__step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: calc(100% + 0.4em);
  inset-inline-start: 50%;
  height: 1.8em;
  border-inline-start: 1px dashed var(--ebmnt1-how-we-work-dotted-line-color);
}

.ebmnt1-how-we-work__step:not(:last-child)::after {
  content: "\f103";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: calc(100% + 3.9em);
  inset-inline: 0;
  text-align: center;
  color: var(--ebmnt1-how-we-work-chevron-color);
  font-size: 2rem;
  line-height: 1;
}

/* ---------- >= 768 : horizontal ---------- */

@media (min-width: 768px) {
  .ebmnt1-how-we-work__steps {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.5em;
  }

  .ebmnt1-how-we-work__step:not(:last-child)::after,
  .ebmnt1-how-we-work__step:not(:last-child)::before {
    display: none;
  }

  /* dotted line crossing the numbers */

  .ebmnt1-how-we-work__steps::before {
    content: "";
    position: absolute;
    top: 1.7rem;
    inset-inline: 0;
    border-top: 1px dashed var(--ebmnt1-how-we-work-dotted-line-color);
  }

  .ebmnt1-how-we-work__steps {
    position: relative;
  }

  .ebmnt1-how-we-work__connector {
    display: block;
    position: absolute;
    top: 0.7rem;
    inset-inline-end: calc(-0.75em - 1.25rem);
    width: 2.5rem;
    text-align: center;
    z-index: 2;
    background-color: var(--ebmnt1-how-we-work-plane-background-color);
    color: var(--ebmnt1-how-we-work-plane-color);
    font-size: 1.3rem;
    line-height: 2;
  }

  [dir="rtl"] .ebmnt1-how-we-work__connector i {
    display: inline-block;
    transform: scaleX(-1);
  }

  .ebmnt1-how-we-work__step:not(:last-child) .ebmnt1-how-we-work__photo-wrap::after {
    content: "\f100";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: clamp(4.2rem, 9vw, 6.6rem);
    inset-inline-end: calc(-0.75em - clamp(1.5rem, 4vw, 3rem));
    width: clamp(3rem, 8vw, 6rem);
    text-align: center;
    color: var(--ebmnt1-how-we-work-chevron-color);
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1;
    pointer-events: none;
  }

  .ebmnt1-how-we-work__photo-wrap {
    position: static;
    width: clamp(6.5rem, 20vw, 10.5rem);
  }

  .ebmnt1-how-we-work__text {
    max-width: 100%;
  }
}

@media (min-width: 1024px) {
  .ebmnt1-how-we-work__photo-wrap {
    width: 11rem;
  }
}


