/* Hero – Variante M: Hero + überlappende Leistungsteaser mit Icon am oberen Rand */

.wf-hero--m {
  --wf-hero-m-overlap: 4.5rem;
  display: block;
  min-height: 0;
  background: var(--wf-bg);
  overflow: visible;
}

.wf-hero--m__hero {
  position: relative;
  min-height: min(58vh, 480px);
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  padding-bottom: calc(var(--wf-hero-m-overlap) + 2rem);
}

.wf-hero--m__surface {
  position: absolute;
  inset: 0;
  background: var(--wf-text-muted);
}

.wf-hero--m__overlay {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--wf-text) 55%, transparent);
}

.wf-hero--m__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--wf-max-width);
  margin: 0 auto;
  padding: var(--wf-space-2xl) var(--wf-container-padding);
  padding-bottom: calc(var(--wf-hero-m-overlap) + 3.5rem);
}

.wf-hero--m__headline {
  margin: 0 0 var(--wf-space-md);
  max-width: 18ch;
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
}

.wf-hero--m__subheadline {
  margin: 0;
  max-width: 36rem;
  font-size: var(--wf-font-size-base);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}

.wf-hero--m__teasers {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--wf-space-lg);
  max-width: var(--wf-max-width);
  margin: calc(var(--wf-hero-m-overlap) * -1) auto 0;
  padding: 0 var(--wf-container-padding) var(--wf-space-2xl);
}

.wf-hero--m__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--wf-space-sm);
  padding: calc(2rem + 0.35rem) 1.15rem 1.35rem;
  background: var(--wf-bg);
  border: 1px solid var(--wf-border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.wf-hero--m__card-icon {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  width: 3.5rem;
  height: 3.5rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border-style: solid;
  border-width: 3px;
  border-color: var(--wf-bg);
  background: var(--wf-text);
  color: var(--wf-bg);
  font-size: 0.55rem;
  box-shadow: 0 0 0 1.5px var(--wf-border);
}

.wf-hero--m__card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--wf-text);
}

.wf-hero--m__card-text {
  margin: 0;
  flex: 1;
  font-size: var(--wf-font-size-sm);
  line-height: 1.55;
  color: var(--wf-text-muted);
}

.wf-hero--m__card-link {
  margin-top: var(--wf-space-sm);
  font-size: var(--wf-font-size-sm);
  font-weight: 600;
  color: var(--wf-text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.wf-hero--m__card-link:hover {
  color: var(--wf-text-muted);
}

@media (max-width: 1000px) {
  .wf-hero--m__teasers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .wf-hero--m {
    --wf-hero-m-overlap: 2.5rem;
  }

  .wf-hero--m__teasers {
    grid-template-columns: 1fr;
    max-width: 22rem;
  }
}
