/* Anpassungen für das Sticky-Verhalten */
#karl-scroll-container {
    min-height: calc(100vh + 100px); /* Viewport + Puffer für Sticky-Element */
    position: relative; /* Wichtig für die Positionierung des Sticky-Elements */
}

#vehicle-panel {
    position: sticky;
    top: calc(20px + 56px); /* 56px = Höhe des Joomla-Headers (anpassen!) */
    display: flex;
    align-items: center;
    justify-content: center;
}

#vehicle-panel img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

#text-panel section {
    padding: 20px;
    background-color: #f8f9faEE;
    border-radius: 8px;
}

#karl-scroll-container-parent {
    position: relative; /* Wichtig für absolute Positionierung des ::before-Elements */
    background-color: #001538;
    background-image:
        radial-gradient(circle at 18% 22%, rgba(122, 193, 255, 0.28) 0, rgba(122, 193, 255, 0) 32%),
        radial-gradient(circle at 78% 16%, rgba(91, 170, 255, 0.22) 0, rgba(91, 170, 255, 0) 29%),
        radial-gradient(circle at 62% 72%, rgba(61, 132, 224, 0.18) 0, rgba(61, 132, 224, 0) 36%),
        linear-gradient(180deg, #001538 0%, #001538 100%);
}
#karl-scroll-container-parent::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/images/pruefstaende/karl/pattern-rotated.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0.25;
}
#karl-scroll-container-parent h1 {
    position: relative;
}





/* === Sanfte Animation für das Fahrzeug-Panel === */
@media (min-width: 768px) {
  /* Parent-Element des Fahrzeug-Panels */
  #karl-scroll-container > div {
    transition: width 0.5s ease-in-out; /* Sanfte Animation */
  }
  /* Sticky-Effekt für das Fahrzeug-Panel */
  #vehicle-panel {
    position: sticky;
    top: 0;
    /*height: 100vh;*/
    z-index: 1000;
  }

  #text-panel section {
    opacity: 0; /* Anfangs unsichtbar */
    transform: translateY(20px); /* Leichte Verschiebung nach unten */
    transition:
      opacity 0.5s ease-in-out 0.3s, /* Verzögerte Einblendung */
      transform 0.5s ease-in-out 0.3s;
    pointer-events: none; /* Verhindert Klicks während der Animation */
  }

  #text-panel section.visible {
    opacity: 1; /* Voll sichtbar */
    transform: translateY(0); /* Zurück an die ursprüngliche Position */
    pointer-events: auto; /* Klicks wieder ermöglichen */
  }
}


/* === Mobile-View-Anpassungen === */
@media (max-width: 767.98px) {
    #text-view {
    }
    #text-view section {
    }
}