/* ALLGEMEINE GRUNDLAGEN */
body {
    background-color: rgb(0, 0, 0);
    margin: 0;
    min-height: 100vh;
    width: 100%;
}

* {
    color: rgb(210, 210, 210);
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    margin: 0;
}

/* ------------------------------------- */
/* --- HEADER & NAVIGATION (DESKTOP DEFAULT) --- */
/* ------------------------------------- */

header {
    position: fixed;     
    top: 0;
    left: 0;
    width: 100%;
    padding: 12px 0;
    /* Angepasst: Mehr Deckkraft für besseren Kontrast */
    background: rgba(0, 0, 0, 0.4); 
    /* NEU: Blur auf 10px angepasst, um Formular-Boxen zu entsprechen */
    backdrop-filter: blur(10px); 
    box-shadow: 0px 2px 20px rgba(0,0,0,0.75);
    z-index: 10;
    display: flex;   
    justify-content: center;
}

/* Hamburger Icon und Checkbox auf Desktop/Standard verbergen */
.menu-toggle,
.menu-icon {
    display: none;
}

/* Desktop-Layout */
header .main-nav { 
    display: flex;   
    justify-content: center; 
    gap: 14px;   
    width: auto;
}

/* Desktop: Visuelle Reihenfolge (Home in der Mitte) */
header .main-nav a {
    order: 2; /* Standard-Reihenfolge */
}

.home-link {
    order: 3; /* Home in die Mitte (3. von 5) */
}

header .main-nav a:nth-child(2), /* Leistungen */
header .main-nav a:nth-child(3)  /* Referenzen */
{
    order: 1; /* Links von Home */
}

header .main-nav a:nth-child(4), /* Über mich */
header .main-nav a:nth-child(5)  /* Kontakt */
{
    order: 4; /* Rechts von Home */
}


header a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    text-decoration: none;
    color: rgb(210, 210, 210);
    font-size: clamp(0.7rem, 1vw, 1rem);
    text-shadow: 0 0 8px black;
    white-space: nowrap;
    justify-content: center;
    width: 100px;
    overflow: hidden;
}

/* Desktop: Ausfahr-Effekt für den Text */
header a span {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: max-width 0.6s ease-out, opacity 0.6s ease-out, color 0.2s linear;
}

header a:hover span {
    opacity: 1;
    max-width: 150px;
}

header img {
    width: 22px;
    height: 22px;
    filter: invert(1);
}

/* ------------------------------------- */
/* --- HERO SEKTION & KONTAKT FORMULAR --- */
/* ------------------------------------- */

.startbild {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

header ul {
    list-style: none;
    padding: 0;
}

.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: visible;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    align-items: center;
    text-align: center;
    padding-top: 6rem; 
    padding-bottom: 4rem; 
}


.kontakt-textbox {
    background: rgba(35, 35, 35, 0.25);
    backdrop-filter: blur(10px); /* Vergleichswert */
    box-shadow: 0px 5px 25px rgba(0,0,0,0.75);
    z-index: 0;
    display: inline-block;
    text-align: left;
    border-radius: 10px;
    padding: 1.4rem;
    width: min(30rem, 80%);
    margin: 1rem;
    text-shadow: 0 0 8px black;
    line-height: 1.2;
    font-size: clamp(0.6rem, 1.4vw, 1.1rem);
    transition: transform 0.3s ease;
}
.kontakt-textbox h2 {
    margin-bottom: 0.6rem;
    text-align: center;
    transition: transform 0.3s ease;
}
.kontakt-textbox:hover {
    transform: scale(1.05);
}

.my-form {
    height: auto;
    background: rgba(35, 35, 35, 0.25);
    backdrop-filter: blur(10px); /* Vergleichswert */
    box-shadow: 0px 5px 25px rgba(0,0,0,0.75);
    border-radius: 10px;
    padding: 1.4rem;
    width: min(30rem, 80%);
    margin: 1rem;
    text-shadow: 0 0 8px black;
    font-size: clamp(0.6rem, 1.4vw, 1.1rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}
.my-form:hover {
    transform: scale(1.05);
}

.my-form label {
    margin-top: 0.8rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

/* Alle Inputs wieder einzeilig */
.my-form input {
    height: 45px; 
    min-height: 45px; 
    resize: none; 
}

/* Nur das letzte Feld (Textarea) groß */
.my-form textarea {
    height: auto;
    min-height: 120px; 
    resize: vertical; 
}

/* Gemeinsame Styles */
.my-form input,
.my-form textarea {
    width: 100%;
    padding: 0.7rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(180, 180, 180, 0.4);
    border-radius: 6px;
    outline: none;
    color: rgb(230, 230, 230);
    text-shadow: 0 0 6px black;
}

/* Fokus-Effekt */
.my-form input:focus,
.my-form textarea:focus {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.35);
}

/* --- SENDE-BUTTON & ANIMATION (Desktop) --- */

.send-btn {
    position: relative;
    /* FIX: Sorgt dafür, dass der Button ein Flex-Container ist (Desktop) */
    display: flex; 
    align-items: center;
    justify-content: center;

    width: 60px;
    height: 60px;

    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(180, 180, 180, 0.4);
    border-radius: 50%;
    cursor: pointer;

    overflow: hidden;
    transition: 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 12px rgba(0,0,0,0.6);
}

/* Icon Container */
.send-btn .icon {
    width: 28px;
    height: 28px;
    filter: invert(1);
    transition: 0.3s ease;
    transform: none; 
}

/* FIX: Das tatsächliche Bild innerhalb des Icon-Containers sichtbar machen */
.send-btn .icon img {
    width: 100%; 
    height: 100%;
    object-fit: contain;
}

/* Text „Absenden“ */
.send-btn .text {
    position: absolute;
    opacity: 0;
    right: -80px; 
    white-space: nowrap;

    color: white;
    text-shadow: 0 0 6px black;
    font-size: 1rem;
    font-weight: 600;
    transition: 0.35s ease;
}

/* WIEDERHERGESTELLT: Hover-Effekt (Desktop) */
.send-btn:hover {
    width: 150px;
    border-radius: 40px;
}

.send-btn:hover .icon {
    transform: translateX(-40px);
}

.send-btn:hover .text {
    opacity: 1;
    right: 20px;
}


/* ------------------------------------- */
/* --- BOTTOM LINKS --- */
/* ------------------------------------- */

.bottom-links a {
    color: rgb(210, 210, 210);
    text-decoration: none;
    text-shadow: 0 0 8px black;
    /* Dies wird auf Mobile zu klein. Wir überschreiben es in der Media Query. */
    font-size: clamp(0.6rem, 1.3vw, 1rem); 
}

.bottom-links a:hover {
    color: rgb(170, 170, 170);
}

.bottom-links img {
    width: 18px;
    filter: invert(1);
    transition: transform 0.3s ease;
}

.bottom-links img:hover {
    transform: scale(1.15);
}
.bottom-links {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

.bottom-links a {
    text-shadow: 0 0 8px black;
    line-height: 1;
    font-size: clamp(0.6rem, 1.4vw, 1rem);
    text-decoration: none;
    color: rgb(210, 210, 210);
}

.bottom-links a:hover {
    color: rgb(170, 170, 170);
}

.bottom-links img {
    width: 18px;
    filter: invert(1);
    transition: transform 0.3s ease;
}

.bottom-links img:hover {
    transform: scale(1.15);
}

.link-row {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center; 
    align-items: center;
    gap: 10px;
}

.left-link {
    position: absolute;
    right: 50%; 
    transform: translateX(-10px); 
    text-align: right;
}

.right-link {
    position: absolute;
    left: 50%; 
    transform: translateX(10px); 
    text-align: left;
}

.separator {
    color: rgb(210, 210, 210);
    user-select: none;
    z-index: 1;
}

/* ------------------------------------- */
/* --- MOBILE & TABLET ANPASSUNGEN (max-width: 768px) --- */
/* ------------------------------------- */

@media (max-width: 768px) {
    
    /* *************************************** */
    /* *** HEADER & NAV ANPASSUNG MOBILE *** */
    /* *************************************** */
    
    header {
        /* Setzt die Breite auf einen kleinen Wert, der das Hamburger-Icon gerade umgibt */
        width: 60px; 
        /* NEU: Erhöhe Padding oben/unten, um das Icon besser zu zentrieren */
        padding: 1.5rem 0; 
        /* Setzt Höhe (Icon ist ca. 25px hoch, plus Padding 10px+10px = 45px Gesamthöhe) */
        height: auto; 
        
        /* Stellt sicher, dass das Icon und der Hintergrundfilter sichtbar bleiben */
        left: 0;
        right: auto;
        /* WICHTIG: Setzt den Header wieder ganz oben in den Viewport */
        top: 0;
        
        /* Flex-Eigenschaften entfernen, da wir nun eine feste Breite/Höhe nutzen */
        display: block; 
    }
    
    /* 1. Hamburger Icon anzeigen */
    .menu-icon {
        display: flex; 
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        cursor: pointer;
        z-index: 20;
        /* Positionierung anpassen, da der Header jetzt kleiner ist */
        /* NEU: Positionierung relativ zum kleinen Header-Kasten, nicht fixed zum Viewport */
        position: absolute; 
        left: 50%; /* Zentriert horizontal */
        top: 50%; /* Zentriert vertikal */
        transform: translate(-50%, -50%); /* Korrigiert die Zentrierung */
    }
    
    /* Linien des Hamburger Icons */
    .icon-line {
        display: block;
        height: 3px;
        width: 100%;
        background-color: rgb(210, 210, 210);
        border-radius: 1px;
        transition: all 0.3s ease-in-out;
    }

    /* 2. Vertikales, ausgeblendetes Menü für Mobile (main-nav anpassen) */
    header .main-nav { 
        position: fixed; 
        top: 0;
        left: 0;
        height: 100vh;
        width: min(80vw, 300px); 
        background: rgba(35, 35, 35, 0.95);
        backdrop-filter: blur(8px);
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.8);
        
        /* Vertikale Anordnung der Links */
        flex-direction: column;
        justify-content: flex-start; 
        padding-top: 60px; 
        gap: 0;
        
        /* Verstecke das Menü */
        transform: translateX(-100%);
        transition: transform 0.4s ease-in-out;
        z-index: 15;
        pointer-events: none;
    }
    
    /* Mobile: Home an erster Stelle durch Zurücksetzen der order-Eigenschaft */
    header .main-nav a {
        order: 0 !important; 
        justify-content: flex-start; 
        width: 100%;
        padding: 12px 20px;
        text-shadow: none;
        font-size: 1.1rem;
    }

    /* Mobile: Text ist IMMER sichtbar (Überschreibt Desktop-Ausfahr-Logik) */
    header a span {
        opacity: 1; 
        max-width: none; 
        overflow: visible;
        transition: none; 
        margin-left: 10px; 
    }
    
    /* Hover beibehalten, da gewünscht */
    header a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    /* 3. Checkbox Funktionalität (Toggle) */
    .menu-toggle:checked ~ .main-nav {
        pointer-events: auto;
        transform: translateX(0); /* Zeige das Menü an */
    }

    /* 4. Hamburger Icon Animation beim Öffnen */
    .menu-toggle:checked + .menu-icon .icon-line:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }

    .menu-toggle:checked + .menu-icon .icon-line:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle:checked + .menu-icon .icon-line:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }
    
    
    /* *************************************** */
    /* *** HOVER DEAKTIVIERUNG / FORMULAR *** */
    /* *************************************** */
    
    /* 1. Kontakt-Textbox Hover entfernen */
    .kontakt-textbox:hover {
        transform: none;
    }

    /* 2. Formular Hover entfernen */
    .my-form:hover {
        transform: none;
    }
    
    /* FIX: Textgröße in der Kontakt-Textbox erhöhen */
    .kontakt-textbox {
        font-size: 1.1rem; 
        line-height: 1.4; 
        transform: none;
    }
    
    /* 3. Sende-Button korrigieren und Hover entfernen */
    .send-btn {
        width: 60px !important; 
        height: 60px !important; 
        border-radius: 50% !important;
        /* FIX: Sicherstellen, dass der Button ein Flex-Container ist und Inhalt zentriert */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Icon-Container (span.icon) auf mobilem Gerät zentrieren und sichtbar machen */
    .send-btn .icon {
        transform: none !important; 
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Das Bild-Element (img) im Icon-Container */
    .send-btn .icon img {
        width: 100%; 
        height: 100%;
        object-fit: contain;
    }

    /* Den Text (Absenden) verstecken */
    .send-btn .text {
        opacity: 0 !important; 
        right: -80px !important;
        position: absolute !important;
    }
    
    /* 4. Bottom Links Hover entfernen */
    .bottom-links a:hover {
        color: rgb(210, 210, 210); 
    }
    
    .bottom-links img:hover {
        transform: none; 
    }
    
    /* *************************************** */
    /* *** ALLGEMEINE INHALTS-ANPASSUNG *** */
    /* *************************************** */
    
    /* Reduziert Padding */
    .hero {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
    
    /* Passt Breite der Boxen an */
    .kontakt-textbox,
    .my-form {
        width: 90%; 
        max-width: 90%;
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
    
    /* FIX: Textgröße in den Labels und Input-Feldern des Formulars erhöhen */
    .my-form label,
    .my-form input,
    .my-form textarea {
        font-size: 1rem;
    }
    
    .my-form {
        font-size: 1.1rem; /* Basis-Schriftgröße der Formular-Box erhöhen */
    }

    /* FIX: Bottom Links (Impressum/Datenschutz) auf mobilem Gerät besser lesbar machen */
    .bottom-links a {
        font-size: 0.95rem; /* Gut lesbare, feste Größe */
    }
}