.site-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.site-header--home {
    justify-content: space-between;
}

.brand {
    color: #111827;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.01em;
    flex-shrink: 0;
}

.header-search {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    display: flex;
    align-items: center;
}

.header-search-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    border-right: none;
    border-radius: 12px 0 0 12px;
    font-size: 15px;
    font-family: inherit;
    color: #111827;
    background: #ffffff;
    outline: none;
    transition: border-color 0.15s;
}

.header-search-input:focus {
    border-color: #9ca3af;
}

.header-search-input::placeholder {
    color: #94a3b8;
}

.header-search-btn {
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-left: none;
    border-radius: 0 12px 12px 0;
    background: #111827;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.15s;
}

.header-search-btn:hover {
    background: #1f2937;
}

/* =========================================================
   LANGUAGE SWITCHER
   ========================================================= */

.language-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.language-switcher a {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.04em;
    padding-bottom: 2px;
    transition: color 0.15s;
}

.language-switcher a:hover {
    color: #111827;
}

.language-switcher a.lang-active {
    color: #111827;
    border-bottom: 2px solid #111827;
    padding-bottom: 0;
}

/* =========================================================
   BREADCRUMBS
   ========================================================= */

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 0;
    font-size: 13px;
    color: #94a3b8;
}

.breadcrumbs a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.15s;
}

.breadcrumbs a:hover {
    color: #111827;
}

.breadcrumbs span {
    color: #94a3b8;
}

.breadcrumbs strong {
    color: #111827;
    font-weight: 500;
}

/* =========================================================
   MOBILE LANGUAGE TOOLBAR
   ========================================================= */

.mobile-lang-toolbar {
    display: none;
}

/* =========================================================
   UTILITIES
   ========================================================= */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-footer {
    text-align: center;
    padding: 24px 16px;
    color: #94a3b8;
    font-size: 13px;
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
}

/* =========================================================
   MOBILE — single unified block
   ========================================================= */

@media (max-width: 600px) {
    .site-header {
        padding: 10px 16px;
        gap: 8px;
    }

    /* Hide desktop lang switcher */
    .language-switcher {
        display: none;
    }

    /* Search bar drops out of absolute centering */
    .header-search {
        position: static;
        transform: none;
        max-width: 100%;
        flex: 1;
    }

    /* Show mobile lang toolbar above header */
    .mobile-lang-toolbar {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0;
        padding: 0 16px;
        background: #ffffff;
        border-bottom: 1px solid #e5e7eb;
        scrollbar-width: none;
    }

    .mobile-lang-toolbar::-webkit-scrollbar {
        display: none;
    }

    .mobile-lang-toolbar a {
        flex-shrink: 0;
        padding: 8px 10px;
        color: #94a3b8;
        font-size: 12px;
        font-weight: 600;
        text-decoration: none;
        letter-spacing: 0.04em;
        border-bottom: 2px solid transparent;
        white-space: nowrap;
        transition: color 0.15s;
    }

    .mobile-lang-toolbar a:hover {
        color: #111827;
    }

    .mobile-lang-toolbar a.lang-active {
        color: #111827;
        border-bottom: 2px solid #111827;
    }

    /* Home page: hide toolbar since langs already shown inline in header */
    .mobile-lang-toolbar--home {
        display: none !important;
    }

    .site-header--home .language-switcher {
        display: flex !important;
        flex-wrap: wrap;
        gap: 6px 10px;
        width: 100%;
        border-top: 1px solid #f1f5f9;
        padding-top: 8px;
    }

    .site-header--home {
        flex-wrap: wrap;
        padding: 10px 16px;
    }

    .site-header--home .brand {
        flex: 1;
    }

    .breadcrumbs {
        padding: 10px 16px;
    }
}

/* =========================================================
   RTL SUPPORT (Arabic)
   ========================================================= */

[dir="rtl"] .site-header {
    direction: ltr;
}

[dir="rtl"] .header-search-input {
    direction: rtl;
    text-align: right;
    border-radius: 12px 0 0 12px;
    border-right: none;
    border-left: 1px solid #e5e7eb;
}

[dir="rtl"] .header-search-btn {
    border-radius: 0 12px 12px 0;
    border-left: none;
    border-right: 1px solid #e5e7eb;
}

[dir="rtl"] .breadcrumbs {
    flex-direction: row-reverse;
}

[dir="rtl"] .language-switcher {
    direction: ltr;
}