/* ==========================================================================
   Jobs Page – Filter Bar + Card Grid  (Redesign April 2026)
   ========================================================================== */

/* ── Page Container ── */
.jobs-page {
  max-width: 70rem;
  margin: 0 auto;
  padding: 1rem 0.9375rem 3rem;
  background: #fff;
  min-height: 70vh;
}

/* ── Search results page header ── */
.search-results-page.jobs-page {
  margin-top: 0 !important;  /* override body:not(.home) .container { margin-top: 7.25rem } */
}
body.search-results .container {
  margin-top: 0 !important;
}
.search-page-header {
  max-width: 520px;
  margin: 1.5rem auto 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.search-page-query {
  font-size: 1.15rem;
  color: #293262;
  margin: 0;
}
.search-page-query strong {
  font-weight: 800;
}
.search-page-count {
  font-size: 0.9rem;
  color: #6a7285;
  margin-left: 0.35rem;
}
.search-page-form {
  width: 100%;
}
.jobs-no-results {
  display: flex;
  justify-content: center;
  padding: 2rem 0 1rem;
}
.search-noresults-notice {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  border-bottom: 2px solid #e8eaf0;
  margin-bottom: 2.5rem;
}
.search-noresults-notice__text {
  font-size: 1.35rem;
  color: #293262;
  margin: 0;
}
.search-noresults-notice__text strong {
  font-weight: 800;
}

/* ── Latest Jobs Widget (no-results page) ── */
.latest-jobs-widget {
  background: #f5f7fb;
  border: 1px solid #e0e4ef;
  border-radius: 0.75rem;
  padding: 2rem 1.5rem 1.75rem;
  margin-bottom: 2rem;
}
.latest-jobs-widget__header {
  text-align: center;
  margin-bottom: 1.75rem;
}
.latest-jobs-widget__title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #293262;
  margin: 0 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.latest-jobs-widget__intro {
  color: #6a7285;
  font-size: 0.95rem;
  margin: 0;
}
.latest-jobs-widget__footer {
  display: flex;
  justify-content: center;
  padding-top: 1.5rem;
}

/* ── Filter Bar ── */
.jobs-filter-bar {
  margin-bottom: 2rem;
}
.jobs-filter-bar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  padding: 0.75rem 0;
}
.jobs-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border: 1.5px solid #293262;
  border-radius: 100px;                     /* pill shape */
  background: #fff;
  color: #293262;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
              box-shadow 0.2s ease;
  white-space: nowrap;
}
.jobs-filter-btn:hover,
.jobs-filter-btn:focus-visible {
  background: #00a285;
  border-color: #00a285;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 162, 133, 0.28);
}
.jobs-filter-btn.is-active {
  background: #293262;
  border-color: #293262;
  color: #fff;
  box-shadow: 0 4px 14px rgba(41, 50, 98, 0.22);
}
.jobs-filter-btn__count {
  display: inline-block;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 100px;
  padding: 0.05rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.5;
}
.jobs-filter-btn.is-active .jobs-filter-btn__count {
  background: rgba(255, 255, 255, 0.28);
}

/* ── Jobs Grid ── */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 70rem;
  margin: 0 auto;
  padding: 0 0.9375rem;
}

/* ── Job Card ── */
.jobs-card {
  display: flex;
  flex-direction: column;
  /* Glassmorphism */
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 12px;
  padding: 1.5rem 1.75rem 1.25rem;
  box-shadow:
    0 2px 12px rgba(41, 50, 98, 0.09),
    0 8px 28px rgba(41, 50, 98, 0.07);
  transition: box-shadow 0.3s ease, transform 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  /* Green accent line at top */
  position: relative;
  overflow: hidden;
}
.jobs-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #293262 0%, #00a285 100%);
  border-radius: 12px 12px 0 0;
}
.jobs-card:hover {
  box-shadow:
    0 6px 24px rgba(41, 50, 98, 0.16),
    0 14px 40px rgba(41, 50, 98, 0.10);
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.85);
  color: inherit;
  text-decoration: none;
}
.jobs-card__category {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #00a285;
  background: rgba(0, 162, 133, 0.10);
  border-radius: 100px;
  padding: 0.2rem 0.65rem;
  margin-bottom: 0.75rem;
}
.jobs-card__title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0 0 0.5rem;
  line-height: 1.35;
  color: #293262;
}
.jobs-card__title a {
  color: inherit;
  text-decoration: none;
}
.jobs-card__title a:hover {
  color: #00a285;
}
.jobs-card__location {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: #6a7285;
  margin-bottom: 0.85rem;
}
.jobs-card__location::before {
  content: "\1F4CD";
  font-size: 0.9em;
}
.jobs-card__excerpt {
  font-size: 0.88rem;
  color: #4a5068;
  flex: 1;
  margin-bottom: 1.1rem;
}
.jobs-card__excerpt p {
  margin: 0;
}
.jobs-card__link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
  background: #293262;
  text-decoration: none;
  padding: 0.45rem 1.05rem;
  border-radius: 100px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.jobs-card__link:hover {
  background: #00a285;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 162, 133, 0.32);
}
.jobs-card__link::after {
  content: "\2192";
}

/* ── Empty / no results ── */
.jobs-grid__empty,
.jobs-grid__no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem 1rem;
  color: #666;
  font-size: 1.1rem;
}

/* ── Hide filtered cards with animation ── */
.jobs-card.is-hidden {
  display: none;
}

/* ── Scroll sentinel ── */
.jobs-scroll-sentinel {
  height: 1px;
  visibility: hidden;
}

/* ── Responsive ── */

/* Tablet: 2 columns */
@media screen and (max-width: 1023px) {
  .jobs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Filter toggle (hidden on desktop) ── */
.jobs-filter-toggle {
  display: none;
}

/* Mobile: 1 column */
@media screen and (max-width: 639px) {
  .jobs-grid {
    grid-template-columns: 1fr;
  }

  /* Collapsible filter bar */
  .jobs-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.7rem 1rem;
    background: #293262;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
  }
  .jobs-filter-toggle__icon {
    font-size: 1.3rem;
    line-height: 1;
    transition: transform 0.2s;
  }
  .jobs-filter-toggle[aria-expanded="true"] .jobs-filter-toggle__icon {
    transform: rotate(45deg);
  }
  .jobs-filter-bar__inner {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    gap: 0.35rem;
    padding: 0;
  }
  .jobs-filter-bar__inner.is-open {
    max-height: 500px;
    padding: 0.6rem 0;
  }
  .jobs-filter-btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   Pagination  (jobs page + search results)
   ========================================================================== */

.pagination-container {
  margin: 2.5rem 0 1rem;
  text-align: center;
}

.pagination {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* "Seite X von Y" label — eigene Zeile, damit die Buttons sauber umbrechen */
.pagination > span:not(.current) {
  font-size: 0.88rem;
  color: #6a7285;
  white-space: nowrap;
  width: 100%;
  display: block;
  margin-bottom: 0.6rem;
}

/* Shared pill base — 1:1 identisch mit .jobs-filter-btn */
.pagination-container .pagination a,
.pagination-container .pagination span.current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  padding: 0.5rem 1.1rem;
  border: 1.5px solid #293262;
  border-radius: 100px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  outline: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
              box-shadow 0.2s ease;
}

/* Inaktive Seitenzahlen — wie .jobs-filter-btn Default */
.pagination-container .pagination a {
  background: #fff;
  color: #293262;
}

.pagination-container .pagination a:hover,
.pagination-container .pagination a:focus-visible {
  background: #00a285;
  border-color: #00a285;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 162, 133, 0.28);
}

/* Aktive / aktuelle Seite — wie .jobs-filter-btn.is-active */
.pagination-container .pagination span.current {
  background: #293262;
  border-color: #293262;
  color: #fff;
  box-shadow: 0 4px 14px rgba(41, 50, 98, 0.22);
  cursor: default;
}

@media screen and (max-width: 639px) {
  .pagination a.first-page,
  .pagination a.last-page {
    display: none;
  }
  .pagination {
    gap: 0.3rem;
  }
  .pagination a,
  .pagination span.current {
    min-width: 2rem;
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
  }
}
