/* mod_lmdb_jobs Layout „cards“ – Stellenangebote als Karten im Stil der Startseite
   Unterregeln hängen an .hwx-job-cards, damit sie die globale Regel „main :is(p,span)“ aus app.css schlagen. */

.hwx-job-cards {
  --job-ink: #0C3247;
  --job-text: #303030;
  --job-muted: #6C757D;
  --job-line: #DBE3E8;
  --job-surface: #F5F8FA;
  --job-accent: #164F9E;
  --job-red: #D11F34;
  --job-button: #013F58;

  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 2.5rem 0;
}

.hwx-job-cards .hwx-job-cards__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hwx-job-cards .hwx-job-cards__title {
  display: inline-block;
  max-width: calc(100% - 1rem);
  margin: 0 0 0 .5rem;
  padding: .6rem 1.75rem;
  transform: skew(-15deg);
  background: var(--job-accent);
  color: #fff;
  font-family: var(--hwx-text_font-family, WorkSans-Regular), system-ui, sans-serif;
  font-size: clamp(1.25rem, 2.35vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.hwx-job-cards .hwx-job-cards__empty {
  margin: 0;
  padding: 1.5rem;
  background: #fff;
  border-radius: .875rem;
  color: var(--job-text);
}

.hwx-job-cards .hwx-job-cards__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 1.25rem;
}

.hwx-job-cards .hwx-job-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border-radius: .875rem;
  box-shadow: 0 .45rem 1.2rem rgba(12, 50, 71, .08);
  transition: box-shadow .2s ease, transform .2s ease;
}

.hwx-job-cards .hwx-job-card:hover {
  box-shadow: 0 1rem 2.75rem rgba(12, 50, 71, .15);
  transform: translateY(-2px);
}

.hwx-job-cards .hwx-job-card__logo {
  position: relative;
  display: grid;
  place-items: center;
  height: 6.5rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid var(--job-line);
}

.hwx-job-cards .hwx-job-card__logo img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: contain;
}

.hwx-job-cards .hwx-job-card__logo.is-empty {
  background: var(--job-surface);
  color: var(--job-muted);
  font-size: 1.75rem;
}

.hwx-job-cards .hwx-job-card__new {
  position: absolute;
  top: .625rem;
  right: .625rem;
  padding: .2rem .55rem;
  border-radius: 9999px;
  background: var(--job-red);
  color: #fff;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hwx-job-cards .hwx-job-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: .5rem;
  padding: 1rem 1.125rem 1.125rem;
}

.hwx-job-cards .hwx-job-card__employer {
  overflow: hidden;
  color: var(--job-muted);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hwx-job-cards .hwx-job-card__title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--job-ink);
  font-family: var(--hwx-text_font-family, WorkSans-Regular), system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.hwx-job-cards .hwx-job-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  margin: auto 0 0;
  padding: .5rem 0 0;
  list-style: none;
}

.hwx-job-cards .hwx-job-card__chips li {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .25rem .625rem;
  border-radius: 9999px;
  background: var(--job-surface);
  color: var(--job-text);
  font-size: .75rem;
  line-height: 1.3;
}

.hwx-job-cards .hwx-job-card__chips li span,
.hwx-job-cards .hwx-job-card__chips li time {
  color: inherit;
}

.hwx-job-cards .hwx-job-card__chips .fa-solid,
.hwx-job-cards .hwx-job-card__chips .fa-regular {
  color: var(--job-muted);
}

.hwx-job-cards .hwx-job-card__link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}

.hwx-job-cards .hwx-job-card__link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.hwx-job-cards .hwx-job-cards__all {
  display: flex;
  justify-content: center;
  padding-top: .5rem;
}

.hwx-job-cards .hwx-job-cards__button {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  height: 58px;
  padding: 0 1.75rem;
  border: 2px solid var(--job-button);
  border-radius: 9999px;
  color: var(--job-button);
  font-size: 19px;
  font-weight: 500;
  text-decoration: none;
  transition: background .4s, color .4s;
}

.hwx-job-cards .hwx-job-cards__button span {
  color: inherit;
}

.hwx-job-cards .hwx-job-cards__button:hover,
.hwx-job-cards .hwx-job-cards__button:focus-visible {
  background: var(--job-button);
  color: #fff;
}

/* Mobil: Seitenrand (Position „bottom“ hat keinen) und Karten als wischbare Reihe */
@media (max-width: 767.98px) {
  .hwx-job-cards {
    margin-inline: 1rem;
  }
}

@media (max-width: 575.98px) {
  .hwx-job-cards .hwx-job-cards__grid {
    grid-auto-columns: 78%;
    grid-auto-flow: column;
    grid-template-columns: none;
    gap: 1rem;
    margin-inline: -1rem;
    padding: .25rem 1rem 1rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .hwx-job-cards .hwx-job-cards__grid::-webkit-scrollbar {
    display: none;
  }

  .hwx-job-cards .hwx-job-card {
    scroll-snap-align: start;
  }

  .hwx-job-cards .hwx-job-card:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hwx-job-cards .hwx-job-card,
  .hwx-job-cards .hwx-job-cards__button {
    transition: none;
  }

  .hwx-job-cards .hwx-job-card:hover {
    transform: none;
  }
}
