/* Responsive two-level header shared by Arabic and English. */
.language-switch {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    min-height: 42px;
    padding: 8px;
    border: 1px solid rgba(28, 37, 40, .2);
    border-radius: 50%;
    background: rgba(255, 255, 255, .72);
    color: var(--red-dark);
    font: 800 12px/1 Georgia, "Times New Roman", serif;
    letter-spacing: .08em;
    transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.language-switch:hover,
.language-switch:focus-visible {
    border-color: var(--red);
    background: var(--red);
    color: #fff;
    transform: translateY(-1px);
}
.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}
.nav-cta-mobile { display: none; }

@media (min-width: 981px) {
    .header-row {
        min-height: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: 76px 50px;
        align-items: center;
        column-gap: clamp(20px, 3vw, 42px);
    }
    .header-row > .brand {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }
    .header-row > .brand span:last-child { min-width: 0; }
    .header-row > .brand small {
        max-width: min(40vw, 460px);
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .header-actions {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }
    .site-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        align-self: stretch;
        width: 100%;
        margin: 0;
        display: block;
        border-top: 1px solid var(--line);
    }
    .site-nav ul {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: stretch;
        justify-content: space-between;
        gap: clamp(10px, 1.4vw, 22px);
    }
    .site-nav li {
        display: flex;
        min-width: 0;
        align-items: stretch;
    }
    .site-nav li a {
        height: 100%;
        display: flex;
        align-items: center;
        padding: 0 2px;
        font-size: clamp(14px, 1vw, 16px);
    }
    .site-nav li a::after { bottom: 0; }
    .site-nav .nav-cta-mobile { display: none; }
}

@media (max-width: 980px) {
    .header-row {
        min-height: 72px;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .header-actions {
        margin-inline-start: auto;
        flex: 0 0 auto;
        gap: 8px;
    }
    .header-actions .header-cta { display: none; }
    .header-actions .menu-toggle {
        display: block;
        margin-inline-start: 0;
    }
    .site-nav .nav-cta-mobile {
        width: 100%;
        margin-top: 16px;
        display: inline-flex;
    }
}

@media (max-width: 460px) {
    .header-row { gap: 8px; }
    .language-switch {
        min-width: 38px;
        min-height: 38px;
        padding: 6px;
    }
    .menu-toggle { padding: 8px; }
}