/* =============================================
   process-stepper.css — Horizontal Process Stepper
   Riparazioni Ricci — Component Library
   ============================================= */

/* ── Stepper Desktop ── */
.stepper {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  position: relative;
  z-index: 1;
}

.step-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
  cursor: default;
}

.step-circle:hover {
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(var(--color-primary-rgb), 0.25);
}

.step-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  color: var(--slate-900);
  margin-top: 16px;
}

.step-desc {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--slate-500);
  margin-top: 4px;
  max-width: 150px;
  line-height: 1.45;
}

/* ── Connectors (SVG overlay) ── */
.connectors-svg {
  position: absolute;
  top: 24px; /* center of circle */
  left: 0;
  width: 100%;
  height: 2px;
  pointer-events: none;
  z-index: 0;
}

.connector-line {
  stroke: rgba(var(--color-primary-rgb), 0.2);
  stroke-width: 2;
  stroke-linecap: round;
}

/* ── Mobile Vertical ── */
@media (max-width: 767px) {
  .stepper {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .step {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 20px;
    position: relative;
  }

  .step:last-child {
    padding-bottom: 0;
  }

  .step-circle {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .step-label {
    margin-top: 0;
  }

  .step-desc {
    display: none;
  }

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

  /* Vertical connector */
  .step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 14px; /* center of 28px circle */
    top: 28px;
    width: 2px;
    height: calc(100% - 28px);
    background: rgba(var(--color-primary-rgb), 0.15);
  }

  .connectors-svg {
    display: none;
  }

  .section {
    padding: clamp(2rem, 4vw, 3rem) 0;
  }
}

/* ── Entrance ── */
.js-loaded .step {
  opacity: 0;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .step {
    opacity: 1 !important;
  }

  .connector-line {
    stroke-dashoffset: 0 !important;
  }
}
