/* Hero-Banner: Rahmen für die lebenden CRM-Kopien (hero-banners.js) */

/* Schatten je Karte statt Filter über alle Slides: der Filter müsste sonst jedes Animationsbild neu rechnen */
.hp-slides { filter: none !important; }
.hp-messe-card { box-shadow: 0 28px 64px rgb(27 54 97 / .2); }

.hp-hero {
  position: relative;
  display: block;
  width: min(100%, calc((100vh - 13.2rem) * 1180 / 740));
  margin-inline: auto;
  aspect-ratio: 1180 / 740;
  border-radius: 16px;
  border: 1px solid rgb(27 54 97 / .1);
  background: var(--bs-body-bg);
  box-shadow: 0 28px 64px rgb(27 54 97 / .2);
  overflow: hidden;
  isolation: isolate;
  color: inherit;
  text-decoration: none;
  transition: transform .25s cubic-bezier(.2, .8, .3, 1), box-shadow .25s ease;
}
.hp-hero:hover,
.hp-hero:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 34px 72px rgb(27 54 97 / .26);
}
.hp-hero:focus-visible { outline: 3px solid #5b8def; outline-offset: 3px; }
/* Darkmode-Folie: Knopf statt Link, schaltet das Thema der Seite um (homepage.js, data-hp-theme-toggle) */
button.hp-hero {
  padding: 0;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
  appearance: none;
}

.hp-hero-host {
  position: absolute;
  inset: 0;
}
/* Platzhalter, bis die Kopie gebaut ist */
.hp-slide[data-hero]:not(.is-built) .hp-hero-host {
  background:
    linear-gradient(90deg, transparent, rgb(27 54 97 / .06), transparent) 0 0 / 40% 100% no-repeat,
    var(--bs-tertiary-bg);
  animation: hp-hero-wait 1.2s linear infinite;
}

.hp-hero-cta {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .42rem .85rem;
  border-radius: 999px;
  background: #1b3661;
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgb(27 54 97 / .3);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease;
}
.hp-hero:hover .hp-hero-cta,
.hp-hero:focus-visible .hp-hero-cta {
  opacity: 1;
  transform: none;
}
@media (hover: none) {
  .hp-hero-cta { opacity: 1; transform: none; }
}
/* Umschalter bleibt sichtbar: nach dem Wechsel steht dort der Weg zurück */
.hp-hero[data-hp-theme-toggle] .hp-hero-cta { opacity: 1; transform: none; }
.hp-hero[data-hp-theme-toggle]:hover .hp-hero-cta,
.hp-hero[data-hp-theme-toggle]:focus-visible .hp-hero-cta { background: #2a4875; }
html[data-bs-theme="dark"] .hp-hero[data-hp-theme-toggle] .hp-hero-cta { background: #7B6DFF; box-shadow: 0 8px 20px rgb(0 0 0 / .4); }
html[data-bs-theme="dark"] .hp-hero[data-hp-theme-toggle]:hover .hp-hero-cta,
html[data-bs-theme="dark"] .hp-hero[data-hp-theme-toggle]:focus-visible .hp-hero-cta { background: #6a5cf0; }

/* Handy: die Modul-Folien füllen dieselbe Höhe wie die erste Karte (.hp-jtl) und zeigen die Handy-Ansicht in Originalgröße */
@media (max-width: 767.98px) {
  .hp-slide[data-hero] { display: flex; }
  .hp-slide[data-hero] .hp-hero {
    flex: 1 1 auto;
    width: 100%;
    aspect-ratio: auto;
    min-height: 32rem;
  }
}

@keyframes hp-hero-wait {
  from { background-position: -40% 0, 0 0; }
  to { background-position: 140% 0, 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hp-hero, .hp-hero-cta { transition: none; }
  .hp-slide[data-hero]:not(.is-built) .hp-hero-host { animation: none; }
}
