@media (max-width: 992px) {
    .main-nav ul {
        display: none;
        flex-direction: column;
        background: #fff;
        position: absolute;
        top: 70px;
        right: 20px;
        padding: 10px;
        border: 1px solid #ccc;
    }

    .main-nav ul.show {
        display: flex;
    }

    /* show hamburger earlier */
    .hamburger {
        display: block;
        margin-left: 8px;
    }

    /* add extra right spacing so DE|EN doesn't touch the hamburger */
    .language-switch {
        margin-right: 24px;
    }
}

/* Narrow phone adjustments: keep hamburger aligned to the right of the language switch
   instead of wrapping below the logo. */
@media (max-width: 480px) {
    .site-header {
        flex-wrap: nowrap; /* prevent wrapping that pushes hamburger to second line */
        align-items: center;
    }

    .main-nav {
        flex: 1 1 auto;
        min-width: 0; /* allow flex children to shrink */
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .main-nav ul {
        position: absolute;
        top: 60px;
        right: 20px;
    }

    .language-switch {
        order: 1;
        margin-left: auto;
        margin-right: 8px;
    }

    .hamburger {
        order: 2;
        display: block;
        margin-left: 0;
    }

    .logo img {
        height: 44px; /* slightly smaller on very small screens */
    }
}

@media (max-width: 420px) {
    /* Reduce logo a bit more (~5%) to free space for DE|EN and hamburger */
    .logo img {
        height: 42px;
    }

    /* Nudge header padding a few pixels left so logo starts slightly more left */
    .site-header {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Slightly tighten language/hamburger spacing */
    .language-switch {
        margin-right: 8px;
    }

    .hamburger {
        margin-left: 4px;
    }
}
