/* ==========================================================================
   📝 BEREINIGTE & KORRIGIERTE CUSTOM.CSS "THE STAGS" (Stand: 23. Juli 2026)
   ========================================================================== */

/* 1. GLOBALE BASIS (Verhindert, dass schwarze Platten die Bilder verdecken) */
html, body, main, #body {
    background-color: #000000 !important;
}

#page-wrapper, .modular-row, .section, .modular-text, .bg-gray {
    background: transparent !important;
    background-color: transparent !important;
}

/* 2. TYPOGRAFIE (Stags-Türkis für Überschriften, Hellblau für Texte) */
h1, h2, h3, .section h1, .section h2, .section h3, h1 *, h2 *, h3 * {
    color: #40e0d0 !important;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.95) !important;
    font-weight: bold !important;
}

p, li, span, a, div, .section p, .song-title {
    color: #add8e6 !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.95) !important;
}

/* 3. HEADER-BALKEN AUSBLENDEN */
#header, header, .site-header, .header-fixed, .header-fixed-wrapper, .header-fixed-wrapper * {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 0px !important;
    min-height: 0px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
}

main#body, .global-page-wrapper, #page-wrapper {
    margin-top: 0px !important;
    padding-top: 0px !important;
}
/* 4. UNZERSTÖRBARER PARALLAX-EFFEKT (Direkt auf den sichtbaren Sektions-Balken) */
.section.modular-text {
    position: relative !important;
    min-height: 85vh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    background-attachment: fixed !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
}

/* 5. HELLIGKEIT DER BILDER (Dunkler Schleier 0.35 direkt auf der Sektion) */
.section.modular-text::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.15) !important;
    z-index: 1 !important;
}

/* Sicherstellen, dass Text-Inhalte über dem Schleier liegen */
.section-content, .container, .columns {
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important;
    max-width: 850px !important;
    margin: 0 auto !important;
    text-align: center !important;
}

/* 6. BILDZUWEISUNG ÜBER DIE REIHENFOLGE DER SEKTIONEN IM HTML */
#start .section.modular-text:nth-of-type(1) { background-image: url("/user/pages/01.start/foto1.jpg") !important; }
#start .section.modular-text:nth-of-type(2) { background-image: url("/user/pages/01.start/foto2.jpg") !important; }
#start .section.modular-text:nth-of-type(3) { background-image: url("/user/pages/01.start/foto3.jpg") !important; }
#start .section.modular-text:nth-of-type(4) { background-image: url("/user/pages/01.start/foto4.jpg") !important; }
#start .section.modular-text:nth-of-type(5) { background-image: url("/user/pages/01.start/foto5.jpg") !important; }
#start .section.modular-text:nth-of-type(6) { background-image: url("/user/pages/01.start/foto6.jpg") !important; }
#start .section.modular-text:nth-of-type(7) { background-image: url("/user/pages/01.start/foto6.jpg") !important; }

/* 7. KOSMETISCHER FIX FÜR DEN STRIPENFREIEN SLIDER */
.slidecontainer {
    width: 100% !important;
    max-width: 600px !important;
    height: 45px !important;
}
.slider {
    cursor: pointer;
}
.player, .startStopImg {
    display: inline-block !important;
    visibility: visible !important;
}

/* ======================================================================
   8. SMARTPHONE-OPTIMIERUNG (RESPONSIVENESS & VIDEO-ZENTRIERUNG)
   ====================================================================== */
@media (max-width: 1024px) {
    /* Parallax-Hintergründe für mobile Performance auf Mitscrollen umstellen */
    #start .section.modular-text {
        background-attachment: scroll !important;
        padding: 4rem 1rem !important;
    }

    /* Videos auf Smartphones perfekt zentrieren und begrenzen */
    .section.modular-text video {
        max-width: 100% !important;
        height: auto !important;
        margin: 1.5rem auto !important;
        display: block !important;
    }

        /* Schutz vor Rand-Kollision und unerwünschten Umbrüchen */
    .section.modular-text h1,
    .section.modular-text h2 {
        font-size: clamp(1.6rem, 7.2vw, 2.2rem) !important;
        word-wrap: normal !important;
    }

    /* Fix für Querformat (Landscape) auf Smartphones gegen den rechten Streifen */
    @media (orientation: landscape) {
        #start,
        #start .section.modular-text,
        #start .container {
            width: 100vw !important;
            max-width: 100vw !important;
            min-width: 100vw !important;
            margin-left: 0 !important;
            margin-right: 0 !important;
            padding-left: max(1.5rem, env(safe-area-inset-left)) !important;
            padding-right: max(1.5rem, env(safe-area-inset-right)) !important;
        }
    }

}

/* BACK TO TOP BUTTON - IN SEITEN-TÜRKIS */
#scrollToTop {
    display: none;
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: rgba(64, 224, 208, 0.2); /* Hintergrund sehr dezent (20% Türkis) */
    color: rgba(64, 224, 208, 0.8);           /* Der Pfeil selbst in 80% kräftigem Türkis */
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0px 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

/* Beim Drüberfahren wird das Element komplett solide */
#scrollToTop:hover {
    background-color: rgba(64, 224, 208, 1.0); /* Hintergrund wird vollflächig Türkis */
    color: #ffffff;                            /* Pfeil wechselt zu Weiß für perfekten Kontrast */
    box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
}

/* =========================================================================
   9. PROJEKT X BAR - EINZELSEITE & FULLSCREEN PARALLAX
   ========================================================================= */

/* Zwingt das enge Theme-Raster der Unterseite auf die volle Bildschirmbreite */
body.x-bar-page #body-wrapper,
body.x-bar-page main.main-content,
body.x-bar-page .container,
body.x-bar-page .grid {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #000000 !important;
}

/* Der Parallax-Balken: Keine schwarzen Balken, kein Kacheln, echtes Cover */
body.x-bar-page .xbar-section {
    position: relative !important;
    width: 100% !important;
    width: 100vw !important;
    min-height: 85vh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    background-attachment: fixed !important;
    background-position: center center !important;
    background-repeat: no-repeat !important; /* Verhindert das Kacheln an den Rändern */
    background-size: cover !important;        /* Bild füllt den Raum ohne Verzerrung */
    padding: 6rem 1rem !important;
    margin: 0 !important;                     /* Vernichtet schwarze Trennbalken zwischen Sektionen */
}

/* Der dunkle Schleier (0.35) für perfekten Textkontrast wie auf der Hauptseite */
body.x-bar-page .xbar-section::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.35) !important;
    z-index: 1 !important;
}

/* Hebt Inhalte über den dunklen Schleier */
body.x-bar-page .xbar-content {
    position: relative !important;
    z-index: 2 !important;
    max-width: 850px !important;
    width: 100% !important;
    margin: 0 auto !important;
    text-align: center !important;
}

/* Video-Styling auf der X-Bar-Unterseite */
body.x-bar-page .xbar-content video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 1.5rem auto 3rem auto !important;
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

/* Typografie-Anpassungen */
body.x-bar-page .xbar-content h1,
body.x-bar-page .xbar-content h3 {
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.9) !important;
}
body.x-bar-page .xbar-content h3 {
    color: #40e0d0 !important; /* Dein Stags-Türkis */
    font-size: clamp(1.5rem, 4vw, 2.5rem) !important;
}

/* Zurück-Button Styling */
body.x-bar-page .back-to-home {
    margin-top: 3rem !important;
}
body.x-bar-page .btn-back {
    color: #40e0d0 !important;
    text-decoration: none !important;
    font-weight: bold !important;
    font-size: 1.2rem !important;
    transition: all 0.3s ease;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.9) !important;
}
body.x-bar-page .btn-back:hover {
    color: #add8e6 !important; /* Dein Hellblau */
}

/* =========================================================================
   10. GLOBAL SMARTPHONE-OPTIMIERUNGEN & RESPONSIVE DESIGN
   ========================================================================= */

@media (max-width: 1024px) {
    /* Deaktiviert fixierten Hintergrund auf Handys gegen Ruckeln */
    body.x-bar-page .xbar-section {
        background-attachment: scroll !important;
        padding: 3rem 1rem !important;
    }

    /* Dynamische Textgröße für kleinere Bildschirme */
    body.x-bar-page .xbar-content h1 {
        font-size: clamp(2rem, 7.2vw, 3.5rem) !important;
    }
}

/* Spezieller Querformat-Fix für Smartphones (Notch-Schutz) */
@media screen and (orientation: landscape) and (max-device-width: 932px) {
    body.x-bar-page .xbar-section {
        width: 100vw !important;
        padding-left: env(safe-area-inset-left) !important;
        padding-right: env(safe-area-inset-right) !important;
    }
}

/* =========================================================================
   11. MITLAUFENDE NAVIGATIONSTASTEN (STICKY BUTTONS)
   ========================================================================= */

/* Gemeinsame Basis-Styles für beide Buttons */
#scrollToTop,
#scrollBackHome {
    position: fixed;
    bottom: 20px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: rgba(64, 224, 208, 0.2); /* Dein transparentes Stags-Türkis */
    color: rgba(64, 224, 208, 0.8);
    cursor: pointer;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    padding: 0 !important;
    border-radius: 4px;
    font-size: 18px;
    transition: all 0.3s ease;
    text-decoration: none !important;
    display: none !important;

}

/* Nach-Oben-Pfeil ganz rechts positionieren */
#scrollToTop {
    right: 20px;
}

/* Nach-Links-Pfeil direkt links daneben positionieren */
#scrollBackHome {
    right: 80px; /* 20px Rand + 50px Breite + 10px Abstand */
}

/* Hover-Effekte für beide Buttons identisch */
#scrollToTop:hover,
#scrollBackHome:hover {
    background-color: rgba(64, 224, 208, 1.0); /* Volles Stags-Türkis */
    color: #ffffff !important; /* Weißer Pfeil */
}

/* =========================================================================
   12. MINIMALISTISCHES X BAR POP-UP (GLASEFFEKT)
   ========================================================================= */
#xbar-popup {
    position: fixed;
    top: 50%;
    left: -240px; /* Startet unsichtbar außerhalb des linken Bildschirms */
    transform: translateY(-50%);
    width: 200px;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(8px); /* Der edle Glaseffekt */
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(64, 224, 208, 0.3);
    border-left: none; /* Bündig am linken Rand andocken */
    border-radius: 0 8px 8px 0;
    padding: 12px;
    z-index: 999;
    text-align: center;
    transition: left 0.5s ease-in-out; /* Weiches Reinsliden */
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.7);
}

/* Wenn das Pop-up die Klasse 'active' bekommt, slidet es rein */
#xbar-popup.active {
    left: 0;
}

#xbar-popup img {
    max-width: 80px;
    height: auto;
    margin-bottom: 15px;
    display: inline-block;
}

/* 🎯 TRANSPARENTER BUTTON-LOOK */
#xbar-popup .btn-popup {
    display: block;
    background: transparent !important; /* Komplett transparent */
    color: #40e0d0 !important;          /* Dein Stags-Türkis */
    border: 1px solid #40e0d0;          /* Feiner türkiser Rahmen */
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

/* Hover-Effekt: Beim Drüberfahren füllt sich der Button */
#xbar-popup .btn-popup:hover {
    background: rgba(64, 224, 208, 1.0) !important; /* Volles Türkis */
    color: #ffffff !important;                      /* Weiße Schrift */
}

/* Schließen-Button oben rechts im Pop-up */
#xbar-popup .close-popup {
    position: absolute;
    top: 5px;
    right: 10px;
    color: rgba(64, 224, 208, 0.6);
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
}
#xbar-popup .close-popup:hover {
    color: #ffffff;
}

/* =========================================================================
   14. SMARTPHONE-ANPASSUNG FÜR DAS X BAR POP-UP
   ========================================================================= */
@media (max-width: 1024px) {
    #xbar-popup {
        top: auto !important; /* Löst das Pop-up aus der vertikalen Mitte */
        bottom: -200px;       /* Startet unsichtbar unter dem unteren Bildschirmrand */
        left: 0 !important;
        transform: none !important;
        width: 100% !important; /* Volle Breite auf dem Handy */
        max-width: 100% !important;
        border-radius: 12px 12px 0 0; /* Abrundung nur oben */
        border: 1px solid rgba(64, 224, 208, 0.3);
        border-bottom: none; /* Bündig unten abschließen */
        padding: 12px max(15px, env(safe-area-inset-right)) 15px max(15px, env(safe-area-inset-left)) !important; /* Schutz für Notch/Home-Bar */
        transition: bottom 0.5s ease-in-out !important; /* Weiches Hoch- und Runtersliden */
    }

    /* Wenn aktiv, slidet es von unten nach oben rein */
    #xbar-popup.active {
        bottom: 0 !important;
    }

    /* Das Logo und der Button nebeneinander anordnen für maximale Platzersparnis */
    #xbar-popup .close-popup {
        top: 8px;
        right: 15px;
        font-size: 20px;
    }

    #xbar-popup img {
        max-width: 50px !important; /* Logo deutlich kleiner */
        margin-bottom: 0 !important;
        margin-right: 15px;
        vertical-align: middle;
    }

    #xbar-popup .btn-popup {
        display: inline-block !important;
        vertical-align: middle;
        font-size: 0.85rem !important;
        padding: 6px 15px !important;
    }
}

