/* ==========================================================================
   Jobs Page Styles
   (Job card component styles are bundled via main.js → @shared/styles/job-card.css)
   ========================================================================== */

/* Hero Section */
.jobs-hero {
  padding: 1.8rem 1rem 2rem;
  text-align: center;
  background: var(--surface-alt);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, #ba3eef, #6a40d7, #475cdf, #31b1ce) 1;
}

.jobs-hero__title {
  font-size: var(--font-size-h1);
  font-weight: 800;
  margin: 0 0 1rem;
  line-height: 1.1;
}

.jobs-hero__subtitle {
  font-size: clamp(1.0625rem, 2.5vw, 1.25rem);
  color: var(--color-muted);
  margin: 0;
  max-width: 50ch;
  margin-inline: auto;
  line-height: 1.6;
}

.jobs-hero__subtitle strong {
  color: var(--brand-primary);
  font-weight: 700;
}

/* Hero Search Bar */
.jobs-hero__search {
  position: relative;
  max-width: 540px;
  margin: 1.75rem auto 0;
}

.jobs-hero__search-icon {
  position: absolute;
  left: 1.125rem;
  top: 50%;
  translate: 0 -50%;
  color: var(--color-muted);
  pointer-events: none;
}

.jobs-hero__search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.jobs-hero__search-input::placeholder {
  color: var(--color-muted);
  opacity: 0.6;
}

.jobs-hero__search-input:hover {
  border-color: var(--brand-secondary);
}

.jobs-hero__search-input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(106, 64, 215, 0.15), var(--shadow-sm);
}

/* Jobs page wider container */
.jobs-page .container {
  max-width: 1400px;
}

/* Jobs Layout - Sidebar + List */
.jobs-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  padding-block: 2rem;
  align-items: start;
}

/* Sidebar */
.jobs-sidebar {
  position: sticky;
  top: 5rem; /* Account for sticky site nav height */
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

.jobs-sidebar__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.jobs-sidebar__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.jobs-sidebar__clear {
  background: none;
  border: none;
  color: var(--brand-primary);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}

.jobs-sidebar__clear:hover {
  background: rgba(106, 64, 215, 0.08);
}

.jobs-sidebar__clear:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.jobs-sidebar__group {
  margin-bottom: 1.25rem;
}

.jobs-sidebar__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.jobs-sidebar__input,
.jobs-sidebar__select {
  width: 100%;
  padding: 0.75rem 0.875rem;
  font-size: 0.9375rem;
  font-family: inherit;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm, 8px);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.jobs-sidebar__input::placeholder {
  color: var(--color-muted);
  opacity: 0.6;
}

.jobs-sidebar__input:hover,
.jobs-sidebar__select:hover {
  border-color: var(--brand-secondary);
}

.jobs-sidebar__input:focus,
.jobs-sidebar__select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(106, 64, 215, 0.15);
}

.jobs-sidebar__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235f5c70' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
  cursor: pointer;
}

@media (forced-colors: active) {
  .jobs-sidebar__select {
    appearance: auto;
  }
}

.jobs-sidebar__count {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.jobs-sidebar__count span {
  font-weight: 600;
  color: var(--color-text);
}

/* Jobs List */
.jobs-list {
  min-height: 50vh;
}

.jobs-list__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.jobs-list__loading {
  text-align: center;
  color: var(--color-muted);
  padding: 2rem;
}

.jobs-list__empty {
  text-align: center;
  padding: 3rem 1rem;
}

.jobs-list__empty p {
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}

/* Job Card — pinned variant (shared base styles imported at top) */
.job-card--pinned {
  border-left: 4px solid var(--brand-primary);
}

/* Responsive */
@media (max-width: 1100px) and (min-width: 901px) {
  .jobs-list__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .jobs-hero {
    padding: 3.5rem 1rem 2.5rem;
  }

  .jobs-layout {
    grid-template-columns: 1fr;
  }

  .jobs-list__grid {
    grid-template-columns: 1fr;
  }

  .jobs-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    border: 1px solid var(--border-subtle);
  }

  .jobs-sidebar__header {
    grid-column: 1 / -1;
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
  }

  .jobs-sidebar__group {
    margin-bottom: 0;
  }

  .jobs-sidebar__count {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
  }
}

@media (max-width: 600px) {
  .jobs-hero {
    padding: 3rem 1rem 2rem;
  }

  .jobs-sidebar {
    grid-template-columns: 1fr;
  }

  .jobs-list__grid {
    gap: 1rem;
  }
}

