/* ── Jobs page — Eh design system ── */

.jobs-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  font-family: 'Inter', sans-serif;
  color: var(--text);
}

/* ── Search bar ── */
.jobs-search {
  padding: 2rem 0 1.25rem;
}
.jobs-search__inner {
  max-width: 800px;
}
.jobs-search__title {
  font-family: 'Druk Heavy', 'Arial Black', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
  margin: 0 0 1.25rem;
  line-height: 1.1;
}
.jobs-search__form {
  margin: 0;
}
.jobs-search__fields {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}
.jobs-search__field {
  flex: 1;
  min-width: 0;
}
.jobs-search__field--what {
  flex: 1.5;
}
.jobs-search__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
  letter-spacing: 0.01em;
}
.jobs-search__input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.jobs-search__input::placeholder {
  color: var(--dim);
}
.jobs-search__input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.08);
}
.jobs-search__btn {
  padding: 0.65rem 1.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--red);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
  min-width: 44px;
  transition: opacity 0.15s;
}
.jobs-search__btn:hover {
  opacity: 0.88;
}

/* ── Filters ── */
.jobs-filters {
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--border);
}
.jobs-filters__row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.jobs-filters__select {
  padding: 0.5rem 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  -webkit-appearance: none;
  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='%23777' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  padding-right: 1.8rem;
  transition: border-color 0.15s;
}
.jobs-filters__select:focus {
  outline: none;
  border-color: var(--red);
}

/* ── Results ── */
.jobs-results {
  padding: 1rem 0 2rem;
}
.jobs-results__header {
  margin-bottom: 1rem;
}
.jobs-results__count {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ── Job Cards grid ── */
.jobs-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

/* ── Job Card ── */
.jc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--card-shadow);
}
.jc:hover,
.jc:focus-visible {
  border-color: var(--red);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  outline: none;
}
.jc__header {
  margin-bottom: 0.4rem;
}
.jc__title {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.15rem;
  line-height: 1.3;
}
.jc__company {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 700;
}
.jc__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.4rem;
}
.jc__location {
  font-size: 0.82rem;
  color: var(--muted);
}
.jc__tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.jc__tag--time {
  background: rgba(255, 0, 0, 0.06);
  color: var(--red);
}
.jc__tag--type {
  background: rgba(39, 174, 96, 0.08);
  color: #1e7a46;
}
.jc__salary {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.jc__salary-est {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--muted);
}
.jc__desc {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
}
.jc__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.jc__category {
  font-size: 0.75rem;
  color: var(--muted);
}
.jc__age {
  font-size: 0.75rem;
  color: var(--dim);
}

/* ── Detail overlay ── */
.jobs-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.jobs-detail-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.jobs-detail {
  width: 100%;
  max-width: 520px;
  height: 100%;
  background: var(--bg);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
}
.jobs-detail-overlay.is-open .jobs-detail {
  transform: translateX(0);
}

/* Detail panel inner */
.jd__topbar {
  position: sticky;
  top: 0;
  background: var(--header-bg);
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  z-index: 1;
}
.jd__back {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--red);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: opacity 0.15s;
}
.jd__back:hover {
  opacity: 0.75;
}
.jd__body {
  padding: 1.25rem;
}
.jd__title {
  font-family: 'Inter', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.4rem;
  line-height: 1.3;
}
.jd__company {
  font-size: 1rem;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.jd__location {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.jd__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.jd__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 0, 0, 0.06);
  color: var(--red);
}
.jd__salary {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.jd__salary-est {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
}
.jd__posted {
  font-size: 0.85rem;
  color: var(--dim);
  margin-bottom: 1rem;
}
.jd__description {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 1.5rem;
  white-space: pre-line;
}
.jd__apply-btn {
  display: block;
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  color: #fff;
  background: var(--red);
  border: none;
  border-radius: var(--radius-lg);
  text-decoration: none;
  min-height: 48px;
  line-height: 48px;
  padding: 0;
  transition: opacity 0.15s;
}
.jd__apply-btn:hover {
  opacity: 0.88;
}

/* ── Apply link on cards ── */
.jc__apply {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
  transition: opacity 0.15s;
}
.jc__apply:hover {
  opacity: 0.75;
}

/* ── Pagination — scope-tab pill style ── */
.jobs-pagination {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  padding: 1.5rem 0;
  flex-wrap: wrap;
}
.jobs-pg__btn {
  padding: 0.4rem 0.9rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  min-height: 36px;
  min-width: 36px;
  transition: background 0.15s, color 0.15s;
}
.jobs-pg__btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.jobs-pg__btn.is-active {
  background: var(--red);
  color: #fff;
}

/* ── Empty / loading state ── */
.jobs-empty,
.jobs-loading {
  text-align: center;
  padding: 3rem 1rem;
}
.jobs-empty__heading {
  font-family: 'Druk Heavy', 'Arial Black', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
  margin: 0 0 0.5rem;
}
.jobs-empty__text,
.jobs-loading__text {
  font-size: 0.95rem;
  color: var(--muted);
}

/* ── Tablet: 2 columns ── */
@media (min-width: 600px) {
  .jobs-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Desktop: 3 columns ── */
@media (min-width: 900px) {
  .jobs-cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .jobs-search__title {
    font-size: 2.4rem;
  }
}

/* ── Mobile: stack search fields, scroll filters ── */
@media (max-width: 599px) {
  .jobs-search__fields {
    flex-direction: column;
  }
  .jobs-search__btn {
    width: 100%;
  }
  .jobs-filters__row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
  }
  .jobs-filters__row::-webkit-scrollbar {
    display: none;
  }
  .jobs-filters__select {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .jobs-detail {
    max-width: 100%;
  }
  .jc__title {
    font-size: 0.95rem;
  }
  .jd__title {
    font-size: 1.15rem;
  }
  /* Mobile font-floor: 0.93rem (approx 14px) */
  .jobs-search__label { font-size: 0.93rem; }
  .jobs-filters__select { font-size: 0.93rem; }
  .jobs-results__count { font-size: 0.93rem; }
  .jc__company { font-size: 0.93rem; }
  .jc__location { font-size: 0.93rem; }
  .jc__tag { font-size: 0.93rem; }
  .jc__salary-est { font-size: 0.93rem; }
  .jc__desc { font-size: 0.93rem; }
  .jc__category { font-size: 0.93rem; }
  .jc__age { font-size: 0.93rem; }
  .jd__back { font-size: 0.93rem; }
  .jd__location { font-size: 0.93rem; }
  .jd__tag { font-size: 0.93rem; }
  .jd__salary-est { font-size: 0.93rem; }
  .jd__posted { font-size: 0.93rem; }
  .jd__description { font-size: 0.93rem; }
  .jobs-pg__btn { font-size: 0.93rem; }
}
