/* Globale Einstellungen & Variablen */
:root {
    --primary-color: #0d47a1; /* Dunkles Blau */
    --secondary-color: #ffc107; /* Gelb/Gold */
    --background-color: #f8f9fa;
    --text-color: #333;
    --card-bg: #ffffff;
    --header-height-desktop: 160px; /* Ca. Start-Höhe */
    --header-height-mobile: 90px;
}

html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box; /* WICHTIG: Verhindert Layout-Probleme durch Padding */
}

body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    /* Platzhalter für den festen Header (wird unten in Media Queries feinjustiert) */
    padding-top: var(--header-height-desktop); 
}

/* --- HEADER & NAVIGATION --- */
header {
    background-color: var(--card-bg);
    color: var(--primary-color);
    
    /* Layout & Positionierung */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed; /* Fixiert am oberen Rand */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    
    /* Schatten & Animation */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease-in-out;
    
    /* Padding: Oben/Unten groß, Links/Rechts prozentual für PC-Zentrierung */
    padding: 20px 10%; 
}

/* Logo Styles */
.logo img {
    height: 120px; /* Startgröße PC */
    width: auto;
    display: block;
    transition: height 0.3s ease-in-out;
}

/* Navigation Links (Desktop Standard) */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--secondary-color);
}

/* Hamburger Button (Standardmäßig unsichtbar) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 5px;
}

/* --- HEADER SCHRUMPFT BEIM SCROLLEN (.scrolled Klasse) --- */
header.scrolled {
    padding: 5px 10%; /* Weniger Padding oben/unten */
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

header.scrolled .logo img {
    height: 50px; /* Logo wird viel kleiner */
}

/* --- RESPONSIVE / MOBILE DESIGN (max-width: 768px) --- */
@media (max-width: 768px) {
    
    body {
        padding-top: 100px; /* Weniger Abstand auf Mobile nötig */
    }

    header {
        padding: 10px 20px; /* Kleinerer Rand auf Mobile */
    }

    /* Logo auf Mobile generell etwas kleiner starten */
    .logo img {
        height: 60px; 
    }
    
    /* Scroll-Effekt auf Mobile anpassen */
    header.scrolled {
        padding: 5px 20px;
    }
    header.scrolled .logo img {
        height: 40px;
    }

    /* Hamburger Button sichtbar machen */
    .menu-toggle {
        display: block;
    }

    /* Navigation verstecken und als Dropdown stylen */
    nav ul.nav-links {
        display: none; /* Versteckt */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%; /* Direkt unter dem Header */
        left: 0;
        background-color: white;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        text-align: center;
        padding-bottom: 1rem;
    }

    /* Klasse zum Einblenden (wird per JS hinzugefügt) */
    nav ul.nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }

    nav ul li {
        margin: 0;
        border-bottom: 1px solid #f1f1f1;
    }

    nav ul li a {
        display: block;
        padding: 15px;
        font-size: 1.1rem;
    }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- HAUPTINHALT & SEKTIONEN --- */
main {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2rem;
}

section {
    background-color: var(--card-bg);
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    /* Scroll-Margin sorgt dafür, dass die Überschrift nicht unter dem Sticky-Header landet */
    scroll-margin-top: 120px; 
}

h2 {
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Dienstleistungen Grid */
.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.service-card {
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    text-align: left;
    transition: transform 0.3s, box-shadow 0.3s;
    background: #fdfdfd;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.service-card h3 {
    margin-top: 0;
    color: var(--primary-color);
}

/* Karussell Styles */
.carousel-container {
    position: relative;
    max-width: 800px;
    margin: auto;
    min-height: 200px;
}

.carousel {
    display: flex;
    overflow: hidden;
    border-radius: 8px;
    background: #e9e9e9;
    aspect-ratio: 4 / 3;
}

.carousel-item {
    display: none;
    width: 100%;
    height: 100%;
    animation: fade 0.5s ease-in-out;
}

.carousel-item.active {
    display: block;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.loading-message {
    padding: 2rem;
    text-align: center;
    width: 100%;
    color: #888;
}

@keyframes fade {
    from { opacity: 0.4 }
    to { opacity: 1 }
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(13, 71, 161, 0.6);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, background-color 0.3s;
    z-index: 10;
}

.carousel-control.visible {
    opacity: 1;
    pointer-events: auto;
}

.carousel-control:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.carousel-control.prev { left: 10px; }
.carousel-control.next { right: 10px; }

/* Kontakt */
.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}
.contact-details a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--primary-color);
    color: white;
    margin-top: 2rem;
}
footer a {
    color: var(--secondary-color);
}