/* ============================================================
   Careers: the open roles list (careers.html) and the job page
   (careers/<slug>.html). The form itself is in forms.css.
   Logical properties throughout, so Arabic needs no RTL overrides.
   ============================================================ */

/* ---- open roles ---- */
.openings { padding-block: 0 clamp(64px, 8vw, 104px); scroll-margin-top: 96px; }
.openings__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; }
.openings__head h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.openings__head p { margin-top: 8px; max-width: 560px; font-size: 1.125rem; line-height: 1.55; color: var(--ink-2); }

.job-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.job-filters[hidden] { display: none; }
.job-filters button {
  height: 38px;
  padding-inline: 16px;
  font: inherit;
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.job-filters button:hover { color: var(--ink); border-color: rgba(20, 22, 26, 0.24); }
.job-filters button[aria-pressed="true"] { color: var(--paper-warm); background: var(--ink); border-color: var(--ink); }

.jobs-list { display: grid; gap: 12px; margin-top: 32px; }
.job-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 44px;
  align-items: center;
  gap: 24px;
  padding: 24px 28px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.job-row[hidden] { display: none; }
.job-row:hover { border-color: rgba(240, 83, 35, 0.45); box-shadow: 0 18px 40px -28px rgba(20, 22, 26, 0.45); transform: translateY(-2px); }
.job-row:focus-visible { outline: 3px solid rgba(240, 83, 35, 0.45); outline-offset: 2px; }
.job-row__title { font-family: var(--font-heading); font-size: 1.3rem; line-height: 1.25; font-weight: 700; color: var(--ink); }
.job-row__summary { margin-top: 6px; font-size: 1.05rem; line-height: 1.5; color: var(--ink-2); }
.job-row__meta { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; margin: 0; padding: 0; list-style: none; }
.job-row__meta li {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--rule);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
}
.job-row__go {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--paper-warm);
  transition: background 0.18s ease;
}
.job-row:hover .job-row__go { background: var(--orange-hi); }
[dir="rtl"] .job-row__go svg { transform: scaleX(-1); }

.jobs-empty {
  margin-top: 32px;
  padding: 32px;
  border: 1px dashed rgba(20, 22, 26, 0.2);
  border-radius: var(--radius);
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink-2);
  text-align: center;
}
.jobs-empty[hidden] { display: none; }

/* ---- open application (careers.html) ---- */
.open-apply {
  padding-block: clamp(56px, 7vw, 96px);
  background: var(--surface-2);
  border-top: 1px solid var(--rule);
  scroll-margin-top: 80px;
}
.open-apply__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.open-apply h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.open-apply__intro p { margin-top: 14px; font-size: 1.125rem; line-height: 1.6; color: var(--ink-2); }

/* ---- job page ---- */
.job-hero { padding-top: 112px; padding-bottom: clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--rule); }
@media (min-width: 700px) { .job-hero { padding-top: clamp(150px, 11vw, 190px); } }
.job-hero__dept { margin-top: 28px; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--orange); }
.job-hero h1 {
  margin-top: 10px;
  max-width: 900px;
  font-size: clamp(2.25rem, 1.5rem + 2.5vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--ink);
}
.job-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 22px 0 0; padding: 0; list-style: none; }
.job-meta li { display: inline-flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 600; color: var(--ink-2); }
.job-meta svg { flex: none; color: var(--ink-3); }

.job-body {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
  padding-block: clamp(40px, 5vw, 72px) clamp(64px, 8vw, 104px);
}
.job-summary { font-size: 1.375rem; line-height: 1.55; color: var(--ink); }
.job-copy section + section, .job-summary + section { margin-top: 40px; }
.job-copy h2 { font-family: var(--font-heading); font-size: 1.5rem; line-height: 1.25; color: var(--ink); }

.apply-card {
  position: sticky;
  top: 104px;
  padding: clamp(24px, 3vw, 36px);
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: 0 24px 60px -40px rgba(20, 22, 26, 0.5);
  scroll-margin-top: 96px;
}
.apply-card h2 { font-family: var(--font-heading); font-size: 1.5rem; line-height: 1.25; color: var(--ink); }
.apply-card__note { margin-top: 6px; font-size: 1rem; line-height: 1.5; color: var(--ink-2); }

@media (max-width: 960px) {
  .job-body, .open-apply__grid { grid-template-columns: minmax(0, 1fr); }
  .apply-card { position: static; }
}
@media (max-width: 700px) {
  .job-row { grid-template-columns: minmax(0, 1fr) 40px; padding: 20px; gap: 16px; }
  .job-row__meta { grid-column: 1 / -1; grid-row: 2; justify-content: start; }
  .job-row__go { width: 40px; height: 40px; }
}

/* the sidebar card is too narrow for two fields side by side */
.apply-card .field-row { grid-template-columns: minmax(0, 1fr); }
