/* --- Reset & Basis --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    font-family: 'Roboto', sans-serif;
    background-color: #111; /* Fallback, falls das Bild lädt */
}

/* --- Header / Navigation --- */
header {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    /* Weißer Schimmer (Glassmorphism) und untere Linie */
    background: rgba(255, 255, 255, 0.03); 
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: -1; /* Schiebt den Blur hinter das Logo und die Buttons */
}

.logo {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
}

.logo-icon {
    height: 35px;
    margin-right: 10px;
}


.desktop-menu a {
    color: white;
    text-decoration: none;
    margin-left: 35px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.desktop-menu a:hover {
    color: #b51a24; /* Das Rot vom Button */
}

.mobile-menu-btn {
    display: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    /* HIER DEIN HINTERGRUNDBILD EINBINDEN */
    background: url('res/pics/BG_Alps.png') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Leichter dunkler Verlauf, damit der Text rechts besser lesbar ist */
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    max-width: 1400px;
    padding: 0 5%;
    align-items: center;
    justify-content: space-between;
}

/* --- Animationen --- */
@keyframes slideInLeft {
    from { transform: translateX(-150%); opacity: 1; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(50%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- Fahrrad (Links) --- */
.bike-container {
    flex: 1.2; 
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-width: 0; 
    transform: translateX(-50%);
    opacity: 1;
    animation: slideInLeft 2.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.2s;
    pointer-events: none; 
}

.bike-img {
    height: 80vh; 
    width: auto; 
    /* NEU: Begrenzt die maximale Breite auf die 1,5-fache Bildschirmbreite */
    max-width: 150vw; 
    margin-left: 0; 
    /* Wir verschieben nicht mehr um 110% der Bildbreite, sondern fix bezogen auf die Fensterbreite (Viewport Width). Spiel mit dem Wert (z.B. -20vw bis -40vw), bis der Anschnitt für dich perfekt ist. */
    transform: translateX(-60vw); 
    filter: drop-shadow(10px 15px 25px rgba(0,0,0,0.6));
    object-fit: contain;
	pointer-events: auto; /* Macht nur das Bild klickbar */
    cursor: pointer;      /* Zeigt die Hand nur über dem Fahrrad */
}

/* --- Textblock (Rechts) --- */
.text-container {
    flex: 0.8; 
    /* Zwingt den Text-Container, im sichtbaren Bereich zu bleiben */
    min-width: 0; 
    color: white;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    transform: translateX(120%);
    opacity: 0;
    animation: slideInRight 5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.2s;
}

h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 5.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    line-height: 1.5;
    max-width: 450px;
}

.cta-button {
    background-color: #a71923; /* Das Rot aus der Vorlage */
    color: white;
    padding: 16px 40px;
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s, transform 0.3s;
}

.cta-button:hover {
    background-color: #d11f2d;

    transform: scale(1.05);
}

/* --- Responsive Design (Smartphones & Tablets) --- */
@media (max-width: 1024px) {
    h1 { font-size: 4rem; }
    
    /* Fahrrad aus dem Layout lösen und in den Hintergrund legen */
    .bike-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
        display: flex;
        align-items: center; /* Zentriert das Rad vertikal, wenn es > 100vh ist */
        justify-content: flex-start;
		pointer-events: auto; 
    	cursor: pointer;
    }

    .bike-img { 
        height: 80vh; 
        width: auto;
        max-width: none;
        opacity: 1; 
        transform: translateX(-60%); 
        filter: drop-shadow(10px 15px 25px rgba(0,0,0,0.8));
        object-fit: contain; 
    }
	
	.hero::before {
        background: linear-gradient(to right, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.8) 100%);
        z-index: 1;
    }

    .hero-content {
        justify-content: center; 
        align-items: center; /* Zentriert den Text-Container auf der X-Achse im übergeordneten Element */
    }

    .text-container {
        flex: 1;
        z-index: 2; 
        align-items: center; /* Zentriert Überschrift, Text und Button untereinander */
        text-align: center; /* Zentriert die Textzeilen an sich */
        width: 100%; /* Zwingt den Container auf die volle Breite, damit er nicht an den Rand rutscht */
        text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
    }
}

@media (max-width: 768px) {
    /* Mobile Navigation */
    .mobile-menu-btn { display: block; z-index: 10000; }
    
    .desktop-menu {
        display: none;
        position: fixed; /* 'fixed' verhindert, dass man den geblurten Bereich wegscrollen kann */
        top: 80px; 
        left: 0; 
        width: 100%;
        height: calc(100vh - 80px); /* Füllt exakt den Rest des Bildschirms aus */
        
        background: rgba(255, 255, 255, 0.03); 
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 50px; /* Schiebt die Links etwas nach unten für eine bessere Optik */
        text-align: center;
        z-index: 9998;
    }
    
    .desktop-menu.active { display: flex; }
    .desktop-menu a { 
        margin: 15px 0; 
        font-size: 1.8rem; /* Hier den Wert erhöhen (vorher 1.2rem) */
    }

    /* Hero Section Anpassung */
    .hero-content {
        padding-top: 80px;
    }

    .hero::before {
        background: rgba(0,0,0,0.5); 
    }

    h1 { font-size: 3rem; }
    p { max-width: 100%; }

    /* Text Animation (Fahrrad kommt bereits durch den 1024px-Block von links) */
    .text-container {
        animation: fadeInRightMobile 1s ease forwards;
        transform: translateX(50vw); /* Startposition rechts außerhalb der Mitte */
        opacity: 0; 
    }

    @keyframes fadeInRightMobile {
        to { transform: translateX(0); opacity: 1; }
    }
}/* CSS Document */


/* --- Blur Overlay für den Hintergrund --- */
.hero-blur-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 3; 
    pointer-events: none; 
    transition: backdrop-filter 0.8s ease, -webkit-backdrop-filter 0.8s ease, background 0.8s ease;
}

/* Wird durch JavaScript aktiviert */
body.cockpit-active .hero-blur-overlay {
    background: rgba(0, 0, 0, 0.4); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    /* NEU: Nimmt Klicks an, um das Cockpit zu schließen */
    pointer-events: auto; 
    cursor: pointer; /* Zeigt an, dass man hier klicken kann */
}

/* --- Cockpit Bild-Wrapper (ehemals .cockpit-container) --- */
.cockpit-wrapper {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%); 
    
    width: 100%;
    max-width: 1200px;
    z-index: 105; 
    
    pointer-events: none; 
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
	
    display: flex;
    flex-direction: column; 
    justify-content: flex-end;
    align-items: center;
    
    /* Hält das Formular vom Menüband fern (ca. 80px Header + etwas Puffer) */
    padding-top: 150px; 
    padding-bottom: 0px;
	
    height: 100vh;
    height: 100dvh; 
}

/* --- Formular Styling --- */
.registration-form {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    margin-bottom: 0px;
    z-index: 110;
    pointer-events: auto; 
    
    /* Verhindert, dass das Formular jemals gequetscht wird */
    flex-shrink: 0; 
}

.registration-form h3 {
    color: white;
    font-family: 'Oswald', sans-serif;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-align: center;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.registration-form input, 
.registration-form textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px 15px;
    color: white;
    font-family: 'Roboto', sans-serif;
    outline: none;
    transition: border 0.3s;
}

.registration-form input:focus, 
.registration-form textarea:focus {
    border-color: #a71923;
}

.registration-form textarea {
    resize: none;
    margin-bottom: 20px;
}

.registration-form .cta-button {
    width: 100%;
    border: none;
    cursor: pointer;
}

/* Responsive Anpassung für schmale Screens */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
    }
}

/* Reinfahren bei aktiver Klasse */
body.cockpit-active .cockpit-wrapper {
    transform: translate(-50%, 0);
}

/* --- Cockpit Bild --- */
.cockpit-img {
    width: 100%; /* Nimmt die verfügbare Breite des Containers ein */
    height: 100%; /* Nimmt die durch Flexbox zugewiesene Resthöhe ein */
    flex: 1; 
    min-height: 0; 
    object-fit: contain; /* Zwingt das Bild absolut immer in seine Originalproportionen */
	object-position: bottom;
    display: block;
    pointer-events: auto; 
    filter: drop-shadow(0 -10px 20px rgba(0,0,0,0.5));
}

@media (max-height: 600px) {
    .cockpit-wrapper {
        flex-direction: row; 
        justify-content: center;
        align-items: flex-end; 
        /* GEÄNDERT: Oben 80px Abstand (für Header), Rechts 5%, Unten 0, Links 5% */
        padding: 80px 5% 0 5%; 
        gap: 20px; 
    }

    .registration-form {
        width: 100%;
        max-width: 350px; 
        margin-bottom: 0;
        padding: 15px 20px; 
        align-self: center; /* Das Formular bleibt trotzdem vertikal zentriert */
    }

    /* Überschriften und Abstände im Formular für Querformat kompakter machen */
    .registration-form h3 { margin-bottom: 10px; font-size: 1.2rem; }
    .registration-form input, .registration-form textarea { padding: 8px 12px; }
    .registration-form textarea { margin-bottom: 10px; }
    .form-row { margin-bottom: 10px; }

    .cockpit-img {
        height: 90vh; 
        width: 100%; 
        max-width: 50vw; 
        margin-top: 0;
        /* object-position: bottom; wird automatisch von der Hauptklasse übernommen */
    }
}

/* --- Footer Styling --- */
.legal-links-mobile {
    display: none; /* Standardmäßig aus (Desktop) */
}

.site-footer {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 120; /* Wert von 10 auf 120 erhöht */
    display: block;
}

.site-footer a, .site-footer .separator {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.site-footer a:hover {
    color: white;
}

.site-footer .separator {
    margin: 0 10px;
}

/* --- Legal Modal Styling --- */
.legal-modal {
    display: none; 
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Etwas dunkler für bessere Lesbarkeit */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    
    /* Höher als der Header (9999) und das Cockpit (105) */
    z-index: 99999; 
    
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.legal-content-wrapper {
    background: rgba(30, 30, 30, 0.8); /* Dunklerer Hintergrund für den Text-Container */
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    width: 95%;
    max-width: 900px;
    max-height: 90vh; /* Nutzt mehr Platz auf dem Bildschirm */
    overflow-y: auto;
    position: relative;
    color: white;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.close-legal {
    position: sticky;
    top: -20px;
    float: right;
    cursor: pointer;
    font-size: 2rem;
    color: #a71923;
    z-index: 10;
    background: rgba(30, 30, 30, 0.9);
    padding: 5px 10px;
    border-radius: 50%;
}


.legal-text-block h2, .legal-text-block h3 {
    font-family: 'Oswald', sans-serif;
    margin-bottom: 15px;
    color: #a71923; /* Akzentfarbe */
}

.legal-text-block p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: left;
    max-width: 100%;
}

/* --- Mobile Menü Anpassung --- */
@media (max-width: 768px) {
    
    /* 1. Footer im Smartphone-Modus komplett ausblenden */
    .site-footer {
        display: none;
    }

    /* 2. Rechtliche Links im Menü-Overlay einblenden */
    .legal-links-mobile {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 20px;
        margin-top: auto; /* Schiebt die Links ganz nach unten im Overlay */
        padding-bottom: 30px;
        width: 100%;
    }

    .legal-links-mobile a {
        font-size: 0.9rem !important;
        color: rgba(255, 255, 255, 0.5) !important;
        margin: 0 !important; /* Überschreibt die Abstände der normalen Menülinks */
        text-transform: none;
    }
    
    /* Sicherstellen, dass das Menü-Overlay die volle Höhe nutzt, 
       um die Links unten zu platzieren */
    .desktop-menu.active {
        display: flex;
        flex-direction: column;
    }
}