/* === Bauerschmidt Horizontal Hover Cards === */
.bs-hc {
  --bs-hc-height: 180px;
  --bs-hc-gap: 0px;
  --bs-hc-border-width: 1px;
  --bs-hc-border-color: #E5E5E5;
  --bs-hc-bg: #FFFFFF;
  --bs-hc-text: #000000;
  --bs-hc-text-hover: #FFFFFF;
  --bs-hc-overlay: rgba(0, 0, 0, 0.4);
  --bs-hc-num-gap: 20px;
  --bs-hc-content-gap: 40px;
  display: flex;
  flex-direction: column;
  gap: var(--bs-hc-gap);
}

.bs-hc-card {
  position: relative;
  height: var(--bs-hc-height);
  border-bottom: var(--bs-hc-border-width) solid var(--bs-hc-border-color);
  background: var(--bs-hc-bg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all .4s ease;
  cursor: pointer;
}

.bs-hc-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.1);
  transition: opacity .4s ease, transform .4s ease;
  z-index: 0;
}

.bs-hc-overlay {
  position: absolute;
  inset: 0;
  background: var(--bs-hc-overlay);
  opacity: 0;
  transition: opacity .4s ease;
  z-index: 1;
}

.bs-hc-content {
  position: relative;
  height: 100%;
  padding: 30px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--bs-hc-content-gap);
  z-index: 2;
  color: var(--bs-hc-text);
  transition: color .4s ease;
}

.bs-hc-top {
  display: flex;
  align-items: baseline;
  gap: var(--bs-hc-num-gap);
  flex-shrink: 0;
}

.bs-hc-num   { font-size: 14px; font-weight: 400; white-space: nowrap; }
.bs-hc-title { margin: 0; font-size: 28px; font-weight: 600; line-height: 1.2; white-space: nowrap; color: inherit; }
.bs-hc-text  { font-size: 15px; line-height: 1.6; opacity: .9; max-width: 600px; flex: 1; text-align: right; }

/* Desktop-Hover (Hover-fähige Geräte) */
.bs-hc-card:hover .bs-hc-bg      { opacity: 1; transform: scale(1); }
.bs-hc-card:hover .bs-hc-overlay { opacity: 1; }
.bs-hc-card:hover .bs-hc-content { color: var(--bs-hc-text-hover); }

/* === Tablet + Mobile (≤980): Hintergrund + Overlay sind IMMER sichtbar.
   Hover-Konzept funktioniert auf Touch nicht — die Karten sehen jetzt wie
   die „aktive" Version aus. Tap navigiert. === */
@media (max-width: 980px) {
  /* Karte hat feste Höhe (wie auf Desktop) — Content ist absolut
     positioniert und füllt die Karte exakt. Damit greift
     `justify-content: center` zuverlässig auf einer definierten Höhe. */
  .bs-hc-card {
    height: var(--bs-hc-height);
    min-height: var(--bs-hc-height);
  }
  .bs-hc-bg      { opacity: 1; transform: none; }
  .bs-hc-overlay { opacity: 1; }
  .bs-hc-content {
    position: absolute !important;
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    height: auto !important;
    width: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 10px;
    padding: 28px 20px;
    color: var(--bs-hc-text-hover);
  }
  .bs-hc-top    { flex-wrap: wrap; gap: 14px; align-items: baseline; }
  .bs-hc-num    { font-size: 14px; letter-spacing: 0.06em; font-weight: 600; color: inherit; }
  .bs-hc-title  { font-size: 22px; line-height: 1.25; white-space: normal; color: inherit; }
  .bs-hc-text   { text-align: left; max-width: 100%; font-size: 15px; line-height: 1.6; }

  /* Scroll-Reveal: Karten starten leicht nach unten verschoben + transparent
     und werden eingeblendet, sobald sie per IntersectionObserver in den
     Viewport rutschen (data-bs-reveal wird vom JS gesetzt — fällt JS aus,
     bleibt die Karte ohne Attribute einfach sichtbar). */
  .bs-hc-card[data-bs-reveal="pending"] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s cubic-bezier(0.22, 1, 0.36, 1),
                transform .6s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .bs-hc-card[data-bs-reveal="visible"] {
    opacity: 1;
    transform: none;
  }

  /* Reduced-Motion: Animation abschalten */
  @media (prefers-reduced-motion: reduce) {
    .bs-hc-card[data-bs-reveal="pending"],
    .bs-hc-card[data-bs-reveal="visible"] {
      opacity: 1;
      transform: none;
      transition: none;
    }
  }
}

@media (max-width: 480px) {
  .bs-hc-content { padding: 22px 16px; gap: 8px; }
  .bs-hc-title   { font-size: 20px; }
  .bs-hc-text    { font-size: 14px; }
}
