/* =========================================================
   HEADER – FINAL, STABIL, OHNE EXPERIMENTELLE FEATURES
========================================================= */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: var(--shadow-sm);
    z-index: 9990;
}

/* Layout */
.header-3col {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    max-width: var(--page-width);
    margin: 0 auto;
    gap: 24px;
}

/* Logo */
.logo-col {
    padding-right: 16px;
    /* kleiner Sicherheitsabstand zum Menü */
}

.logo-col img {
    height: 48px;
    width: auto;
}

/* =============================
   NAVIGATION (DESKTOP)
============================= */

.nav-col {
    flex: 1 1 auto;
}

.nav-desktop ul {
    display: flex;
    flex-wrap: wrap;
    /* erlaubt echten Umbruch */
    justify-content: center;
    min-width: 400px;
    gap: 26px;
    row-gap: 5px;
    padding: 0;
    margin: 0;
    list-style: none;
    max-height: 88px;
    /* genau 2 Zeilen */
    overflow: hidden;
}

.nav-desktop li {
    white-space: nowrap;
}

.nav-desktop a {
    display: block;
    padding: 6px 4px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: -0.2px;
    color: var(--gray-800);
    text-decoration: none;
}

.nav-desktop a:hover {
    background: var(--gray-100);
    color: var(--blue-700);
}

/* =============================
   CTA + SPRACHE
============================= */

.cta-col {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-cta {
    background: var(--blue-600);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
}

.nav-lang {
    font-weight: 700;
    color: var(--blue-600);
}

/* =============================
   Hamburger Button (hidden)
============================= */

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

/* =============================
   MOBILE NAVIGATION (Overlay + Slide-in)
============================= */

.nav-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(1px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease;
    z-index: 10000;
}

.nav-mobile-overlay.open {
    opacity: 1;
    visibility: visible;
}

.nav-mobile {
    position: absolute;
    top: 12px;
    right: 12px;
    width: min(92vw, 360px);
    max-height: calc(100vh - 24px);
    background: #fff;
    border-radius: 14px;
    box-shadow: -12px 8px 28px rgba(0, 0, 0, 0.2);
    padding: 14px 0 6px;
    transform: translateX(110%);
    transition: transform 0.32s ease;
    overflow: hidden;
    overflow-y: auto;
}

.nav-mobile-overlay.open .nav-mobile,
.nav-mobile.open {
    transform: translateX(0);
}

.nav-mobile__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px 6px;
    border-bottom: 1px solid var(--gray-100);
}

.nav-mobile__brand img {
    height: 48px;
    width: auto;
}

.nav-mobile__close {
    background: #f4f6f8;
    border: 1px solid #e2e6ea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--gray-800);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav-mobile__close:hover {
    background: #e9edf1;
    color: var(--blue-700);
    border-color: #d5dbe2;
}

.nav-mobile ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-mobile li {
    border-bottom: 1px solid #eef1f5;
}

.nav-mobile a {
    display: block;
    padding: 16px 20px;
    font-size: 1.15rem;
    color: var(--gray-900);
    font-weight: 700;
    text-decoration: none;
}

.nav-mobile a:hover {
    background: #f5f7fa;
}

.nav-mobile .nav-cta--mobile {
    background: var(--blue-700);
    color: #fff;
    border-radius: 0;
}

.nav-mobile__lang {
    padding: 10px 20px 6px;
    border-bottom: none;
}

.nav-mobile .lang-switch {
    align-items: flex-start;
    padding: 0;
}

/* Body scroll verhindern bei offenem Menü */
.no-scroll {
    overflow: hidden;
}

/* =============================
   BREAKPOINTS
============================= */

/* ƒ?" Navigation wird 2-zeilig bei ~900px ƒ?" */
@media (max-width: 900px) {
    .nav-desktop ul {
        gap: 18px;
        row-gap: 4px;
    }
}

/* ƒ?" Navigation wÇ¬rde 3 Zeilen benÇôtigen ƒÎ' Hamburger ƒ?" */
@media (max-width: 1100px) {

    .nav-col {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .header-3col {
        justify-content: space-between;
    }
}

/* Mobile Tuning */
@media (max-width: 600px) {
    .logo-col img {
        height: 42px;
    }
}

/* Sprachumschalter (EN/DE + Flagge) */
.lang-switch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.lang-code {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--blue-600);
}

.lang-flag {
    width: 24px;
    height: auto;
    display: block;
}
