/* ================================================================
   1. FONTS & GLOBALE VARIABLEN
   ================================================================ */
@import url('https://fonts.googleapis.com');

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Light Mode: Warmer Premium-Look */
    --bg: #F9F7F2;          /* Sanfter Sand-Ton */
    --bg-card: #FFFFFF;     /* Reinweiße Karten */
    --text: #2D2D2D;
    --text-muted: #6B6B6B;
    --accent: #F7931A;      /* Bitcoin Orange */
    --nav-bg: rgba(249, 247, 242, 0.75);
    --nav-border: rgba(0, 0, 0, 0.05);
}

body.dark {
    /* Dark Mode: Blocktrainer Anthrazit */
    --bg: #181818;
    --bg-card: #202327;
    --text: #EAEAEA;
    --text-muted: #D1D1D1;
    --accent: #F7931A;
    --nav-bg: rgba(32, 35, 39, 0.85);
    --nav-border: rgba(255, 255, 255, 0.1);
}

/* ================================================================
   2. BASIS STYLING
   ================================================================ */
html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    line-height: 1.75;
    transition: background 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
    padding-top: 120px; /* Platz für fixierte Nav */
}

/* Sektionen als elegante Karten */
section.section, .leistungen, #mission, #beratung, #kontakt {
    max-width: 1100px;
    margin: 40px auto;
    padding: 80px 80px;
    background: var(--bg-card);
    border-radius: 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: all 0.4s ease;
}

.leistungen br + • { /* Oder du nutzt <ul> */
    display: block;
    margin-top: 10px;
    color: var(--accent);
}

body.dark section.section, body.dark .leistungen {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: 2.2rem; margin-top: 1rem; }

p { margin-bottom: 1.8rem; opacity: 0.9; }
a { color: var(--accent); text-decoration: none; transition: 0.2s; }

/* Damit der Text innerhalb der breiten Box lesbar bleibt (Zeilenlänge) */
section.section p, 
.leistungen p {
    max-width: 800px;        /* Textzeilen nicht zu lang werden lassen */
    margin-left: 0;          /* Linksbündig für klaren Fokus */
}

/* ================================================================
   3. NAVIGATION (Glassmorphism)
   ================================================================ */
header.nav {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    display: flex; justify-content: center;
    padding: 20px;
}

nav.nav {
    width: 100%; max-width: 1100px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--nav-border);
    border-radius: 24px;
    padding: 10px 32px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800; font-size: 1.2rem;
    letter-spacing: 1.2px; text-transform: uppercase;
    color: var(--accent); cursor: pointer; transition: 0.3s;
}

.logo:hover {
    color: var(--accent);
    text-shadow: 0 0 15px rgba(247, 147, 26, 0.3);
}

.menu { display: flex; gap: 30px; margin-left: auto; margin-right: 30px; }

.menu a {
    color: var(--text); font-weight: 600; font-size: 0.95rem;
    position: relative; padding: 5px 0; opacity: 0.8;
}

.menu a::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: 0; left: 0; background-color: var(--accent);
    transition: width 0.3s ease;
}

.menu a:hover::after { width: 100%; }
.menu a:hover { color: var(--accent); opacity: 1; }

.nav-right {
    display: flex; align-items: center; gap: 18px;
    border-left: 1px solid var(--nav-border); padding-left: 18px;
}

/* ================================================================
   4. UI ELEMENTE (Toggle & Icons)
   ================================================================ */
.theme-toggle {
    width: 56px; height: 30px; border-radius: 999px;
    background: rgba(0, 0, 0, 0.08); border: 1px solid var(--nav-border);
    position: relative; cursor: pointer;
}

body.dark .theme-toggle { background: rgba(255, 255, 255, 0.15); }

.toggle-knob {
    position: absolute; top: 4px; left: 4px; width: 22px; height: 22px;
    background-color: var(--accent); border-radius: 50%;
    background-image: url('../img/sun.svg'); background-size: 65%;
    background-repeat: no-repeat; background-position: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.dark .toggle-knob {
    transform: translateX(26px);
    background-image: url('../img/moon.svg');
}

.user-icon {
    width: 38px; height: 38px; border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.05); background-image: url('../img/user.svg');
    background-size: 55%; background-repeat: no-repeat; background-position: center;
    border: 1px solid var(--nav-border);
    filter: brightness(0.2); transition: 0.3s; cursor: pointer;
}

body.dark .user-icon { background-color: rgba(255, 255, 255, 0.1); filter: brightness(1); }

/* ================================================================
   5. HERO & GALLERY
   ================================================================ */
.hero { width: 100%; height: 100vh; position: relative; display: flex; align-items: center; }

.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }

.hero::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.7), transparent);
}

.hero-text { position: relative; z-index: 2; padding-left: 8%; max-width: 700px; color: white; }

.scroll-gallery { height: 200vh; position: relative; background: var(--bg); }

.sticky-container {
    position: sticky; top: 120px; height: 65vh; width: calc(100% - 40px);
    margin: 0 20px; overflow: hidden; display: flex; align-items: center;
    justify-content: center; border-radius: 32px; box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
/* Dunkles Overlay ÜBER den Bildern, UNTER dem Text */
.sticky-container::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.5));
    z-index: 5;
    border-radius: 32px; /* Muss zur Abrundung des Containers passen */
}
.scroll-image {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0; transition: opacity 0.6s ease;
}

.scroll-image:first-child { opacity: 1; }

.gallery-text {
    position: relative;
    z-index: 20;
    /* Wir erzwingen Weiß, egal was global eingestellt ist */
    color: #FFFFFF !important; 
    text-align: center;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Spezifisch für die Überschrift in der Galerie */
.gallery-text h2 {
    color: #FFFFFF !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    /* Schlagschatten für Lesbarkeit auf hellem Wasser */
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7); 
}

/* Spezifisch für den Untertext in der Galerie */
.gallery-text p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1.2rem;
    max-width: 500px;
    margin: 0 auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ================================================================
   6. FOOTER (Blocktrainer Style)
   ================================================================ */
.footer {
    background: var(--bg-card); padding: 100px 40px 40px;
    border-top: 1px solid var(--nav-border); margin-top: 120px;
}

.footer-container {
    max-width: 1150px; margin: 0 auto;
    display: flex; justify-content: space-between; gap: 80px;
}

.footer-left { flex: 1.5; }

.footer-left .logo { margin-bottom: 30px; }

.footer-description { font-size: 1rem; line-height: 1.8; margin-bottom: 25px; max-width: 500px; }

.footer-right {
    flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
}

.footer-column h4 {
    font-family: 'Montserrat', sans-serif; font-size: 1rem;
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 25px;
}

.footer-column h4::before {
    content: ">"; color: var(--accent); margin-right: 10px; font-weight: bold;
}

.footer-column { display: flex; flex-direction: column; gap: 12px; }

.footer-column a { color: var(--text-muted); font-size: 0.95rem; }

.footer-column a:hover { color: var(--accent); }

.footer-bottom {
    max-width: 1150px; margin: 80px auto 0; padding-top: 30px;
    border-top: 1px solid var(--nav-border); font-size: 0.85rem; opacity: 0.5;
}

/* ================================================================
   7. RESPONSIVE & BURGER
   ================================================================ */
.burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; z-index: 2000; }
.burger span { width: 28px; height: 3px; background: var(--text); border-radius: 10px; transition: 0.3s; }

@media (max-width: 768px) {
    /* 1. Container-Ausrichtung fixieren */
    nav.nav { 
        display: flex;
        justify-content: space-between; /* Verteilt Logo links, Toggle/Burger rechts */
        align-items: center;
        border-radius: 16px; 
        padding: 10px 20px; 
    }

    /* 2. Logo explizit nach links */
    .logo {
        order: 1;
        margin-right: auto; /* Schiebt alles andere nach rechts */
        text-align: left;
    }

    /* 3. Icons rechts gruppieren */
    .nav-right {
        order: 2;
        display: flex;
        align-items: center;
        gap: 20px;
        border: none; /* Trennlinie auf mobil entfernen */
        padding-left: 0;
		padding: 0;
        margin-left: 15px; /* Abstand zum Logo (nach links) */
    }

    .user-icon {
        display: none; /* Wie gewünscht ausblenden */
    }

    .theme-toggle {
        order: 1; /* Innerhalb von .nav-right */
        margin: 0; /* Zentrierung entfernen */
    }

    .burger {
        display: flex;
        order: 2; /* Burger erscheint nach dem Toggle */
        margin-left: 10px;
    }
    
    /* 4. Restliches Mobile Menu */
    .menu {
        position: fixed; top: 0; right: -100%; width: 80%; height: 100vh;
        background: var(--nav-bg); backdrop-filter: blur(20px);
        flex-direction: column; justify-content: center; align-items: center; gap: 40px;
        transition: 0.4s ease; z-index: 1500;
    }
    .menu.active { right: 0; }

    section.section, .leistungen, #mission, #beratung, #kontakt {
        margin: 30px 15px; padding: 40px 25px; border-radius: 20px;
    }
    .footer-container { flex-direction: column; gap: 60px; }
}

/* Mobile Anpassung: Hier wieder schmaler werden */
@media (max-width: 1150px) {
    section.section, .leistungen, #mission, #beratung, #kontakt {
        max-width: calc(100% - 40px); /* Kleiner Rand rechts/links */
        padding: 60px 40px;
    }
}
/* Modal Hintergrund (Overlay) */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
}

/* Modal Box */
.modal-content {
    background-color: var(--bg-card);
    margin: 5% auto;
    padding: 40px;
    border: 1px solid var(--nav-border);
    width: 80%;
    max-width: 900px;
    border-radius: 32px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    color: var(--text);
}

/* Schließen Button */
.close-modal {
    color: var(--text-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover {
    color: var(--accent);
}

/* Scrollbar Styling für die Modal Box */
.modal-content::-webkit-scrollbar {
    width: 8px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}
