/*
 * volunteer-jobs.css -- CCSS Volunteer job board (vol-jobs.php).
 * Styles the [ccss_volunteer_jobs] listing (toolbar + search + cards) and the
 * single-job view's info block + Apply button. Everything is scoped under
 * .ccss-jobboard / .ccss-job-* so the theme is left untouched. Brand green
 * (#5a8f29) matches the application form.
 */

.ccss-jobboard {
  --cj-green: #5a8f29;
  --cj-green-d: #47741f;
  --cj-ink: #1f2937;
  --cj-mut: #6b7280;
  --cj-line: #e6e9ee;
  --cj-tint: #f2f7ea;
  --cj-radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--cj-ink);
  max-width: 1080px;
  margin: 0 auto;
  line-height: 1.5;
}
.ccss-jobboard *, .ccss-jobboard *::before, .ccss-jobboard *::after { box-sizing: border-box; }
.ccss-jobboard .ccss-ico { flex: 0 0 auto; }

/* ---- toolbar: search + category pills --------------------------------- */
.ccss-jobboard-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 14px;
}

/* Search is a progressive enhancement: hidden until JS marks the board. */
.ccss-jobsearch-wrap { display: none; }
.ccss-jobboard.ccss-js .ccss-jobsearch-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1 1 260px;
  min-width: 220px;
  max-width: 380px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--cj-line);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  transition: border-color .15s, box-shadow .15s;
}
.ccss-jobboard.ccss-js .ccss-jobsearch-wrap:focus-within {
  border-color: var(--cj-green);
  box-shadow: 0 0 0 3px rgba(90, 143, 41, .15);
}
.ccss-jobsearch-wrap .ccss-ico { color: var(--cj-mut); }
.ccss-jobsearch {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 11px 0;
  font-size: 14px;
  font-family: inherit;
  color: var(--cj-ink);
}
.ccss-jobsearch::-webkit-search-cancel-button { -webkit-appearance: none; }

.ccss-jobfilter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.ccss-jobfilter-btn {
  display: inline-block;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #41506a;
  background: #f1f3f6;
  border: 1px solid #e3e7ec;
  transition: background .15s, color .15s, border-color .15s;
}
.ccss-jobfilter-btn:hover { background: #e7ecf3; color: var(--cj-ink); }
.ccss-jobfilter-btn.on {
  background: var(--cj-green);
  border-color: var(--cj-green);
  color: #fff;
  box-shadow: 0 2px 8px rgba(90, 143, 41, .28);
}

.ccss-jobboard-count {
  font-size: 13px;
  color: var(--cj-mut);
  margin: 0 2px 16px;
}
.ccss-jobcount-n { font-weight: 700; color: var(--cj-ink); }

/* ---- card grid -------------------------------------------------------- */
.ccss-jobs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}

.ccss-job-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--cj-line);
  border-radius: var(--cj-radius);
  padding: 22px 22px 20px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
/* accent bar that grows in on hover */
.ccss-job-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--cj-green), #8cc63f);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.ccss-job-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -12px rgba(16, 24, 40, .22);
  border-color: #d7e2c6;
}
.ccss-job-card:hover::before { transform: scaleX(1); }

.ccss-job-card.ccss-job-closed { background: #fbfbfb; }
.ccss-job-card.ccss-job-closed .ccss-job-title a { color: #57606f; }

.ccss-job-cardhead { margin-bottom: 12px; }

/* badges */
.ccss-job-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.ccss-job-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.ccss-job-badge.type { background: #eaf3fb; color: #1f5e96; }
.ccss-job-badge.cat  { background: var(--cj-tint); color: var(--cj-green-d); }
.ccss-job-badge.closed { background: #fdecea; color: #922b21; }

.ccss-job-title { margin: 0 0 12px; font-size: 19px; line-height: 1.3; font-weight: 700; }
.ccss-job-title a { color: var(--cj-ink); text-decoration: none; }
.ccss-job-title a:hover { color: var(--cj-green); }

/* meta rows */
.ccss-job-meta { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 7px; }
.ccss-job-meta li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--cj-mut);
}
.ccss-job-meta .ccss-ico { color: var(--cj-green); }

.ccss-job-excerpt {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* actions */
.ccss-job-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.ccss-job-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 9px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.ccss-job-btn.ccss-job-apply {
  background: var(--cj-green);
  color: #fff;
  border: 1px solid var(--cj-green);
  box-shadow: 0 2px 10px rgba(90, 143, 41, .28);
}
.ccss-job-btn.ccss-job-apply::after { content: "\2192"; transition: transform .15s; }
.ccss-job-btn.ccss-job-apply:hover {
  background: var(--cj-green-d);
  border-color: var(--cj-green-d);
  color: #fff;
}
.ccss-job-btn.ccss-job-apply:hover::after { transform: translateX(3px); }
.ccss-job-btn.ccss-job-details {
  background: #fff;
  color: var(--cj-green-d);
  border: 1px solid #cfe0bb;
}
.ccss-job-btn.ccss-job-details:hover { background: var(--cj-tint); color: var(--cj-green-d); }

/* empty / no-results states */
.ccss-jobs-empty, .ccss-jobs-noresults {
  max-width: 640px;
  margin: 8px auto 0;
  padding: 20px 22px;
  background: #f9fafb;
  border: 1px dashed #d7dbe2;
  border-radius: var(--cj-radius);
  font-size: 15px;
  color: #4b5563;
  text-align: center;
}
.ccss-jobs-empty a { color: var(--cj-green); }
.ccss-jobsearch-clear {
  margin-left: 6px;
  background: none;
  border: 0;
  color: var(--cj-green);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .ccss-jobfilter { margin-left: 0; }
  .ccss-jobboard.ccss-js .ccss-jobsearch-wrap { max-width: none; }
  .ccss-job-actions { flex-direction: column; }
  .ccss-job-btn { justify-content: center; }
}

/* Single job pages borrow the theme's post layout; suppress its post meta
 * (published date / author) -- irrelevant for a job posting. */
.single-ccss_job .nv-meta-list,
.single-ccss_job .entry-meta,
.single-ccss_job .nv-meta-list li.meta.date { display: none !important; }

/* ---- single job view (injected via the_content) ---------------------- */
.ccss-job-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 4px 26px;
  background: var(--cj-tint, #f7faf2);
  border: 1px solid #e3eed3;
  border-radius: 14px;
  padding: 18px 22px;
  margin: 0 0 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.ccss-job-fact { display: flex; flex-direction: column; padding: 8px 0; font-size: 15px; color: #1f2937; }
.ccss-job-fact-l {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #6a7c92;
  margin-bottom: 3px;
}

.ccss-job-apply-wrap { margin: 22px 0; }
/* Reuse the listing button styling on the single view's Apply button. */
.ccss-job-apply-wrap .ccss-job-btn.ccss-job-apply,
.ccss-job-skills + * .ccss-job-btn.ccss-job-apply {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 9px;
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  background: #5a8f29;
  color: #fff;
  border: 1px solid #5a8f29;
  box-shadow: 0 3px 12px rgba(90, 143, 41, .3);
}
.ccss-job-apply-wrap .ccss-job-btn.ccss-job-apply::after { content: "\2192"; }
.ccss-job-apply-wrap .ccss-job-btn.ccss-job-apply:hover { background: #47741f; border-color: #47741f; }

.ccss-job-skills { margin-top: 22px; }
.ccss-job-skills h3 { font-size: 17px; margin: 0 0 8px; }

.ccss-job-contact { margin-top: 18px; font-size: 14px; color: #374151; }
.ccss-job-contact a { color: #5a8f29; }

.ccss-job-closed-note {
  margin: 22px 0;
  padding: 15px 20px;
  background: #fdecea;
  border: 1px solid #f5c6c2;
  border-radius: 14px;
  font-size: 15px;
  color: #922b21;
}
