/* ============================================================
   CathLab.com — Job Post Styles (job.css)
   Used by: job-featured.html, job-standard.html
   WordPress: Enqueue on single job listing template only
     wp_enqueue_style('cathlab-job', get_template_directory_uri().'/css/job.css');

   Both templates share the same HTML structure.
   Visual distinction is driven by body class:
     .job-page--featured  ← premium / paid listing
     .job-page--standard  ← regular listing
============================================================ */


/* ============================================================
   EDIT JOB BUTTON — standard layout top bar
============================================================ */
.job-detail__top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}
.job-detail__edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-teal);
  background: rgba(23,122,111,0.08);
  border: 1px solid rgba(23,122,111,0.25);
  padding: 0.4375rem 0.875rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 180ms ease;
  white-space: nowrap;
}
.job-detail__edit-btn svg {
  flex-shrink: 0;
}
.job-detail__edit-btn:hover {
  background: rgba(23,122,111,0.15);
  border-color: var(--color-teal);
  color: var(--color-teal);
}

/* EDIT JOB BUTTON — premium layout breadcrumb */
.job-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3125rem 0.75rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 180ms ease;
  margin-left: auto;
  white-space: nowrap;
}
.job-edit-btn svg { flex-shrink: 0; }

/* Light version on light breadcrumbs (standard) */
.job-page--standard .job-edit-btn {
  color: var(--color-teal);
  background: rgba(23,122,111,0.08);
  border: 1px solid rgba(23,122,111,0.25);
}
.job-page--standard .job-edit-btn:hover {
  background: rgba(23,122,111,0.15);
  border-color: var(--color-teal);
}

/* Dark version on navy breadcrumb (featured) */
.job-page--featured .job-edit-btn {
  color: var(--color-teal);
  background: rgba(23,122,111,0.15);
  border: 1px solid rgba(23,122,111,0.3);
}
.job-page--featured .job-edit-btn:hover {
  background: rgba(23,122,111,0.25);
  border-color: var(--color-teal);
  color: #fff;
}


/* ============================================================
   BREADCRUMB
============================================================ */
.job-breadcrumb {
  padding-block: 0.875rem;
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-bg);
}
.job-breadcrumb__inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}
.job-breadcrumb__link {
  color: var(--color-teal);
  font-weight: 500;
  transition: color 180ms ease;
}
.job-breadcrumb__link:hover { color: var(--color-teal-hover); }
.job-breadcrumb__sep {
  color: var(--color-border);
  user-select: none;
}
.job-breadcrumb__current {
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40ch;
}


/* ============================================================
   JOB HERO — base styles (shared)
============================================================ */
.job-hero {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.job-hero__inner {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.job-hero__main {}

/* Company identity row */
.job-hero__company-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.job-hero__logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.job-hero__company-name {
  font-size: 1rem;
  font-weight: 600;
}

/* Job title */
.job-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw, 2.625rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
}

/* Meta tags row */
.job-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  align-items: center;
}
.job-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-full);
}
.job-meta-tag svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* Sidebar quick-apply card */
.job-hero__sidebar {}
.job-apply-card {
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  position: sticky;
  top: 84px;
}
.job-apply-card__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
}
.job-apply-card__detail {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding-block: 0.75rem;
  border-bottom: 1px solid;
  font-size: 0.875rem;
}
.job-apply-card__detail:first-of-type { padding-top: 0; }
.job-apply-card__detail:last-of-type { border-bottom: none; }
.job-apply-card__detail svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}
.job-apply-card__detail-label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.job-apply-card__detail-value {
  display: block;
}
.job-apply-card__actions {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.btn--apply {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.9375rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 220ms ease;
  text-decoration: none;
  letter-spacing: 0.01em;
  width: 100%;
}
.btn--apply:hover {
  transform: translateY(-2px);
}
.btn--apply:active { transform: translateY(0); }

.btn--save {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6875rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background: transparent;
  cursor: pointer;
  transition: all 220ms ease;
  width: 100%;
  text-decoration: none;
}
.btn--save svg { width: 15px; height: 15px; }
.btn--save:hover {
  border-color: var(--color-text-secondary);
  background: var(--color-surface-2);
}


/* ============================================================
   JOB BODY — main content + sticky sidebar
============================================================ */
.job-body {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.job-body__inner {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* Content area */
.job-content {
  min-width: 0;
}
.job-content h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-dark);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border-light);
}
.job-content h2 + * { margin-top: 0; }
.job-content p {
  font-size: 0.9875rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}
.job-content ul, .job-content ol {
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
}
.job-content li {
  font-size: 0.9875rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 0.375rem;
  list-style: disc;
}
.job-content strong {
  color: var(--color-dark);
  font-weight: 600;
}
.job-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border-light);
}
.job-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Body sidebar */
.job-sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.job-sidebar-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.job-sidebar-card__title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border-light);
}
.job-sidebar-card p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin-bottom: 0.5rem;
}
.job-sidebar-card p:last-child { margin-bottom: 0; }
.job-sidebar-card a {
  color: var(--color-teal);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* ============================================================
   BOTTOM APPLY BANNER
============================================================ */
.job-apply-banner {
  padding-block: clamp(3rem, 6vw, 4.5rem);
  text-align: center;
}
.job-apply-banner__inner {
  border-radius: var(--radius-xl);
  padding: clamp(2.5rem, 5vw, 3.5rem);
  max-width: 640px;
  margin-inline: auto;
}
.job-apply-banner__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}
.job-apply-banner__sub {
  font-size: 0.9375rem;
  line-height: 1.65;
  margin-bottom: 1.75rem;
}
.job-apply-banner__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}


/* ============================================================
   FEATURED — section cards (match standard card style)
============================================================ */
.job-page--featured .job-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 1rem;
  border-bottom: none;
  padding-bottom: 1.75rem;
}
.job-page--featured .job-section:last-child {
  margin-bottom: 0;
}


/* ============================================================
   FEATURED TEMPLATE OVERRIDES (.job-page--featured)
============================================================ */

/* Hero — dark navy with teal accent */
.job-page--featured .job-breadcrumb {
  background: var(--color-dark);
  border-bottom-color: rgba(255,255,255,0.08);
}
.job-page--featured .job-breadcrumb__inner {
  color: rgba(255,255,255,0.4);
}
.job-page--featured .job-breadcrumb__link {
  color: rgba(255,255,255,0.65);
}
.job-page--featured .job-breadcrumb__link:hover {
  color: #fff;
}
.job-page--featured .job-breadcrumb__sep {
  color: rgba(255,255,255,0.2);
}
.job-page--featured .job-breadcrumb__current {
  color: rgba(255,255,255,0.5);
}

.job-page--featured .job-hero {
  background: var(--color-dark);
  position: relative;
  overflow: hidden;
}
/* Subtle teal glow in the featured hero */
.job-page--featured .job-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 100% at 85% 50%, rgba(23,122,111,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.job-page--featured .job-hero__inner {
  position: relative;
  z-index: 1;
}
.job-page--featured .job-hero__company-name {
  color: rgba(255,255,255,0.8);
}
.job-page--featured .job-hero__logo {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.15);
}
.job-page--featured .job-hero__title {
  color: #fff;
}

/* Featured badge */
.job-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-teal);
  background: rgba(23,122,111,0.15);
  border: 1px solid rgba(23,122,111,0.3);
  padding: 0.3125rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}
.job-featured-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-teal);
}

/* Meta tags on dark hero */
.job-page--featured .job-meta-tag {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.12);
}

/* Apply card — featured style */
.job-page--featured .job-apply-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
}
.job-page--featured .job-apply-card__label {
  color: rgba(255,255,255,0.4);
}
.job-page--featured .job-apply-card__detail {
  border-bottom-color: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
}
.job-page--featured .job-apply-card__detail svg {
  color: rgba(255,255,255,0.4);
}
.job-page--featured .job-apply-card__detail-label {
  color: rgba(255,255,255,0.4);
}
.job-page--featured .btn--apply {
  background: var(--color-teal);
  color: #fff;
  box-shadow: 0 4px 18px rgba(23,122,111,0.35);
}
.job-page--featured .btn--apply:hover {
  background: var(--color-teal-hover);
  box-shadow: 0 6px 22px rgba(23,122,111,0.45);
}
.job-page--featured .btn--save {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.05);
}
.job-page--featured .btn--save:hover {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* Body section — featured gets a clean white body, no color */
.job-page--featured .job-body {
  background: var(--color-bg);
}

/* Apply banner — featured */
.job-page--featured .job-apply-banner {
  background: var(--color-bg);
}
.job-page--featured .job-apply-banner__inner {
  background: var(--color-dark);
  box-shadow: var(--shadow-lg);
}
.job-page--featured .job-apply-banner__title {
  color: #fff;
}
.job-page--featured .job-apply-banner__sub {
  color: rgba(255,255,255,0.7);
}
.job-page--featured .btn--apply-banner {
  background: var(--color-teal);
  color: #fff;
  font-size: 1.0625rem;
  padding: 1rem 2.5rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  transition: all 220ms ease;
  text-decoration: none;
  border: none;
}
.job-page--featured .btn--apply-banner:hover {
  background: var(--color-teal-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(23,122,111,0.4);
}


/* ============================================================
   STANDARD TEMPLATE OVERRIDES (.job-page--standard)
============================================================ */
.job-page--standard .job-hero {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-light);
}
.job-page--standard .job-hero__company-name {
  color: var(--color-text-secondary);
}
.job-page--standard .job-hero__logo {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.job-page--standard .job-hero__title {
  color: var(--color-dark);
}
.job-page--standard .job-meta-tag {
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

/* Apply card — standard style */
.job-page--standard .job-apply-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  /* Teal top accent — subtle distinction from featured */
  border-top: 3px solid var(--color-teal);
}
.job-page--standard .job-apply-card__label {
  color: var(--color-text-muted);
}
.job-page--standard .job-apply-card__detail {
  border-bottom-color: var(--color-border-light);
  color: var(--color-text-secondary);
}
.job-page--standard .job-apply-card__detail svg {
  color: var(--color-text-muted);
}
.job-page--standard .job-apply-card__detail-label {
  color: var(--color-text-muted);
}
.job-page--standard .btn--apply {
  background: var(--color-teal);
  color: #fff;
}
.job-page--standard .btn--apply:hover {
  background: var(--color-teal-hover);
  box-shadow: 0 6px 18px rgba(23,122,111,0.3);
}
.job-page--standard .btn--save {
  color: var(--color-text-secondary);
}

/* Body */
.job-page--standard .job-body {
  background: var(--color-bg);
}

/* Apply banner — standard */
.job-page--standard .job-apply-banner {
  background: var(--color-bg);
}
.job-page--standard .job-apply-banner__inner {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.job-page--standard .job-apply-banner__title {
  color: var(--color-dark);
}
.job-page--standard .job-apply-banner__sub {
  color: var(--color-text-secondary);
}
.job-page--standard .btn--apply-banner {
  background: var(--color-teal);
  color: #fff;
  font-size: 1.0625rem;
  padding: 1rem 2.5rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  transition: all 220ms ease;
  text-decoration: none;
  border: none;
}
.job-page--standard .btn--apply-banner:hover {
  background: var(--color-teal-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(23,122,111,0.3);
}


/* ============================================================
   RESPONSIVE — JOB TEMPLATES
============================================================ */
@media (max-width: 900px) {
  .job-hero__inner,
  .job-body__inner {
    grid-template-columns: 1fr;
  }
  /* Sidebar moves below content on mobile */
  .job-hero__sidebar { order: -1; }
  .job-sidebar { position: static; }
  .job-apply-card { position: static; }

  .job-page--featured .job-hero__sidebar .job-apply-card {
    /* Compact on mobile */
    padding: 1.25rem;
  }
}
@media (max-width: 600px) {
  .job-hero__meta { gap: 0.5rem; }
  .job-apply-banner__actions { flex-direction: column; align-items: center; }
  .btn--apply-banner { width: 100%; text-align: center; }
}

/* ============================================================
   SECTION TITLES (repeater)
============================================================ */
.job-section__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-dark);
  letter-spacing: -0.02em;
  margin-bottom: 0.875rem;
  padding-bottom: 0.625rem;
  border-bottom: 2px solid var(--color-border-light);
}

/* ============================================================
   CLICKABLE META PILLS (taxonomy links)
============================================================ */
a.job-meta-tag,
.job-meta-tag--link {
  text-decoration: none;
  cursor: pointer;
  transition: all 180ms ease;
}
.job-page--featured a.job-meta-tag:hover,
.job-page--featured .job-meta-tag--link:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.25);
  color: #fff;
}
.job-page--standard a.job-meta-tag:hover,
.job-page--standard .job-meta-tag--link:hover {
  background: var(--color-teal-light);
  border-color: var(--color-teal-border);
  color: var(--color-teal);
}

/* ============================================================
   SHARE BUTTONS — no underline, proper spacing
============================================================ */
.job-share-btns {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}
.job-share-btn {
  text-decoration: none !important;
  width: auto !important;
  font-size: 0.8125rem !important;
  padding: 0.5rem 0.875rem !important;
}


/* ============================================================
   TRUE 2-COLUMN — content sections inline in left column,
   all sidebar cards stack in right column.
============================================================ */

/* Sidebar: stack cards vertically, whole column is sticky */
.job-hero__sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 84px;
  align-self: start;
}

/* Cards inside sidebar are not individually sticky */
.job-hero__sidebar .job-apply-card {
  position: static;
}

/* Space between pills and content sections */
.job-content {
  margin-top: clamp(1.5rem, 3vw, 2rem);
}

/* Standard: no hero border-bottom (not a separate section anymore) */
.job-page--standard .job-hero {
  border-bottom: none;
}

/* Featured: content in a white card — readable on dark hero background */
.job-page--featured .job-content {
  background: var(--color-surface);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

/* Responsive */
@media (max-width: 900px) {
  .job-hero__sidebar {
    position: static;
  }
}

/* ============================================================
   SECTION CARDS + RESPONSIVE COLUMN ORDERING
============================================================ */

/* 3-child grid: identity (col1 row1), content (col1 row2), sidebar (col2 span 2) */
.job-hero__inner {
  grid-template-rows: auto 1fr;
}
.job-hero__main {
  grid-column: 1;
  grid-row: 1;
}
.job-content {
  grid-column: 1;
  grid-row: 2;
  margin-top: 0;
}
.job-hero__sidebar {
  grid-column: 2;
  grid-row: 1 / 3;
}

/* Each section is its own white card */
.job-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border); /* override the divider-only style */
}
.job-section:last-child {
  margin-bottom: 0;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

/* Remove the old divider-only section spacing */
.job-section {
  padding-bottom: 1.5rem;
}

/* Remove the featured single white-box wrapper — sections handle their own cards */
.job-page--featured .job-content {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

/* Responsive: single column with identity → sidebar → content order */
@media (max-width: 900px) {
  .job-hero__inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .job-hero__main    { grid-column: 1; grid-row: auto; order: 1; }
  .job-hero__sidebar { grid-column: 1; grid-row: auto; order: 2; position: static; }
  .job-content       { grid-column: 1; grid-row: auto; order: 3; }
}

/* ── Visit Employer Posting button ──────────────────────────────────────────── */
.job-employer-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  justify-content: center;
}

/* Override .job-sidebar-card a colour rule so button text stays white */
.job-sidebar-card .job-employer-btn,
.job-sidebar-card .job-employer-btn:visited {
  color: #fff;
  text-decoration: none;
}
.job-sidebar-card .job-employer-btn:hover {
  color: #fff;
  text-decoration: none;
}

/* Sidebar card wrapper — no title needed, just the button */
.job-sidebar-card--apply {
  padding: 1rem;
}

/* Bottom-of-content CTA box */
.job-employer-cta {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--color-teal-light);
  border: 1px solid var(--color-teal-border);
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: center;
}
