/* 1. GRUNDLAGEN & FARBEN */
:root {
    --primary: #0056b3;
    --secondary: #2c3e50;
    --white: #ffffff;
    --light-bg: #f4f7fa;
    --text: #333333;
}

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

html, body {
    width: 100%;
    overflow-x: hidden;
    font-family: 'Arial', sans-serif;
    color: var(--text);
}

body {
    padding-top: 80px; /* Platz für fixierten Header */
}

/* 2. HEADER - Name LINKS, Menü RECHTS */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 9999;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding: 0 20px;
}

.logo {
    text-decoration: none;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
    white-space: nowrap;
}

.logo span {
    color: var(--secondary);
    font-weight: normal;
    margin-left: 5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
}

.has-dropdown {
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 0;
    display: block;
    transition: 0.3s;
}

/* 3. DROPDOWN */
.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    display: none;
    list-style: none;
    width: min(500px, calc(100vw - 30px));
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    border-radius: 0 0 5px 5px;
    padding: 10px 0;
    z-index: 10000;
    max-height: 72vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.dropdown::-webkit-scrollbar { width: 9px; }
.dropdown::-webkit-scrollbar-thumb {
    background: #9aa9c6;
    border: 2px solid #fff;
    border-radius: 10px;
}

.has-dropdown:hover .dropdown {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.dropdown li a {
    padding: 10px 20px;
    border-bottom: 1px solid #f1f1f1;
    font-weight: normal;
}

/* 4. MOBILE ANSICHT (NEBENEINANDER) */
@media (max-width: 768px) {
    body {
        padding-top: 100px; /* Weniger Platzbedarf als bei Liste */
    }

    header {
        height: auto;
        padding: 10px 0;
    }

    .header-container {
        flex-direction: column; /* Name oben, Menü darunter */
        gap: 10px;
        justify-content: center;
    }

    .nav-links {
        flex-direction: row !important; /* Erzwingt nebeneinander */
        flex-wrap: nowrap !important;   /* Kein Umbruch erlaubt */
        justify-content: center;
        width: 100%;
        gap: 8px; /* Kleiner Abstand zwischen den Punkten */
    }

    .nav-links li {
        width: auto;
    }

    .nav-links a {
        font-size: 0.75rem; /* Schrift kleiner, damit alles in eine Reihe passt */
        padding: 5px 2px;
        background: transparent; /* Kein Hintergrund am Handy nötig bei Reihe */
        white-space: nowrap;
    }

    .dropdown {
        position: absolute; /* Dropdown schwebt wieder */
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        width: min(280px, calc(100vw - 20px));
        max-height: 68vh;
        overflow-y: auto;
    }

    .has-dropdown:hover .dropdown {
        grid-template-columns: 1fr;
    }
}

/* 5. FOOTER & BUTTONS */
footer {
    background: var(--secondary);
    color: white;
    text-align: center;
    padding: 40px 20px;
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 14px 28px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    font-weight: bold;
    margin-top: 20px;
    border: none;
}

/* Einheitliche Karten für ergänzte Dienstleistungen */
.service-card { color: inherit; text-decoration: none; }
.service-card > div {
    height: 100%;
    box-sizing: border-box;
    padding: 30px;
    border-radius: 12px;
    background: #fff;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,.05);
}
.service-card > div > i,
.service-card > div > svg { margin-bottom: 20px; color: #3b5998; font-size: 3rem; }
.service-card > div > h3 { margin-bottom: 10px; color: #3b5998; }
.service-card > div > p { color: #666; font-size: .95rem; }
