/* =====================================================================
   refresh.css — additive visual refresh (loaded AFTER the original CSS).
   Keeps the existing markup/structure; modernises type, colour, spacing,
   header, buttons, job cards, footer. Safe to remove to revert.
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --brand:      #64a143;   /* existing green */
  --brand-dark: #4f8235;
  --ink:        #1f2933;
  --muted:      #6b7785;
  --bg:         #f5f7f6;
  --card:       #ffffff;
  --border:     #e4e8e6;
  --radius:     12px;
  --shadow:     0 1px 2px rgba(16,24,40,.05), 0 6px 20px rgba(16,24,40,.06);
  --shadow-lg:  0 10px 30px rgba(16,24,40,.10);
}

/* ---- base ---- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); transition: color .15s ease; }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { color: var(--ink); letter-spacing: -0.01em; }

/* ---- header (scoped to the SITE header only — not nested card <header>s) ---- */
body > header {
  position: sticky; top: 0; z-index: 50;
  background: #fff !important;
  box-shadow: 0 1px 0 var(--border), 0 2px 12px rgba(16,24,40,.04);
}
.header-row { align-items: center; }
.logo-title { color: var(--ink); font-weight: 700; }
.main-nav > ul > li > a {
  color: var(--ink) !important;
  font-weight: 500;
  border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}
.main-nav > ul > li > a:hover { color: var(--brand) !important; background: rgba(100,161,67,.08); }
.main-nav-drop { box-shadow: var(--shadow); border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.main-nav-drop li a:hover { background: rgba(100,161,67,.10); color: var(--brand) !important; }

/* ---- buttons (covers the various button classes in use) ---- */
.btn-hover, .simple-btn, .jr-btn, .browse-jobs-send, .browse-jobs-send-home,
.login-box .signup a, .nav-btn .create, .actions a {
  display: inline-block;
  background: var(--brand) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 10px !important;
  padding: 10px 18px !important;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16,24,40,.10);
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.btn-hover:hover, .simple-btn:hover, .jr-btn:hover, .browse-jobs-send:hover,
.browse-jobs-send-home:hover, .login-box .signup a:hover, .nav-btn .create:hover, .actions a:hover {
  background: var(--brand-dark) !important;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.login-box .login a { color: var(--ink) !important; font-weight: 600; }
.login-box .login a:hover { color: var(--brand) !important; }

/* ---- page scaffold ---- */
.page-content { max-width: 1180px; margin: 0 auto; padding: 28px 20px; }
.page-title h1 {
  font-size: 30px; font-weight: 700; margin-bottom: 6px;
  border-left: 4px solid var(--brand); padding-left: 14px;
}

/* ---- homepage: latest jobs + how-it-works ---- */
.find-job-title { font-size: 26px; font-weight: 700; margin: 8px 0 18px; }
.jobs-list { list-style: none; padding: 0; }
.jobs-list li { margin: 0 0 10px; }
.jobs-list li a {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
  transition: transform .1s ease, box-shadow .15s ease, border-color .15s ease;
}
.jobs-list li a:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.jobs-list .jr-title { color: var(--ink); font-weight: 600; }
.home-box { background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; box-shadow: var(--shadow); margin-bottom: 22px; }
.home-box h3 { font-size: 20px; margin-bottom: 14px; }

/* ---- job listings (browse / search) as cards ---- */
.browse-job-result > ul { list-style: none; padding: 0; display: grid; gap: 16px; }
.browse-job-result > ul > li {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  transition: transform .1s ease, box-shadow .15s ease, border-color .15s ease;
}
.browse-job-result > ul > li:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #d6ddd9; }
.jr-title { font-size: 19px; font-weight: 700; color: var(--ink); }
.browse-job-result a:hover .jr-title { color: var(--brand); }
.jr-content-block { color: var(--muted); margin: 8px 0 14px; }
.jr-data { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; list-style: none; padding: 0; }
.jr-data > li { display: inline-flex; gap: 6px; align-items: center; margin: 0 !important;
  background: #eef4ea; color: #3c5730; border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.jr-data-name { font-weight: 600; }
.jr-adr, .jr-date { color: var(--muted); font-size: 13px; }
.jr-logo img { max-width: 168px; height: auto; border-radius: 8px; }
/* give the (now larger) logo enough column width on signed-in cards */
.browse-job-result.signed-in .jr-logo { width: 20% !important; }
.browse-job-result.signed-in .jr-content { width: 60% !important; }

/* ---- pagination ---- */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 24px 0 0; list-style: none; flex-wrap: wrap; }
.pagination li { display: inline-block; }
.pagination li a, .pagination li span {
  display: inline-block; padding: 8px 13px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; color: var(--ink); text-decoration: none;
}
.pagination li.active span { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---- footer ---- */
footer { background: #11211a; color: #c7d3cc; margin-top: 40px; }
footer a { color: #aee08f; }
footer a:hover { color: #fff; }
.footer-title { color: #fff; }
.copyright { text-align: center; padding: 16px; color: #8aa195; font-size: 13px; }

/* ---- mobile nav (toggle injected by refresh.js) ---- */
.nav-toggle { display: none; }
@media (max-width: 880px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    background: var(--brand); color: #fff; border: 0; border-radius: 8px;
    padding: 9px 14px; font-weight: 600; font-size: 15px;
  }
  body > header .main-nav { display: none; width: 100%; }
  body > header.nav-open .main-nav { display: block; }
  body > header .main-nav > ul { display: block; }
  body > header .main-nav > ul > li { display: block; width: 100%; }
  .main-nav-drop { position: static !important; box-shadow: none; border: 0; }
  .browse-job-result > ul { grid-template-columns: 1fr; }
  .side-banners { display: none; }
}
@media (min-width: 881px) {
  .browse-job-result > ul { grid-template-columns: 1fr; }
}

/* =====================================================================
   Layout: make the fixed 1170px shell fluid so it adapts to any width
   ===================================================================== */
html, body { overflow-x: hidden; max-width: 100%; }
.header-row,
.page-content {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}
.find-job, .latest-jobs, .latest-content,
.find-job .find-job-form { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }
img { max-width: 100%; height: auto; }
/* ad-space side banners removed per request */
.side-banners { display: none !important; }

/* ---- #1: "Match from Spec" button on the Find Candidate page ---- */
.spec-match-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.spec-match-head h1 { margin: 0; }
.spec-match-btn { white-space: nowrap; }

/* ---- #3: Recent Vacancies grid of cards ---- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 6px 0 20px; }
.view-all-link { font-weight: 600; white-space: nowrap; }
.vacancy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.vacancy-card {
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 18px 16px; box-shadow: var(--shadow); text-decoration: none;
  transition: transform .1s ease, box-shadow .15s ease, border-color .15s ease;
}
.vacancy-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.vacancy-title { font-size: 17px; font-weight: 700; color: var(--ink); margin: 0 0 4px; line-height: 1.35; }
.vacancy-employer { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.vacancy-meta { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.vacancy-meta .vm { background: #f1f5ef; color: #3c5730; border-radius: 6px; padding: 3px 9px; font-size: 12.5px; }
.vacancy-cta { margin-top: 14px; color: var(--brand); font-weight: 600; font-size: 13.5px; }

/* ---- match-from-spec page ---- */
.spec-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); max-width: 860px; }
.spec-intro { color: var(--muted); margin-bottom: 10px; }
.spec-mode { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.spec-mode.on { background: #eef4ea; color: #3c5730; }
.spec-mode.off { background: #eef2f7; color: #445; }
.spec-label { display: block; font-weight: 600; margin-bottom: 6px; }
.spec-status { color: var(--brand-dark); font-size: 13px; margin-top: 8px; min-height: 18px; }
.spec-or { margin: 18px 0; color: var(--muted); }
.spec-textarea { width: 100%; border: 1px solid #d7ddda; border-radius: 10px; padding: 12px; font: inherit; resize: vertical; box-sizing: border-box; }

/* ---- #5: general neatening of form controls ---- */
.form-wrap select,
.form-wrap input[type="text"], .form-wrap input[type="email"],
.form-wrap input[type="number"], .form-wrap input[type="password"] {
  border-radius: 8px;
}

/* =====================================================================
   Homepage hero (brings the freight background image back) + fix the
   vacancy block that was floating over "How it works".
   ===================================================================== */
.home-hero {
  background-image: linear-gradient(rgba(15,30,22,.66), rgba(15,30,22,.66)), url('/images/slide2.png');
  background-size: cover;
  background-position: center;
  color: #fff;
}
.home-hero-inner { max-width: 1100px; margin: 0 auto; padding: 76px 20px; }
.home-hero-title { color: #fff; font-weight: 800; line-height: 1.08; letter-spacing: -0.02em;
  font-size: clamp(30px, 5vw, 52px); margin: 0 0 14px; }
.home-hero-sub { color: rgba(255,255,255,.92); max-width: 640px; margin: 0 0 26px;
  font-size: clamp(15px, 2vw, 19px); }
.home-hero-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.home-hero-link { color: #fff; font-weight: 600; }
.home-hero-link:hover { color: #fff; text-decoration: underline; }

/* the original theme absolutely-positioned .latest-content over the banner;
   force it back into normal flow now that the banner is a separate hero */
.latest-jobs { min-height: 0 !important; border-bottom: 0 !important; padding: 0 !important; }
.latest-jobs .latest-content {
  position: static !important; top: auto !important; left: auto !important; right: auto !important;
  transform: none !important; display: block !important;
  max-width: 1200px !important; margin: 0 auto !important; padding: 36px 20px !important;
}
.vacancy-section-title { font-size: 26px; font-weight: 700; margin: 0; color: var(--ink); }

/* ---- anonymous candidate reference on match results ---- */
.cand-ref { color: var(--muted); font-size: 12.5px; margin: 2px 0 6px; }

/* =====================================================================
   #3: filter ("search") bars on Browse Jobs / Browse Candidates — make
   the fields a tidy responsive row instead of fixed-width misalignment.
   ===================================================================== */
.browse-jobs .form-list,
.browse-candidates-filter .form-list {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin: 0;
}
.browse-jobs .form-list > li,
.browse-candidates-filter .form-list > li {
  float: none !important; margin: 0 !important; width: auto !important;
  flex: 1 1 190px; min-width: 170px; position: relative; list-style: none;
}
.browse-jobs .form-list .field-btn,
.browse-candidates-filter .form-list > li:last-child { flex: 0 0 auto; }
.browse-jobs .form-list .select-wrap,
.browse-candidates-filter .form-list .select-wrap,
.browse-jobs .form-list select,
.browse-candidates-filter .form-list select { width: 100% !important; box-sizing: border-box; }

/* ===== Browse Candidates: keyword search bar + button spacing ===== */
.browse-candidates-search .form-list { overflow: visible; }
.browse-candidates-search .form-list > li { display: flex; align-items: center; gap: 14px; margin-top: 18px; list-style: none; }
.browse-candidates-search .cand-search-input {
  flex: 1 1 auto; min-width: 0; border: 1px solid #d7ddda; border-radius: 10px;
  padding: 12px 16px; font: inherit; box-sizing: border-box;
}
.browse-candidates-search .cand-search-input + div { flex: 0 0 auto; }
.browse-candidates-search .form-list > li .cand-search-input { width: auto !important; float: none !important; }
.browse-candidates-search .form-list > li .cand-search-send {
  width: auto !important; float: none !important; height: auto !important;
  margin: 0 !important; white-space: nowrap; min-width: 130px; padding: 12px 26px !important; font-size: 15px;
}

/* ===== Browse Candidates: modern profile cards ===== */
.browse-candidates.search-result > ul {
  list-style: none; padding: 0; margin: 22px 0 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px;
}
.browse-candidates.search-result > ul > li {
  width: auto !important; float: none !important; margin: 0 !important;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: box-shadow .15s ease, transform .1s ease;
}
.browse-candidates.search-result > ul > li:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.browse-candidates.search-result > ul > li header {
  background: #f5f7f6 !important; position: static !important; box-shadow: none !important;
  border-bottom: 1px solid var(--border); padding: 12px 16px !important;
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
}
.browse-candidates.search-result > ul > li header a { color: var(--brand-dark) !important; font-weight: 600; font-size: 12px; }
.browse-candidates.search-result .cand-id {
  order: -1; color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.3;
}
.browse-candidates.search-result .box-list { border: 0 !important; padding: 14px 16px !important; flex: 1; }
.browse-candidates.search-result .box-list:after { display: none !important; }
.browse-candidates.search-result .box-list .box-param-name { color: var(--ink); }
.browse-candidates.search-result .box-list .box-param-value { color: var(--muted); }
.browse-candidates.search-result > ul > li footer { border-top: 1px solid var(--border); padding: 0; background: #fff; }
.browse-candidates.search-result > ul > li footer > ul { display: flex; margin: 0; padding: 0; list-style: none; }
.browse-candidates.search-result > ul > li footer > ul > li { flex: 1; border: 0 !important; margin: 0 !important; text-align: center; }
.browse-candidates.search-result > ul > li footer > ul > li + li { border-left: 1px solid var(--border) !important; }
.browse-candidates.search-result > ul > li footer a {
  display: block; padding: 12px 6px; color: var(--brand-dark) !important; font-weight: 600;
  font-size: 13.5px; background: #fff !important; border: 0 !important;
}
.browse-candidates.search-result > ul > li footer a:hover { background: #eef4ea !important; }
.browse-candidates.search-result > ul > li footer li.active a { background: var(--brand) !important; color: #fff !important; }

/* ===== My Vacancies: modern cards (and restore the hidden title) ===== */
.my-vacancies-form .form-list {
  overflow: visible !important; margin: 24px 0 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px;
}
.my-vacancies-form .form-list > li {
  width: auto !important; float: none !important; margin: 0 !important;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; min-height: 0;
}
.my-vacancies-form .box-list { flex: 1 1 auto; }
.my-vacancies-form .form-list > li header,
.my-vacancies-form .form-list > li.box-checked header {
  background: #fff !important; color: var(--ink) !important; position: static !important;
  box-shadow: none !important; border: 0 !important; padding: 16px 18px 8px !important; font-size: inherit !important;
}
.my-vacancies-form .form-list > li header label {
  color: var(--ink) !important; font-weight: 700; font-size: 16px; margin: 1px 0 0 10px !important;
}
.my-vacancies-form .form-list > li.box-checked header label::after {
  content: 'Live'; margin-left: 8px; font-size: 11px; font-weight: 700; color: var(--brand);
  background: #eef4ea; padding: 2px 8px; border-radius: 999px; vertical-align: middle;
}
.my-vacancies-form .box-list { border: 0 !important; padding: 4px 18px 14px !important; }
.my-vacancies-form .box-list:after { display: none !important; }
.my-vacancies-form .box-list > ul li { margin: 8px 0 0 !important; overflow: visible !important; }
.my-vacancies-form .box-list .box-param-name { color: var(--muted); }
.my-vacancies-form .box-list .box-param-value { color: var(--ink); }
.my-vacancies-form .form-list > li footer {
  flex: 0 0 auto;
  background: #fff !important; color: var(--ink) !important;
  border-top: 1px solid var(--border); padding: 10px 12px !important;
}
.my-vacancies-form .form-list > li footer .vac-actions {
  display: flex !important; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 6px; padding: 0 !important; text-align: center !important;
}
/* section headings + empty state on My Vacancies */
.vac-section-title { font-size: 18px; font-weight: 700; color: var(--ink); margin: 26px 0 14px; }
.my-vacancies-form .vac-section-title:first-child { margin-top: 8px; }
.vac-empty { color: var(--muted); margin: 0 0 8px; }

/* signup prompt in the login popup */
.login-signup-prompt { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.login-signup-prompt a { font-weight: 600; }

/* =====================================================================
   #1: round the select boxes in the green search panels (the white box
   behind the control was square-cornered)
   ===================================================================== */
.form-wrap .select-ico-wrap,
.form-wrap .select-ico-wrap .select-wrap { border-radius: 8px; }
.form-wrap .select-ico-wrap .select-wrap { overflow: hidden; }
.form-wrap .select-ico-wrap select { border-radius: 8px; }

/* =====================================================================
   #2: Browse Jobs — clamp the description to a uniform height so the
   Contract type / Salary row sits in the same position on every card
   ===================================================================== */
.browse-job-result .jr-content .jr-content-block {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.8em; margin: 12px 0 14px;
}

/* =====================================================================
   #3: Candidate dashboard — modernise the Suggested Jobs cards to match
   the rest of the site (were dark-headed / dated)
   ===================================================================== */
.suggested-jobs > ul > li,
.suggested-jobs .bx-viewport > ul > li {
  background: #fff !important; border: 1px solid var(--border) !important;
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
}
.suggested-jobs > ul > li header,
.suggested-jobs .bx-viewport > ul > li header {
  background: #fff !important; color: var(--ink) !important; border: 0 !important;
  padding: 16px 18px 4px !important; font-size: inherit !important;
}
.suggested-jobs > ul > li header strong,
.suggested-jobs .bx-viewport > ul > li header strong {
  color: var(--ink); font-size: 16px; font-weight: 700;
}
.suggested-jobs .box-list { border: 0 !important; padding: 6px 18px 12px !important; }
.suggested-jobs .box-list:after { display: none !important; }
.suggested-jobs .box-list .box-param-name { color: var(--muted); }
.suggested-jobs .box-list .box-param-value { color: var(--ink); }
.suggested-jobs > ul > li footer,
.suggested-jobs .bx-viewport > ul > li footer {
  background: #fff !important; border: 0 !important;
  border-top: 1px solid var(--border) !important; padding: 12px !important;
}
.suggested-jobs .sg-actions ul { display: flex !important; gap: 8px; overflow: visible !important; }
.suggested-jobs .sg-actions ul li { width: auto !important; flex: 1; float: none !important; margin: 0 !important; }
.suggested-jobs .sg-actions ul li a { border-radius: 8px !important; }
.my-vacancies-form .form-list > li footer .vac-actions li { display: inline-flex !important; margin: 0 !important; }
/* show the text labels (not just the icon font) so the buttons are always visible */
.my-vacancies-form .form-list > li footer .vac-actions li a {
  display: inline-flex !important; align-items: center; gap: 6px;
  font: 600 13px/1 'Inter', sans-serif !important; color: var(--brand-dark) !important;
  padding: 6px 10px; border-radius: 8px;
}
.my-vacancies-form .form-list > li footer .vac-actions li a > span { display: inline !important; }
.my-vacancies-form .form-list > li footer .vac-actions li a:before { display: none !important; }
.my-vacancies-form .form-list > li footer .vac-actions li a:hover { background: #eef4ea; }
.my-vacancies-form .form-list > li footer .vac-actions li.delete a { color: #b4453a !important; }
.my-vacancies-form .form-list > li footer .vac-actions li.delete a:hover { background: #fbeae8; }
