/* ==========================================================
   NEONROOS Hero – CSS (nr-hero.css)
   Einbau: Child-Theme /css/nr-hero.css, geladen über functions.php
   auf allen Seiten mit der Klasse „nr-hero“ und auf der Startseite.
   Stand: 24.11.2026
   Greift nur in Containern mit der CSS-Klasse „nr-hero“
   (Container → Allgemein → CSS-Klasse).
   ========================================================== */

/* Hero-Container: randlos über die gesamte Breite (inkl. 4K) im 16:9-Format */
.nr-hero .fusion-imageframe {
  position: relative;
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  touch-action: pan-y;
}

.nr-hero .fusion-imageframe img {
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

/* Nachgeladene Crossfade-Slides */
.nr-hero .fusion-imageframe img.nr-hero-slide {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  pointer-events: none;
  z-index: 2;
}

.nr-hero .fusion-imageframe img.nr-hero-slide.is-active {
  opacity: 1;
}

/* Pfeile (nur Geräte mit Maus, erscheinen beim Überfahren) */
.nr-hero .fusion-imageframe .nr-hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nr-hero .fusion-imageframe .nr-hero-prev { left: 16px; }
.nr-hero .fusion-imageframe .nr-hero-next { right: 16px; }

@media (hover: hover) {
  .nr-hero .fusion-imageframe.nr-ready .nr-hero-nav { display: flex; }
  .nr-hero .fusion-imageframe.nr-ready:hover .nr-hero-nav,
  .nr-hero .fusion-imageframe .nr-hero-nav:focus-visible { opacity: 1; }
}

/* Scroll-Hinweis: Maus mit animiertem Scrollrad (Stand 23.11.2026)
   Sofort sichtbar, bleibt beim Scrollen stehen, Animation immer aktiv. */
.nr-hero .fusion-imageframe .nr-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 3;
  width: 24px;
  height: 38px;
  margin-left: -12px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
}

.nr-hero .fusion-imageframe .nr-scroll-hint::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 4px;
  height: 7px;
  margin-left: -2px;
  border-radius: 2px;
  background: #fff;
  animation: nr-hint-wheel 1.6s ease-in-out infinite;
}

@keyframes nr-hint-wheel {
  0%   { transform: translateY(0);    opacity: 1; }
  70%  { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0);    opacity: 0; }
}

/* Wisch-Hinweis mobil (Stand 24.11.2026)
   Hand wischt 3× von rechts nach links, mit Ein- und Ausblenden.
   Wird per JS nur mobil und nur bei weiteren Slides eingefügt. */
.nr-hero .fusion-imageframe .nr-swipe-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.55));
  animation: nr-swipe 1.5s ease-in-out 1s 3 both;
}

@keyframes nr-swipe {
  0%   { opacity: 0; transform: translateX(28px); }
  20%  { opacity: 1; }
  75%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(-28px); }
}

@media (min-width: 768px) {
  .nr-hero .fusion-imageframe .nr-swipe-hint { display: none; }
}

/* Mobil (< 768 px): kein Scroll-Hinweis (Stand 24.11.2026) */
@media (max-width: 767px) {
  .nr-hero .fusion-imageframe .nr-scroll-hint { display: none; }
}


/* ==========================================================
   Hero: Text über dem Bildelement (Stand 24.11.2026)
   Container: CSS-Klasse „nr-hero nr-hero-overlay“, 100 % Breite, Padding 0
   Spalte 1: Image Element (Fetch Priority High, Skip Lazy Load)
   Spalte 2: Überzeile, H1, Button – CSS-Klasse „nr-hero-text“
   Linker Rand folgt automatisch der Avada-Seitenbreite (--site_width)
   ========================================================== */
.nr-hero-overlay .fusion-builder-row { position: relative; }

.nr-hero-overlay .fusion-imageframe::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 35%, rgba(0,0,0,.65) 100%);
}

.nr-hero-overlay .nr-hero-text {
  position: absolute !important;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  margin: 0 !important;
  width: 100% !important;
  /* Bündig mit Logo und Inhalt: Avada-Seitenbreite (--site_width, 1310px) und 30px Rand */
  padding: 0 max(30px, calc((100% - var(--site_width, 1310px)) / 2)) 80px !important;
  color: #fff;
}

.nr-hero-overlay .nr-hero-text h1 { color: #fff; }

/* Flacker-Fix (24.11.2026): Avada setzt beim Hover einer Spalte den
   z-index auf „auto“. Die Textspalte rutscht dann unter das Bild, verliert
   den Hover, springt zurück – Endlosschleife. z-index daher fest. */
.nr-hero-overlay .nr-hero-text,
.nr-hero-overlay .nr-hero-text:hover {
  z-index: 3 !important;
}

/* Mobil: Text unter das Bild, sonst zu eng */
@media (max-width: 800px) {
  .nr-hero-overlay .nr-hero-text {
    position: static !important;
    background: #1A1A1A;
    padding: 32px 24px 48px !important;
  }
  .nr-hero-overlay .fusion-imageframe::after { display: none; }
}
