/* === HOW IT WORKS === */
.how-it-works {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1rem;
  background: #f9f9f9;
  text-align: center;
}

.how-it-works h2 {
  font-size: clamp(1.5rem, 1vw + 0.75rem, 2.5rem);
  font-weight: 300;
  letter-spacing: 0.25rem;
  color: #000; /* or base color */
  max-width: 1250px;
  margin: 0 auto 2rem auto;
  line-height: 1.5;
}

/* .how-it-works img {
  max-width: 500px;
  width: 100%;
  margin: 1.5rem auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgb(0, 0, 0);
} */

/* Step list styles */
.step-flow {
  display: flex;
  /* flex-wrap: wrap; */
  justify-content: center;
  align-items: center;
  /* gap: 1rem; */
  /* margin: 2rem auto; */
  max-width: 100%;
  padding: 0 1rem;
}

.step-wrapper {
  display: flex;
  padding: 0;
  background-color: transparent;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.1));
  z-index: 0;
}

.step {
  position: relative;
  display: flex;
  align-items: center;
  padding: 2rem 4rem;
  color: rgb(0, 0, 0);
  font-weight: 600;
  text-align: left;
  /* white-space: nowrap; */
  clip-path: polygon(0% 0%, 90% 0%, 100% 50%, 90% 100%, 0% 100%, 10% 50%);
  background-color: white;
  /* min-width: 500px; */
  /* margin-left: -45px; */ /* Overlap to make steps connect */
  z-index: 1;
}

.step-number {
  /* position: absolute; */
  /* left: 20px;
  top: 50%; */
  /* transform: translateY(-50%); */
  background-color: #ffffff;
  color: rgb(0, 0, 0);
  border-radius: 50%;
  width: 3.2rem;
  height: 3.2rem;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
  box-shadow: 0 0 0 4px white;
  z-index: 2;
  /* margin-right: 2rem; */
  border: 3px solid #ccc;
}

.step-text {
  margin-left: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
}

/* .step-flow > .step:first-child {
  margin-left: 0;
  clip-path: polygon(0% 0%, 90% 0%, 100% 50%, 90% 100%, 0% 100%);
}

.step-flow > .step:nth-last-of-type(1) {
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 10% 50%);
} */

.step-wrapper:nth-child(1) .step-number {
  border-color: var(--primary-color);
}

.step-wrapper:nth-child(2) .step-number {
  border-color: #2195f394;
}

.step-wrapper:nth-child(3) .step-number {
  border-color: var(--primary-color);
}

/* Step-specific custom property */
.step-wrapper:nth-child(1) {
  --shadow-color: var(--primary-color);
  animation: shadow-flow 3s infinite ease-in-out;
}

.step-wrapper:nth-child(2) {
  --shadow-color: #2195f3;
  animation: shadow-flow 3s infinite ease-in-out;
}

.step-wrapper:nth-child(3) {
  --shadow-color: var(--primary-color);
  animation: shadow-flow 3s infinite ease-in-out;
}

@keyframes shadow-flow {
  0% {
    filter: drop-shadow(0 0 3px var(--shadow-color));
  }
  25% {
    filter: drop-shadow(4px 0 3px var(--shadow-color));
  }
  50% {
    filter: drop-shadow(0 4px 3px var(--shadow-color));
  }
  75% {
    filter: drop-shadow(-4px 0 3px var(--shadow-color));
  }
  100% {
    filter: drop-shadow(0 0 3px var(--shadow-color));
  }
}

@media (max-width: 1015px) {
  .step-flow {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
  }

  .step {
    clip-path: polygon(0% 0%, 50% 20%, 100% 0%, 100% 80%, 50% 100%, 0% 80%);
    flex-direction: column;
    min-height: 250px;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    padding: 6rem 1rem;
  }

  /* .step-flow > .step:first-child {
    margin-left: 0;
    clip-path: polygon(0% 0%, 100% 0%, 100% 80%, 50% 100%, 0% 80%);
  }

  .step-flow > .step:nth-last-of-type(1) {
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 10% 50%);
  } */

  .step-text {
    max-width: 35ch;
  }
}
