/* ------------------------------------------------------------------- */
/* 🎨 GLOBALE CSS-STYLES: LERNLICHTER MASTER SHEET                     */
/* ------------------------------------------------------------------- */

/* ========================================= */
/* 1. BASIS, VARIABLEN & UTILITIES           */
/* ========================================= */
:root {
    /* Farben */
    --primary-dark: #1A1A2E;
    --primary: #16213E;
    --primary-light: #0F3460;
    --accent: #8B9DC3;
    --accent-dark: #6B7C99;
    --accent-gold: #D4AF37;
    --background: #F8F9FA;
    --background-alt: #FAFBFC;
    --surface: #FFFFFF;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-on-dark: #FFFFFF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    
    /* Schatten */
    --shadow-sm: rgba(26, 26, 46, 0.08);
    --shadow-md: rgba(26, 26, 46, 0.12);
    --shadow-lg: rgba(26, 26, 46, 0.15);

    /* Lernlichter Brand Colors */
    --llorange: #ff6600;
    --lblue: #367190;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "DM Sans", sans-serif;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-primary);
    overflow-x: hidden;
    padding-top: 0; /* Padding wird über den Header geregelt */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

a { text-decoration: none; color: inherit; }
.invert { filter: invert(1); }

/* Scroll-Korrektur für Anker-Links */
html { scroll-padding-top: 100px; }

/* Trenner */
.section-divider {
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--llorange) 100%);
}

/* Animationen */
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: all 0.6s ease; }
.animate-on-scroll.animated { opacity: 1; transform: translateY(0); }


/* ========================================= */
/* 2. NAVBAR                                 */
/* ========================================= */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    background: #ffffff; 
    z-index: 1000;
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 1rem; 
    max-width: 1150px; 
    margin: 0 auto;
}

.logo { height: 60px; transition: transform 0.3s ease; }
.logo img { height: 100%; width: auto; object-fit: contain; } 
.logo:hover { transform: scale(1.05); }

.menu-toggle { display: block; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--primary-dark); }

/* Mobile Menu Standard (wird bei Desktop überschrieben) */
.nav-links {
    position: fixed; top: 92px; right: -100%; width: 100%; height: calc(100vh - 92px);
    background: #ffffff;
    display: flex; flex-direction: column; justify-content: flex-start; align-items: center;
    padding-top: 2rem; gap: 1.5rem; list-style: none; transition: right 0.3s ease; z-index: 999;
}
.nav-links.active { right: 0; }
.nav-links a {
    color: var(--primary-dark);
    font-size: 1rem; padding: 0.75rem 1rem;
    border-radius: 8px; text-align: center; display: block; transition: color 0.3s ease;
}


/* ========================================= */
/* 3. LANDING PAGE (HEADER)                  */
/* ========================================= */
.landing-header {
    height: 85vh;
    min-height: 600px;
    width: 100%;
    position: relative;
    background-color: var(--background-alt);
    display: flex;
    align-items: center;
    justify-content: space-between;
    
    /* Desktop Default Padding */
    padding-top: 130px; 
    box-sizing: border-box;
}

/* Linker Bereich: Text */
.header-content-left {
    width: 100%;
    max-width: 800px;
    padding-left: 5vw;
    padding-right: 2rem;
    z-index: 10;
}

.welcome-title {
    font-size: 3.5rem;
    font-weight: 800; 
    color: var(--primary-dark);
    line-height: 1.1;
    margin-top: 0;
    text-align: left;
}

.highlight-orange { color: var(--llorange); display: inline-block; }

/* ========================================= */
/* Im Bereich: 3. LANDING PAGE (HEADER)      */
/* ========================================= */

.typewriter-text {
    overflow: hidden; 
    border-right: .15em solid var(--llorange); 
    white-space: nowrap; 
    margin: 0; 
    padding-right: 0; 
    
    /* WICHTIG: Hier KEINE Animation definieren! */
    /* Die Animation startet erst, wenn JS das "Go" gibt */
    
    width: 0; /* Startzustand: Text ist unsichtbar */
    display: inline-block; 
    vertical-align: bottom;
    will-change: width; 
}

/* --- HIER STARTET DIE ANIMATION (Erst wenn Schrift geladen ist) --- */
.fonts-loaded .typewriter-text {
    animation: 
        typewriter 1.5s steps(12) 0.5s 1 normal both,
        blink-caret .75s step-end 4 forwards;
}

/* Desktop Animation */
@keyframes typewriter {
    from { width: 0; }
    to { width: 7.7ch; } 
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--llorange); }
}

/* Rechter Bereich: Bild (Desktop Standard) */
.header-image-right {
    position: absolute;
    right: 2rem;       
    top: 60%;          /* Tiefer gesetzt für Desktop */
    animation: slideInImage 1.2s ease-out forwards;
    width: 45%;        
    max-width: 600px;
    z-index: 1;
    pointer-events: none; 
    opacity: 0.9; 
}

.header-image-right img {
    width: 100%;
    height: auto;      
    max-height: 80vh;  
    object-fit: contain; 
    display: block;
}

@keyframes slideInImage {
    0% { transform: translate(50%, -50%); opacity: 0; }
    100% { transform: translate(0, -50%); opacity: 0.9; }
}

/* Untertitel Sektion */
.subtitle-section {
    padding: 3rem 0;
    background: var(--background-alt);
    text-align: center;
}
.welcome-subtitle {
    font-size: 1.5rem; color: var(--text-primary); 
    max-width: 900px; margin: 0 auto;
    line-height: 1.6; font-weight: 600;
}


/* ========================================= */
/* 4. SEKTION: WER SIND WIR?                 */
/* ========================================= */
.about-section { padding: 4rem 0; background: var(--surface); }

.about-row { 
    display: flex; 
    flex-direction: column; /* Mobile first: untereinander */
    gap: 2rem;              
    align-items: center;    
    max-width: 1000px;      
    margin: 0 auto;
}

.profile-image-container {
    width: 100%; 
    max-width: 450px;       
    border-radius: 20px; 
    box-shadow: 0 10px 30px var(--shadow-md);
    transition: transform 0.4s ease;
    overflow: hidden;
    flex-shrink: 0;         
}
.profile-image-container:hover { transform: scale(1.02); }
.profile-image-container img { 
    width: 100%; height: auto; display: block; 
    transform: scale(2) translate(-4%, 8%); /* Bildausschnitt Korrektur */
}

.about-text { width: 100%; text-align: left; }
.about-text h2 { font-size: 2.5rem; color: var(--primary-dark); margin-bottom: 1.5rem; text-align: left; }
.inline-logo { height: 1.2em; vertical-align: middle; transform: translateY(-2px); margin: 0 0.2rem; }


/* ========================================= */
/* 5. SEKTION: UNSER ANGEBOT                 */
/* ========================================= */
.offer-section { padding: 4rem 0; background: var(--background); }

.offer-row {
    display: flex;
    flex-direction: column; /* Mobile first */
    gap: 3rem;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.offer-text { width: 100%; text-align: left; }
.section-title-left { font-size: 2.5rem; color: var(--primary-dark); margin-bottom: 1.5rem; font-weight: 700; }

.offer-visual-container {
    width: 100%; max-width: 450px;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-md);
    background: var(--surface);
    padding: 2rem; 
    display: flex; align-items: center; justify-content: center;
}

.mini-subjects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem; width: 100%;
}

.mini-subject {
    display: flex; flex-direction: column; 
    align-items: center; justify-content: center;
    text-align: center; padding: 0.5rem 0;
}
.mini-subject i { font-size: 1.8rem; color: var(--llorange); margin-bottom: 0.5rem; transition: transform 0.3s ease; }
.mini-subject span { font-size: 0.85rem; font-weight: 600; color: var(--primary-dark); }
.mini-subject:hover i { transform: scale(1.2); }


/* ========================================= */
/* 6. GUTHABEN & PREISE                      */
/* ========================================= */
.guthaben-section {
    padding: 4rem 0;
    border-bottom: 2px solid var(--border);
    background: var(--background);
}
.angebot-title { text-align: center; font-size: 3rem; font-weight: 700; margin-bottom: 2rem; margin-top: 0rem; }
.angebot-bottom { max-width: 1200px; margin: 5rem auto 6rem auto; text-align: center; }

.guthaben-cards {
    display: flex; flex-direction: column; justify-content: center; gap: 1.5rem;
}
.guthaben-card {
    background: var(--surface); padding: 2rem; border-radius: 50px;
    text-align: center; width: 100%; max-width: 400px; margin: 0 auto;
    box-shadow: 0 8px 20px var(--shadow-md); transition: transform 0.3s ease;
    border: 1px solid var(--border-light);
}
.guthaben-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px var(--shadow-lg); }
.guthaben-card h3 { font-size: 1.5rem; margin-bottom: 0.5rem; color: var(--text-primary); }

.leucht-grid {
    display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap;
    padding: 4rem 0 3rem 0; border-bottom: 2px solid var(--border);
}
.leucht-card {
    width: 300px; background: white; border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1); padding-bottom: 2rem;
    text-align: center; transition: 0.3s ease;
}
.leucht-card:hover { transform: translateY(-6px); box-shadow: 0 14px 35px rgba(0,0,0,0.15); }
.leucht-img-wrapper {
    width: 100%; height: 180px; background: var(--llorange);
    border-radius: 20px 20px 0 0; display: flex; align-items: center; justify-content: center;
    overflow: hidden; margin-bottom: 1rem;
}
.leucht-img-wrapper img { max-height: 150px; }
.leucht-title { font-size: 1.6rem; font-weight: 700; margin-top: 0.5rem; }
.leucht-sub { font-size: 1.1rem; color: #555; margin-top: 0.3rem; }
.leucht-btn {
    display: inline-block; padding: 0.8rem 1.8rem; margin-top: 1.5rem;
    background: var(--llorange); color: white; font-weight: 600;
    border-radius: 30px; transition: background 0.2s ease;
}
.leucht-btn:hover { background: #e55a00; }


/* ========================================= */
/* 7. KONTAKT                                */
/* ========================================= */
.contact-section { padding: 4rem 0; background: var(--background-alt); }
.contact-row { display: flex; flex-direction: column; gap: 3rem; align-items: center; }

.contact-details { order: 1; text-align: center; max-width: 500px; }
.contact-details h2 { font-size: 2.5rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 1rem; }
.contact-details p { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 2rem; }

.contact-info { display: flex; flex-direction: column; gap: 1.5rem; align-items: stretch; }
.contact-item {
    display: flex; align-items: center; gap: 1rem; padding: 1.2rem;
    background: var(--surface); border-radius: 12px; width: 100%; max-width: 400px;
    margin: 0 auto; border: 1px solid var(--border-light); transition: all 0.3s ease;
}
.contact-item:hover { transform: translateY(-3px); box-shadow: 0 8px 20px var(--shadow-md); border-color: var(--accent); }
.contact-item strong { display: block; color: var(--primary); font-size: 1.1rem; }

.contact-icon {
    width: 50px; height: 50px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.4rem; flex-shrink: 0;
}
.cta-message {
    font-size: 1.4rem !important; font-weight: 700; color: var(--primary-light);
    margin-top: 3rem; text-align: center; text-transform: uppercase; letter-spacing: 0.1em;
    animation: pulse 1.5s infinite;
}

.contact-form-col { order: 2; width: 100%; max-width: 500px; }
.form-title { font-size: 1.2rem; font-weight: 600; text-align: center; margin-bottom: 1.5rem; color: var(--primary-dark); }
.form-wrapper-new {
    width: 100%; min-height: 500px; height: 70vh;
    border: 1px solid var(--border); border-radius: 10px;
    box-shadow: 0 10px 30px var(--shadow-md); overflow: hidden; background: white;
}
.form-wrapper-new iframe { width: 100%; height: 100%; border: none; }


/* ========================================= */
/* 8. FOOTER                                 */
/* ========================================= */
#impressum, #datenschutz { padding: 4rem 1rem; background: var(--background-alt); }
#impressum h2, #datenschutz h1 { text-align:center; margin-bottom:2rem; font-size: 2.5rem; }

.footer { background: var(--lblue); color: var(--text-on-dark); padding: 4rem 0 2rem 0; }
.footer-container { padding: 0 2rem; display: grid; grid-template-columns: 1fr; gap: 3rem; }
.footer-logo img { height: 80px; filter: brightness(0) invert(1); } 
.footer-link { display: block; margin-bottom: 0.5rem; color: rgba(255,255,255,0.8); transition: color 0.3s; }
.footer-link:hover { color: var(--accent-gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 3rem; padding-top: 2rem; text-align: center; font-size: 0.9rem; color: rgba(255,255,255,0.6); }


/* ========================================= */
/* 9. DESKTOP ERWEITERUNGEN (Min-Width)      */
/* ========================================= */

/* --- Tablet & kleiner Desktop (ab 768px) --- */
@media (min-width: 768px) {
    .container { padding: 0 2rem; }

    /* HIER IST DER NEUE TEIL FÜR DAS IPAD: */
    .header-image-right {
        /* Vorher war hier nichts definiert (also Standard 60%) */
        /* Jetzt: 50% -> Zieht das Logo auf dem Tablet nach oben */
        top: 50%; 
        width: 45%; /* Sicherheitshalber Breite definieren */
    }

    /* Navbar Desktop */
    .menu-toggle { display: none; }
    .nav-links {
        position: static; width: auto; height: auto; background: none;
        flex-direction: row; justify-content: flex-end; padding: 0; gap: 2rem;
    }
    .nav-links a { padding: 0.5rem 0; color: var(--primary-dark); font-weight: 600; }
    .nav-links a:hover { color: var(--llorange); }
    .nav-container { padding: 0 2rem; }

    /* About Section Layout */
    .about-row { 
        flex-direction: row;     
        align-items: center;     
        gap: 4rem;               
        text-align: left;        
    } 
    .profile-image-container { width: 45%; max-width: none; margin: 0; }
    .about-text { width: 55%; text-align: left; margin: 0; }

    /* Angebot Section Layout */
    .offer-row {
        flex-direction: row; 
        gap: 4rem;
        justify-content: space-between;
    }
    .offer-text { width: 50%; order: 1; margin-bottom: 0; text-align: left; }
    .offer-visual-container {
        width: 40%; max-width: none; padding: 2.5rem; order: 2;
    }
    .mini-subjects-grid { gap: 2rem; }
    .mini-subject { aspect-ratio: 1 / 1; }
    .mini-subject i { font-size: 2.2rem; margin-bottom: 0; }

    /* Guthaben & Kontakt Layout */
    .guthaben-cards { flex-direction: row; }
    .guthaben-card { padding: 3rem 1.5rem; }

    .contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
    .contact-details { text-align: left; max-width: none; }
    .contact-info { align-items: flex-start; }
    .contact-item { margin: 0; }
    .contact-form-col { display: flex; flex-direction: column; height: 100%; flex-grow: 1; max-width: none; }
    .form-wrapper-new { flex-grow: 1; height: calc(100% - 60px); min-height: 450px; margin-bottom: 2rem; }
    .form-title { text-align: center; margin-top: 0; }
    
    .footer-container { grid-template-columns: 1fr 1fr; }
}

/* --- Großer Desktop (ab 992px) --- */
@media (min-width: 992px) {
    /* 1. Schriftgröße normalisieren (wie vorher) */
    .welcome-title {
        font-size: 5rem; 
    }
    
    /* 2. Logo Positionierung */
    .header-image-right {
        width: 45%; 
        right: 5%; 
        /* Schiebt das Logo weit nach unten (unter die Navbar) */
        top: 67%; 
    }
    
    .header-image-right img {
        width: 100%; 
    }

    .subtitle-section {
        padding-top: 180px; /* Vorher 3rem -> Jetzt viel mehr Platz oben */
    }
}

/* --- Extra Groß (ab 1024px) --- */
@media (min-width: 1024px) {
    .logo { height: 80px; }
    .footer-container { grid-template-columns: repeat(4, 1fr); }
    html { scroll-padding-top: 125px; }
    body { padding-top: 0; /* Bleibt 0, wird über Header geregelt */ }
}


/* ========================================= */
/* 10. MOBILE FIXES (Smartphone only)        */
/* ========================================= */
/* Diese Regeln überschreiben alles andere auf kleinen Bildschirmen */

@media (max-width: 768px) {

    /* --- Header Bereich --- */
    .landing-header {
        flex-direction: column; 
        justify-content: flex-start; 
        padding-top: 120px !important;  /* Genug Platz für die Navbar */
        padding-bottom: 2rem;
        min-height: auto !important; 
        height: auto;
        overflow: hidden;
    }

    /* --- Text Container --- */
    .header-content-left {
        padding-left: 1.5rem !important; /* Abstand zum Rand */
        padding-right: 1.5rem !important;
        margin-bottom: 2.5rem !important; 
        max-width: none;
        width: 100%;
    }

    .welcome-title {
        font-size: 3rem; 
        margin-bottom: 0;
        word-wrap: break-word; 
    }

    /* --- Logo Mobile --- */
    .header-image-right {
        position: relative !important;
        margin-top: 0 !important;
        margin-left: 0 !important;
        right: auto !important;
        top: auto !important;
        
        width: 100% !important;
        opacity: 1 !important;
        
        display: flex;
        justify-content: center;
        align-items: center;
        transform: none !important;
        animation: none; 
    }

    .header-image-right img {
        width: 95% !important;         
        max-width: 100% !important;
        height: auto;
    }

    /* --- Text Zentrierungen Mobile --- */
    .about-text, .about-text h2, .about-text p,
    .offer-text, .section-title-left, .offer-text p,
    .offer-text > div {
        text-align: center !important;
    }
    
    .offer-text > div {
        margin-top: 2rem;
        display: block;
        width: 100%;
    }

    /* --- Animation Mobile Fix --- 
    .typewriter-text {
        animation: 
            typewriter-mobile 1.5s steps(12) 1.5s 1 normal both,
            blink-caret .75s step-end 4 forwards;
    } */
}

/* Ganz unten in der Datei */
@keyframes typewriter-mobile {
    from { width: 0; }
    to { width: 7.7ch; }
}

/* WICHTIG: Falls im Mobile-Block (media query) noch eine Regel für 
   .typewriter-text existiert, stelle sicher, dass dort KEINE "animation:" Zeile mehr steht.
   Die Animation wird jetzt nur noch oben über .fonts-loaded gesteuert. 
   Lösche die 'animation'-Zeile im Mobile-Teil, falls vorhanden. */