/*
 * Career page (app/(site)/[lang]/career/page.tsx): job cards in place of the old table.
 * Same palette and type as the rest of the site; logical properties, so Arabic mirrors on its own.
 * The application modal (#jobApplyModal) keeps its legacy styles.
 */
.career {
  --job-purple: #542785;
  --job-ink: #1e2333;
  --job-yellow: #f5d253;
  --job-line: rgba(84, 39, 133, 0.14);
  max-width: 1080px;
  padding-bottom: 72px;
}

.career h1.title {
  margin-bottom: 18px;
}

.careerIntro {
  max-width: 46rem;
  margin: 0 0 34px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
  color: #3b3f4d;
}

.careerSubhead {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(30, 35, 51, 0.6);
}

.jobList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.jobCard {
  position: relative;
  padding: 24px 28px;
  border: 1px solid var(--job-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(30, 35, 51, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Yellow accent on the start edge */
.jobCard::before {
  content: "";
  position: absolute;
  inset-block: 24px;
  inset-inline-start: -1px;
  width: 3px;
  border-radius: 3px;
  background: var(--job-yellow);
}

.jobCard:hover,
.jobCard:focus-within {
  border-color: rgba(84, 39, 133, 0.32);
  box-shadow: 0 10px 28px -16px rgba(42, 16, 74, 0.35);
}

.jobCard__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
}

.jobCard .jobHeading {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--job-ink);
}

.jobMeta {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.jobMeta li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(84, 39, 133, 0.07);
  color: var(--job-purple);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.jobMeta i {
  font-size: 11px;
  opacity: 0.8;
}

.career .jobApplyBtn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--job-purple);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.career .jobApplyBtn:hover {
  background: var(--job-yellow);
  color: var(--job-ink);
}

.career .jobApplyBtn:focus-visible {
  outline: 3px solid var(--job-yellow) !important;
  outline-offset: 3px;
}

.jobCard__summary {
  max-width: 48rem;
  margin: 16px 0 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.7;
  color: #3b3f4d;
}

/* ---- Details toggle -------------------------------------------------------------------- */
.jobCard__details {
  margin-top: 14px;
}

.jobCard__details summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  list-style: none;
  cursor: pointer;
  color: var(--job-purple);
  font-size: 14px;
  font-weight: 700;
}

.jobCard__details summary::-webkit-details-marker {
  display: none;
}

.jobCard__details summary:hover .when-closed,
.jobCard__details summary:hover .when-open {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.jobCard__details summary:focus-visible {
  outline: 2px solid var(--job-purple);
  outline-offset: 3px;
  border-radius: 3px;
}

.jobCard__details summary i {
  font-size: 11px;
  transition: transform 0.2s ease;
}

.jobCard__details .when-open,
.jobCard__details[open] .when-closed {
  display: none;
}

.jobCard__details[open] .when-open {
  display: inline;
}

.jobCard__details[open] summary i {
  transform: rotate(180deg);
}

.jobCard__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--job-line);
}

.jobCard__body h4 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--job-ink);
}

.jobCard__body ul + h4 {
  margin-top: 20px;
}

.jobCard__body ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.jobCard__body ul li {
  position: relative;
  padding-inline-start: 18px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.6;
  color: #3b3f4d;
}

.jobCard__body ul li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--job-yellow);
}

.jobFacts {
  align-self: start;
  margin: 0;
  padding: 18px 20px;
  border-radius: 10px;
  background: #f7f5fb;
  display: grid;
  gap: 14px;
}

.jobFacts dt {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(30, 35, 51, 0.55);
}

.jobFacts dd {
  margin: 3px 0 0;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--job-ink);
}

/* ---- Small screens --------------------------------------------------------------------- */
@media (max-width: 767px) {
  .career {
    padding-bottom: 96px; /* clear of the floating WhatsApp button */
  }
  .careerIntro {
    font-size: 15px;
    margin-bottom: 26px;
  }
  .jobCard {
    padding: 20px;
  }
  .jobCard::before {
    inset-block: 20px;
  }
  .jobCard__head {
    flex-direction: column;
  }
  .jobCard .jobHeading {
    font-size: 19px;
  }
  .career .jobApplyBtn {
    width: 100%;
  }
  .jobCard__body {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ---- Arabic: no Latin tracking/uppercase, comfortable line height ----------------------- */
html[dir="rtl"] .careerSubhead,
html[dir="rtl"] .jobFacts dt {
  letter-spacing: 0;
  text-transform: none;
  font-size: 13.5px;
}

html[dir="rtl"] .careerIntro,
html[dir="rtl"] .jobCard__summary,
html[dir="rtl"] .jobCard__body ul li {
  font-weight: 500;
  line-height: 1.9;
}

/* ---- Resume chooser in the application modal ------------------------------------------ */
#uploadResume.resumeUpload {
  position: relative;
  margin: 0 0 14px;
}

.resumeUpload__button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin: 0;
  padding: 0 22px;
  border: 0;
  border-radius: 2px;
  background: #542785;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.resumeUpload__button:hover {
  background: #432069;
  color: #fff;
}

.resumeUpload__button:focus-visible {
  outline: 3px solid var(--job-yellow);
  outline-offset: 3px;
}

.resumeUpload__input {
  display: none;
}

.resumeUpload__button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.resumeUpload__hint,
.resumeUpload__filename,
.resumeUpload__error {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0;
}

.resumeUpload__hint {
  color: #666;
}

.resumeUpload__filename {
  overflow-wrap: anywhere;
  color: var(--job-purple);
  font-weight: 600;
}

.resumeUpload__error {
  color: #b42318;
  font-weight: 600;
}

html[dir="rtl"] .jobCard__body ul li::before {
  top: 0.8em;
}

@media (prefers-reduced-motion: reduce) {
  .jobCard,
  .career .jobApplyBtn,
  .jobCard__details summary i {
    transition: none;
  }
}
