/* Modernes CSS Reset & Variablen */
:root {
    --primary: #0f172a;    /* Edles Dunkelblau */
    --accent: #f97316;     /* Modernes Orange für Akzente */
    --accent-hover: #ea580c; /* Dunkleres Orange beim Drüberfahren */
    --text: #334155;       /* Gut lesbares Graublau für Text */
    --light: #f8fafc;      /* Heller Hintergrund */
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--light);
    color: var(--text);
    line-height: 1.6;
}

/* Navigation & Header-Layout */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    z-index: 102;
}

.logo-text span {
    color: var(--accent);
}

/* Desktop-Menü */
nav {
    display: flex;
    align-items: center;
    list-style: none;
}

nav > li {
    position: relative;
    margin-left: 1.5rem;
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
    transition: color 0.2s ease-in-out;
}

nav a:hover {
    color: var(--accent);
}

/* Desktop Dropdown-Untermenü */
.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--white);
    min-width: 160px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    padding: 0.5rem 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-in-out;
    border-top: 2px solid var(--accent);
}

.dropdown li {
    width: 100%;
}

.dropdown a {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 400;
}

.dropdown a:hover {
    background-color: var(--light);
    color: var(--accent);
}

nav li:hover .dropdown,
nav li:focus-within .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Unsichtbare Checkbox & Hamburger-Icon für Mobilgeräte */
.menu-toggle {
    display: none;
}

.hamburger-icon {
    display: none;
    cursor: pointer;
    z-index: 102;
    flex-direction: column;
    gap: 6px;
}

.hamburger-icon span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Hero Bereich */
.hero {
    background: radial-gradient(circle at 50% 30%, #2563eb 0%, #1e293b 45%, #0f172a 80%);
    color: var(--white);
    padding: 7rem 1rem 7rem 1rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--accent);
}

.hero::after {
    content: "";
    position: absolute;
    bottom: -26px;
    left: 0;
    width: 100%;
    height: 25px;
    background: linear-gradient(to bottom, rgba(249, 115, 22, 0.22) 0%, rgba(15, 23, 42, 0.03) 50%, transparent 100%);
    z-index: 10;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--accent) !important;
    color: var(--white) !important;
    padding: 0.75rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    border: none !important;
    outline: none !important;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.btn:hover {
    background-color: var(--accent-hover) !important;
    color: var(--primary) !important;
    box-shadow: 0 0 25px rgba(249, 115, 22, 0.7);
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Hauptinhalt & Sektionen */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 1rem;
}

section {
    scroll-margin-top: 5rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 3rem;
}

/* Leistungen Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04), 0 1px 8px rgba(15, 23, 42, 0.02);
    border: none !important; 
    transition: box-shadow 0.3s ease-in-out;
}

.card:hover {
    box-shadow: 0 0 35px rgba(249, 115, 22, 0.3) !important; 
}

.card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.35rem;
}

/* Kontaktbox */
.contact-box {
    background: var(--white);
    padding: 3.5rem 2rem;
    border-radius: 12px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    border: none !important;
}

.content-logo-img {
    max-width: 220px;
    height: auto;
    margin-bottom: 2rem;
    object-fit: contain;
}

.contact-box p { margin-bottom: 1rem; font-size: 1.1rem; }

.contact-box a { 
    color: var(--accent); 
    text-decoration: none; 
    font-weight: bold;
    transition: color 0.2s ease-in-out;
}
.contact-box a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Korrigiert: To-Top Button in auffälligerem, hellerem Blau & mathematisch exakt zentriert */
.to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 45px;
    height: 45px;
    background-color: #3b82f6; /* Korrigiert: Strahlendes, helleres Blau */
    color: var(--white);
    text-decoration: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    z-index: 99;
    padding-bottom: 2px; /* Gleicht die optische Schwerpunkt-Verschiebung des Dreiecks nach unten aus */
    transition: background-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.to-top-btn:hover {
    background-color: #2563eb;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.6);
    transform: translateY(-2px);
}

/* Rechtliche Links im Footer */
.legal-links {
    text-align: center;
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem; 
}

.legal-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.2s ease-in-out;
}

.legal-links a:hover { 
    color: var(--accent);
    text-decoration: underline; 
}

/* Modale Boxen */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
}

.modal:target { display: block; }

.modal-content {
    background: var(--white);
    max-width: 700px;
    margin: 2rem auto;
    padding: 2.5rem;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    border: none !important;
}

/* Korrigiert: WKO ECG-Bildgröße fixieren (Verhindert das Aufblähen) */
.wko-link img {
    width: 169px !important;
    height: 223px !important;
    object-fit: contain;
    display: block;
}

.close-btn {
    display: inline-block;
    margin-top: 1.5rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
    margin-right: 1rem;
}

.close-btn:hover {
    background: #334155;
}

/* Footer */
footer {
    background: radial-gradient(circle at 50% 100%, #1d4ed8 0%, #111827 60%, #0f172a 100%);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 3rem 1rem;
    font-size: 0.9rem;
    position: relative;
    border-top: 1px solid var(--accent); 
}

footer::before {
    content: "";
    position: absolute;
    top: -26px;
    left: 0;
    width: 100%;
    height: 25px;
    background: linear-gradient(to top, rgba(249, 115, 22, 0.18) 0%, rgba(15, 23, 42, 0.03) 50%, transparent 100%);
}

/* ==========================================================================
   Handy-Optimierungen (KORRIGIERTE VERSION)
   ========================================================================== */
@media (max-width: 768px) {
    .hamburger-icon {
        display: flex;
    }

    /* Korrigiert: Durchsichtiges Dunkelblau statt massivem Schwarz */
    nav {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background-color: rgba(15, 23, 42, 0.96); /* Elegant semitransparent */
        flex-direction: column;
        justify-content: flex-start; /* Korrigiert: Am oberen Rand ausrichten */
        align-items: center;
        padding-top: 7rem; /* Angenehmer Abstand zur Kopfzeile */
        z-index: 101;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
    }

    nav > li {
        margin: 1rem 0;
        text-align: center;
        width: 100%;
    }

    nav a {
        color: var(--white);
        font-size: 1.4rem;
    }

    /* Korrigiert: Untermenü dauerhaft aufgeklappt, kleiner und statisch ohne Bewegung */
    .dropdown {
        position: static;
        transform: none !important;
        background-color: transparent;
        box-shadow: none;
        opacity: 1 !important;
        visibility: visible !important;
        padding: 0;
        margin-top: 0.5rem;
        border-top: none;
        display: block !important;
    }

    .dropdown li {
        margin: 0.4rem 0;
    }

    .dropdown a {
        font-size: 1.05rem !important; /* Sichtbar kleinere Schrift */
        color: rgba(255, 255, 255, 0.6) !important; /* Dezenteres Weiß-Grau */
        padding: 0.2rem 0;
        font-weight: 400;
    }
    
    .dropdown a:hover {
        background-color: transparent;
        color: var(--accent) !important;
    }

    .menu-toggle:checked ~ nav {
        opacity: 1;
        visibility: visible;
    }

    .menu-toggle:checked ~ .hamburger-icon span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
        background-color: var(--white);
    }

    .menu-toggle:checked ~ .hamburger-icon span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle:checked ~ .hamburger-icon span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -7px);
        background-color: var(--white);
    }

    .hero h1 { font-size: 2.2rem; }
    .legal-links { gap: 1.5rem; flex-direction: row; }
    .to-top-btn { bottom: 1.5rem; right: 1.5rem; width: 40px; height: 40px; font-size: 1.1rem; }
}
