.header-inner {
    gap: 1rem;
}

.header-brand {
    min-width: 0;
}

.header-brand img {
    width: auto;
    height: 88px;
    max-width: min(100%, 420px);
    object-fit: contain;
    object-position: left center;
}

.home-header .header-brand img {
    height: 92px;
    max-width: min(100%, 440px);
}

.header-actions {
    flex: 0 0 auto;
    min-width: 0;
}

.header-actions .btn-donate {
    justify-content: center;
    min-height: 44px;
    text-align: center;
}

.site-language-control {
    display: inline-flex;
    align-items: center;
    flex: 0 1 auto;
    gap: 0.125rem;
    padding-inline: 0.375rem;
    border: 1px solid #CBD5E1;
    border-radius: 0.75rem;
    background: #fff;
}

.site-language-control .site-language-icon {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    color: #EA580C;
}

.site-language-options {
    display: flex;
    flex-wrap: wrap;
}

.site-language-picker {
    min-height: 44px;
    padding: 0.25rem 0.375rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: #0F4C5C;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.site-language-picker:hover,
.site-language-picker:focus-visible {
    background: #F0F7F9;
}

.site-language-status:empty {
    display: none;
}

.site-language-status {
    position: absolute;
    inset-block-start: 100%;
    inset-inline: 1rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background: #FFFDF9;
    color: #92400E;
}

@media (max-width: 639px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .header-brand {
        align-self: flex-start;
        max-width: 100%;
    }

    .header-brand img,
    .home-header .header-brand img {
        height: auto;
        max-height: 64px;
    }

    .header-inner .header-actions {
        gap: 0.5rem;
    }

    .header-actions .btn-donate {
        flex: 1;
        min-width: 0;
        padding-inline: 0.5rem;
        font-size: 0.875rem;
        line-height: 1.25;
    }

    .header-actions .btn-menu {
        flex: 0 0 auto;
        min-height: 44px;
    }
}

@media (max-width: 1023px) {
    .header-mobile-nav {
        max-height: 55vh;
        overflow-y: auto;
    }
}

@media (min-width: 1024px) {
    .header-brand {
        max-width: 34%;
    }

    .header-inner .nav-links {
        min-width: 0;
        flex-wrap: wrap;
        column-gap: clamp(0.75rem, 1.5vw, 1.5rem);
        row-gap: 0.375rem;
    }

    .header-mobile-nav {
        display: none !important;
    }
}
