/* Colours and header measurements follow www.masmedicalstaffing.com. Text colours are darkened
   where the brand green on white falls below WCAG AA contrast. */
:root {
  --nav-bg: #303235;
  --nav-hover: #9fcf5d;
  --green: #8dc63f;
  --green-soft: #eef6e3;
  --green-text: #3f6b12;
  --green-button: #4a7c16;
  --green-button-hover: #3a6311;
  --teal: #073b3a;
  --teal-soft: #e3eeee;
  --text: #25272a;
  --muted: #555960;
  --line: #dcdfe3;
  --field-line: #b9bec4;
  --page-bg: #f6f6f6;
  --card-bg: #fff;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.06);
  --header-h: 80px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green-text); }
a:hover { color: var(--teal); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

img { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: #fff; color: var(--text); padding: 10px 16px; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--header-h); padding: 0 28px;
}
.site-header__logo img { display: block; height: 50px; width: auto; }

.menu { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.menu__item { position: relative; display: flex; align-items: center; }
.menu__link {
  display: block; padding: 28px 12px;
  color: #fff; text-decoration: none; text-transform: uppercase;
  font-size: 15px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap;
  cursor: default;
}
a.menu__link { cursor: pointer; }
.menu__link:hover, .menu__item:hover > .menu__link, .menu__link[aria-current] { color: var(--nav-hover); }
.menu__item--has-sub > .menu__link { padding-right: 2px; }

.menu__toggle {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 40px; margin-right: 6px; padding: 0;
  background: none; border: 0; color: #fff; cursor: pointer;
}
.menu__item:hover > .menu__toggle { color: var(--nav-hover); }
.caret {
  width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid currentColor;
  transition: transform 0.15s;
}
.menu__toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }

.submenu {
  position: absolute; top: calc(100% - 12px); left: 0; z-index: 10;
  min-width: 240px; margin: 0; padding: 8px 0; list-style: none;
  background: #fff; border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.menu__item:last-child .submenu { left: auto; right: 0; }
.menu__item--has-sub:hover > .submenu,
.menu__item--has-sub:focus-within > .submenu,
.menu__item.is-open > .submenu { opacity: 1; visibility: visible; transform: none; }
.submenu a {
  display: block; padding: 9px 22px;
  color: var(--text); text-decoration: none; font-size: 15px; line-height: 1.4;
}
.submenu a:hover, .submenu a:focus-visible { background: var(--green-soft); color: var(--green-text); }

.menu-button {
  display: none; align-items: center; gap: 10px;
  padding: 10px 14px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 6px;
  background: none; color: #fff; font: inherit; font-weight: 600; text-transform: uppercase; cursor: pointer;
}
.menu-button__bars, .menu-button__bars::before, .menu-button__bars::after {
  display: block; width: 20px; height: 2px; background: currentColor; content: ''; position: relative;
}
.menu-button__bars::before { position: absolute; top: -6px; }
.menu-button__bars::after { position: absolute; top: 6px; }

@media (max-width: 1179px) {
  .site-header__inner { flex-wrap: wrap; padding: 0 20px; }
  .menu-button { display: inline-flex; }
  .site-nav { display: none; width: 100%; padding-bottom: 12px; }
  .site-header.is-open .site-nav { display: block; }
  .menu { flex-direction: column; align-items: stretch; }
  .menu__item { flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, 0.1); }
  .menu__link { flex: 1; padding: 14px 4px; font-size: 16px; }
  .menu__toggle { width: 48px; height: 48px; margin: 0; }
  .submenu {
    position: static; display: none; width: 100%; min-width: 0; padding: 0 0 8px;
    background: none; box-shadow: none; opacity: 1; visibility: visible; transform: none; transition: none;
  }
  .menu__item--has-sub:hover > .submenu, .menu__item--has-sub:focus-within > .submenu { display: none; }
  .menu__item.is-open > .submenu { display: block; }
  .submenu a { color: #e6e7e8; padding: 10px 16px; font-size: 16px; }
  .submenu a:hover, .submenu a:focus-visible { background: rgba(255, 255, 255, 0.06); color: var(--nav-hover); }
}

/* ---------- Banner ---------- */

.banner {
  color: #fff;
  background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), var(--nav-bg) var(--banner-image, none) center 30% / cover no-repeat;
  padding: 64px 0 56px;
  text-align: center;
}
.banner__title { margin: 0; font-size: 40px; line-height: 1.2; font-weight: 600; }
.banner__lead { margin: 12px 0 0; font-size: 18px; color: #eef0f1; }

.banner--job { text-align: left; padding: 40px 0 36px; }
.banner--job .banner__title { font-size: 34px; }
.banner__back { margin: 0 0 12px; font-size: 15px; }
.banner__back a { color: #fff; text-decoration: none; opacity: 0.9; }
.banner__back a:hover { color: var(--nav-hover); opacity: 1; }
.banner__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 14px 0 0; font-size: 18px; }

@media (max-width: 700px) {
  .banner { padding: 40px 0 36px; }
  .banner__title { font-size: 30px; }
  .banner--job .banner__title { font-size: 26px; }
  .banner__lead { font-size: 16px; }
}

/* ---------- Shared pieces ---------- */

.page { padding: 40px 0 72px; }
.narrow { max-width: 720px; }
.lead { font-size: 18px; }

.button {
  display: inline-block; padding: 12px 26px;
  background: var(--green-button); color: #fff; border: 0; border-radius: 6px;
  font: inherit; font-size: 16px; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--green-button-hover); color: #fff; }
.button--block { display: block; width: 100%; padding: 15px 24px; font-size: 18px; }

.tag {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-text);
  font-size: 14px; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
.tag--travel, .tag--allied { background: var(--teal-soft); color: var(--teal); }
.banner .tag { background: var(--green); color: #1d2a0c; }

/* ---------- Job list ---------- */

.search-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 32px; align-items: start; }

.filters-panel { position: sticky; top: calc(var(--header-h) + 24px); }
.filters {
  background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.filters__heading { margin: 0 0 16px; font-size: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 600; }
.field input, .field select {
  width: 100%; padding: 11px 12px;
  font: inherit; font-size: 16px; color: var(--text);
  background: #fff; border: 1px solid var(--field-line); border-radius: 6px;
}
.field input:focus, .field select:focus { border-color: var(--green-button); outline: 3px solid rgba(141, 198, 63, 0.35); outline-offset: 0; }
.filters__actions { display: grid; gap: 10px; }
.filters__actions .button { width: 100%; }
.js .filters__submit { display: none; }
.js .field:last-of-type { margin-bottom: 0; }
.js .filters__clear:not([hidden]) { margin-top: 18px; }
.filters__clear[hidden] { display: none; }

.button--secondary { background: #fff; color: var(--green-text); border: 2px solid var(--green-button); padding: 10px 24px; }
.button--secondary:hover { background: var(--green-soft); color: var(--green-text); }

.results__bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.results__count { margin: 0; font-size: 17px; font-weight: 600; }
.results__clear { font-size: 16px; font-weight: 600; }
.results[aria-busy="true"] .job-list { opacity: 0.55; transition: opacity 0.1s; }

.job-list { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.job-card {
  position: relative;
  background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 26px; box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.job-card:hover { border-color: var(--green); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1); }
.job-card__title { margin: 0 0 10px; font-size: 20px; line-height: 1.35; }
.job-card__title a { color: var(--green-text); text-decoration: none; }
/* The whole card is the link target; the title stays the accessible name. */
.job-card__title a::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); }
.job-card__title a:hover { text-decoration: underline; }
.job-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; font-size: 16px; }
.job-card__pay { margin: 10px 0 0; font-size: 17px; font-weight: 700; }
.job-card__posted { margin: 6px 0 0; font-size: 15px; color: var(--muted); }

.empty { background: var(--card-bg); border: 1px dashed var(--field-line); border-radius: var(--radius); padding: 32px; text-align: center; }
.empty__title { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.empty p:last-child { margin: 0; }

@media (max-width: 900px) {
  .search-layout { grid-template-columns: 1fr; gap: 24px; }
  .filters-panel { position: static; }
  .filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; padding: 20px; }
  .filters__heading, .filters__actions { grid-column: 1 / -1; }
  .js .field:last-of-type { margin-bottom: 18px; }
}
@media (max-width: 700px) {
  .filters { grid-template-columns: 1fr 1fr; gap: 0 12px; padding: 16px; }
  .filters__heading { margin-bottom: 10px; font-size: 17px; }
  .field { margin-bottom: 12px; }
  .field:first-of-type, .field:last-of-type { grid-column: 1 / -1; }
  .js .field:last-of-type { margin-bottom: 0; }
  .field label { font-size: 14px; margin-bottom: 4px; }
  .field input, .field select { padding: 10px; }
  .wrap { padding: 0 16px; }
  .page { padding: 24px 0 56px; }
  .job-card { padding: 18px 20px; }
  .job-card__title { font-size: 19px; }
}

/* ---------- Job page ---------- */

.job-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start;
  grid-template-areas: "body summary" "again summary";
}
.job { grid-area: body; }
.job-summary { grid-area: summary; position: sticky; top: calc(var(--header-h) + 24px); }
.job__apply-again { grid-area: again; max-width: 320px; }

.job__body {
  background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 36px; box-shadow: var(--shadow);
  font-size: 17px; line-height: 1.7; overflow-wrap: anywhere;
}
.job__body > :first-child { margin-top: 0; }
.job__body > :last-child { margin-bottom: 0; }
.job__body p { margin: 0 0 1em; }
.job__body ul, .job__body ol { margin: 0 0 1em; padding-left: 1.4em; }
.job__body li { margin-bottom: 0.35em; }
.job__body h2, .job__body h3, .job__body h4 { margin: 1.4em 0 0.5em; line-height: 1.3; color: var(--teal); }
.job__body h2 { font-size: 22px; }
.job__body h3, .job__body h4 { font-size: 19px; }

.job-summary__card {
  background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.job-summary__pay { margin: 0 0 16px; font-size: 22px; font-weight: 700; line-height: 1.3; }
.job-summary__facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; margin: 22px 0 0; font-size: 15px; }
.job-summary__facts dt { font-weight: 700; color: var(--muted); }
.job-summary__facts dd { margin: 0; }

@media (max-width: 900px) {
  .job-layout { grid-template-columns: 1fr; grid-template-areas: "summary" "body" "again"; gap: 20px; }
  .job-summary { position: static; }
  .job__apply-again { max-width: none; }
  .job__body { padding: 24px 22px; }
}

/* ---------- Footer ---------- */

.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 40px 0 44px; }
.site-footer__inner { display: flex; gap: 28px; align-items: flex-start; }
.site-footer__mark { flex: none; width: 60px; height: auto; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.footer-nav a {
  color: var(--green-text); text-decoration: none; text-transform: uppercase;
  font-size: 15px; font-weight: 700; letter-spacing: 0.03em;
}
.footer-nav a:hover { color: var(--teal); }
.social { display: flex; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.social a {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--nav-bg); color: #fff;
}
.social a:hover { background: var(--green-button); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.site-footer__legal { margin: 18px 0 0; font-size: 15px; color: var(--muted); }

@media (max-width: 700px) {
  .site-footer__inner { flex-direction: column; gap: 18px; }
}
