/* ==========================================================================
   SETUP STEPS SECTION ("Simple Setup in Three Steps")
   Pozadina #242424 (nastavak iz prethodnih sekcija).
   Aktivni korak se menja na scroll (pin efekat), progress bar i dots prate.
   ========================================================================== */

.setup {
  display: flex;
  flex-direction: column;
  align-items: center;

  padding: 100px 48px;
  background: #242424;
}

.setup__inner {
  width: 100%;
  max-width: var(--container-width);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.setup__eyebrow {
  margin: 0;
  color: var(--main-blue);
  text-align: center;
  font-family: var(--font-family);
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: 21px; /* 150% */
  letter-spacing: 1.68px;
  text-transform: uppercase;
}

.setup__heading {
  margin: 16px 0 0;
  color: #FFF;
  text-align: center;
  font-family: var(--font-family);
  font-size: 40px;
  font-style: normal;
  font-weight: 700;
  line-height: 46px; /* 115% */
  letter-spacing: -0.8px;
}

.steps-pin-wrap {
  position: relative;
  width: 100%;
  height: 180vh;
  margin-top: 64px;
}

.steps-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  position: relative;
}

.step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
}

.step-num {
  display: flex;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;

  border-radius: 28px;
  border: 2px solid #5A5A5A;
  background: #474747;

  color: #C4C4C4;
  text-align: center;
  font-family: var(--font-family);
  font-size: 24px;
  font-style: normal;
  font-weight: 700;
  line-height: 36px; /* 150% */

  transition: border-color 0.4s var(--ease, ease), background 0.4s var(--ease, ease), color 0.4s var(--ease, ease), transform 0.4s var(--ease, ease);
}

.step-card.is-active .step-num {
  border-radius: 30.8px;
  border: 2px solid var(--main-blue);
  background: var(--main-blue);
  color: #FFF;
  font-size: 24px;
  line-height: 39.6px; /* 165% */
  transform: scale(1.05);
  box-shadow: 0 0 0 8px rgba(91, 138, 225, 0.16);
}

.step-card h3 {
  margin: 0 0 8px 0;
  color: #C4C4C4;
  text-align: center;
  font-family: var(--font-family);
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: 30px; /* 150% */
  letter-spacing: -0.4px;
  transition: color 0.4s var(--ease, ease);
}

.step-card.is-active h3 {
  color: var(--main-blue);
}

.step-card p {
  margin: 0;
  color: #C4C4C4;
  text-align: center;
  font-family: var(--font-family);
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px; /* 150% */
  opacity: 0.6;
  transition: opacity 0.4s var(--ease, ease);
}

.step-card.is-active p {
  opacity: 1;
}

/* Progress track */
.steps-track {
  position: relative;
  width: 100%;
  height: 4px;
  margin-top: 48px;
  border-radius: 4px;
  background: #5A5A5A;
  overflow: hidden;
}

.steps-track-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: linear-gradient(90deg, #4A73C4, var(--main-blue));
  transition: width 0.1s linear;
}

.steps-dots {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-top: -6px;
}

.steps-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #242424;
  border: 2px solid #5A5A5A;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.steps-dots span.is-filled {
  background: var(--main-blue);
  border-color: var(--main-blue);
  transform: scale(1.2);
}

/* ==========================================================================
   MOBILE / TABLET (<= 1023px)
   Koraci idu vertikalno, nema pin/sticky efekta (prevelik skrol na malom
   ekranu bi bio nepredvidiv) - aktivni korak se pali kad udje u viewport.
   Breakpoint usaglasen sa ostatkom sajta (1023px), ranije je bio na 767px
   pa je tablet opseg (768px-1023px) i dalje koristio pin/180vh scroll efekat
   i layout je bio razbijen ("nije bio dobar") na tim sirinama.
   ========================================================================== */
@media (max-width: 1023px) {

  .setup {
    padding: 80px 24px;
  }

  .steps-pin-wrap {
    height: auto;
    margin-top: 40px;
  }

  .steps-sticky {
    position: relative;
    top: auto;
    height: auto;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .steps-track,
  .steps-dots {
    display: none;
  }
}

/* ==========================================================================
   MOBILE (<= 767px) - Figma spec
   Brojevi levo (60x60 krug) sa vertikalnom linijom koja ih povezuje, tekst
   desno. Aktivan korak (is-active) ima veci font u broju + plavi krug sa
   glow senkom, neaktivni koraci su sivi/zatamnjeni.
   ========================================================================== */
@media (max-width: 767px) {

  .setup {
    padding: 80px 24px;
  }

  .setup__eyebrow {
    margin: 0;
  }

  .setup__heading {
    margin: 16px 0 0;
    font-size: 32px;
    line-height: 40px; /* 125% */
    letter-spacing: -0.64px;
  }

  .steps-pin-wrap {
    height: auto;
    margin-top: 24px;
  }

  .steps-sticky {
    position: relative;
    top: auto;
    height: auto;
  }

  .steps {
    display: flex;
    flex-direction: column;
    grid-template-columns: unset;
    gap: 0;
    position: relative;
  }

  /* Vertikalna linija - ide od centra prvog kruga do centra poslednjeg,
     krugovi (opaque pozadina) stoje preko nje (z-index) tako da linija
     izgleda "prekinuta" tacno na mestu krugova. ::before je staticna siva
     pozadinska linija, ::after je plavi "fill" preko nje koji raste na
     osnovu scroll progress-a (JS postavlja --steps-fill custom property
     na .steps, u procentima 0-100%). */
  .steps::before {
    content: "";
    position: absolute;
    left: 28px;     /* (60px krug / 2) - (4px linija / 2) = 30 - 2 = 28px */
    top: 62px;      /* centar 1. kruga: card padding-top 32px + pola od 60px krug */
    bottom: 96px;   /* podignuto sa 92px na 96px - linija se jos vidila iza/ispod kruga 3 */
    width: 4px;
    background: #5A5A5A;
    z-index: 1;
  }

  .steps::after {
    content: "";
    position: absolute;
    left: 28px;
    top: 62px;
    width: 4px;
    height: var(--steps-fill, 0%);
    max-height: calc(100% - 158px); /* 158px = 62px top + 96px bottom, isto kao ::before */
    background: linear-gradient(180deg, #4A73C4, var(--main-blue));
    z-index: 1;
    transition: height 0.1s linear;
  }

  .step-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 30px;
    padding: 32px 0;
    position: relative;
    z-index: 2;
  }

  .step-num {
    width: 60px;
    height: 60px;
    margin-bottom: 0;
    border-radius: 30.8px;
    border: 2px solid #5A5A5A;
    background: #474747;
    color: #C4C4C4;
    font-size: 24px;
    line-height: 36px; /* 150% */
    box-shadow: none;
    transform: none;
  }

  .step-card.is-active .step-num {
    border-radius: 30.8px;
    border: 2px solid var(--main-blue);
    background: var(--main-blue);
    color: #FFF;
    font-size: 26.4px;
    line-height: 39.6px; /* 150% */
    box-shadow: 0 0 0 8px rgba(91, 138, 225, 0.16);
    transform: none;
  }

  .step-text {
    display: flex;
    flex-direction: column;
    text-align: left;
  }

  .step-card h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    line-height: 28px; /* 140% */
    letter-spacing: -0.4px;
    color: #C4C4C4;
    text-align: left;
  }

  .step-card.is-active h3 {
    color: var(--main-blue);
  }

  .step-card p {
    font-size: 16px;
    line-height: 24px; /* 150% */
    color: #C4C4C4;
    opacity: 1;
    text-align: left;
  }

  .steps-track,
  .steps-dots {
    display: none;
  }
}
