/* PAW Spark Theme – Hero-Slider (OPC-Portlet). Farben, Schrift und Ecken aus dem Spark-Design (--sp-*), ohne Theme neutrale Werte. */
.sp-hero { --h-bg: var(--sp-hero-bg, var(--sp-primary, #111)); --h-fg: var(--sp-hero-fg, var(--sp-on-primary, #fff)); --h-r: var(--sp-radius, 16px);
  --h-ease: cubic-bezier(.23, 1, .32, 1); position: relative; margin-bottom: 1rem; }
.sp-hero-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain;
  border-radius: var(--h-r); }
.sp-hero-track::-webkit-scrollbar { display: none; }
.sp-hero-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  min-height: clamp(380px, 38vw, 580px); background: var(--h-bg); color: var(--h-fg); }
.sp-hero.is-img-left .sp-hero-slide { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
.sp-hero.is-img-left .sp-hero-img { order: -1; }
.sp-hero-text { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: clamp(12px, 1.4vw, 20px); padding: clamp(28px, 4.6vw, 76px); }
/* über html.paw-spark :is(h2, .h2) des Themes (0,2,1) */
.sp-hero .sp-hero-text .sp-hero-h { font-family: var(--sp-font-head, inherit); font-weight: var(--sp-head-weight, 800); font-size: clamp(32px, 3.7vw, 60px); line-height: 1.02;
  letter-spacing: -.03em; margin: 0; color: inherit; text-wrap: balance; }
.sp-hero-text p { font-size: clamp(15px, 1.12vw, 18px); line-height: 1.55; margin: 0; max-width: 32em; opacity: .84; }
.sp-hero-btn { display: inline-flex; align-items: center; gap: .5em; min-height: 46px; padding: 0 1.4em; border-radius: var(--sp-btn-r, 999px);
  background: var(--h-fg); color: var(--h-bg) !important; font-weight: 700; font-size: 15px; text-decoration: none !important; transition: transform .16s var(--h-ease); }
.sp-hero-btn:active { transform: scale(.97); }
.sp-hero-btn svg { width: 16px; height: 16px; flex: none; }
.sp-hero-img { position: relative; overflow: hidden; background: var(--sp-hero-ibg, transparent); }
.sp-hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Bildanpassung: Ganz zeigen; „nie vergrößern“ deckelt das Bild per Inline-max-width/height auf seine Pixel (srcset mit w-Angaben
   kennt die echte Größe nicht, object-fit: scale-down ginge daran vorbei) und mittelt es im Bildfeld */
.sp-hero:is(.is-fit-contain, .is-fit-orig) .sp-hero-img img { object-fit: contain; }
.sp-hero.is-fit-orig .sp-hero-img img { margin: auto; }
.sp-hero.is-pos-top .sp-hero-img img { object-position: center top; margin-top: 0; }
.sp-hero.is-pos-bottom .sp-hero-img img { object-position: center bottom; margin-bottom: 0; }
.sp-hero.is-pos-left .sp-hero-img img { object-position: left center; margin-left: 0; }
.sp-hero.is-pos-right .sp-hero-img img { object-position: right center; margin-right: 0; }
/* festes Bildformat: das Bildfeld hat das Format, die Folie ist so hoch wie Bildfeld oder Text; alle Folien gleich hoch (Flex-Zeile).
   place-self: stretch, sonst nimmt ein Grid-Element mit aspect-ratio die Breite aus der gestreckten Höhe und ragt aus seiner Spalte */
.sp-hero.has-ratio .sp-hero-slide { min-height: 0; }
.sp-hero.has-ratio .sp-hero-img { aspect-ratio: var(--sp-hero-r); place-self: stretch; }
@media (min-width: 768px) {
  .sp-hero.has-ratio .sp-hero-img { max-height: 85vh; }
}
.sp-hero-arrow { position: absolute; top: 50%; margin-top: -22px; z-index: 2; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: var(--sp-bg, #fff); color: var(--sp-text, #111); box-shadow: 0 6px 20px -8px rgb(0 0 0 / .35); cursor: pointer;
  transition: transform .16s var(--h-ease); }
.sp-hero-arrow:active { transform: scale(.94); }
.sp-hero-arrow svg { width: 18px; height: 18px; }
.sp-hero-prev { left: 14px; }
.sp-hero-next { right: 14px; }
.sp-hero-dots { position: absolute; right: 18px; bottom: 18px; display: flex; gap: 6px; z-index: 2; }
.sp-hero.is-img-left .sp-hero-dots { right: auto; left: 18px; }
/* font-family einzeln: „font: … var(--x, inherit)“ ist mit inherit ungültig und fiele ganz weg */
.sp-hero-dot { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: rgb(255 255 255 / .82); color: #111; font-family: var(--sp-font-body, inherit);
  font-size: 12px; font-weight: 700; line-height: 30px; cursor: pointer; box-shadow: 0 4px 12px -6px rgb(0 0 0 / .45); transition: background-color .2s var(--h-ease), color .2s var(--h-ease), transform .16s var(--h-ease); }
.sp-hero-dot[aria-current="true"] { background: #111; color: #fff; }
.sp-hero-dot:active { transform: scale(.92); }
.sp-hero :is(.sp-hero-arrow, .sp-hero-dot, .sp-hero-btn):focus-visible { outline: 3px solid var(--sp-accent, #2563eb); outline-offset: 2px; }
.sp-hero-slide.is-active .sp-hero-text > * { animation: sp-hero-rise .28s var(--h-ease) backwards; }
.sp-hero-slide.is-active .sp-hero-text > :nth-child(2) { animation-delay: .04s; }
.sp-hero-slide.is-active .sp-hero-text > :nth-child(3) { animation-delay: .08s; }
@keyframes sp-hero-rise { from { opacity: 0; transform: translateY(10px); } }
.sp-hero-empty { display: grid; place-items: center; gap: 4px; min-height: 220px; padding: 24px; border: 2px dashed #c5cad3; border-radius: 12px; color: #4b5563;
  font-weight: 700; text-align: center; }
.sp-hero-empty small { display: block; font-weight: 400; }
@media (max-width: 767.98px) {
  .sp-hero-slide, .sp-hero.is-img-left .sp-hero-slide { grid-template-columns: minmax(0, 1fr); grid-template-rows: 230px auto; min-height: 0; }
  .sp-hero-img { order: -1; }
  .sp-hero-arrow { top: 115px; }
  .sp-hero-dots, .sp-hero.is-img-left .sp-hero-dots { top: 192px; bottom: auto; right: 18px; left: auto; }
  /* festes Format: Bild so hoch wie Breite / Format, mindestens 140 px (flacher stoßen Pfeil und Punkte zusammen); Mehrhöhe einer
     Folie geht an den Text, sonst wüchse ihr Bild. Pfeile + Punkte folgen über margin-top in % (= Prozent der Breite) */
  .sp-hero.has-ratio .sp-hero-slide { grid-template-rows: auto 1fr; }
  .sp-hero.has-ratio .sp-hero-img { min-height: 140px; }
  .sp-hero.has-ratio .sp-hero-arrow { top: 0; margin-top: calc(max(140px, 100% / var(--sp-hero-r)) / 2 - 22px); }
  .sp-hero.has-ratio .sp-hero-dots { top: 0; margin-top: calc(max(140px, 100% / var(--sp-hero-r)) - 38px); }
}
@media (prefers-reduced-motion: reduce) {
  .sp-hero-track { scroll-behavior: auto; }
  .sp-hero * { animation: none !important; transition: none !important; }
}
