/* =========================================
   Unter Leistungen Step Line – Section
   (Layout wie Screenshot)
   ========================================= */

.unter-leistungen-line {
  padding-top: 3rem;
  padding-bottom: 3rem;
  /* Steuerung der Größen zentral */
  --step-size: 110px;
  --line-thickness: 2px;
}

.unter-leistungen-line h2 {
  text-align: center;
  margin-bottom: 2.2rem;
}

/* ----- Steps Wrapper ----- */
.unter-steps {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2.5rem;
  width: 100%;
  margin: 0 auto;
  padding: 0 0.5rem;
}

/* Verbindungslinie hinter den Kreisen */
.unter-steps::before {
  content: "";
  position: absolute;
  top: calc(var(--step-size) / 2);
  left: calc(var(--step-size) / 2);
  right: calc(var(--step-size) / 2);
  height: var(--line-thickness);
  background: var(--accentsecond);
  z-index: 0;
  opacity: 0.9;
}

/* ----- Einzelner Step ----- */
.unter-step {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Top-Bereich (Nummer + Iconkreis) */
.unter-step-top {
  position: relative;
  width: var(--step-size);
  height: var(--step-size);
  margin-bottom: 1.2rem;
  z-index: 1; /* vor der Linie */
}

/* Nummern-Bubble oben links */
.unter-step-number {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Großer Icon-Kreis */
.unter-step-iconwrap {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accentsecond);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* dezenter, edler Hover (Akzent-Schimmer) */
.unter-step:hover .unter-step-iconwrap {
  transform: translateY(-2px);
  box-shadow:
    0 10px 22px rgba(0,0,0,0.12),
    0 0 0 3px color-mix(in srgb, var(--accentsecond) 28%, transparent);
}

/* SVG-Icon */
.unter-step-icon {
  width: 44px;
  height: 44px;
  fill: #fff;
  display: block;
}

/* Text */
.unter-step-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.2px;
  line-height: 1.2;
  word-break: break-word;
}

/* =========================================
   Responsive
   ========================================= */

/* Tablet / kleinere Desktops */
@media (max-width: 1050px) {
  .unter-leistungen-line {
    --step-size: 100px;
  }

  .unter-steps {
    gap: 2rem;
  }

  .unter-step-icon {
    width: 40px;
    height: 40px;
  }
}

/* ✅ Mobile/Tablet: bleibt horizontal, aber so klein,
   dass 4 Steps OHNE Scrollen passen */
@media (max-width: 820px) {
  .unter-leistungen-line {
    --step-size: 70px;          /* kleiner Kreis */
    --line-thickness: 2px;
  }

  .unter-steps {
    flex-wrap: nowrap;          /* kein Umbruch */
    justify-content: space-between;
    gap: 0.8rem;               /* enger */
    padding: 0 0.2rem;         /* weniger Rand */
    overflow: visible;         /* kein Scroll */
  }

  .unter-steps::before {
    display: block;            /* Linie bleibt */
  }

  .unter-step {
    flex: 1 1 0;               /* darf schrumpfen */
    min-width: 0;              /* wichtig: kein Mindestmaß */
  }

  .unter-step-top {
    margin-bottom: 0.7rem;
  }

  .unter-step-icon {
    width: 30px;
    height: 30px;
  }

  .unter-step-title {
    font-size: 0.9rem;
    line-height: 1.15;
  }

  .unter-step-number {
    width: 20px;
    height: 20px;
    font-size: 0.72rem;
    top: -6px;
    left: -6px;
  }
}

/* ✅ Sehr kleine Geräte: noch kompakter, weiterhin 1 Reihe */
@media (max-width: 560px) {
  .unter-leistungen-line {
    --step-size: 60px;
  }

  .unter-steps {
    gap: 0.6rem;
    padding: 0 0.1rem;
  }

  .unter-step-icon {
    width: 26px;
    height: 26px;
  }

  .unter-step-title {
    font-size: 0.82rem;
    line-height: 1.1;
  }

  .unter-step-number {
    width: 18px;
    height: 18px;
    font-size: 0.68rem;
    top: -5px;
    left: -5px;
  }
}