/* ==========================================================================
   Shared page header (.category-header + .category-title)
   Used by careers, corporate, job, news, news-details, productions, venues.
   - Height grows with the title, so long titles never overflow on mobile.
   - Logical properties (border-inline-*, text-align: start) flip the accent
     bar and alignment automatically for Arabic; no per-page PHP needed.
   - Selectors are prefixed with "html" so they win over leftover
     page-level .category-header / .category-title rules.
   ========================================================================== */

html[lang="ar"] .category-header {
    direction: rtl;
}

html .category-header:not(.fallback-header) {
    box-sizing: border-box;
    margin-top: 33px;
    min-height: 100px;
    height: auto;
    padding: 20px 32px;
    border-top: 0.5px solid black;
    border-bottom: 0.5px solid black;
    border-left: 0;
    border-right: 0;
    border-inline-start: 19px solid #00375f;
    border-inline-end: 0.5px solid black;
    background: white;
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

html .category-header .category-title {
    font-size: clamp(26px, 6vw, 44px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.06em;
    color: black;
    margin: 0;
    text-transform: uppercase;
    text-align: start;
    overflow-wrap: break-word;
}

/* Arabic: no negative tracking (it breaks letter joining), taller lines for diacritics */
html[lang="ar"] .category-header .category-title {
    font-size: clamp(24px, 5.5vw, 38px);
    line-height: 1.5;
    letter-spacing: 0;
}

/* Japanese: no uppercase/tracking tricks, allow line breaks anywhere */
html[lang="jp"] .category-header .category-title {
    font-size: clamp(22px, 5.5vw, 38px);
    line-height: 1.4;
    letter-spacing: 0;
    line-break: strict;
}

@media (max-width: 768px) {
    html .category-header:not(.fallback-header) {
        min-height: 80px;
        padding: 16px 20px;
        border-inline-start-width: 12px;
    }
}
