/* --- 1. BASIS & ABSOLUTE STABILITÄT --- */
:root {
    --primary-font: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --bg-beige: #f5f5dc;
    --accent-orange: rgba(255, 165, 0, 0.8);
}

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

html, body {
    width: 100%;
    overflow-x: hidden; 
    position: relative;
    -webkit-text-size-adjust: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: var(--primary-font);
    line-height: 1.6;
    color: #333;
    background-color: white;
}

/* --- 2. HEADER & STICKY LOGIK --- */
header {
    width: 100%;
    background: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.hero-img {
    width: 100%;
    height: 250px; 
    object-fit: cover;
    display: block;
}

.triple-head {
    display: flex;
    width: 100%;
    gap: 2px;
}

.triple-head img {
    flex: 1;
    min-width: 0;
    height: 120px;
    object-fit: cover;
}

/* --- 3. NAVIGATION --- */
nav {
    background-color: var(--bg-beige) !important;
    width: 100%;
    padding: 10px 0;
}

.nav-links {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    list-style: none;
    padding: 5px 15px;
    gap: 20px;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
    text-decoration: none;
    color: black !important;
    font-weight: bold;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* --- 4. MAIN & ANKER (STARTSEITEN OPTIMIERUNG) --- */
main {
    flex: 1;
    padding: 40px 20px;
    width: 100%;
    max-width: 100%;
}

/* Überschriften auf der Website zentriert lassen */
main h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.intro-lead {
    font-size: 1.1rem;
    color: #555;
}

/* Flex-Container für Porträt und die Datenblöcke */
.profile-flex-container {
    display: flex;
    flex-direction: column; /* Standard auf Mobilgeräten: untereinander */
    gap: 30px;
    width: 100%;
    margin-bottom: 40px;
}

.portrait-box {
    width: 100%;
    max-width: 360px;
    margin: 0 auto; /* Zentriert das Bild auf Smartphones */
}

.portrait-box img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.personal-data-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.data-block h2 {
    font-size: 1.3rem;
    color: #222;
    margin-bottom: 8px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
}

.data-block p {
    margin-bottom: 6px;
}

.data-block a {
    color: #0066cc;
    text-decoration: none;
}

.data-block a:hover {
    text-decoration: underline;
}

/* KI Hinweis Box unten (wieder volle Breite) */
.ki-hinweis-box {
    width: 100%;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee; 
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Mobile Anker-Puffer */
h1:target, h2:target, p:target, div:target, [id] {
    scroll-margin-top: 160px !important;
}

/* --- 5. PORTFOLIO CARDS --- */
.gallery {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 20px;
    padding: 20px 0;
    width: 100%;
    scroll-snap-type: x mandatory;
}

.card {
    flex: 0 0 80%;
    scroll-snap-align: center;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    padding: 15px;
}

.card-body { padding: 20px; }

/* --- 6. FOOTER --- */
footer {
    background-color: var(--bg-beige) !important;
    padding: 30px 20px;
    text-align: center;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-links a {
    text-decoration: none;
    color: black;
    font-weight: bold;
}

/* --- 7. TABLET & DESKTOP MEDIAGRID --- */
@media screen and (min-width: 769px) {
    .hero-img { height: 400px; }
    .triple-head img { height: 250px; }

    h1:target, h2:target, p:target, div:target, [id] {
        scroll-margin-top: 480px !important; 
    }

    main { 
        max-width: 1200px; 
        margin: 0 auto;
        padding: 60px 5%;
    }

    /* Ab hier rücken Bild und Daten nebeneinander */
    .profile-flex-container {
        flex-direction: row;
        align-items: flex-start;
        gap: 50px;
    }

    .portrait-box {
        flex: 0 0 350px;
        margin: 0;
    }

    .nav-links { justify-content: center; }

    .gallery {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        overflow: visible;
        scroll-snap-type: none;
    }

    .card { flex: none; width: 100%; }

    .footer-links {
        flex-direction: row;
        justify-content: center;
        gap: 50px;
    }
}

/* --- 8. GEHALTSSEITEN-STYLING (CHECKBOXEN UNTEREINANDER & VORNE) --- */
.salary-box {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
    margin: 20px 0;
}

.salary-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1.05rem;
}

.salary-row input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.btn-salary {
    margin-top: 10px;
}

/* --- 9. BUTTON FÜR BEWERBUNGSEXPORT & NACHHALTIGKEITSHINWEIS --- */
.print-action-zone {
    margin-top: 15px;
    padding-top: 15px;
}

.btn-print-portfolio {
    display: inline-block;
    background-color: #f5f5f5; /* Unaufdringliches, helles Grau statt Signalfarbe */
    color: #333;
    text-decoration: none;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: bold;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-print-portfolio:hover {
    background-color: #e8e8e8;
    border-color: #bbb;
    color: #000;
    text-decoration: none !important;
}

.print-green-note {
    font-size: 0.78rem;
    color: #777;
    line-height: 1.4;
    margin-top: 8px;
    max-width: 400px;
    font-style: italic;
}

/* --- 10. PRINT OPTIMIERUNG (DER "PDF-LOOK" BEIM DIREKTDRUCK) --- */
@media print {
    header, nav, footer, .footer-container, .hero-img, .no-print, .nav-links, .triple-head, .print-action-zone {
        display: none !important;
    }

    @page {
        size: A4;
        margin: 25mm 20mm 20mm 20mm;
    }

    @page :first {
        margin-top: 15mm;
    }

    body {
        display: block !important;
        background: white !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 11pt;
    }

    main {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    h1 {
        text-align: center;
        font-size: 24pt;
        margin-bottom: 20pt;
        border-bottom: 2px solid #333;
        padding-bottom: 10pt;
    }

    h2 {
        font-size: 16pt;
        margin-top: 25pt;
        margin-bottom: 12pt;
        border-left: 5px solid #ffa500;
        padding-left: 10pt;
        text-align: left !important;
    }

    .text-lebenslauf {
        text-align: justify;
        hyphens: auto;
        margin-bottom: 15pt;
    }

    h2 { page-break-after: avoid; }
    p { page-break-inside: avoid; }

    a {
        text-decoration: none !important;
        color: black !important;
    }
}