/* فرص الخليج — أنماط الموقع */
:root {
  --ink: #0b1b2b;
  --ink-soft: #33475b;
  --muted: #61748a;
  --bg: #f5f8f9;
  --card: #ffffff;
  --line: #e2e9ee;
  --brand: #0e7c66;
  --brand-dark: #0a5d4d;
  --brand-soft: #e6f4f0;
  --accent: #f0b429;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(11, 27, 43, .06);
  --shadow: 0 6px 24px rgba(11, 27, 43, .07);
  --shadow-lg: 0 18px 48px rgba(11, 27, 43, .12);
  --maxw: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- رأس الصفحة ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo__mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand), #17a487);
  color: #fff; box-shadow: 0 4px 12px rgba(14, 124, 102, .28);
}
.logo__mark svg { width: 20px; height: 20px; }
.logo small { display: block; font-size: .7rem; font-weight: 600; color: var(--muted); line-height: 1; }

.nav { display: flex; align-items: center; gap: 22px; margin-inline-start: auto; }
.nav a { color: var(--ink-soft); font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--brand); }
.nav .btn { padding: 9px 18px; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; color: var(--ink); cursor: pointer; }

/* ---------- أزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 24px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: .95rem;
  background: var(--brand); color: #fff; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  box-shadow: 0 6px 18px rgba(14, 124, 102, .22);
}
.btn:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { color: var(--brand); border-color: #c9ded7; background: #fff; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- الهيرو ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 0 56px;
  background:
    radial-gradient(900px 380px at 85% -10%, rgba(23, 164, 135, .18), transparent 60%),
    radial-gradient(700px 320px at 10% 0%, rgba(240, 180, 41, .16), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-soft); color: var(--brand-dark);
  border-radius: 999px; padding: 6px 14px; font-size: .82rem; font-weight: 700;
}
.hero h1 { margin: 18px 0 12px; font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.25; font-weight: 800; letter-spacing: -.5px; }
.hero h1 span { color: var(--brand); }
.hero p.lead { margin: 0 0 28px; color: var(--ink-soft); font-size: 1.05rem; max-width: 620px; }

.searchbar {
  display: flex; gap: 10px; padding: 10px; background: #fff; border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow); max-width: 760px;
}
.searchbar__field { flex: 1 1 auto; display: flex; align-items: center; gap: 10px; padding: 0 12px; min-width: 0; }
.searchbar__field svg { flex: 0 0 auto; color: var(--muted); }
.searchbar input, .searchbar select {
  width: 100%; border: 0; outline: none; font: inherit; color: var(--ink); background: transparent; padding: 12px 0; min-width: 0;
}
.searchbar select { cursor: pointer; color: var(--ink-soft); }
.searchbar__divider { width: 1px; background: var(--line); margin: 8px 0; }
.searchbar .btn { flex: 0 0 auto; }

.hero__stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 30px; }
.stat b { display: block; font-size: 1.4rem; font-weight: 800; }
.stat span { font-size: .85rem; color: var(--muted); }

/* ---------- شريط التنبيه ---------- */
.notice {
  background: #fff8e6; border: 1px solid #f5e2ad; color: #7a5b00;
  border-radius: var(--radius-sm); padding: 12px 16px; font-size: .88rem; margin: 20px 0 0;
}
.notice b { color: #6b4f00; }

/* ---------- الأقسام ---------- */
.section { padding: 56px 0; }
.section--tight { padding: 36px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-head h2 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }

.countries { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.country-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-weight: 700; color: var(--ink); box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s;
}
.country-card:hover { border-color: #bfdcd3; transform: translateY(-2px); color: var(--brand-dark); }
.country-card span { font-size: .8rem; color: var(--muted); font-weight: 600; }

/* ---------- شريط الفلاتر ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 8px 16px; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { border-color: #bfdcd3; color: var(--brand-dark); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.toolbar select {
  font: inherit; font-size: .88rem; font-weight: 600; color: var(--ink-soft);
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 14px; cursor: pointer;
}
.toolbar__count { margin-inline-start: auto; font-size: .88rem; color: var(--muted); font-weight: 600; }

/* ---------- شبكة الوظائف ---------- */
.jobs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }

.job-card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.job-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #cfe3dd; }
.job-card__head { display: flex; align-items: flex-start; gap: 12px; }
.avatar {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; font-size: 1.05rem;
}
.job-card h3 { margin: 0; font-size: 1.02rem; font-weight: 700; line-height: 1.45; }
.job-card h3 a { color: var(--ink); }
.job-card h3 a:hover { color: var(--brand); }
.job-card__meta { margin: 2px 0 0; font-size: .84rem; color: var(--muted); }
.job-card__summary { margin: 0; font-size: .9rem; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.job-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #f1f5f7; color: var(--ink-soft); }
.tag--brand { background: var(--brand-soft); color: var(--brand-dark); }
.tag--remote { background: #eef2ff; color: #3b4cc0; }
.job-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; border-top: 1px dashed var(--line); }
.salary { font-size: .85rem; font-weight: 700; color: var(--brand-dark); }
.posted { font-size: .78rem; color: var(--muted); }
.badge-new { position: absolute; top: 14px; left: 14px; background: var(--accent); color: #4a3600; font-size: .68rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; }

.empty { text-align: center; padding: 56px 20px; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- كيف يعمل ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step b { display: block; font-size: 1rem; margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); font-size: .9rem; }
.step i { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; font-style: normal; margin-bottom: 12px; }

/* ---------- شريط الدعوة ---------- */
.cta {
  background: linear-gradient(135deg, var(--ink) 0%, #123a4a 60%, #0e5c50 100%);
  color: #fff; border-radius: 22px; padding: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 24px;
}
.cta h2 { margin: 0 0 8px; font-size: 1.5rem; }
.cta p { margin: 0; color: #c9dbe2; font-size: .95rem; }
.cta .btn { margin-inline-start: auto; background: #fff; color: var(--ink); box-shadow: none; }
.cta .btn:hover { background: var(--accent); color: #3a2a00; }

/* ---------- صفحة الوظيفة ---------- */
.job-hero { background: #fff; border-bottom: 1px solid var(--line); padding: 36px 0; }
.breadcrumb { font-size: .82rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.job-hero h1 { margin: 0 0 8px; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; }
.job-hero__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ink-soft); font-size: .9rem; }
.job-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; padding: 36px 0 64px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.panel + .panel { margin-top: 18px; }
.panel h2 { margin: 0 0 14px; font-size: 1.1rem; font-weight: 800; }
.panel p { margin: 0 0 14px; color: var(--ink-soft); }
.panel ul { margin: 0; padding-inline-start: 20px; color: var(--ink-soft); }
.panel li { margin-bottom: 8px; }
.aside { position: sticky; top: 88px; }
.facts { display: grid; gap: 12px; margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; text-align: end; }

/* ---------- التذييل ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 44px 0 28px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.footer-grid h3 { font-size: .9rem; margin: 0 0 12px; }
.footer-grid a, .footer-grid p { display: block; color: var(--muted); font-size: .88rem; margin: 0 0 8px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px; color: var(--muted); font-size: .8rem; }

/* ---------- فتحة الإعلان ---------- */
.ad-slot { margin: 28px 0; min-height: 90px; display: grid; place-items: center; }

/* ---------- استجابة الشاشات ---------- */
@media (max-width: 900px) {
  .job-layout { grid-template-columns: 1fr; }
  .aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .nav.is-open {
    display: flex; position: absolute; top: 68px; inset-inline: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: #fff; border-bottom: 1px solid var(--line); padding: 12px 20px 18px; box-shadow: var(--shadow);
  }
  .nav-toggle { display: inline-flex; margin-inline-start: auto; }
  .hero { padding: 44px 0 36px; }
  .searchbar { flex-direction: column; align-items: stretch; padding: 12px; }
  .searchbar__divider { display: none; }
  .searchbar__field { border: 1px solid var(--line); border-radius: 12px; }
  .hero__stats { gap: 18px; }
  .cta { padding: 26px; }
  .cta .btn { margin-inline-start: 0; width: 100%; }
  .jobs-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- نموذج نشر وظيفة ---------- */
.post-form { display: grid; gap: 14px; margin-top: 8px; }
.post-form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 700; color: var(--ink-soft); }
.post-form input, .post-form select, .post-form textarea {
  font: inherit; font-size: .95rem; font-weight: 400; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; background: #fff; width: 100%;
}
.post-form input:focus, .post-form select:focus, .post-form textarea:focus { outline: 2px solid #bfe3d9; border-color: var(--brand); }
.post-form textarea { resize: vertical; }
.post-preview {
  background: #f7fafb; border: 1px solid var(--line); border-radius: 10px; padding: 16px;
  white-space: pre-wrap; font-family: inherit; font-size: .9rem; line-height: 1.8; color: var(--ink-soft);
}

/* ---------- الدول بدون وظائف بعد ---------- */
.country-card.is-empty { color: var(--muted); background: #fbfcfd; border-style: dashed; }
.country-card.is-empty:hover { transform: none; color: var(--muted); border-color: var(--line); }
.coverage-note { margin: 14px 0 0; font-size: .84rem; color: var(--muted); }

/* ---------- محاذاة البطاقات ---------- */
.job-card, .job-card__head, .job-card h3, .job-card__meta, .job-card__summary { text-align: start; }
.job-card__head > div { min-width: 0; }
.salary.is-empty { color: var(--muted); font-weight: 600; }

/* زر القائمة يجب أن يظل أبيض على الأخضر */
.nav a.btn, .nav a.btn:hover { color: #fff; }

/* SEO/UX polish */
h1, h2, h3, .job-card h3 a, .job-hero h1 { overflow-wrap: anywhere; }
.job-card, .stat b, .toolbar__count, .country-card span { font-variant-numeric: tabular-nums; }
.more-wrap { text-align: center; margin-top: 22px; }
.jobs-grid { min-height: 120px; }
.prose { max-width: 760px; line-height: 1.95; font-size: 1.05rem; }
.prose h2 { margin-top: 1.8em; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.sources li { margin-bottom: 6px; overflow-wrap: anywhere; }
.article-meta { color: var(--muted); font-size: .9rem; margin: 8px 0 0; }
.articles-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.article-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow-sm); }
.article-card h3 { margin: 0 0 8px; font-size: 1.05rem; line-height: 1.5; }
.article-card p { margin: 0; color: var(--muted); font-size: .92rem; }
[dir=ltr] .prose, [dir=ltr] .article-card { text-align: left; }
/* CV builder */
.cv-layout { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); margin-top: 24px; }
@media (min-width: 980px) { .cv-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } .cv-preview-wrap { position: sticky; top: 90px; } }
.cv-form label { display: block; font-weight: 600; font-size: .9rem; margin: 10px 0 4px; }
.cv-form input, .cv-form textarea, .cv-form select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.cv-entry { border: 1px dashed var(--line); border-radius: 12px; padding: 10px; margin-top: 10px; }
.cv-entry__grid { display: grid; gap: 8px; }
.cv-entry textarea { margin-top: 8px; }
.cv-entry .cv-del { margin-top: 8px; padding: 6px 12px; font-size: .85rem; }
.cv-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.cv-paper { background: #fff; color: #111; border: 1px solid var(--line); border-radius: 6px; padding: 28px; min-height: 420px; line-height: 1.65; font-family: Arial, Tahoma, sans-serif; box-shadow: var(--shadow-sm); overflow-wrap: anywhere; }
.cv-paper h1 { margin: 0; font-size: 1.6rem; }
.cv-paper h2 { font-size: 1rem; border-bottom: 1px solid #888; padding-bottom: 3px; margin: 18px 0 8px; text-transform: uppercase; }
.cv-paper .cv-title { font-size: 1.05rem; margin: 2px 0; }
.cv-paper .cv-contact { color: #444; font-size: .9rem; }
.cv-paper ul { margin: 4px 0; padding-inline-start: 20px; }
.cv-paper .cv-item { margin-bottom: 10px; }
.cv-paper .cv-item__head span { float: inline-end; color: #444; font-size: .9rem; }
.cv-empty { color: #888; }
@media print {
  body * { visibility: hidden; }
  #cvOut, #cvOut * { visibility: visible; }
  #cvOut { position: absolute; inset: 0; border: 0; box-shadow: none; padding: 0; }
}
