/*
Theme Name: Jobs Hub
Theme URI: https://jobshub.co.za/
Author: Jobs Hub
Description: Simple South African job board. JH brand colours. Light and dark mode.
Version: 2.3.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: jobshub
*/

/* Dark (default) — colours from JH monogram: navy + gold */
:root,
[data-theme="dark"] {
  --jh-bg: #0c1118;
  --jh-bg-soft: #141b24;
  --jh-panel: #182230;
  --jh-panel-2: #1f2a3a;
  --jh-border: rgba(255, 255, 255, 0.12);
  --jh-text: #f2f5f8;
  --jh-muted: #b4bfcc;
  --jh-navy: #0a4a8a;
  --jh-navy-bright: #1a6bb8;
  --jh-amber: #ffc107;
  --jh-amber-deep: #e6a800;
  --jh-cta: #ff6a1a;
  --jh-cta-text: #ffffff;
  --jh-link: #ffc107;
  --jh-header-bg: rgba(12, 17, 24, 0.94);
  --jh-shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
  --jh-search-bg: #182230;
  --jh-input-bg: #1f2a3a;
  --jh-glow: rgba(255, 193, 7, 0.1);
  --jh-radius: 8px;
  --jh-radius-lg: 12px;
  --jh-font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --jh-font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

/* Light — cool paper, not cream */
[data-theme="light"] {
  --jh-bg: #f3f5f8;
  --jh-bg-soft: #e8ecf2;
  --jh-panel: #ffffff;
  --jh-panel-2: #eef1f5;
  --jh-border: rgba(15, 20, 25, 0.12);
  --jh-text: #15202b;
  --jh-muted: #5c6b7a;
  --jh-navy: #003d78;
  --jh-navy-bright: #003d78;
  --jh-amber: #b86a00;
  --jh-amber-deep: #944f00;
  --jh-cta: #e85a18;
  --jh-cta-text: #ffffff;
  --jh-link: #1e3a8a;
  --jh-header-bg: rgba(243, 245, 248, 0.94);
  --jh-shadow: 0 10px 28px rgba(21, 32, 43, 0.08);
  --jh-search-bg: #ffffff;
  --jh-input-bg: #eef1f5;
  --jh-glow: rgba(30, 58, 138, 0.07);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--jh-font-body);
  color: var(--jh-text);
  background:
    radial-gradient(ellipse 55% 40% at 100% 0%, var(--jh-glow), transparent 60%),
    var(--jh-bg);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.25s ease, color 0.25s ease;
}

a {
  color: var(--jh-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--jh-amber-deep);
}

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

h1, h2, h3 {
  font-family: var(--jh-font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--jh-text);
  margin: 0 0 0.55rem;
}

p {
  margin: 0 0 1rem;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.jh-wrap {
  width: min(1040px, 92%);
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--jh-header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--jh-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
}

.site-branding,
.site-branding-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-branding img,
.site-branding-link img,
.custom-logo,
.site-logo {
  height: 64px;
  width: auto;
}

.site-branding-link:hover {
  opacity: 0.92;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--jh-muted);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.nav-menu a:hover {
  color: var(--jh-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.jh-theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--jh-radius);
  border: 1px solid var(--jh-border);
  background: var(--jh-panel);
  color: var(--jh-text);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.jh-theme-toggle:hover {
  border-color: var(--jh-amber);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.95rem;
  background: var(--jh-cta);
  color: var(--jh-cta-text) !important;
  border-radius: var(--jh-radius);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

.header-cta:hover {
  background: var(--jh-amber-deep);
  color: #fff !important;
}

/* Hero */
.jh-hero {
  padding: 3.75rem 0 2.75rem;
}

.jh-hero__eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--jh-amber);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.jh-hero__title {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  max-width: 12ch;
  margin-bottom: 0.85rem;
  color: var(--jh-text);
}

.jh-hero__title em {
  font-style: normal;
  color: var(--jh-amber);
  border-bottom: 3px solid var(--jh-cta);
}

.jh-hero__lead {
  font-size: 1.12rem;
  color: var(--jh-muted);
  max-width: 38ch;
  margin-bottom: 1.5rem;
}

.jh-search {
  display: grid;
  grid-template-columns: 1.35fr 1fr auto;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--jh-search-bg);
  border: 1px solid var(--jh-border);
  border-radius: var(--jh-radius-lg);
  box-shadow: var(--jh-shadow);
  max-width: 700px;
}

.jh-search input {
  width: 100%;
  border: 1px solid var(--jh-border);
  background: var(--jh-input-bg);
  color: var(--jh-text);
  border-radius: var(--jh-radius);
  padding: 0.85rem 0.95rem;
  font: inherit;
  outline: none;
}

.jh-search input:focus {
  border-color: var(--jh-navy-bright);
}

.jh-search input::placeholder {
  color: var(--jh-muted);
  opacity: 0.85;
}

.jh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.15rem;
  border-radius: var(--jh-radius);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.jh-btn--primary {
  background: var(--jh-cta);
  color: #fff !important;
  border-color: var(--jh-cta);
}

.jh-btn--primary:hover {
  background: var(--jh-amber-deep);
  border-color: var(--jh-amber-deep);
}

.jh-btn--navy {
  background: var(--jh-navy);
  color: #fff !important;
  border-color: var(--jh-navy);
}

.jh-btn--navy:hover {
  background: var(--jh-navy-bright);
}

.jh-btn--ghost {
  background: transparent;
  color: var(--jh-text) !important;
  border-color: var(--jh-border);
}

.jh-btn--ghost:hover {
  border-color: var(--jh-amber);
}

.jh-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

/* Sections */
.jh-section {
  padding: 2.75rem 0;
}

.jh-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--jh-border);
  padding-bottom: 0.85rem;
}

.jh-section__title {
  font-size: clamp(1.4rem, 2.8vw, 1.85rem);
  margin: 0;
}

.jh-section__text {
  color: var(--jh-muted);
  margin: 0.3rem 0 0;
  max-width: 42ch;
}

.jh-panel {
  background: var(--jh-panel);
  border: 1px solid var(--jh-border);
  border-radius: var(--jh-radius-lg);
  padding: 1.1rem 1.2rem;
}

.jh-job {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  background: var(--jh-panel);
  border: 1px solid var(--jh-border);
  border-left: 3px solid var(--jh-navy);
  border-radius: var(--jh-radius);
  margin-bottom: 0.65rem;
}

.jh-job:hover {
  border-left-color: var(--jh-cta);
}

.jh-job h3 {
  font-size: 1.05rem;
  margin: 0 0 0.2rem;
  font-family: var(--jh-font-body);
  font-weight: 700;
  letter-spacing: 0;
}

.jh-job h3 a {
  color: var(--jh-text);
  text-decoration: none;
}

.jh-job p {
  margin: 0;
  color: var(--jh-muted);
  font-size: 0.92rem;
}

.jh-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.jh-tool {
  background: var(--jh-panel);
  border: 1px solid var(--jh-border);
  border-radius: var(--jh-radius-lg);
  padding: 1.25rem;
}

.jh-tool h3 {
  font-size: 1.1rem;
}

.jh-tool p {
  color: var(--jh-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.site-main {
  padding: 2.25rem 0 3.5rem;
}

.entry-content {
  color: var(--jh-muted);
}

/* WP Job Manager */
.job_listings {
  list-style: none;
  margin: 0;
  padding: 0;
}

.job_listings .job_listing {
  list-style: none !important;
  background: var(--jh-panel) !important;
  border: 1px solid var(--jh-border) !important;
  border-left: 3px solid var(--jh-navy) !important;
  border-radius: var(--jh-radius) !important;
  padding: 1rem 1.1rem !important;
  margin: 0 0 0.65rem !important;
  box-shadow: none !important;
}

.job_listings .job_listing a {
  color: var(--jh-text) !important;
  text-decoration: none !important;
}

.job_listings .job_listing:hover {
  border-left-color: var(--jh-cta) !important;
}

.job_listings .meta,
.job_listings .location,
.job_listings .company {
  color: var(--jh-muted) !important;
}

.job_filters,
.job_filters .search_jobs {
  background: var(--jh-panel) !important;
  border: 1px solid var(--jh-border) !important;
  border-radius: var(--jh-radius-lg) !important;
  padding: 1rem !important;
  margin-bottom: 1.1rem !important;
}

.job_filters input,
.job_filters select,
.job-manager-form input,
.job-manager-form textarea,
.job-manager-form select {
  background: var(--jh-input-bg) !important;
  border: 1px solid var(--jh-border) !important;
  color: var(--jh-text) !important;
  border-radius: var(--jh-radius) !important;
}

.application_button,
input[type="submit"],
.button,
button[type="submit"],
.job-manager-form input[type="submit"] {
  background: var(--jh-cta) !important;
  border: 0 !important;
  color: #fff !important;
  border-radius: var(--jh-radius) !important;
  font-weight: 700 !important;
  padding: 0.7rem 1.1rem !important;
}

.site-footer {
  border-top: 1px solid var(--jh-border);
  padding: 2.25rem 0;
  margin-top: 1.5rem;
  color: var(--jh-muted);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.1rem;
}

.site-footer__logo {
  height: 48px;
  width: auto;
  margin-bottom: 0.5rem;
}

.site-footer strong {
  color: var(--jh-text);
  font-family: var(--jh-font-display);
}

.site-footer a {
  color: var(--jh-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--jh-text);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.1rem;
}

.jh-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--jh-radius);
  border: 1px solid var(--jh-border);
  background: var(--jh-panel);
  color: var(--jh-text);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
}

.jh-notice {
  margin: 0.85rem auto 0;
  padding: 0.75rem 1rem;
  background: var(--jh-panel);
  border: 1px solid var(--jh-border);
  border-left: 3px solid var(--jh-amber);
  border-radius: var(--jh-radius);
  color: var(--jh-text);
}

.jh-404 {
  padding: 3.5rem 0 4rem;
}

.jh-404__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.1rem 0 0.5rem;
}

.jh-404 .jh-search {
  margin-top: 1rem;
}

.jh-404__jobs {
  margin-top: 2rem;
  padding-top: 0;
}

@media (max-width: 820px) {
  .jh-search {
    grid-template-columns: 1fr;
  }

  .jh-tools {
    grid-template-columns: 1fr;
  }

  .site-header__inner {
    flex-wrap: wrap;
    position: relative;
  }

  .jh-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .header-actions {
    order: 3;
  }

  .primary-nav {
    display: none;
    width: 100%;
    order: 4;
    padding: 0.5rem 0 0.25rem;
  }

  .primary-nav.is-open {
    display: block;
  }

  .nav-menu {
    flex-direction: column;
    gap: 0.15rem;
  }

  .nav-menu a {
    display: block;
    padding: 0.65rem 0.25rem;
    min-height: 44px;
  }

  .jh-job {
    grid-template-columns: 1fr;
  }

  .header-cta,
  .jh-theme-toggle {
    min-height: 40px;
  }

  body {
    overflow-x: hidden;
  }
}
