/* ============================================================
 * NLE Dynamic Slider - Frontend CSS
 * Schriftarten + Primary-Color werden aus Elementor uebernommen
 * (var(--e-global-...)), mit Fallback fuer Nicht-Elementor-Setups.
 * ============================================================ */

.nle-slider {
    /* Layout-Defaults (per Inline-Style oder Theme-CSS ueberschreibbar) */
    --nle-height: calc(100vh - 90px);
    --nle-gradient-color: #11161D;
    --nle-gradient-height: 220px;

    /* Button-Defaults: nutzen Elementor-Globals, fallback auf eigene Werte */
    --nle-btn-primary-bg:   var(--e-global-color-primary, #1E9BE6);
    --nle-btn-secondary-bg: rgb(85, 110, 131);
    --nle-btn-color:        #FFFFFF;
    --nle-btn-border:       0;
    --nle-btn-radius:       100px;
    --nle-btn-padding:      20px 40px;
    --nle-btn-font:         var(--e-global-typography-primary-font-family, inherit);
    --nle-btn-weight:       var(--e-global-typography-primary-font-weight, 600);

    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    height: var(--nle-height);
    min-height: 480px;
    overflow: hidden;
}

.nle-slider .swiper,
.nle-slider .swiper-wrapper,
.nle-slider .swiper-slide {
    width: 100%;
    height: 100%;
}

.nle-slide {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

/* ----------------------------------------------------------
 * Hintergrund: cover, ohne Verzerrung, Ken-Burns-Loop
 * ---------------------------------------------------------- */
.nle-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 0;
    will-change: transform;
}

.nle-slider .swiper-slide-active .nle-slide-bg {
    animation: nle-kenburns 22s ease-in-out infinite alternate;
}

@keyframes nle-kenburns {
    0%   { transform: scale(1.05) translate(0, 0); }
    100% { transform: scale(1.18) translate(-2%, -1.5%); }
}

/* ----------------------------------------------------------
 * Verlauf (optional)
 * ---------------------------------------------------------- */
.nle-slider-gradient {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--nle-gradient-height);
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        var(--nle-gradient-color) 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* ----------------------------------------------------------
 * Slide-Content (z-index 3 = ueber Verlauf)
 * ---------------------------------------------------------- */
.nle-slide-content {
    position: relative;
    z-index: 3;
    max-width: 920px;
    padding: 40px 24px 80px;
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.7),
        0 0 24px rgba(0, 0, 0, 0.5);
}

/* H1 */
.nle-slide-heading {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin: 0 0 20px;
    font-weight: 700;
    color: #fff;
}

/* SR-only fuer SEO-only-H1 */
.nle-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Logo - bis 800x400, proportional skaliert */
.nle-slide-logo {
    display: block;
    max-width: min(800px, 90%);
    max-height: 400px;
    width: auto;
    height: auto;
    margin: 0 auto 24px;
    object-fit: contain;
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.55));
}

/* Subline */
.nle-slide-sub {
    font-size: clamp(1rem, 1.6vw, 1.35rem);
    line-height: 1.5;
    margin: 0 0 32px;
    opacity: 0.95;
    color: #fff;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* ----------------------------------------------------------
 * Buttons - Style aus Elementor-Globals
 * ---------------------------------------------------------- */
.nle-slide-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    position: relative;
    z-index: 4;
}

.nle-slide-btn {
    display: inline-block;
    padding: var(--nle-btn-padding);
    text-decoration: none !important;
    border-radius: var(--nle-btn-radius);
    border: var(--nle-btn-border);
    font-family: var(--nle-btn-font);
    font-weight: var(--nle-btn-weight);
    font-size: 1em;
    line-height: 20px;
    letter-spacing: 0;
    text-shadow: none;
    color: var(--nle-btn-color) !important;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
    cursor: pointer;
    text-align: center;
}

.nle-slide-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.nle-slide-btn--primary {
    background-color: var(--nle-btn-primary-bg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.nle-slide-btn--primary:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.nle-slide-btn--secondary {
    background-color: var(--nle-btn-secondary-bg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.nle-slide-btn--secondary:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* ----------------------------------------------------------
 * SLIDE-IN-ANIMATION beim Slide-Wechsel
 * Headline -> Logo -> Subline -> Buttons fliegen versetzt
 * von unten ein.
 * ---------------------------------------------------------- */

/* Initial unsichtbar + nach unten versetzt */
.nle-slide .nle-slide-heading,
.nle-slide .nle-slide-logo,
.nle-slide .nle-slide-sub,
.nle-slide .nle-slide-buttons {
    opacity: 0;
    transform: translateY(60px);
}

/* Aktive Slide: Animation starten, gestaffelt */
.nle-slider .swiper-slide-active .nle-slide-heading {
    animation: nle-slide-up 0.85s cubic-bezier(0.2, 0.7, 0.3, 1) 0.20s forwards;
}

/* Logo bekommt zusaetzlich Zoom (Vergroessern aus dem Hintergrund) */
.nle-slider .swiper-slide-active .nle-slide-logo {
    animation: nle-logo-in 1.0s cubic-bezier(0.2, 0.8, 0.25, 1.05) 0.40s forwards;
}

.nle-slider .swiper-slide-active .nle-slide-sub {
    animation: nle-slide-up 0.85s cubic-bezier(0.2, 0.7, 0.3, 1) 0.55s forwards;
}

.nle-slider .swiper-slide-active .nle-slide-buttons {
    animation: nle-slide-up 0.85s cubic-bezier(0.2, 0.7, 0.3, 1) 0.75s forwards;
}

@keyframes nle-slide-up {
    from { opacity: 0; transform: translateY(60px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes nle-logo-in {
    0%   { opacity: 0; transform: translateY(40px) scale(0.4); }
    60%  { opacity: 1; transform: translateY(0)    scale(1.05); }
    100% { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ----------------------------------------------------------
 * Navigation: Dreiecks-Pfeile an den Raendern
 * ---------------------------------------------------------- */

.nle-slider .swiper-button-prev,
.nle-slider .swiper-button-next {
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 50%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 5;
    margin-top: -28px;  /* exakt zentrieren */
    color: #fff;
    text-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nle-slider .swiper-button-prev { left: 18px; }
.nle-slider .swiper-button-next { right: 18px; }

.nle-slider .swiper-button-prev:hover,
.nle-slider .swiper-button-next:hover {
    background: rgba(0, 0, 0, 0.55);
    transform: scale(1.08);
}

/* Default-Chevron ueberschreiben durch CSS-Dreieck */
.nle-slider .swiper-button-prev::after,
.nle-slider .swiper-button-next::after {
    content: "" !important;
    font-size: 0 !important;
    font-family: inherit !important;
    width: 0;
    height: 0;
    border-style: solid;
    display: block;
}

.nle-slider .swiper-button-prev::after {
    border-width: 11px 16px 11px 0;
    border-color: transparent #fff transparent transparent;
    margin-right: 4px;  /* optisch zentrieren */
    animation: nle-arrow-pulse-left 2.6s ease-in-out infinite;
}

.nle-slider .swiper-button-next::after {
    border-width: 11px 0 11px 16px;
    border-color: transparent transparent transparent #fff;
    margin-left: 4px;
    animation: nle-arrow-pulse-right 2.6s ease-in-out infinite;
}

@keyframes nle-arrow-pulse-left {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(-4px); }
}

@keyframes nle-arrow-pulse-right {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(4px); }
}

/* Pagination-Dots */
.nle-slider .swiper-pagination {
    z-index: 5;
}

.nle-slider .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.55;
    width: 10px;
    height: 10px;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.nle-slider .swiper-pagination-bullet-active {
    background: var(--nle-btn-primary-bg);
    opacity: 1;
    transform: scale(1.2);
}

/* ----------------------------------------------------------
 * Scroll-Down-Indicator - dezenter weisser Pfeil mit Bounce
 * ---------------------------------------------------------- */
.nle-scroll-down {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 6;

    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;

    background: none;
    border: 0;
    padding: 4px;
    margin: 0;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
    opacity: 0.85;
    transition: opacity 0.2s ease;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
}

.nle-scroll-down:hover,
.nle-scroll-down:focus {
    opacity: 1;
    outline: none;
}

.nle-scroll-down-text {
    font-size: 0.65rem;
    letter-spacing: 1px;
    font-weight: 400;
    text-transform: uppercase;
    opacity: 0.85;
    /* Nur ein dezenter Schatten, falls Text genutzt wird, fuer Lesbarkeit ueber Bildern */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.nle-scroll-down-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: nle-scroll-bounce 1.8s ease-in-out infinite;
    color: #fff;
    /* Subtiler Schatten direkt am SVG, damit der Pfeil ueber hellen Bildstellen sichtbar bleibt */
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55));
}

@keyframes nle-scroll-bounce {
    0%, 100% { transform: translateY(0);   opacity: 0.8; }
    50%      { transform: translateY(6px); opacity: 1; }
}

/* ----------------------------------------------------------
 * prefers-reduced-motion respektieren
 * ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .nle-slider .swiper-slide-active .nle-slide-bg,
    .nle-slider .swiper-slide-active .nle-slide-heading,
    .nle-slider .swiper-slide-active .nle-slide-logo,
    .nle-slider .swiper-slide-active .nle-slide-sub,
    .nle-slider .swiper-slide-active .nle-slide-buttons,
    .nle-slider .swiper-button-prev::after,
    .nle-slider .swiper-button-next::after,
    .nle-scroll-down-icon {
        animation: none !important;
    }
    .nle-slide .nle-slide-heading,
    .nle-slide .nle-slide-logo,
    .nle-slide .nle-slide-sub,
    .nle-slide .nle-slide-buttons {
        opacity: 1;
        transform: none;
    }
}

/* ----------------------------------------------------------
 * Mobile
 * ---------------------------------------------------------- */
/* Tablet */
@media (max-width: 1024px) {
    .nle-slider {
        --nle-btn-padding: 18px 36px;
    }

    .nle-slide-logo {
        max-width: min(560px, 88%);
        max-height: 280px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .nle-slider {
        --nle-height: calc(100vh - 70px);
        --nle-gradient-height: 160px;
        --nle-btn-padding: 16px 28px;
        --nle-btn-radius: 100px;
        min-height: 420px;
    }

    .nle-slide-content {
        padding: 24px 16px 88px; /* mehr Bottom-Padding wegen Scroll-Indicator */
    }

    .nle-slide-logo {
        max-width: min(360px, 90%);
        max-height: 200px;
        margin-bottom: 18px;
    }

    .nle-slide-heading {
        font-size: clamp(1.5rem, 8vw, 2.4rem);
        margin-bottom: 14px;
    }

    .nle-slide-sub {
        font-size: clamp(0.95rem, 4vw, 1.1rem);
        margin-bottom: 22px;
    }

    .nle-slide-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
        gap: 10px;
    }

    .nle-slide-btn {
        width: 100%;
        text-align: center;
    }

    .nle-slider .swiper-button-prev,
    .nle-slider .swiper-button-next {
        width: 40px;
        height: 40px;
        margin-top: -20px;
    }
    .nle-slider .swiper-button-prev { left: 8px; }
    .nle-slider .swiper-button-next { right: 8px; }

    .nle-slider .swiper-button-prev::after { border-width: 8px 12px 8px 0; }
    .nle-slider .swiper-button-next::after { border-width: 8px 0 8px 12px; }

    .nle-scroll-down {
        bottom: 12px;
    }
    .nle-scroll-down-text {
        font-size: 0.6rem;
        letter-spacing: 0.8px;
    }
    .nle-scroll-down-icon svg {
        width: 22px;
        height: 22px;
    }

    .nle-slider .swiper-pagination {
        bottom: 48px; /* ueber dem Scroll-Indicator */
    }
}

/* Sehr schmale Phones */
@media (max-width: 380px) {
    .nle-slide-logo {
        max-height: 160px;
    }
    .nle-slider .swiper-button-prev,
    .nle-slider .swiper-button-next {
        display: none; /* bei Mini-Screens nur Swipe */
    }
}
