/* =========================================================
   /jobs/-Page — Karriere-Showroom + Detail-Pages

   Listen-Page-Layout:
     1. Page-Hero (cross-page Pattern aus main.css)
     2. Filter-Pills oben (dynamisch aus jobs.beschaeftigungsarten)
     3. Card-Grid (3 Cols Desktop → 2 → 1 Mobile)
     4. Empty-State bei Filter-Match-Null oder keiner aktiven Stelle

   Detail-Page-Layout (zweispaltig auf Desktop):
     1. Breadcrumb "← Alle Stellen"
     2. Header (Titel + Meta-Zeile)
     3. Content-Spalte (Markdown-Body) | Sidebar (Meta-Box + sticky CTA)
     4. CTA-Block am Seitenende (Bewerben-Button + Hinweis)
     5. Cred-Section
   ========================================================= */

/* ---------- FILTER-PILLS (zwei Reihen, AND-kombiniert) ---------- */
.jobs-filter {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
  padding: 14px 18px;
  background: var(--surface-dark-anchor);
  border: 1px solid var(--border-hairline-dark);
  border-radius: 14px;
}
.jobs-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.jobs-filter-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gy);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-right: 8px;
  min-width: 88px; /* einheitliche Label-Breite — Pills beider Reihen vertikal aligniert */
}
.jobs-filter-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  color: var(--gy);
  border: 1px solid var(--border-hairline-dark);
  border-radius: 8px;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
  font-family: inherit;
}
.jobs-filter-btn:hover {
  color: #fff;
  border-color: var(--gy);
}
.jobs-filter-btn.is-active {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

/* ---------- CARD-GRID ---------- */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 1000px) {
  .jobs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .jobs-grid { grid-template-columns: 1fr; }
}

/* ---------- CARD ---------- */
.jobs-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--surface-dark-anchor);
  border: 1px solid var(--border-hairline-dark);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.jobs-card:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 32, 40, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
.jobs-card[hidden] { display: none; }

.jobs-card-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.jobs-card-art {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  align-self: flex-start;
}
.jobs-card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  color: #fff;
}

.jobs-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--gy);
}
.jobs-card-meta strong {
  color: #ddd;
  font-weight: 600;
}

.jobs-card-teaser {
  font-size: 14px;
  line-height: 1.6;
  color: var(--gy);
  margin: 0;
  flex: 1;
}

.jobs-card-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  margin-top: auto;
}
.jobs-card:hover .jobs-card-cta { text-decoration: underline; }

/* ---------- EMPTY STATES ---------- */
.jobs-empty {
  text-align: center;
  padding: var(--space-section-y) var(--space-gutter); /* war 60px 24px */
  color: var(--gy);
  font-size: 15px;
}
.jobs-empty-reset {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--red);
  cursor: pointer;
  text-decoration: underline;
}
.jobs-empty-static {
  text-align: center;
  padding: var(--space-section-y) var(--space-gutter); /* war 60px 24px */
  max-width: 640px;
  margin: 0 auto;
}
.jobs-empty-static h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 16px;
  color: #fff;
}
.jobs-empty-static p {
  color: var(--gy);
  font-size: 16px;
  line-height: 1.7;
}
.jobs-empty-static a { color: var(--red); }

/* =========================================================
   DETAIL-PAGE-STYLES (/jobs/{slug}/)
   Header → Zweispaltiges Layout (Content + sticky Sidebar)
   → Bottom-CTA → Cred-Section
   ========================================================= */

/* Nav-Hoehe + Abstand im padding-top (vorher nur 40px): die Job-Detailseite
   hat KEINEN .page-hero, der den Platz unter der fixierten Nav freihaelt --
   Breadcrumb und Titel lagen dadurch hinter der Nav (gemessen: Text bei
   114px, Nav-Unterkante bei 108px).
   Scrim als ::before ueber die volle Viewport-Breite, exakt das Muster von
   .reifen-detail (reifen.css): ohne ihn lief das Hintergrundfoto ungetoent
   durch den Fliesstext, der dadurch kaum lesbar war (Ton siehe unten). */
.job-detail {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 32px) 24px 0;
  position: relative;
}
.job-detail::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(255, 255, 255, .035), transparent 72%),
    /* .55 statt der sonst ueblichen .40: hier steht LANGER Fliesstext direkt
       auf dem Foto (kein Karten-Wrapper wie auf der Listen-Page, wo die
       Texte in .jobs-card sitzen). Bei .40 kam selbst aufgehellter Text
       nur knapp ueber die AA-Grenze -- mit .55 bleibt Puffer, egal welcher
       Bildausschnitt bei welcher Fensterhoehe gerade darunter liegt. */
    rgba(13, 14, 17, .55);
  /* Untere Kante: .55 trifft dort auf die .40 der Folgesektion (.cred) --
     der Sprung war als waagerechte Linie quer ueber das Foto sichtbar
     (dieselbe Art Kante wie zuvor an der Hero-Unterkante). Statt die Flaeche
     hart enden zu lassen, laeuft sie ueber die letzten 160px aus, sodass
     der Rest-Unterschied dort auf 0 geht. Oben ist keine Ausblendung noetig:
     darueber sitzt die Nav, kein Farbwechsel. */
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 160px), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 160px), transparent 100%);
}
.job-detail > * { position: relative; }

.job-detail-breadcrumb {
  margin-bottom: 24px;
  font-size: 14px;
}
.job-detail-breadcrumb a {
  color: rgb(214, 216, 219);
  text-decoration: none;
  transition: color .2s;
}
.job-detail-breadcrumb a:hover { color: var(--red); }

/* ---------- HEADER ---------- */
.job-detail-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-hairline-dark);
}
.job-detail-art {
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.job-detail-title {
  font-family: var(--font-heading);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px;
  color: #fff;
}
.job-detail-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  font-size: 14px;
  color: rgb(214, 216, 219);
}
.job-detail-meta-line strong {
  color: #ddd;
  font-weight: 600;
  margin-right: 4px;
}

/* ---------- ZWEISPALTIGES LAYOUT ---------- */
.job-detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
  margin-bottom: 80px;
}
@media (max-width: 900px) {
  .job-detail-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ---------- CONTENT-SPALTE (Markdown-Body) ---------- */
.job-detail-content {
  font-size: 15px;
  line-height: 1.7;
  color: rgb(214, 216, 219);
  max-width: 720px;
}
.job-detail-content h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: #fff;
}
.job-detail-content h2:first-child { margin-top: 0; }
.job-detail-content p {
  margin: 0 0 1em;
}
.job-detail-content strong { color: #fff; }
.job-detail-content ul,
.job-detail-content ol {
  padding-left: 24px;
  margin: 0 0 1em;
}
.job-detail-content li {
  margin-bottom: 0.5em;
}
/* Bug-Trap: Selector bewusst eng gehalten. Wenn neue CTAs/Buttons in
   .job-detail-content wandern, brauchen sie kein explizites color override
   mehr — die rote Inline-Link-Regel greift nur noch auf Prosa-Elemente. */
.job-detail-content p a,
.job-detail-content li a,
.job-detail-content h2 a,
.job-detail-content h3 a,
.job-detail-content h4 a {
  color: var(--red);
  text-decoration: underline;
}

/* ---------- BOTTOM-CTA (Bewerben-Button am Ende der Content-Spalte) ---------- */
.job-detail-cta-bottom {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-hairline-dark);
}
.job-detail-cta-hint {
  font-size: 13px;
  color: rgb(214, 216, 219);
  margin: 0 0 14px;
}
/* Schlichtes Button-Treatment ohne Icon, ausbalanciertes Padding, kleinerer
   Border-Radius. inline-block damit der Button sich seinem Inhalt anschmiegt,
   nicht volle Container-Breite einnimmt. Hover dezent: Background-Shift
   dunkle Surface → hellere Surface plus minimaler Lift. IDEAL bleibt rot (.ideal-accent matcht
   den <span> direkt, vererbtes color: #fff aus dem Parent greift nicht). */
.job-detail-cta-primary {
  display: inline-block;
  padding: 16px 32px;
  background: var(--surface-dark-card);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.job-detail-cta-primary:hover {
  background: var(--surface-dark-card);
  transform: translateY(-1px);
}

/* ---------- SIDEBAR (sticky auf Desktop, statisch auf Mobile) ---------- */
.job-detail-sidebar-inner {
  background: var(--surface-dark-anchor);
  border: 1px solid var(--border-hairline-dark);
  border-radius: 14px;
  padding: 24px;
  position: sticky;
  top: 24px;
}
@media (max-width: 900px) {
  .job-detail-sidebar-inner { position: static; }
}

.job-detail-sidebar-h {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
  color: #fff;
}

.job-detail-meta {
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.job-detail-meta-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.job-detail-meta-row dt {
  font-size: 11px;
  font-weight: 700;
  color: var(--gy);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.job-detail-meta-row dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

/* Sidebar-Variante: proportional kleiner (12px 24px, 14px Font), identisches
   Treatment. display: block damit der Button die Sidebar-Card-Breite ausfüllt
   — die Sidebar ist 320px schmal, ein inline-block-Button würde dort optisch
   verloren wirken. text-align: center für visuelle Mitte. */
.job-detail-sidebar-cta {
  display: block;
  text-align: center;
  padding: 12px 24px;
  background: var(--surface-dark-card);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.job-detail-sidebar-cta:hover {
  background: var(--surface-dark-card);
  transform: translateY(-1px);
}
