/* -----------------------------------------------------------------------------
   Base / reset
----------------------------------------------------------------------------- */
:root {
  /* Default tokens. Overridden per-theme by inline <style> emitted from
     getThemeCss() in inc/functions.php. */
  --accent: #e6006e;
  --accent-hover: #b8004e;
  --header-bg: #ffffff;
  --header-text: #0b0033;
  --header-text-muted: #5f5b75;
  --header-border: #ececf2;
  --hero-gradient: linear-gradient(135deg, #1a0f3d 0%, #2d1860 50%, #e6006e 140%);
  --hero-bg: var(--hero-gradient);
  --hero-heading: #ffffff;
  --hero-subheading: rgba(255,255,255,0.85);
  --hero-card-bg: #ffffff;
  --hero-card-text: #222;
  --footer-bg: #0b0033;
  --footer-text: #ffffff;
  --bg: #f9f9f9;
  --text: #222;
  --border: #e0e0e0;
}

* { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f4f8fb;
  color: var(--text);
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

a { color: var(--accent); }

/* -----------------------------------------------------------------------------
   Site header (top nav)
----------------------------------------------------------------------------- */
.site-header {
  background: var(--header-bg);
  color: var(--header-text);
  border-bottom: 1px solid var(--header-border);
}
.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.logo {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--header-text);
  text-decoration: none;
  white-space: nowrap;
}
.logo .accent { color: var(--accent); font-weight: 900; }
.top-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.top-nav a {
  color: var(--header-text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s;
}
.top-nav a:hover,
.top-nav a:focus {
  color: var(--accent);
}

/* -----------------------------------------------------------------------------
   Hero
----------------------------------------------------------------------------- */
.hero {
  background: var(--hero-bg);
  background-size: cover;
  background-position: center;
  color: var(--hero-heading);
  padding: 4rem 1.25rem 5.5rem 1.25rem;
  position: relative;
  text-align: center;
}
.hero-inner {
  max-width: 1000px;
  margin: 0 auto;
}
.hero-h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 0.6rem 0;
  color: var(--hero-heading);
}
.hero-h1 .hero-accent {
  color: var(--accent);
}
.hero-sub {
  margin: 0 0 2rem 0;
  font-size: 1.1rem;
  color: var(--hero-subheading);
}
.hero-search {
  max-width: 900px;
  margin: 0 auto;
}

/* -----------------------------------------------------------------------------
   Search box (embedded in hero or used standalone via .search-area)
----------------------------------------------------------------------------- */
.search-area {
  background: var(--accent);
  padding: 2.5rem 1.25rem 2rem 1.25rem;
}
.search-box-blue {
  background: var(--hero-card-bg);
  color: var(--hero-card-text);
  border-radius: 0.7rem;
  box-shadow: 0 6px 30px rgba(0,0,0,0.18);
  padding: 1rem;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  transition: max-height 0.4s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.search-box-blue input,
.search-box-blue select {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  font-size: 0.95rem;
  flex: 1 1 180px;
  background: var(--hero-card-bg);
  color: var(--hero-card-text);
  transition: border 0.2s, box-shadow 0.2s;
  min-width: 0;
}
.search-box-blue input::placeholder,
.search-box-blue select::placeholder {
  color: var(--header-text-muted);
  opacity: 0.85;
}
.search-box-blue input:focus,
.search-box-blue select:focus {
  border: 1.5px solid var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}
.search-box-blue button,
.btn-green {
  background: var(--accent);
  color: #fff;
  border-radius: 0.4rem;
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.2s;
}
.search-box-blue button:hover,
.btn-green:hover {
  background: var(--accent-hover);
  color: #fff;
}
.more-options-link {
  display: inline-block;
  color: var(--accent);
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: underline;
  margin: 0 0.5rem;
  flex: 0 0 auto;
}
.search-box-collapsed .advanced-fields { display: none; }
.search-box-expanded .advanced-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  flex-basis: 100%;
  margin-top: 0.5rem;
}
.more-search-options {
  color: var(--accent);
  background: var(--hero-card-bg);
  border: 2px solid var(--accent);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.4rem;
  padding: 0.6rem 1.4rem;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s, color 0.2s;
}
.more-search-options:hover {
  background: var(--accent);
  color: #fff;
}

/* -----------------------------------------------------------------------------
   Sub-page nav (towns / roles) — sits between hero and category-nav
----------------------------------------------------------------------------- */
.subpage-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  text-align: center;
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem 0.5rem;
}
.subpage-nav-label {
  font-weight: 600;
  color: #444;
  margin-right: 0.4rem;
}
.subpage-nav a {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: #f4f6fa;
  border: 1px solid #e6e9ef;
  border-radius: 999px;
  color: #444;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.subpage-nav a:hover,
.subpage-nav a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.subpage-blurb {
  max-width: 760px;
  margin: 0 0 1.5rem 0;
  font-size: 1.02rem;
  line-height: 1.6;
  color: #333;
}
.subpage-blurb p { margin: 0 0 0.8rem 0; }

.subpage-faqs {
  max-width: 760px;
  margin: 2.5rem 0 1rem 0;
}
.subpage-faqs .section-title { margin-bottom: 1rem; }
.subpage-faqs .faq-item {
  margin: 0 0 1.25rem 0;
  padding: 0 0 1rem 0;
  border-bottom: 1px solid var(--border);
}
.subpage-faqs .faq-item:last-child { border-bottom: none; }
.subpage-faqs .faq-item h3 {
  margin: 0 0 0.4rem 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0b0033;
}
.subpage-faqs .faq-item p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

/* /category/ index list */
.category-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.category-grid li a {
  display: block;
  background: #fff;
  border: 1px solid #e6e9ef;
  border-radius: 0.6rem;
  padding: 1rem 1.1rem;
  color: #0b0033;
  text-decoration: none;
  font-weight: 600;
  transition: border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
.category-grid li a:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

/* -----------------------------------------------------------------------------
   Category nav (pills)
----------------------------------------------------------------------------- */
.category-nav {
  padding: 0.75rem 1.25rem;
  overflow-x: auto;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  background: #fff;
  text-align: center;
}
.category-nav a {
  display: inline-block;
  padding: 0.45rem 1rem;
  margin: 0.2rem 0.25rem;
  background: #f4f6fa;
  border: 1px solid #e6e9ef;
  border-radius: 999px;
  font-size: 0.9rem;
  color: #444;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.category-nav a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.category-nav a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}

/* -----------------------------------------------------------------------------
   Main content layout (2-column with sidebar)
----------------------------------------------------------------------------- */
.main-content {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  margin: 2rem auto 0 auto;
  padding: 0 1.25rem;
}
.main-col { flex: 2; min-width: 0; }
.sidebar {
  flex: 1;
  max-width: 360px;
}
.main-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
}
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  letter-spacing: -0.2px;
}
.count-pill {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.18rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--accent);
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 999px;
  vertical-align: middle;
}

/* -----------------------------------------------------------------------------
   Job listing cards
----------------------------------------------------------------------------- */
.job-listing {
  background: #fff;
  border: 1px solid #e6e9ef;
  border-radius: 0.7rem;
  margin: 0 0 1rem 0;
  display: flex;
  gap: 1rem;
  padding: 1.1rem;
  align-items: flex-start;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  flex-wrap: wrap;
}
.job-logo img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 0.4rem;
  background: #f3f3f3;
}
.job-info { flex: 1; min-width: 0; }
.job-info h3 {
  margin: 0 0 0.3rem 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.job-info h3 a,
.popular-searches a,
.latest-jobs a,
.popular-jobs a {
  color: #0b0033;
  text-decoration: none;
}
.job-info h3 a:hover,
.popular-searches a:hover,
.popular-jobs a:hover { color: var(--accent); }
.job-meta {
  color: #555;
  font-size: 0.92rem;
  margin-bottom: 0.25rem;
}
.job-date {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}
.read-more {
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
  background: none;
  border: none;
  font-size: 1em;
  padding: 0;
}
.salary-chip {
  display: inline-block;
  background: rgba(0,0,0,0.04);
  color: var(--accent);
  border: 1px solid rgba(0,0,0,0.06);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

/* Job actions */
.job-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.apply-now-btn,
.more-btn,
.job-actions a,
.job-actions a.more-btn,
.job-actions .apply-now-btn {
  display: inline-block;
  min-width: 110px;
  max-width: 200px;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 0.4rem;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.apply-now-btn { background: var(--accent); color: #fff !important; }
.apply-now-btn:hover { background: var(--accent-hover); color: #fff !important; }
.more-btn { background: #1f2937; color: #fff !important; }
.more-btn:hover { background: #374151; color: #fff !important; }
.job-actions a.btn-green {
  background: #2ecc40;
  color: #fff;
  text-decoration: none;
}
.job-actions a.btn-green:hover { background: #229c2b; }

/* -----------------------------------------------------------------------------
   Sidebar (alerts card + popular lists)
----------------------------------------------------------------------------- */
.sidebar > * + * { margin-top: 1.5rem; }
.alerts-card {
  background: var(--accent);
  color: #fff;
  border-radius: 0.7rem;
  padding: 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.alerts-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 700;
}
.alerts-card p {
  margin: 0 0 1rem 0;
  font-size: 0.95rem;
  opacity: 0.95;
}
.alerts-card .alerts-btn {
  display: inline-block;
  background: #fff;
  color: var(--accent);
  padding: 0.55rem 1.1rem;
  border-radius: 0.4rem;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}
.alerts-card .alerts-btn:hover { background: #f3f3f3; }

.sidebar-card {
  background: #fff;
  border: 1px solid #e6e9ef;
  border-radius: 0.7rem;
  padding: 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.popular-jobs { list-style: none; padding: 0; margin: 0; }
.popular-jobs > li {
  padding: 0.7rem 0;
  border-bottom: 1px solid #f0f1f4;
}
.popular-jobs > li:last-child { border-bottom: none; }
.popular-jobs a { font-weight: 600; }
.popular-searches { list-style: none; padding: 0; margin: 0; }
.popular-searches li { padding: 0.4rem 0; }
.popular-searches a:hover { color: var(--accent); }

/* -----------------------------------------------------------------------------
   Footer
----------------------------------------------------------------------------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  margin-top: 4rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.25rem 1.5rem 1.25rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-col h4 {
  margin: 0 0 0.85rem 0;
  font-size: 1rem;
  font-weight: 700;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li { padding: 0.25rem 0; font-size: 0.95rem; }
.footer-col a,
.site-footer a {
  color: var(--footer-text);
  text-decoration: none;
  opacity: 0.85;
}
.footer-col a:hover,
.site-footer a:hover {
  opacity: 1;
  text-decoration: underline;
}
.footer-brand p {
  margin: 0.5rem 0 1rem 0;
  font-size: 0.95rem;
  opacity: 0.85;
  line-height: 1.55;
}
.footer-logo {
  font-size: 1.4rem;
  color: var(--footer-text);
}
.footer-social a { font-size: 0.95rem; }
.footer-meta {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.85rem;
  opacity: 0.75;
  text-align: center;
}

/* Legacy .footer class — keep so any unmigrated page still renders. */
.footer {
  text-align: center;
  color: var(--footer-text);
  background: var(--footer-bg);
  padding: 2rem 0 1rem 0;
  margin-top: 3rem;
  font-size: 1.05rem;
}
.footer a {
  color: var(--footer-text);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.5);
}
.footer a:hover { text-decoration-color: #fff; }

/* -----------------------------------------------------------------------------
   Job detail page
----------------------------------------------------------------------------- */
.job-detail-main {
  max-width: 900px;
  margin: 2rem auto 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.job-detail-header {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
.job-detail-logo img {
  max-width: 100px;
  max-height: 100px;
  border-radius: 0.4rem;
  background: #f3f3f3;
}
.job-detail-info { flex: 1; }
.job-detail-info h1 {
  margin: 0 0 0.5rem 0;
  font-size: 1.7rem;
  font-weight: 800;
}
.job-detail-meta { color: #555; font-size: 1.02rem; margin-bottom: 0.4rem; }
.job-detail-date { color: #888; font-size: 0.95rem; }
.job-detail-actions {
  margin: 1.2rem 0 1rem 0;
  display: flex;
  gap: 1rem;
}
.job-detail-actions a {
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.5rem;
  border-radius: 0.4rem;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  transition: background 0.2s;
}
.job-detail-actions a.back { background: #1f2937; }
.job-detail-actions a:hover { background: var(--accent-hover); }
.job-detail-desc {
  margin: 2rem 0;
  font-size: 1.05rem;
  line-height: 1.7;
}
.related-jobs { margin-top: 2.5rem; }
.related-jobs h2 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
}

/* -----------------------------------------------------------------------------
   Static trust pages (page-template.php)
----------------------------------------------------------------------------- */
.page-wrap {
  max-width: 760px;
  margin: 2rem auto;
  padding: 0 1.25rem;
  line-height: 1.6;
}
.page-wrap h1 { margin-top: 0; }
.page-wrap h2 { margin-top: 2rem; }

/* -----------------------------------------------------------------------------
   Pagination
----------------------------------------------------------------------------- */
.pagination {
  display: flex;
  gap: 0.5em;
  justify-content: center;
  margin: 2em 0;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  padding: 0.5em 1em;
  border-radius: 0.3em;
  text-decoration: none;
  background: #f3f3f3;
  color: #222;
}
.pagination .current {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.pagination a:hover { background: #e0e0e0; }

/* -----------------------------------------------------------------------------
   Legacy header block (used on /apply and any unmigrated views)
----------------------------------------------------------------------------- */
.header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 1.5rem 0 1rem 0;
  text-align: center;
  border-bottom: 1px solid var(--header-border);
}
.header .logo { font-size: 2rem; margin-bottom: 0.2em; }

/* -----------------------------------------------------------------------------
   Responsive
----------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .main-content { flex-direction: column; gap: 0; }
  .sidebar { max-width: 100%; margin-top: 2rem; }
  .top-nav ul { gap: 1rem; }
}

@media (max-width: 700px) {
  .hero { padding: 3rem 1rem 4rem 1rem; }
  .hero-h1 { font-size: 1.9rem; }
  .hero-sub { font-size: 1rem; }
  .search-box-blue {
    flex-direction: column;
    align-items: stretch;
    padding: 0.8rem;
  }
  .search-box-blue input,
  .search-box-blue select,
  .search-box-blue button,
  .more-search-options {
    width: 100%;
    flex: 1 1 auto;
  }
  .search-box-blue .more-options-link { display: none; }
  .search-box-expanded .advanced-fields { flex-direction: column; gap: 0.5rem; }
  .site-header-inner { padding: 0.75rem 1rem; }
  .logo { font-size: 1.4rem; }
  .top-nav ul { gap: 0.8rem; }
  .top-nav a { font-size: 0.85rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; padding: 2rem 1.25rem 1rem 1.25rem; }
  .job-listing {
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem;
  }
  .job-logo img { width: 56px; height: 56px; }
  .job-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  .apply-now-btn,
  .more-btn,
  .job-actions a {
    width: 100%;
    max-width: none;
  }
  .job-detail-header { flex-direction: column; gap: 1rem; }
  .job-detail-main { padding: 1.2rem; }
  .main-content { padding: 0 1rem; }
}
