/* ── Branchen-Hub (/branchen/) ─────────────────────────────── */

/* Niche pages: image cards, the whole card is clickable */
.niche-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
}

.niche-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.niche-card:hover,
.niche-card:focus-within {
  transform: translateY(-6px);
  border-color: rgba(59, 91, 255, 0.35);
  box-shadow: var(--shadow-premium);
}

.niche-card__img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.niche-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.8s cubic-bezier(0.2, 0, 0, 1);
}

.niche-card:hover .niche-card__img img {
  transform: scale(1.04);
}

.niche-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--s4) var(--s4) var(--s4);
  flex: 1;
}

.niche-card__meta {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
}

.niche-card h3 {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
}

.niche-card p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-secondary);
  margin: 0;
}

.niche-card__link {
  margin-top: auto;
  padding-top: var(--s2);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

.niche-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.niche-card__link span {
  transition: transform 0.3s ease;
}

.niche-card:hover .niche-card__link span {
  transform: translateX(4px);
}

/* Project index: all cases grouped by industry */
.project-index {
  columns: 3;
  column-gap: var(--s3);
}

.project-group {
  break-inside: avoid;
  margin-bottom: var(--s3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  padding: var(--s3);
}

.project-group__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2);
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--color-border);
}

.project-group h3 {
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

.project-group h3 a {
  color: inherit;
}

.project-group h3 a:hover {
  color: var(--color-accent);
}

.project-group__count {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border-radius: 999px;
  padding: 3px 10px;
}

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.project-list li + li {
  border-top: 1px dashed var(--color-border);
}

.project-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s2);
  padding: 10px 0;
  color: var(--color-ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.project-list a small {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-secondary);
  text-align: right;
}

.project-list a:hover {
  color: var(--color-accent);
}

@media (max-width: 1100px) {
  .niche-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-index {
    columns: 2;
  }
}

@media (max-width: 768px) {
  .niche-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s3);
  }

  .project-index {
    columns: 1;
  }

  .niche-card__body {
    padding: var(--s3);
  }

  /* Hub hero: three compact stats in one row instead of three stacked cards */
  .hero--hub .hero-service-stats {
    flex-direction: row;
    gap: 8px;
  }

  .hero--hub .service-stat {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    flex-direction: column;
    justify-content: center;
    padding: 14px 8px;
    text-align: center;
  }

  .hero--hub .service-stat__icon {
    display: none;
  }

  .hero--hub .service-stat__num {
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .hero--hub .service-stat__label {
    font-size: 10px;
    line-height: 1.35;
  }
}
