/* Harness Risk Partners: languages, country chooser, deadlines and right-to-left layout */

/* ---------- Fonts per script ---------- */
html[lang="ar"] body,
html[lang="ar"] input, html[lang="ar"] select, html[lang="ar"] textarea, html[lang="ar"] button,
.hrp-loc__box[lang="ar"] { font-family: 'IBM Plex Sans Arabic', 'Inter', Tahoma, sans-serif; }
html[lang="zh-Hans"] body,
html[lang="zh-Hans"] input, html[lang="zh-Hans"] select, html[lang="zh-Hans"] textarea, html[lang="zh-Hans"] button,
.hrp-loc__box[lang="zh-Hans"] { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', 'Noto Sans CJK SC', sans-serif; }
html[lang="ar"] *, html[lang="zh-Hans"] *, .hrp-loc__box[lang="ar"] * { letter-spacing: 0 !important; }
html[lang="ar"] body { line-height: 1.75; }
html[lang="zh-Hans"] .ev-hero h1 { max-width: 15em; }
html[lang="ar"] .ev-hero h1 { max-width: 16em; line-height: 1.3; }

/* Long compound words (German, Dutch, Russian...) must not overflow on phones */
html:not([lang="en"]) h1, html:not([lang="en"]) h2, html:not([lang="en"]) h3,
html:not([lang="en"]) .ev-facts dd, html:not([lang="en"]) .dk-plan__band,
html:not([lang="en"]) .card__title, html:not([lang="en"]) .ev-field label { overflow-wrap: break-word; hyphens: auto; }
html:not([lang="en"]) .nav__links a { white-space: nowrap; }
html:not([lang="en"]) h1, html:not([lang="en"]) h2, html:not([lang="en"]) h3,
html:not([lang="en"]) .card__title, html:not([lang="en"]) .ev-facts dd, html:not([lang="en"]) .dk-plan__band { overflow-wrap: anywhere; }
html:not([lang="en"]) .hero__content { min-width: 0; width: 100%; }
html:not([lang="en"]) .services__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 992px) { html:not([lang="en"]) .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) { html:not([lang="en"]) .services__grid { grid-template-columns: minmax(0, 1fr); } }

/* Keep a tall hero title clear of the fixed header on small phones */
@media (max-width: 768px) { .hero { padding: 104px 0 64px; } }

/* ---------- Locale switcher in the header ---------- */
.nav__locale {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; color: rgba(255,255,255,0.78);
    border: 1px solid rgba(255,255,255,0.2); border-radius: 999px;
    padding: 7px 12px; margin-inline-end: 12px;
    font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.nav__locale:hover { color: var(--white); border-color: rgba(255,255,255,0.45); }
.nav__locale svg { flex-shrink: 0; }
.nav__links .nav__locale-item { display: none; }

/* Wider breakpoint for the menu so longer translations never crowd the header */
@media (max-width: 1100px) {
    .nav__links { gap: 26px; }
}
html:not([lang="en"]) .nav__links { gap: 24px; margin: 0 20px; }
html:not([lang="en"]) .nav__links a { font-size: 0.9rem; }
@media (max-width: 1180px) {
    html:not([lang="en"]) .nav__links { display: none; margin: 0; }
    html:not([lang="en"]) .nav__toggle { display: inline-flex; }
    html:not([lang="en"]) .nav.is-open .nav__links {
        display: flex; flex-direction: column; gap: 0;
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--navy); border-bottom: 1px solid rgba(255,255,255,0.08);
        padding: 4px 16px 12px; box-shadow: 0 18px 40px rgba(0,0,0,0.35);
    }
    html:not([lang="en"]) .nav.is-open .nav__links a,
    html:not([lang="en"]) .nav.is-open .nav__links button {
        padding: 15px 8px; font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,0.06);
    }
}
@media (max-width: 1180px) {
    html:not([lang="en"]) .nav__right .nav__locale { display: none; }
    html:not([lang="en"]) .nav__links .nav__locale-item { display: flex; }
}
@media (max-width: 768px) {
    .nav__right .nav__locale { display: none; }
    .nav__links .nav__locale-item { display: flex; }
}
.nav__links .nav__locale-item {
    align-items: center; gap: 10px; width: 100%;
    background: none; border: none; color: rgba(255,255,255,0.85);
    font: inherit; font-size: 1rem; font-weight: 500; text-align: start;
    padding: 15px 8px; cursor: pointer;
}
.nav__links .nav__locale-item:last-child { border-bottom: none !important; }

/* ---------- Footer locale line and translation note ---------- */
.footer__locale {
    display: inline-flex; align-items: center; gap: 8px;
    background: none; border: 1px solid rgba(255,255,255,0.18); border-radius: 999px;
    color: rgba(255,255,255,0.75); font: inherit; font-size: 0.86rem;
    padding: 7px 14px; cursor: pointer;
}
.footer__locale:hover { color: var(--white); border-color: rgba(255,255,255,0.4); }
.footer__locale span:last-child { color: var(--accent); font-weight: 600; }
.footer__inner { flex-wrap: wrap; gap: 16px 24px; }
.footer__prevails { flex-basis: 100%; color: rgba(255,255,255,0.62); font-size: 0.8rem; line-height: 1.6; }
@media (max-width: 768px) { .footer__prevails { text-align: center; } }

/* ---------- Country and language dialog ---------- */
body.hrp-loc-open { overflow: hidden; }
.hrp-loc {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(5,24,20, 0.72);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.hrp-loc[hidden] { display: none; }
.hrp-loc__box {
    position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto;
    background: #fff; color: #1d2e29; border-radius: 16px;
    padding: 30px 28px 26px; box-shadow: 0 30px 80px rgba(0,0,0,0.4);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
.hrp-loc__brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.05rem; color: var(--navy, #0b2b24); margin-bottom: 18px; letter-spacing: -0.3px; }
.hrp-loc__brand span { color: var(--accent-text, #86692a); }
.hrp-loc__box h2 { font-size: 1.35rem; line-height: 1.3; font-weight: 700; color: var(--navy, #0b2b24); margin-bottom: 8px; }
.hrp-loc__intro { color: #5a6d66; font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px; }
.hrp-loc__field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.hrp-loc__field label { font-size: 0.86rem; font-weight: 600; }
.hrp-loc__field select {
    width: 100%; min-width: 0; padding: 13px 42px 13px 14px;
    border: 1.5px solid #dde6e2; border-radius: 10px; background-color: #fff;
    font: inherit; font-size: 1rem; color: #1d2e29;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235b6b80' stroke-width='1.6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center; background-size: 12px 8px;
}
.hrp-loc__field select:focus { border-color: var(--accent, #c9a961); outline: none; box-shadow: 0 0 0 3px rgba(201,169,97,0.25); }
.hrp-loc__week { min-height: 1.4em; font-size: 0.88rem; color: #5a6d66; margin: 2px 0 6px; line-height: 1.5; }
.hrp-loc__err { min-height: 1.2em; font-size: 0.86rem; color: #a3361f; margin-bottom: 8px; }
.hrp-loc__err:empty { min-height: 0; margin: 0; }
.hrp-loc__go { width: 100%; text-align: center; margin-top: 6px; }
.hrp-loc__x {
    position: absolute; top: 12px; right: 12px; width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: none; border-radius: 8px; color: #5a6d66; cursor: pointer;
}
.hrp-loc__x:hover { background: #f3f6f4; color: #1d2e29; }
.hrp-loc__x[hidden] { display: none; }
.hrp-loc__box[dir="rtl"] .hrp-loc__x { right: auto; left: 12px; }
.hrp-loc__box[dir="rtl"] .hrp-loc__field select { padding: 13px 14px 13px 42px; background-position: left 16px center; }
.hrp-loc__box[dir="rtl"] .hrp-loc__brand { direction: ltr; justify-content: flex-end; }
.hrp-loc__box[lang="ar"] h2 { line-height: 1.5; }
@media (max-width: 420px) { .hrp-loc__box { padding: 26px 20px 22px; } }

/* ---------- Deadlines ---------- */
.ev-due {
    display: inline-block; margin-bottom: 10px;
    background: rgba(201,169,97,0.16); color: #7a5a17;
    font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.ev-week { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.ev-week strong { color: var(--ink); }
.ev-week [data-hrp-workweek] { color: var(--ink); font-weight: 600; }
.ev-credit {
    margin-top: 20px; padding: 16px 18px; border-radius: 12px;
    background: #f7f2e6; border: 1px solid #ecdfbf; color: #4a3a17;
    font-size: 0.9rem; line-height: 1.6;
}
.ev-credit strong { display: block; color: #3a2c0c; margin-bottom: 4px; font-size: 0.95rem; }
.ev-next { font-size: 0.9rem; color: var(--muted); line-height: 1.6; margin: -6px 0 18px; }
.evaluate__week { margin-top: 10px; color: rgba(255,255,255,0.5); font-size: 0.86rem; text-align: center; }
.evaluate__week [data-hrp-workweek] { color: rgba(255,255,255,0.78); }

/* ---------- Right-to-left (Arabic) ---------- */
[dir="rtl"] .nav__logo, [dir="rtl"] .footer__logo { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .nav__logo-mark { margin-right: 9px; margin-left: 0; }
[dir="rtl"] .nav__toggle { margin-left: 0; margin-right: 10px; }
[dir="rtl"] .stat { text-align: right; padding-left: 0; padding-right: 24px; border-left: none; border-right: 3px solid var(--accent); }
[dir="rtl"] .evaluate__card { text-align: right; }
[dir="rtl"] .evaluate__list li { padding-left: 0; padding-right: 26px; }
[dir="rtl"] .evaluate__list li::before { left: auto; right: 0; }
[dir="rtl"] .evaluate__price { direction: ltr; text-align: right; }
[dir="rtl"] .legal ul { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .ev-facts div { padding: 22px 0 0 28px; }
[dir="rtl"] .ev-facts div + div { padding-left: 28px; padding-right: 28px; border-left: none; border-right: 1px solid rgba(255,255,255,0.16); }
[dir="rtl"] .ev-hero::after { right: auto; left: -180px; }
[dir="rtl"] .ev-doc { transform: rotate(1.6deg); margin-left: 0; margin-right: auto; }
[dir="rtl"] .ev-doc__table th { text-align: right; }
[dir="rtl"] .ev-doc__table td { padding: 9px 0 9px 8px; }
[dir="rtl"] .ev-doc__table td:last-child { padding-right: 8px; padding-left: 0; text-align: left; }
[dir="rtl"] .ev-prepare li { padding: 14px 34px 14px 0; }
[dir="rtl"] .ev-prepare li::before { left: auto; right: 0; }
[dir="rtl"] .ev-prepare li::after { left: auto; right: 6px; }
[dir="rtl"] .ev-price__amount small { margin-left: 0; margin-right: 6px; }
[dir="rtl"] .ev-price li { padding: 13px 28px 13px 0; }
[dir="rtl"] .ev-price li::before { left: auto; right: 2px; }
[dir="rtl"] .ev-hp { left: auto !important; right: -9999px !important; }
[dir="rtl"] .ev-faq summary { padding: 22px 0 22px 44px; }
[dir="rtl"] .ev-faq summary::after { right: auto; left: 8px; }
[dir="rtl"] .ev-tiers th { text-align: right; padding: 0 0 10px 12px; }
[dir="rtl"] .ev-tiers td { padding: 14px 0 14px 12px; }
[dir="rtl"] .ev-tiers th:last-child, [dir="rtl"] .ev-tiers td:last-child { text-align: left; padding-left: 0; }
[dir="rtl"] .ev-field select { padding-right: 16px; padding-left: 42px; background-position: left 16px center; }
[dir="rtl"] .dk-terms li { padding: 6px 18px 6px 0; }
[dir="rtl"] .dk-terms li::before { left: auto; right: 0; }
[dir="rtl"] .dk-calc__input span { padding: 0 16px 0 6px; direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .dk-calc__input input { padding: 14px 4px 14px 16px; }
[dir="rtl"] .dk-plan__tag { left: auto; right: 18px; }
[dir="rtl"] .dk-plan__price { direction: ltr; text-align: right; }
[dir="rtl"] .dk-plan__price small { margin-left: 2px; }
[dir="rtl"] .dk-plan li { padding-left: 0; padding-right: 20px; }
[dir="rtl"] .dk-plan li::before { left: auto; right: 2px; }
[dir="rtl"] .ev-price__amount { direction: ltr; text-align: right; }
[dir="rtl"] input[type="email"], [dir="rtl"] #dk-finder, [dir="rtl"] #cp-premium { direction: ltr; text-align: right; }
[dir="rtl"] .contact__email { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] #hrp-chat-widget { right: auto; left: 24px; }
[dir="rtl"] #hrp-chat-panel { right: auto; left: 24px; }
@media (max-width: 960px) {
    [dir="rtl"] .ev-facts div:nth-child(3) { padding-right: 0; border-right: none; }
    [dir="rtl"] .ev-doc { margin: 0 auto; }
}
@media (max-width: 640px) {
    [dir="rtl"] .ev-facts div, [dir="rtl"] .ev-facts div + div { padding: 16px 0; border-right: none; }
    [dir="rtl"] .ev-doc { transform: none; }
}
@media (max-width: 480px) {
    [dir="rtl"] #hrp-chat-widget { left: 16px; right: auto; }
    [dir="rtl"] #hrp-chat-panel { left: 16px; right: 16px; }
}

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

/* ---------- Gold text that meets WCAG AA contrast (4.5:1) on light backgrounds ---------- */
:root { --accent-text: #86692a; --hrp-bar-h: 0px; }
.about .section-eyebrow, .services .section-eyebrow, .contact .section-eyebrow,
.ev-doc__kicker, .ev-step-label, .ev-link-btn { color: var(--accent-text); }

/* ---------- Country and language banner (non-blocking) ---------- */
.hrp-bar {
    position: fixed; left: 16px; bottom: 16px; z-index: 9998;
    width: calc(100% - 32px); max-width: 520px;
    background: #fff; color: #1d2e29; border: 1px solid #dde6e2; border-radius: 14px;
    box-shadow: 0 18px 50px rgba(5,24,20, 0.28);
    padding: 15px 46px 14px 18px;
}
[dir="rtl"] .hrp-bar { left: auto; right: 16px; padding: 15px 18px 14px 46px; }
.hrp-bar[hidden] { display: none; }
.hrp-bar__text { font-size: 0.9rem; line-height: 1.55; margin: 0 0 12px; color: #33443e; }
.hrp-bar__suggest { display: block; font-weight: 700; color: #0b2b24; margin-bottom: 2px; }
.hrp-bar__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.hrp-bar__btn {
    font: inherit; font-size: 0.86rem; font-weight: 600; line-height: 1.2;
    padding: 9px 15px; border-radius: 999px; cursor: pointer;
    border: 1.5px solid var(--navy, #0b2b24); background: transparent; color: var(--navy, #0b2b24);
}
.hrp-bar__btn:hover { background: #f3f6f4; }
.hrp-bar__btn--primary { background: var(--accent, #c9a961); border-color: var(--accent, #c9a961); color: var(--navy, #0b2b24); }
.hrp-bar__btn--primary:hover { background: var(--accent-dark, #b08d3f); border-color: var(--accent-dark, #b08d3f); }
.hrp-bar__btn--link { border-color: transparent; padding-inline: 6px; color: var(--accent-text); text-decoration: underline; }
.hrp-bar__btn--link:hover { background: none; color: #5e4a1d; }
.hrp-bar__x {
    position: absolute; top: 8px; right: 8px; width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; background: none; color: #5a6d66; border-radius: 8px; cursor: pointer;
}
.hrp-bar__x:hover { background: #f3f6f4; color: #1d2e29; }
[dir="rtl"] .hrp-bar__x { right: auto; left: 8px; }
@media (max-width: 600px) {
    .hrp-bar { left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; }
    [dir="rtl"] .hrp-bar { left: 12px; right: 12px; }
    body.hrp-bar-open #hrp-chat-widget { bottom: calc(16px + var(--hrp-bar-h)); }
    body.hrp-bar-open #hrp-chat-panel { bottom: calc(84px + var(--hrp-bar-h)); height: calc(100vh - 120px - var(--hrp-bar-h)); }
}
@media print { .hrp-bar { display: none; } }
