/* Match the public demman.org header and footer on the jobs pages only. */
body.dman-jobs-page header:not(.dman-site-header),
body.dman-jobs-page footer:not(.dman-site-footer),
body.dman-jobs-page #footer {
  display: none !important;
}

body.dman-jobs-page {
  margin: 0;
  background: #e3ddcc;
}

.dman-site-header,
.dman-site-header *,
.dman-site-footer,
.dman-site-footer * {
  box-sizing: border-box;
}

.dman-site-header {
  position: relative;
  z-index: 1000;
  width: 100%;
  min-height: 103px;
  background: #e3ddcc;
  color: #172f26;
  border-bottom: 1px solid rgba(23, 63, 45, .08);
  font-family: Tajawal, Arial, sans-serif;
}

.dman-site-header-inner {
  width: min(1224px, calc(100% - 40px));
  min-height: 103px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 206px minmax(0, 1fr) 176px;
  align-items: center;
  gap: 26px;
  direction: ltr;
}

.dman-site-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 206px;
  height: 103px;
  text-decoration: none;
}

.dman-site-logo img {
  display: block;
  width: 190px;
  height: 88px;
  object-fit: contain;
  object-position: left center;
}

.dman-site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 2.5vw, 38px);
  min-width: 0;
  direction: rtl;
}

.dman-site-nav a {
  position: relative;
  padding: 39px 0 35px;
  color: #1d2e27 !important;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
  text-decoration: none !important;
  white-space: nowrap;
}

.dman-site-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 25px;
  left: 0;
  height: 2px;
  background: #b75a36;
  transform: scaleX(0);
  transition: transform .2s ease;
}

.dman-site-nav a:hover::after,
.dman-site-nav a.active::after {
  transform: scaleX(1);
}

.dman-member-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 10px 18px;
  border-radius: 2px;
  background: #174f38;
  color: #f5eedc !important;
  font: 700 15px/1.5 Tajawal, Arial, sans-serif;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background .2s ease, transform .2s ease;
}

.dman-member-button:hover {
  background: #123d2b;
  transform: translateY(-1px);
}

.dman-mobile-menu { display: none; }

.dman-site-footer {
  width: 100%;
  margin: 0;
  padding: 64px 22px 0;
  background: #4b6e5e;
  color: #f5eedc;
  font-family: Tajawal, Arial, sans-serif;
}

.dman-site-footer-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr .9fr 1fr .8fr;
  gap: clamp(30px, 5vw, 68px);
}

.dman-site-footer section { min-width: 0; }
.dman-site-footer h2,
.dman-site-footer h3 {
  margin: 0 0 18px;
  color: #fff8e8;
  font-family: "Noto Kufi Arabic", Tajawal, Arial, sans-serif;
  line-height: 1.6;
}
.dman-site-footer h2 { font-size: 20px; }
.dman-site-footer h3 { font-size: 16px; }
.dman-site-footer p {
  margin: 0 0 11px;
  color: rgba(245, 238, 220, .88);
  font-size: 15px;
  line-height: 1.9;
}
.dman-site-footer section > a {
  display: block;
  width: fit-content;
  margin: 0 0 10px;
  color: rgba(245, 238, 220, .92) !important;
  font-size: 15px;
  line-height: 1.7;
  text-decoration: none !important;
}
.dman-site-footer section > a:hover { color: #fff !important; }
.dman-footer-brand > p:first-of-type {
  color: #d5c39a;
  font-weight: 700;
}
.dman-social-links {
  display: flex;
  gap: 10px;
  direction: ltr;
  margin: 0 0 22px;
}
.dman-social-links a {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid rgba(245, 238, 220, .55);
  border-radius: 50%;
  color: #fff8e8 !important;
  font: 700 18px/1 Arial, sans-serif;
  text-decoration: none !important;
  transition: background .2s ease, color .2s ease;
}
.dman-social-links a:hover {
  background: #f5eedc;
  color: #315143 !important;
}
.dman-site-footer a.dman-footer-member {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid rgba(245, 238, 220, .65);
  border-radius: 3px;
}
.dman-site-copyright {
  width: min(1180px, 100%);
  margin: 48px auto 0;
  padding: 22px 0 25px;
  border-top: 1px solid rgba(245, 238, 220, .20);
  color: rgba(245, 238, 220, .72);
  font-size: 13px;
  text-align: center;
}

.dman-jobs-wrap {
  --dman-green: #173f2d;
  --dman-green-2: #24553e;
  --dman-cream: #e3ddcc;
  --dman-paper: #f7f3e8;
  --dman-accent: #b75a36;
  --dman-text: #18342a;
  box-sizing: border-box;
  width: 100%;
  color: var(--dman-text);
  font-family: Tajawal, Arial, sans-serif;
  background:
    radial-gradient(circle at 8% 6%, rgba(183,90,54,.10) 0 90px, transparent 92px),
    radial-gradient(circle at 92% 15%, rgba(23,63,45,.08) 0 125px, transparent 127px),
    var(--dman-cream);
  padding: clamp(28px, 5vw, 70px) 18px;
  border-radius: 24px;
  overflow: hidden;
}

.dman-jobs-wrap *, .dman-jobs-wrap *::before, .dman-jobs-wrap *::after { box-sizing: border-box; }
.dman-jobs-page { background: var(--dman-cream, #e3ddcc); }
.dman-jobs-page .entry-title,
.dman-jobs-page .wp-block-post-title,
.dman-jobs-page .entry-header { display: none !important; }
.dman-jobs-page main { margin-top: 0 !important; padding-top: 0 !important; }
.dman-jobs-panel, .dman-jobs-listing, .dman-jobs-hub { max-width: 1180px; margin: 0 auto; }
.dman-jobs-panel { background: rgba(247,243,232,.96); border-radius: 22px; padding: clamp(22px, 5vw, 52px); box-shadow: 0 18px 50px rgba(23,63,45,.11); border: 1px solid rgba(23,63,45,.12); }
.dman-jobs-brand { display: flex; justify-content: center; align-items: center; margin: 0 auto 24px; }
.dman-jobs-brand img { display: block; width: min(390px, 82vw); height: auto; max-height: 150px; object-fit: contain; }
.dman-jobs-heading { max-width: 780px; margin: 0 auto 34px; text-align: center; }
.dman-jobs-kicker { display: inline-block; color: var(--dman-accent); font-weight: 700; margin-bottom: 9px; padding: 6px 13px; border: 1px solid rgba(183,90,54,.25); border-radius: 999px; background: rgba(255,255,255,.38); }
.dman-jobs-heading h1 { margin: 0 0 12px; color: var(--dman-green); font-family: "Noto Kufi Arabic", Tajawal, Arial, sans-serif; font-size: clamp(28px, 4vw, 46px); line-height: 1.45; }
.dman-jobs-heading p { margin: 0; font-size: 18px; line-height: 1.9; color: #52645d; }
.dman-jobs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dman-jobs-field { display: block; margin-bottom: 18px; }
.dman-jobs-field > span { display: block; margin-bottom: 8px; font-weight: 700; color: var(--dman-green); }
.dman-jobs-field input, .dman-jobs-field select, .dman-jobs-field textarea { width: 100%; border: 1px solid #bcb5a4; border-radius: 10px; background: #fffdf7; color: var(--dman-text); padding: 14px 15px; font: inherit; outline: none; transition: border-color .2s, box-shadow .2s; }
.dman-jobs-field input:focus, .dman-jobs-field select:focus, .dman-jobs-field textarea:focus { border-color: var(--dman-green-2); box-shadow: 0 0 0 3px rgba(36,85,62,.12); }
.dman-jobs-full { grid-column: 1 / -1; }
.dman-jobs-check { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0 22px; line-height: 1.8; color: #4d5e57; }
.dman-jobs-check input { margin-top: 7px; flex: 0 0 auto; }
.dman-jobs-submit, .dman-job-contact, .dman-jobs-hub-grid a { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 11px 24px; border: 0; border-radius: 8px; background: var(--dman-green); color: #fff !important; font: 700 17px/1.4 Tajawal, Arial, sans-serif; text-decoration: none !important; cursor: pointer; transition: transform .2s, background .2s; }
.dman-jobs-submit { width: 100%; }
.dman-jobs-submit:hover, .dman-job-contact:hover, .dman-jobs-hub-grid a:hover { background: var(--dman-green-2); transform: translateY(-1px); }
.dman-jobs-safety { text-align: center; color: #68766f; font-size: 14px; margin: 13px 0 0; }
.dman-jobs-private-note { margin: 0 0 22px; padding: 13px 16px; border-radius: 10px; background: rgba(23,63,45,.07); border-right: 4px solid var(--dman-green); color: #3c544a; line-height: 1.8; }
.dman-jobs-hp { position: absolute !important; left: -9999px !important; height: 0 !important; overflow: hidden !important; }
.dman-jobs-notice { border-radius: 9px; padding: 15px 17px; margin: 0 0 24px; font-weight: 700; }
.dman-jobs-notice.success { background: #e7f5ea; border: 1px solid #86b890; color: #1d6231; }
.dman-jobs-notice.error { background: #fff0ec; border: 1px solid #d88b75; color: #8e321d; }
.dman-jobs-cards { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.dman-job-card { background: var(--dman-paper); border: 1px solid rgba(23,63,45,.13); border-radius: 16px; padding: 22px; box-shadow: 0 10px 30px rgba(23,63,45,.07); display: flex; flex-direction: column; }
.dman-job-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 13px; }
.dman-job-type { background: rgba(183,90,54,.11); color: var(--dman-accent); padding: 5px 9px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.dman-job-ref { color: #7b837f; font-size: 12px; direction: ltr; }
.dman-job-card h2 { color: var(--dman-green); margin: 0 0 8px; font-family: "Noto Kufi Arabic", Tajawal, Arial, sans-serif; font-size: 20px; line-height: 1.6; }
.dman-job-place { color: var(--dman-accent); font-weight: 700; margin: 0 0 13px; }
.dman-job-desc, .dman-job-skills { line-height: 1.8; color: #4f6059; }
.dman-job-facts { border-top: 1px solid #d8d1c1; margin: auto 0 18px; padding-top: 13px; }
.dman-job-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.dman-job-facts dt { color: #6b756f; }
.dman-job-facts dd { margin: 0; font-weight: 700; color: var(--dman-green); text-align: left; }
.dman-job-contact { width: 100%; min-height: 44px; font-size: 15px; }
.dman-jobs-empty, .dman-jobs-disclaimer { max-width: 920px; margin: 20px auto 0; border-radius: 12px; padding: 18px; text-align: center; line-height: 1.8; }
.dman-jobs-empty { background: var(--dman-paper); border: 1px solid rgba(23,63,45,.13); }
.dman-jobs-disclaimer { background: rgba(183,90,54,.09); border: 1px solid rgba(183,90,54,.26); color: #70412e; }
.dman-jobs-hub-grid { max-width: 960px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.dman-jobs-hub-grid article { position: relative; overflow: hidden; background: rgba(247,243,232,.98); border-radius: 20px; padding: 34px; border: 1px solid rgba(23,63,45,.14); box-shadow: 0 16px 40px rgba(23,63,45,.10); transition: transform .25s, box-shadow .25s; }
.dman-jobs-hub-grid article::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 5px; background: var(--dman-accent); }
.dman-jobs-hub-grid article:hover { transform: translateY(-4px); box-shadow: 0 22px 50px rgba(23,63,45,.15); }
.dman-hub-icon { width: 58px; height: 58px; margin-bottom: 18px; display: grid; place-items: center; border-radius: 16px; background: var(--dman-green); color: #fff; font: 700 28px/1 Tajawal, Arial, sans-serif; }
.dman-hub-worker .dman-hub-icon { background: var(--dman-accent); font-size: 20px; }
.dman-jobs-hub-grid h2 { color: var(--dman-green); font-family: "Noto Kufi Arabic", Tajawal, Arial, sans-serif; margin: 0 0 10px; }
.dman-jobs-hub-grid p { color: #52645d; line-height: 1.8; min-height: 58px; }
.dman-jobs-hub-grid a { width: 100%; margin-top: 9px; }
.dman-jobs-hub-grid a.secondary { background: transparent; border: 1px solid var(--dman-green); color: var(--dman-green) !important; }
.dman-jobs-how { max-width: 840px; margin: 36px auto 0; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border: 1px solid rgba(23,63,45,.15); border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.35); }
.dman-jobs-how div { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 17px 12px; color: var(--dman-green); font-weight: 700; border-left: 1px solid rgba(23,63,45,.12); }
.dman-jobs-how div:last-child { border-left: 0; }
.dman-jobs-how b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--dman-accent); color: white; }

@media (max-width: 900px) {
  .dman-site-header-inner {
    grid-template-columns: 180px 1fr 54px;
    gap: 14px;
  }
  .dman-site-logo,
  .dman-site-logo img { width: 175px; }
  .dman-site-nav,
  .dman-member-button { display: none; }
  .dman-mobile-menu {
    position: relative;
    display: block;
    justify-self: end;
    direction: rtl;
  }
  .dman-mobile-menu summary {
    display: grid;
    place-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(23, 63, 45, .30);
    border-radius: 4px;
    cursor: pointer;
    list-style: none;
  }
  .dman-mobile-menu summary::-webkit-details-marker { display: none; }
  .dman-mobile-menu summary span {
    display: block;
    width: 22px;
    height: 2px;
    background: #173f2d;
  }
  .dman-mobile-menu > div {
    position: absolute;
    top: 55px;
    left: 0;
    width: min(290px, calc(100vw - 36px));
    padding: 10px;
    border: 1px solid rgba(23, 63, 45, .16);
    border-radius: 5px;
    background: #f4efe2;
    box-shadow: 0 16px 35px rgba(23, 63, 45, .18);
  }
  .dman-mobile-menu a {
    display: block;
    padding: 11px 12px;
    border-bottom: 1px solid rgba(23, 63, 45, .10);
    color: #173f2d !important;
    font-weight: 600;
    text-decoration: none !important;
  }
  .dman-mobile-menu a:last-child {
    margin-top: 7px;
    border: 0;
    background: #174f38;
    color: #fff !important;
    text-align: center;
  }
  .dman-site-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dman-jobs-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .dman-site-header,
  .dman-site-header-inner { min-height: 88px; }
  .dman-site-header-inner {
    width: calc(100% - 24px);
    grid-template-columns: minmax(0, 1fr) 48px;
  }
  .dman-site-logo { width: 165px; height: 88px; }
  .dman-site-logo img { width: 165px; height: 76px; }
  .dman-site-footer { padding: 46px 18px 0; }
  .dman-site-footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .dman-site-copyright { margin-top: 36px; }
  .dman-jobs-grid, .dman-jobs-cards, .dman-jobs-hub-grid, .dman-jobs-how { grid-template-columns: 1fr; }
  .dman-jobs-wrap { padding-left: 12px; padding-right: 12px; }
  .dman-jobs-panel { padding: 22px 16px; border-radius: 14px; }
  .dman-jobs-heading p { font-size: 16px; }
  .dman-jobs-hub-grid p { min-height: 0; }
  .dman-jobs-how div { border-left: 0; border-bottom: 1px solid rgba(23,63,45,.12); }
  .dman-jobs-how div:last-child { border-bottom: 0; }
}
