/*-------------------------------------------------------------------
  Custom Job Board Styles
-------------------------------------------------------------------*/

/* CSS Variables */

:root {
  /* Primary = deep green */
  --cjb-primary:         #226c47;
  --cjb-primary-hover:   #1e553d;

  /* Secondary = black + white */
  --cjb-secondary:       #000000;
  --cjb-secondary-light: #ffffff;

  /* Accent = warm brown */
  --cjb-accent:          #8b5e3c;
  --cjb-accent-hover:    #6b4530;

  /* Text on accent pills */
  --cjb-text-light:      #ffffff;
  --cjb-text-dark:       #000000;

  /* Muted grey for footers, borders, etc. */
  --cjb-muted:           #555555;
  --cjb-border:          #cccccc;

  /* FILTERS */
  --cjb-filter-bg:       #ffffff;
  --cjb-filter-border:   #dddddd;
  --cjb-filter-text:     #000000;
  --cjb-filter-accent:   #226c47;
}



/*---------------------------------------------------
  Global Containers & Layout
---------------------------------------------------*/
#job-board {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

/* reset any rogue underlines inside the job board */
#job-board a {
  text-decoration: none;
  color: inherit;
}

/*---------------------------------------------------
  2) Make the entire card a link with hover border
---------------------------------------------------*/
#job-board .job-card {
  display: block;
  position: relative;            /* for overlay */
  border: 1px solid var(--cjb-border);
  border-radius: 1rem;           /* more rounded */
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: box-shadow .2s ease, border-color .2s ease;
}

#job-board .job-card:hover,
#job-board .job-card:focus {
  border-color: var(--cjb-primary);
  box-shadow: 0 0 0 3px var(--cjb-primary);  /* thick “ring” */
  cursor: pointer;
}

/* Invisible full-card link overlay for screen readers */
#job-board .card-link-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1;
  text-indent: -9999px;
  overflow: hidden;
}

/* Pull the real title above the overlay so it remains tabbable */
#job-board .job-title {
  position: relative;
  z-index: 2;
}

/*---------------------------------------------------
  3) Header: title on left, date on right
---------------------------------------------------*/
#job-board .job-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

#job-board .job-card-header .job-title {
  margin: 0;
  color: var(--cjb-primary);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  transition: text-decoration .2s;
}

#job-board .job-card-header .job-title:hover {
  text-decoration: underline;
}

#job-board .job-card-header .job-start-date {
  margin: 0;
  display: flex;
  align-items: center;
  color: var(--cjb-primary);
  font-size: .9em;
}

/* Perfectly center the calendar icon */
#job-board .job-card-header .cjb-icon-calendar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  margin-right: .25em;
  fill: currentColor;
}

/*---------------------------------------------------
  4) Salary & location row: flex inline icons
---------------------------------------------------*/
#job-board .job-details-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem 1rem;
  margin: 0;
}

#job-board .single-job-salary,
#job-board .single-job-location {
  display: flex;
  align-items: center;
  color: var(--cjb-primary);
  font-size: .95em;
}

/* Center money & pin icons */
#job-board .job-details-row .cjb-icon-money,
#job-board .job-details-row .cjb-icon-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  margin-right: .25em;
  fill: currentColor;
}

/*---------------------------------------------------
  5) Description in secondary colour
---------------------------------------------------*/
#job-board .job-desc {
  color: var(--cjb-secondary);
  font-size: 1rem;
  line-height: 1.6;
  padding: 0 1rem;
  margin-bottom: 1rem;
}

/*---------------------------------------------------
  6) Accent-coloured pills
---------------------------------------------------*/
#job-board .job-taxonomies {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 0 1rem 1rem;
}

#job-board .job-taxonomies .pill {
  background: var(--cjb-accent);
  color: var(--cjb-text-light);
  border-radius: 9999px;
  padding: .25rem .75rem;
  font-size: .75rem;
}

/*---------------------------------------------------
  7) Footer
---------------------------------------------------*/
#job-board .job-card-footer {
  padding: 0 1rem 1rem;
  font-size: .85rem;
  color: var(--cjb-muted);
}


/*---------------------------------------------------
  Pagination
---------------------------------------------------*/
.cjb-pagination {
  margin-top: 20px;
  text-align: center;
}

.cjb-pagination .cjb-page-btn {
  color: #000;
}
.cjb-pagination .cjb-page-btn.active {
  color: #fff;
  font-weight: 600; /* optional, to highlight current page */
}

.cjb-page-btn {
  background: #f0f0f0;
  border: 1px solid #ccc;
  padding: 6px 12px;
  margin: 0 4px;
  cursor: pointer;
  border-radius: 3px;
}
.cjb-page-btn:hover,
.cjb-page-btn.active {
  background: var(--wp--preset--color--primary, var(--cjb-accent));
  color: #fff;
  border-color: var(--wp--preset--color--primary, var(--cjb-accent));
  font-weight: bold;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
  .job-filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  #job-search-btn,
  select {
    width: 100%;
  }
}

/*---------------------------------------------------
  Single Team Member: Two-Column Layout
---------------------------------------------------*/
.team-member-page {
  padding: 2rem 0;
}

.member-columns {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .member-columns {
    flex-wrap: nowrap;
  }
}

.team-member-page > .member-columns {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ─── Left sidebar ─── */
.member-sidebar {
  flex: 0 0 300px;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--cjb-secondary-light);
  border: 1px solid var(--cjb-border);
  border-radius: .75rem;
  padding: 1.5rem;
}

.member-photo img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 2px solid var(--cjb-border);
}

.member-name {
  font-size: 1.75rem;
  margin-bottom: .5rem;
  color: var(--cjb-primary);
}

/* Personal Info box */
.member-section-title {
  width: 100%;
  text-align: left;
  margin-top: 1.5rem;
  margin-bottom: .5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cjb-text-dark);
}

.member-contact {
  width: 100%;
  background: #fff;
  border-radius: .5rem;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.member-contact p {
  margin: .5rem 0;
}
.member-contact a {
  color: var(--cjb-primary);
  text-decoration: none;
  font-weight: 500;
}
.member-contact a:hover {
  text-decoration: underline;
}

/* Active Jobs counter box */
.member-counter {
  width: 100%;
  background: #fff;
  border: 1px solid var(--cjb-border);
  border-radius: .5rem;
  padding: 1rem;
  margin-top: 1rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.member-counter .count {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--cjb-primary);
}

/* ─── Right main ─── */
.member-main {
  flex: 1 1 0;
  min-width: 300px;
}

.member-bio {
  margin-bottom: 2rem;
  line-height: 1.6;
  color: #374151;
}

/*───────────────────────────────────────────────────────────────────
  Latest Positions (on single team-member page)
────────────────────────────────────────────────────────────────────*/

/* 1) Section heading */
.jobs-by-member .jobs-heading {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* 2) Grid container */
.jobs-by-member .jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* 3) Each job card */
.jobs-by-member .job-card {
  background: #fff;
  border: 1px solid var(--cjb-border);
  border-radius: .75rem;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: box-shadow .2s ease, border-color .2s ease;
}
/* (if you still want a hover state) */
.jobs-by-member .job-card:hover {
  border-color: var(--cjb-primary);
  box-shadow: 0 0 0 2px var(--cjb-primary);
}

/* 4) Location label at top of card */
.jobs-by-member .job-location {
  font-size: .85rem;
  text-transform: uppercase;
  color: var(--cjb-secondary);
  margin-bottom: .5rem;
}

/* 5) Title link */
.jobs-by-member .job-title a {
  color: var(--cjb-primary);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
}
/* keep :hover underline */
.jobs-by-member .job-title a:hover {
  text-decoration: underline;
}
/* force visited to stay the same colour */
.jobs-by-member .job-title a:visited {
  color: var(--cjb-primary);
}

/* 6) Excerpt text */
.jobs-by-member .job-excerpt {
  color: #4b5563;
  margin: .75rem 0;
  line-height: 1.4;
}

/* 7) View Job button */
.jobs-by-member .job-button {
  display: inline-block;
  padding: .5rem 1rem;
  background: var(--cjb-accent);
  color: var(--cjb-text-light);
  border-radius: .5rem;
  text-decoration: none;
  font-weight: 600;
  transition: background .2s ease;
}
.jobs-by-member .job-button:hover {
  background: var(--cjb-accent-hover);
}

/* 8) “No recent positions” message */
.jobs-by-member .jobs-none {
  font-style: italic;
  color: #6b7280;
}



.member-linkedin a {
  position: relative;
  padding-left: 1.5em;           /* space for the icon */
  color: #0a66c2;
  text-decoration: none;
  font-weight: 600;
}
.member-linkedin a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1em;
  height: 1em;
  transform: translateY(-50%);
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 34 34"><title>LinkedIn</title><path fill="%230a66c2" d="M34,2.9C34,1.3,32.7,0,31.1,0H2.9C1.3,0,0,1.3,0,2.9v28.1C0,32.7,1.3,34,2.9,34h28.1c1.6,0,2.9-1.3,2.9-2.9 V2.9z M10.1,28H5.1V13.1h5V28z M7.6,11.1c-1.6,0-2.9-1.3-2.9-2.9s1.3-2.9,2.9-2.9c1.6,0,2.9,1.3,2.9,2.9S9.2,11.1,7.6,11.1z M28.9,28 H23.9v-7.6c0-1.8-0.6-3-2.2-3c-1.2,0-1.9,0.8-2.2,1.5c-0.1,0.2-0.1,0.5-0.1,0.8V28h-5c0,0,0.1-9.2,0-10.2h5v1.4 c0.7-1.1,1.9-2.6,4.6-2.6c3.4,0,6,2.2,6,7V28z"/></svg>') no-repeat center center;
  background-size: contain;
}
.member-linkedin a:hover {
  text-decoration: underline;
}


/*───────────────────────────────────────────────────────────────────
  Single Job Listing: Card & Layout
────────────────────────────────────────────────────────────────────*/

/* Section background & centering */
.job-listing-section {
  background: #f7fafc;
  padding: 2rem 0;
}
.job-listing-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Card */
.job-listing-card {
  background: #fff;
  border: 1px solid var(--cjb-secondary);
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: box-shadow .2s ease, border-color .2s ease;
}

/* Header flex: title left, recruiter right */
.job-header-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem;
}
.job-header-left {
  flex: 1;
}
.job-header-right {
  flex: 0 0 auto;
  margin-top: 0.5rem;
}

/* Title */
.job-header-left .job-title {
  margin: 0;
  color: var(--cjb-primary);
  font-size: 1.75rem;
  font-weight: 700;
}
@media (min-width: 640px) {
  .job-header-left .job-title {
    font-size: 1.875rem;
  }
}

/* Posted date below title */
.job-posted-date {
  font-size: .9em;
  color: var(--cjb-secondary);
  margin: .5rem 0 0;
}

/* Divider */
.job-divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 1.5rem 0;
}

/* Salary & start (2-column row) */
.job-details-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0 1.5rem;
}
.job-details-row > div {
  display: flex;
  align-items: center;
  font-size: .95em;
  color: var(--cjb-primary);
}
.job-details-row strong {
  margin-right: .25em;
  font-weight: 600;
}

/* Taxonomy pills */
.job-taxonomies {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 0 1.5rem;
  margin-bottom: 1.5rem;
}
.job-taxonomies .pill {
  background: var(--cjb-accent);
  color: var(--cjb-text-light);
  border-radius: 9999px;
  padding: .25rem .75rem;
  font-size: .75rem;
}

/* Content */
.job-content {
  padding: 0 1.5rem 1.5rem;
  line-height: 1.6;
  font-size: 1rem;
  color: #374151;
}

/* Application Form */
.application-container {
  background: #f9fafb;
  border: 1px solid #e2e8f0;
  border-radius: .5rem;
  padding: 1.5rem;
  margin: 0 1.5rem 1.5rem;
}

/* 2) Posted-by snippet (right column) */
.job-posted-by {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.job-posted-by .recruiter-avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--cjb-border);
}
.job-posted-by .recruiter-info {
  display: flex;
  flex-direction: column;
}
.job-posted-by .recruiter-label {
  font-size: .75em;
  color: var(--cjb-primary);
  text-transform: uppercase;
  margin: 0;
}
.job-posted-by .recruiter-name {
  font-size: 1em;
  font-weight: 600;
  margin: 0;
}

/*───────────────────────────────────────────────────────────────────
  Single Job Listing
────────────────────────────────────────────────────────────────────*/

/* 2) Posted-by line: avatar in a circle + inline text */
.job-posted-by {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.5rem;
  margin: 0.5rem 0 1rem;
}
/* make the avatar a bit larger */
.job-posted-by .recruiter-avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--cjb-border);
}

.job-posted-by .job-posted-date {
  font-size: 0.9em;
  color: var(--cjb-secondary);
}
.job-posted-by .recruiter-info {
  display: flex;
  flex-direction: column;
}
.job-posted-by .recruiter-label {
  font-size: 0.75em;
  color: var(--cjb-primary);
  text-transform: uppercase;
  margin: 0;
}
.job-posted-by .recruiter-name {
  font-size: 1em;
  font-weight: 600;
  margin: 0;
}


/* 3) Application form: labels on top, inputs full-width + rounded */
.application-container label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--cjb-text-dark);
}
.application-container input[type="text"],
.application-container input[type="email"],
.application-container input[type="file"],
.application-container textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--cjb-border);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  box-sizing: border-box;
  font-size: 1rem;
  color: var(--cjb-text-dark);
}
.application-container .application-submit {
  width: 100%;
  padding: 0.75rem;
  background: var(--cjb-accent);
  color: var(--cjb-text-light);
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}
.application-container .application-submit:hover {
  background: var(--cjb-accent-hover);
}


/* End of Custom Job Board Styles */

/*---------------------------------------------------
  Job Board: Sidebar Filter Styles (UPDATED)
---------------------------------------------------*/

/* 1) Lay out board as two columns */
#job-board {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
#job-board .job-filters {
  flex: 0 0 250px;
}
#job-board .job-main {
  flex: 1;
}

/* 2) Sidebar “Filters” title and each toggle */
#job-board .job-filters h3,
#job-board .job-filters .filter-toggle {
  color: var(--cjb-filter-text);
  background: var(--cjb-filter-bg);
  padding: 0.5rem;
  border-radius: 4px;
}

/*  Sidebar title + reset button inline  */
#job-board .job-filters h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 1rem;
  padding: 0.5rem;
  background: var(--cjb-filter-bg);
  border-radius: 4px;
  color: var(--cjb-filter-text);
  font-size: 1rem;
}

#job-board .job-filters h3 span {
  /* the “Filters” text */
  font-weight: 600;
}

#job-board .job-filters .filter-reset {
  background: transparent;
  border: none;
  color: var(--cjb-primary);
  font-size: 0.9em;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background 0.2s;
}

#job-board .job-filters .filter-reset:hover {
  background: var(--cjb-filter-accent);
  color: var(--cjb-text-light);
}


/* 3) Spacing tweak on the toggles */
#job-board .job-filters .filter-toggle {
  margin: 0.5rem 0;
  font-weight: 600;
  text-align: left;
  width: 100%;
  border: none;
  cursor: pointer;
  position: relative;
}
/* arrow indicator */
#job-board .job-filters .filter-toggle::after {
  content: '▾';
  position: absolute;
  right: 0.5rem;
  color: var(--cjb-filter-accent);
  transition: transform 0.2s ease;
}
/* rotate when open */
#job-board .job-filters .filter-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* 4) Separator between each group */
#job-board .job-filters .filter-group + hr {
  border: 0;
  border-top: 1px solid var(--cjb-filter-border);
  margin: 1rem 0;
}

/* 5) The hidden/shown options list */
#job-board .job-filters .filter-options {
  display: none;     /* JS toggles this */
  padding-left: 1rem;
  margin-top: 0.5rem;
}
#job-board .job-filters .filter-options label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--cjb-filter-text);
}
#job-board .job-filters .filter-options input[type="checkbox"] {
  margin-right: 0.5rem;
}
#job-board .job-filters .filter-options .count {
  font-size: 0.9em;
  color: var(--cjb-filter-accent);
  margin-left: 0.25em;
}

/* indent child terms */
#job-board .job-filters .filter-options .child-term {
  margin-left: 1.5rem;
  display: block;
  font-size: 0.95em;
}
#job-board .job-filters .filter-options .child-term::before {
  content: '–';
  display: inline-block;
  width: 1rem;
  color: var(--cjb-filter-border);
}

/* 6) Mobile: stack sidebar on top */
@media (max-width: 600px) {
  #job-board {
    flex-direction: column;
  }
  #job-board .job-filters {
    width: 100%;
    margin-bottom: 1.5rem;
  }
}

/*---------------------------------------------------
  Search Bar: full-width, rounded, with vertical spacing
---------------------------------------------------*/
#job-board .job-search-bar {
  display: flex;
  width: 100%;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

#job-board .job-search-bar input#job-search {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--cjb-filter-border);
  border-radius: 999px;
  font-size: 1rem;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

#job-board .job-search-bar button#job-search-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 999px;
  background: var(--cjb-filter-accent);
  color: var(--cjb-text-light);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

#job-board .job-search-bar button#job-search-btn:hover {
  background: var(--cjb-primary-hover);
}
/* jobcard display */

.job-card-body {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.job-card-body .job-desc {
  flex: 2;
}

.job-card-body .job-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* space between each term */
}

.job-card-body .job-meta p {
  margin: 0;
  font-size: 0.9em;
}

/*───────────────────────────────────────────────────────────────────
  Job Search Hero (Homepage Shortcode)
────────────────────────────────────────────────────────────────────*/
.job-search-hero {
  background: var(--cjb-secondary-light);
  padding: 1.5rem;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 800px;
  margin: 2rem auto;
}

.job-search-hero .search-row {
  display: flex;
  width: 100%;
  gap: 0.5rem;
  flex-wrap: wrap; /* wrap on narrow screens */
}

.job-search-hero .search-row input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--cjb-border);
  border-radius: 9999px;
  background: #fff;
  color: var(--cjb-text-dark);
  box-sizing: border-box;
  outline: none;
}

.job-search-hero .search-row button[type="submit"] {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  background: var(--cjb-primary);
  color: #fff;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background 0.2s ease;
}

.job-search-hero .search-row button[type="submit"]:hover {
  background: var(--cjb-primary-hover);
}

/* Job type checkboxes */
.job-search-hero .job-type-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.job-search-hero .job-type-filters label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  font-size: 1rem;
  color: var(--cjb-filter-text);
}

/* Use CSS accent-color where supported to tint the checkboxes */
.job-search-hero .job-type-filters input[type="checkbox"] {
  accent-color: var(--cjb-primary);
}

/*───────────────────────────────────────────────────────────────────
  Mobile Override (keep at bottom)
────────────────────────────────────────────────────────────────────*/
@media only screen and (max-width: 480px) {
  .job-search-hero .search-row {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }
  .job-search-hero .search-row input[type="text"],
  .job-search-hero .search-row button[type="submit"] {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }
  .job-search-hero .search-row button[type="submit"] {
    margin-top: 0.5rem !important;
  }
}
