/*
Theme Name: وظايف
Description: واجهة توظيف سعودية ثنائية اللغة لمصر والخليج.
Version: 2.1.0
Requires PHP: 8.0
*/

@font-face{font-family:Cairo;src:url("assets/cairo-arabic.woff2") format("woff2");font-weight:400 800;font-style:normal;font-display:swap;unicode-range:U+0600-06FF,U+0750-077F,U+0870-089F,U+08A0-08FF,U+200C-200E,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:Cairo;src:url("assets/cairo-latin.woff2") format("woff2");font-weight:400 800;font-style:normal;font-display:swap;unicode-range:U+0000-00FF,U+2000-206F,U+2190-2193,U+2212,U+FEFF}

:root {
    color-scheme: light;
    --ink: #152c25;
    --muted: #4e645b;
    --accent: #0b4938;
    --accent-hover: #06392c;
    --border: #dce5df;
    --paper: #fff;
    --surface: #f4f7f2;
    --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: Cairo, Tahoma, system-ui, sans-serif; font-size: 1rem; line-height: 1.7; }
main { min-height: 70vh; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; }
input, select, textarea { color: var(--ink); }
::selection { background: #dceee3; color: #152c25; }
:focus-visible { outline: 3px solid #268168; outline-offset: 4px; }
.shell { width: min(100% - 52px, 1240px); margin-inline: auto; }
.skip-link { position: absolute; z-index: 10; inset-inline-start: 1rem; top: 5px; padding: 8px 14px; background: white; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { background: white; border-block-end: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 24px; }
.header-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; font-size: 1.7rem; font-weight: 800; line-height: 1; }
.wz-mark { display: block; width: 40px; height: 40px; border-radius: 10px; background: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { text-decoration: none; font-weight: 700; font-size: .93rem; white-space: nowrap; }
.language-link { padding-inline: 10px; color: var(--accent); }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 19px; min-height: 44px; border: 1px solid transparent; border-radius: 10px; background: var(--accent); color: white; text-align: center; text-decoration: none; font-weight: 750; line-height: 1.45; cursor: pointer; }
.button:hover { background: var(--accent-hover); }
.button-outline { background: white; border-color: #dce7df; color: var(--accent); }
.button-outline:hover { background: #e9f4ed; }

.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: stretch; margin-block: 28px 19px; padding: 14px; min-height: 322px; color: #fcfff8; border-radius: 25px; overflow: hidden; background: linear-gradient(112deg,#14392f 20%,#0a4937 64%,#075640); }
.wz-hero-content { align-self: center; padding: 25px clamp(14px, 3vw, 45px); min-width: 0; }
.hero h1 { margin-block: 8px 10px; font-size: clamp(2rem, 4.3vw, 3.7rem); line-height: 1.18; font-weight: 800; }
.hero[lang=en] h1, [lang=en] .hero h1 { letter-spacing: -.035em; }
.hero p { color: #e1ece4; font-size: clamp(.94rem, 2vw, 1.08rem); }
.hero .wz-hero-label { display: flex; align-items: center; gap: 8px; color: #efdcab; font-size: .87rem; font-weight: 750; }
.wz-hero-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #edcc7b; }
.wz-hero-frame { display: grid; min-height: 0; min-width: 0; overflow: hidden; border-radius: 15px; }
.wz-hero-photo { width: 100%; height: 100%; max-height: 390px; object-fit: cover; object-position: center 56%; }
.search-bar { position: relative; display: flex; align-items: center; gap: 10px; max-width: 610px; margin-block-start: 25px; padding: 6px; border-radius: 12px; background: white; }
.search-bar input { width: 100%; min-width: 0; padding: 8px 14px; border: 0; background: transparent; }
.search-bar .button { min-width: 106px; }
.hero .button { color: #1d3228; background: #efdb9f; }
.hero .button:hover { background: #f9e9b9; }

.wz-markets { margin-block-end: 24px; padding: 17px 19px; }
.wz-markets h2 { margin-block-end: 10px; font-size: 1rem; }
.wz-market-links { display: flex; flex-wrap: wrap; gap: 8px; }
.wz-market-links a { display: inline-flex; align-items: center; gap: 7px; min-height: 41px; padding: 5px 10px; border: 1px solid #e1e8e2; border-radius: 8px; color: #234638; text-decoration: none; font-size: .89rem; font-weight: 700; }
.wz-market-links a:hover, .wz-market-links [aria-current=page] { background: #e4f2e8; border-color: #b0cdb8; }
.wz-country-code { display: grid; place-items: center; width: 26px; height: 23px; border-radius: 5px; background: #eaf2ec; color: #315747; font-size: .75rem; font-weight: 800; }
.wz-country-note { padding: 23px; margin-block: -32px 50px; }
.wz-country-note h2 { font-size: 1.2rem; }
.wz-country-note p { margin-block: 5px; color: var(--muted); }
.wz-country-note a { color: var(--accent); font-weight: 700; }

.board { display: grid; grid-template-columns: minmax(200px, 238px) minmax(0, 1fr); align-items: start; gap: 22px; margin-block-end: 60px; }
.panel { background: white; border: 1px solid var(--border); border-radius: var(--radius); }
.filters { padding: 20px; }
.filters-header { margin-block-end: 13px; font-weight: 800; font-size: 1.08rem; cursor: pointer; }
.filters:not([open]) .filters-header { margin-block-end: 0; }
.clear-filters { display: inline-block; margin-block: 0 10px; color: var(--accent); font-size: .86rem; text-underline-offset: 3px; }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.filters label { margin-block-end: 11px; }
.field span:first-child { font-weight: 750; font-size: .9rem; }
.field input:not([type=checkbox]), .field select, .field textarea, .sort select { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #d9dce8; border-radius: 9px; background-color: white; padding: 8px 11px; }
.field select, .sort select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #6a7088 50%), linear-gradient(135deg, #6a7088 50%, transparent 50%); background-position: left 11px top 52%, left 16px top 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 31px; }
[dir=ltr] .field select, [dir=ltr] .sort select { background-position: right 16px top 52%, right 11px top 52%; }
.filters .button { width: 100%; margin-block-start: 4px; }
.results-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; margin-block: 0 12px; }
.results-head h2 { font-size: clamp(1.28rem, 3vw, 1.65rem); font-weight: 800; line-height: 1.4; }
.results-head p { color: var(--muted); font-size: .9rem; margin-block-start: 3px; }
.sort { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); white-space: nowrap; }
.sort select { min-width: 115px; }

.job-list { display: grid; gap: 12px; }
.job-card { padding: 17px 19px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.job-card:hover { border-color: #a4c8b0; }
.company-mark { display: grid; place-items: center; align-self: start; width: 48px; height: 48px; border-radius: 12px; color: #124f3a; background: #e4f1e7; font-size: 1rem; font-weight: 800; }
.job-card:nth-child(3n+2) .company-mark { background: #e3f2ef; color: #225c4e; }
.job-card:nth-child(3n+3) .company-mark { background: #fbeee5; color: #7c421b; }
.job-copy { min-width: 0; }
.job-copy h3 { font-size: 1.13rem; line-height: 1.45; font-weight: 800; overflow-wrap: anywhere; }
.job-copy h3 a { text-decoration: none; }
.job-copy h3 a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.company { color: var(--muted); font-size: .93rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 10px; }
.tag { display: inline-flex; align-items: center; width: fit-content; padding: 2px 8px; border-radius: 7px; background: #f0f4ee; color: #3b5046; font-size: .86rem; font-weight: 650; }
.tag-accent { color: #144a37; background: #e2f1e7; }
.job-side { text-align: end; display: grid; justify-items: end; gap: 7px; white-space: nowrap; }
.job-side time, .source-link { color: var(--muted); font-size: .83rem; }
.source-link { text-underline-offset: 3px; }
.job-side .button { font-size: .85rem; min-height: 38px; padding: 7px 11px; }
.pagination { margin-block-start: 20px; display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 41px; min-height: 41px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 8px; background: white; text-decoration: none; }
.pagination .current { color: white; background: var(--accent); border-color: var(--accent); }
.empty { padding: 40px 22px; text-align: center; }
.empty p { margin-block: 6px 14px; color: var(--muted); }

.subpage { padding-block: 28px 64px; }
.back-link { display: inline-block; color: var(--accent); font-weight: 700; text-underline-offset: 4px; margin-block-end: 16px; }
.detail-hero { padding: clamp(21px, 4vw, 36px); margin-block-end: 18px; }
.detail-title { display: flex; align-items: flex-start; gap: 14px; }
.detail-title h1, .form-head h1 { font-size: clamp(1.65rem, 5vw, 2.6rem); font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; }
.detail-title p { color: var(--muted); margin-block-start: 4px; }
.detail-title .company-mark { flex: none; width: 58px; height: 58px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 300px); align-items: start; gap: 18px; }
.detail-copy, .apply-box { padding: clamp(20px, 4vw, 32px); }
.detail-copy h2, .apply-box h2 { font-size: 1.2rem; margin-block-end: 12px; }
.prose { overflow-wrap: anywhere; }
.prose > * + * { margin-block-start: .9em; }
.prose a, .apply-box a:not(.button) { color: var(--accent); }
.prose img { max-width: 100%; height: auto; }
.apply-box dl { margin: 0 0 18px; }
.apply-box dl div { border-block-end: 1px solid var(--border); padding: 8px 0; }
.apply-box dt { color: var(--muted); font-size: .88rem; }
.apply-box dd { margin: 2px 0 0; font-weight: 700; }
.apply-box .button { width: 100%; }
.apply-box > p { margin-block-start: 12px; font-size: .88rem; color: var(--muted); }

.form-shell { max-width: 770px; }
.form-head { margin-block-end: 18px; }
.form-head p { color: var(--muted); margin-block-start: 6px; }
.submission { padding: clamp(18px, 4vw, 32px); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; margin-block-end: 18px; }
.form-grid .wide { grid-column: 1 / -1; }
.field textarea { min-height: 164px; resize: vertical; }
.field small { color: var(--muted); font-size: .82rem; }
.permission { display: flex; align-items: start; gap: 8px; }
.permission input { inline-size: 16px; block-size: 16px; margin-block-start: 6px; accent-color: var(--accent); }
.wz-translation { border: 1px solid var(--border); border-radius: 11px; padding: 12px 14px; }
.wz-translation summary { cursor: pointer; color: var(--accent); font-weight: 750; }
.wz-translation .field { margin-top: 12px; }
.wz-ad { display: grid; align-content: center; margin-block: 10px; min-height: 116px; padding: 10px; border: 1px dashed #b7c7ba; border-radius: 11px; background: #eef4ee; color: #44594d; text-align: center; }
.wz-ad small { font-size: .82rem; }
.notice { padding: 17px; margin-block-end: 16px; border: 1px solid #b4decb; border-radius: 12px; background: #ecfaf4; color: #174f39; }
.notice-error { border-color: #efc7c6; background: #fff0ef; color: #862b2b; }
.notice ul { margin-block: 5px 0; }
.field [aria-invalid=true] { border-color: #a13b38; }
.bot-field { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.site-footer { border-block-start: 1px solid var(--border); background: white; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-block: 23px; color: var(--muted); font-size: .89rem; }
.footer-inner a { color: var(--accent); }
.wz-footer-nav { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.wz-home-guides { margin-block: -12px 48px; }
.wz-section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-block-end: 14px; }
.wz-section-heading h2 { font-size: clamp(1.25rem, 3vw, 1.65rem); }
.wz-section-heading a, .wz-article-header a, .wz-form-privacy a { color: var(--accent); text-underline-offset: .18em; }
.wz-section-heading a { font-weight: 750; }
.wz-editorial-header { max-width: 52rem; padding: 1rem 0 1.55rem; }
.wz-editorial-header h1, .wz-article-header h1 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.22; }
.wz-editorial-header p, .wz-article-header p { margin-block-start: .65rem; color: var(--muted); }
.wz-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.wz-guide-card { padding: clamp(17px, 3vw, 24px); }
.wz-guide-card h3 { font-size: 1.15rem; line-height: 1.45; }
.wz-guide-card h3 a { text-decoration-color: #9db4a5; text-underline-offset: .2em; }
.wz-guide-card h3 a:hover { color: var(--accent); text-decoration-color: currentColor; }
.wz-guide-card p { color: var(--muted); margin-block-start: .55rem; }
.wz-article-shell { width: min(100%, 790px); margin-inline: auto; }
.wz-article-shell.shell { width: min(calc(100% - 36px), 790px); }
.wz-guide-article { padding: clamp(20px, 5vw, 42px); }
.wz-article-header { border-block-end: 1px solid var(--border); padding-block-end: 20px; margin-block-end: 25px; }
.wz-guide-byline { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-size: .9rem; }
.wz-article-prose { line-height: 1.85; }
.wz-article-prose h2 { margin-block: 1.4em .35em; line-height: 1.45; font-size: clamp(1.18rem, 3vw, 1.45rem); }
.wz-article-prose > h2:first-child { margin-block-start: 0; }
.wz-article-prose h2 + p { margin-block-start: 0; }
.wz-article-prose ul, .wz-article-prose ol { padding-inline-start: 1.5rem; }
.wz-article-prose blockquote { margin-inline: 0; padding: 12px 16px; border-inline-start: 3px solid #9ebda8; background: #eef4ee; }
.wz-guide-article .wz-ad { margin-block-start: 28px; margin-block-end: 0; }
.wz-more-guides { margin-block-start: 34px; }
.wz-form-privacy { margin-block-start: 12px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 850px) {
    .wz-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero { min-height: auto; }
    .board { grid-template-columns: 190px minmax(0, 1fr); gap: 14px; }
    .filters { padding: 14px; }
    .job-card { grid-template-columns: auto minmax(0, 1fr); padding: 14px; }
    .job-side { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
}

@media (max-width: 620px) {
    .shell { width: calc(100% - 26px); }
    .header-inner { min-height: 66px; gap: 8px; }
    .header-brand { font-size: 1.32rem; gap: 6px; }
    .wz-mark { width: 34px; height: 34px; border-radius: 8px; }
    .site-nav { gap: 10px; }
    .site-nav a { font-size: .82rem; }
    .site-nav .button { padding-inline: 8px; }
    .site-nav .language-link { padding-inline: 0; }
    .wz-guide-grid { grid-template-columns: 1fr; }
    .wz-browse-link { display: none; }
    .hero { grid-template-columns: 1fr; margin-block: 15px 13px; padding: 10px; border-radius: 15px; }
    .wz-hero-content { padding: 12px 10px 0; }
    .wz-hero-frame { border-radius: 10px; }
    .wz-hero-photo { height: clamp(125px, 42vw, 210px); }
    .wz-markets { margin-block-end: 14px; padding: 12px; }
    .wz-market-links { flex-wrap: nowrap; overflow-x: auto; padding: 3px; }
    .wz-market-links a { white-space: nowrap; }
    .search-bar { margin-block-start: 18px; }
    .search-bar input { padding-inline: 8px; }
    .search-bar .button { min-width: 65px; padding-inline: 9px; }
    .board, .detail-layout { grid-template-columns: 1fr; }
    .filters-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .filters label { margin-block-end: 2px; }
    .filters .button { margin-block-start: 10px; }
    .detail-layout .apply-box { grid-row: 1; }
    .form-grid { grid-template-columns: 1fr; gap: 13px; }
    .footer-inner { flex-wrap: wrap; }
}
