/* ==========================================================================
   MENU.CSS - Komplettes Framework (Einheitliche Hintergründe & Einrückung)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. GLOBAL & MOBILE BASE STYLES
   -------------------------------------------------------------------------- */

.site-header {
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    height: 65px;
}

.logo-link img {
    height: 45px;
    width: auto;
    display: block;
}

/* Mobile Hamburger-Button */
.mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010;
}

.mobile-toggle span {
    height: 3.5px;
    width: 100%;
    background-color: #0F75B8;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
    transform-origin: center;
}

.mobile-toggle.active span:nth-child(1) { transform: translateY(9.25px) rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: translateY(-9.25px) rotate(-45deg); }

/* Mobile Navigation Container */
.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    padding: 0.5rem 0 1.5rem 0;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.08);
}

.main-nav.open { display: block; }

.main-nav .nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0;
    padding: 0;
}

.main-nav .nav-list > li { width: 100%; }

/* Haupt-Links Base-Styling */
.nav-link {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    text-decoration: none;
    color: #0F75B8;
    font-weight: 500;
    font-size: 1.4rem;
    letter-spacing: -0.2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.9rem 1.5rem;
    box-sizing: border-box;
    transition: all 0.2s ease;
    border-left: 5px solid transparent;
}

/* Aktiver Hauptlink (Mobil: Nur blauer Strich links) */
.nav-link.active {
    font-weight: 700;
    border-left-color: #0F75B8;
}

/* Untermenü Container (Eingerückt & komplett weiss wie Desktop) */
.dropdown-menu {
    display: none;
    list-style: none;
    padding: 0 0 0 1.5rem;
    background-color: #ffffff;
    margin: 0;
    flex-direction: column;
}

/* Untermenü-Links Base */
.dropdown-link {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    text-decoration: none;
    color: #0F75B8;
    font-weight: 500;
    font-size: 1.2rem;
    display: block;
    padding: 0.7rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* Vollflächiges Blau mit weisser Schrift für Unterlinks (Mobil & Desktop) */
.dropdown-link:hover,
.dropdown-link.active {
    background-color: #0F75B8;
    color: #ffffff !important;
}

/* Dropdown Accordion Pfeil & Handling */
.dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.dropdown-toggle .arrow {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 1.5em;
    height: 1.5em;
    font-size: 0.8rem;
}

.dropdown-toggle .arrow::after { content: "▼"; line-height: 1; }

.has-dropdown.active > .dropdown-menu { display: flex; }
.has-dropdown.active > .dropdown-toggle .arrow::after { content: "▲"; }

.header-cta { display: none; }


/* --------------------------------------------------------------------------
   2. DESKTOP BREAKPOINT (ab 992px)
   -------------------------------------------------------------------------- */

@media (min-width: 992px) {
    
    .header-container {
        max-width: 1300px;
        margin: 0 auto;
        padding: 0 2rem;
        height: 68px;
    }

    .logo-link img { height: 50px; }
    .mobile-toggle { display: none; }

    .main-nav {
        display: block !important;
        position: static;
        width: auto;
        padding: 0;
        background-color: transparent;
        box-shadow: none;
        height: 100%;
    }

    .main-nav .nav-list {
        flex-direction: row;
        gap: 0.5rem;
        align-items: stretch;
        height: 100%;
    }

    .main-nav .nav-list > li {
        height: 100%;
        display: flex;
        align-items: center;
        position: relative;
        width: auto;
    }

    /* Desktop Haupt-Links: Strich verlagert sich von links nach OBN */
    .nav-link {
        font-size: 1.25rem;
        padding: 0 1.2rem;
        height: 100%;
        width: auto;
        justify-content: flex-start;
        border-left: none;
        border-top: 4px solid transparent;
    }

    /* Aktiver / Gehoverter Zustand auf Desktop */
    .nav-link:hover,
    .nav-link.active,
    .has-dropdown:hover .nav-link {
        border-left: none;
        border-top-color: #0F75B8;
    }

    .dropdown-toggle {
        display: inline-flex;
        width: auto;
    }

    .has-dropdown:hover .dropdown-toggle .arrow { transform: none !important; }

    .has-dropdown { position: relative; }

    /* Desktop Untermenü Box */
    .dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 280px;
        padding: 0;
        background-color: #ffffff;
        box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
        border-radius: 0 0 4px 4px;
        z-index: 1010;
    }

    .has-dropdown:hover .dropdown-menu { display: flex; }

    .dropdown-link {
        font-size: 1.25rem;
        padding: 0.75rem 1.4rem;
        white-space: nowrap;
    }

    .header-cta {
        display: flex;
        align-items: center;
    }

    .btn-black {
        font-family: 'Oswald', sans-serif;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        display: inline-block;
        padding: 0.55rem 1.4rem;
        background-color: #1e293b;
        color: #ffffff;
        font-weight: 500;
        font-size: 1rem;
        text-decoration: none;
        border-radius: 50px;
        box-shadow: 0 3px 10px rgba(30, 41, 59, 0.15);
        transition: all 0.3s ease-in-out;
    }

    .btn-black:hover {
        background-color: #0F75B8;
        box-shadow: 0 0 18px rgba(15, 117, 184, 0.4);
        transform: translateY(-1px);
    }
}