.aigenix-process-steps {
  display: flex;
  inline-size: 100%;
  gap: 2rem;
  position: relative;
}

.aigenix-process-steps--horizontal .aigenix-process-steps {
  flex-direction: row;
  flex-wrap: wrap;
}

.aigenix-process-steps--vertical .aigenix-process-steps {
  flex-direction: column;
}

.aigenix-process-steps__item {
  position: relative;
  display: flex;
  flex: 1 1 0;
  min-inline-size: 240px;
}

.aigenix-process-steps--horizontal .aigenix-process-steps__item {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.aigenix-process-steps--vertical .aigenix-process-steps__item {
  flex-direction: row;
  align-items: flex-start;
  text-align: start;
  min-inline-size: 100%;
}

/* Connecting Lines */
.aigenix-process-steps-lines-yes .aigenix-process-steps__item::after {
  content: "";
  position: absolute;
  background-color: var(--aigenix-core-border);
  z-index: 1;
  transition: background-color 180ms ease;
}

.aigenix-process-steps-lines-yes.aigenix-process-steps--horizontal .aigenix-process-steps__item::after {
  inline-size: calc(100% - 0.5rem);
  block-size: 2px;
  top: 1.25rem;
  /* vertical middle of 2.5rem badge */
  inset-inline-start: calc(50% + 1.25rem);
}

.aigenix-process-steps-lines-yes.aigenix-process-steps--vertical .aigenix-process-steps__item::after {
  inline-size: 2px;
  block-size: calc(100% - 2.5rem);
  left: 1.25rem;
  /* horizontal middle of 2.5rem badge */
  top: 2.5rem;
}

.aigenix-process-steps-lines-yes .aigenix-process-steps__item:last-child::after {
  display: none;
}

/* Badges */
.aigenix-process-steps__badge {
  display: inline-grid;
  place-items: center;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  border-radius: var(--aigenix-core-radius-full);
  background-color: var(--aigenix-core-brand);
  border: 1px solid var(--aigenix-core-border-strong);
  color: var(--aigenix-core-text);
  font-family: var(--aigenix-core-font-display);
  font-weight: 800;
  font-size: 1rem;
  z-index: 2;
  position: relative;
  flex-shrink: 0;
  box-shadow: var(--aigenix-core-shadow);
}

/* Step Cards */
.aigenix-process-steps__card {
  border: 1px solid var(--aigenix-core-border);
  border-radius: var(--aigenix-core-radius-lg);
  background: var(--aigenix-core-surface);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: block;
  inline-size: 100%;
  box-shadow: var(--aigenix-core-shadow);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
  z-index: 2;
  position: relative;
}

.aigenix-process-steps--horizontal .aigenix-process-steps__card {
  margin-block-start: 1rem;
}

.aigenix-process-steps--vertical .aigenix-process-steps__card {
  margin-inline-start: 1.5rem;
}

.aigenix-process-steps__card--hover-lift:hover {
  transform: translateY(-4px);
  border-color: var(--aigenix-core-border-strong);
  box-shadow: var(--aigenix-core-shadow-strong);
  background-color: var(--aigenix-core-glass);
}

.aigenix-process-steps__title {
  margin: 0;
  margin-block-end: 0.5rem;
  color: var(--aigenix-core-text);
  font-family: var(--aigenix-core-font-display);
  font-size: 1.2rem;
  line-height: 1.3;
}

.aigenix-process-steps__description {
  color: var(--aigenix-core-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.aigenix-process-steps__description>* {
  margin: 0;
}

/* Responsiveness fallback for small viewports */
@media (max-width: 767px) {
  .aigenix-process-steps--horizontal {
    flex-direction: column;
  }

  .aigenix-process-steps--horizontal .aigenix-process-steps__item {
    flex-direction: row;
    align-items: flex-start;
    text-align: start;
    min-inline-size: 100%;
  }

  .aigenix-process-steps-lines-yes.aigenix-process-steps--horizontal .aigenix-process-steps__item::after {
    inline-size: 2px;
    block-size: calc(100% - 0.5rem);
    inset-inline-start: 1.25rem;
    top: 2.5rem;
  }

  .aigenix-process-steps--horizontal .aigenix-process-steps__card {
    margin-block-start: 0;
    margin-inline-start: 1.5rem;
  }
}