/* ==========================================================================
   LMS Wetzlar · Karriere
   Ergänzt site.css um Stellenliste, Stellenansicht und Bewerbungsformular.
   Farben, Schrift und Bausteine kommen aus site.css, hier nur das Neue.
   ========================================================================== */

/* ---------- Ansichten: Übersicht oder einzelne Stelle ---------- */
.is-job .view--list { display: none; }
html:not(.is-job) .view--job { display: none; }

/* ---------- Navigation: aktuelle Seite ---------- */
.nav__links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 1px;
  width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--sky);
}
.menu__link[aria-current="page"] { display: flex; align-items: center; gap: 14px; }
.menu__link[aria-current="page"]::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sky); }

/* ---------- Hero ---------- */
.hero--jobs {
  min-height: max(620px, 86vh);
  min-height: max(620px, 86svh);
}

/* ---------- Stellenliste ---------- */
.section--jobs { padding-top: clamp(72px, 8vw, 128px); }

.jobs { display: grid; gap: 14px; }
.job {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) auto 50px; align-items: center; gap: 24px;
  padding: 26px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.job:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(0, 74, 172, .22); }
.job__main { display: grid; gap: 6px; min-width: 0; }
.job__area { font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.job__title { font-size: clamp(19px, 1.75vw, 23px); line-height: 1.25; letter-spacing: -0.02em; }
.job__link { color: var(--ink); transition: color .2s; }
.job__link .light { font-weight: 300; }
/* Die ganze Karte ist klickbar, der Link bleibt aber der Titel */
.job__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.job__link:focus-visible { outline: none; }
.job__link:focus-visible::after { outline: 2px solid var(--blue); outline-offset: 3px; }
.job:hover .job__link { color: var(--blue); }
.job__teaser { max-width: 66ch; font-size: 15.5px; line-height: 1.5; }
.job__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.job__meta li {
  padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper);
  font-size: 13.5px; line-height: 1.4;
}
.job__pay { display: grid; gap: 2px; text-align: right; }
.job__pay b { font-size: 17px; font-weight: 700; color: var(--blue); white-space: nowrap; font-variant-numeric: tabular-nums; }
.job__pay small { font-size: 13px; }
.job__go {
  width: 50px; height: 50px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--blue); color: var(--blue);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.job__go svg { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.job:hover .job__go { background: var(--blue); color: #fff; }
.job:hover .job__go svg { transform: translateX(3px); }

.job--open { background: transparent; border-style: dashed; border-color: var(--line-strong); box-shadow: none; }
.job--open .job__go { grid-column: 3; }

.noscript { padding: 22px 24px; border-radius: var(--r-lg); background: var(--paper); }

/* ---------- Leistungen und Ablauf ---------- */
.cases--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.steps--row { margin-top: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 44px); }
.steps--row .step { padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .14); }

/* ---------- Stellenansicht ---------- */
.view--job.is-entering .jobhead__inner { animation: rise .8s var(--ease) both; }
.view--job.is-entering .jobbody__grid { animation: rise .9s .08s var(--ease) both; }

.jobhead {
  position: relative; overflow: hidden; isolation: isolate;
  padding: calc(var(--nav-h) + clamp(20px, 3vw, 40px)) 0 clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 520px at 100% 0%, rgba(46, 174, 240, .1), transparent 62%),
    var(--white);
}
.jobhead::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(0, 74, 172, .16) 1.1px, transparent 1.5px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 48% 80% at 100% 10%, #000, transparent 72%);
  mask-image: radial-gradient(ellipse 48% 80% at 100% 10%, #000, transparent 72%);
}
.back {
  display: inline-flex; align-items: center; gap: 8px;
  margin-left: -10px; padding: 8px 14px 8px 10px; border-radius: 999px;
  font-size: 15px; font-weight: 600; color: var(--blue);
  transition: background-color .2s;
}
.back:hover { background: rgba(0, 74, 172, .06); }
.back svg { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.back:hover svg { transform: translateX(-3px); }

.jobhead__inner { margin-top: clamp(28px, 4vw, 52px); display: grid; gap: 20px; justify-items: start; max-width: 1000px; }
.jobhead__title {
  font-size: clamp(38px, 5.6vw, 76px); line-height: 1; letter-spacing: -0.04em;
  color: var(--blue); text-wrap: balance;
}
.jobhead__title:focus { outline: none; }
.jobhead__title .light { display: block; font-weight: 300; }
.jobhead__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.jobhead__tags .tag { display: inline-flex; align-items: center; gap: 9px; }
.jobhead__tags .tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sky); }
.jobhead__ctas { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.jobhead__fine { font-size: 14.5px; }

.jobbody { padding-block: clamp(56px, 7vw, 104px); }
.jobbody__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: clamp(40px, 6vw, 96px); align-items: start;
}
.jobbody__main { display: grid; gap: clamp(36px, 4vw, 52px); max-width: 760px; }
.jobbody__h { margin-bottom: 18px; font-size: clamp(24px, 2.3vw, 30px); letter-spacing: -0.025em; color: var(--blue); }
.jobbody .checks { gap: 14px; margin-top: 0; }
.jobbody .checks li { font-size: 17px; line-height: 1.55; }
.jobbody .checks .ico { width: 22px; height: 22px; margin-top: 2px; }

.about {
  display: grid; gap: 12px; justify-items: start;
  padding: clamp(24px, 3vw, 32px); border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--paper);
}
.about__label, .jobside__label { font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }

.jobside { position: sticky; top: calc(var(--nav-h) + 24px); }
.jobside__card {
  position: relative; overflow: hidden;
  display: grid; gap: 20px; padding: clamp(24px, 2.6vw, 32px);
  border-radius: var(--r-xl); border: 1px solid var(--line); background: #fff;
  box-shadow: var(--shadow-lg);
}
.jobside__card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--blue), var(--sky)); }
.jobside__pay { display: grid; gap: 4px; }
.jobside__amount {
  font-size: clamp(24px, 2.2vw, 28px); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em;
  color: var(--blue); font-variant-numeric: tabular-nums;
}
.jobside__note { font-size: 14.5px; }
.jobside__contact { display: grid; gap: 8px; justify-items: start; padding-top: 20px; border-top: 1px solid var(--line); }
.jobside__name { margin-top: 2px; font-size: 17px; font-weight: 600; line-height: 1.35; }
.jobside__name small { display: block; font-size: 14px; font-weight: 400; }
.jobside__contact a { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--blue); overflow-wrap: anywhere; }
.jobside__contact a:hover span { text-decoration: underline; text-underline-offset: 3px; }
.jobside__contact svg { width: 18px; height: 18px; flex: none; }

/* ---------- Bewerbungsformular ---------- */
.form__head { grid-column: 1 / -1; display: grid; gap: 12px; justify-items: start; margin-bottom: 4px; }
.form__head .form__title { margin-bottom: 0; }
.form__job {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  background: rgba(0, 74, 172, .07); color: var(--blue);
  font-size: 14.5px; font-weight: 600; line-height: 1.35;
}
.form__job svg { width: 18px; height: 18px; flex: none; }

.drop {
  position: relative; display: grid; justify-items: center; gap: 6px;
  padding: 24px 20px 22px; text-align: center;
  border: 1.5px dashed var(--field); border-radius: 14px; background: var(--paper);
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.drop:hover, .drop.is-over { border-color: var(--blue); background: rgba(0, 74, 172, .045); }
.drop:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(46, 174, 240, .22); }
.drop.is-invalid { border-color: var(--error); box-shadow: 0 0 0 4px rgba(180, 35, 24, .09); }
/* Das echte Dateifeld liegt unsichtbar über der Fläche: Klick und Ablegen funktionieren nativ */
.drop__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.drop__icon {
  width: 46px; height: 46px; margin-bottom: 4px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--blue);
  box-shadow: var(--shadow-sm);
}
.drop__icon svg { width: 22px; height: 22px; }
.drop__text { font-size: 15.5px; }
.drop__text b { font-weight: 600; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.drop__hint { max-width: 46ch; font-size: 13px; line-height: 1.45; }

.files { display: grid; gap: 8px; }
.files:empty { display: none; }
.file {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
  padding: 7px 7px 7px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.file__type {
  padding: 3px 7px; border-radius: 6px;
  background: rgba(0, 74, 172, .08); color: var(--blue);
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
}
.file__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.file__size { font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.file__x {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
  transition: background-color .2s, color .2s;
}
.file__x:hover { background: var(--paper); color: var(--blue); }
.file__x svg { width: 16px; height: 16px; }

.form__consents { display: grid; gap: 14px; }
.form__consents .err { margin-top: -6px; padding-left: 34px; }

.success__demo { padding: 6px 14px; border-radius: 999px; border: 1px dashed var(--line-strong); background: var(--paper); font-size: 13.5px; }

/* ---------- Leiste "Jetzt bewerben" (nur Smartphone) ---------- */
.applybar { display: none; }
.applybar__inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.applybar__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 600; color: var(--blue); }

/* ---------- Responsiv ---------- */
@media (max-width: 1040px) {
  .cases--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jobbody__grid { grid-template-columns: minmax(0, 1fr); }
  .jobside { position: static; max-width: 520px; }
}

@media (max-width: 760px) {
  .hero--jobs .facts > div { grid-template-columns: 136px minmax(0, 1fr); }
  .job { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 20px; }
  .job__pay { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; text-align: left; }
  .job__go { display: none; }
  .cases--3 { grid-template-columns: minmax(0, 1fr); }
  .steps--row { grid-template-columns: minmax(0, 1fr); }
  .jobhead__ctas .btn { width: 100%; }
  .jobside { max-width: none; }

  .is-job .applybar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 10px var(--gutter) max(10px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
    transform: translateY(105%); visibility: hidden;
    transition: transform .35s var(--ease), visibility 0s linear .35s;
  }
  .is-job .applybar.is-on { transform: none; visibility: visible; transition: transform .35s var(--ease); }
}
