/*
 * Bausteine, die es im Webflow-Stand nicht gab (ab Version 2):
 *   1. Zurück-Link
 *   2. Meldung (Aktuelles) im Detail
 *   3. Formular (Kontakt)
 *   4. Karriere: Bereiche, Stellenliste, Ablauf, Stellenanzeige
 *   5. 404-Seite
 *
 * Nutzt die Farben, Abstände und Radien aus webflow.css (CSS-Variablen in :root).
 * Muss nach webflow.css und site.css geladen werden.
 */

/* ==========================================================================
   1. Zurück-Link
   ========================================================================== */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--spacing--spacing-60);
  color: var(--primary--color-primary-60);
  font-size: var(--paragraph--l);
  font-weight: 500;
}

.back-link::before {
  content: '';
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.back-link:hover {
  text-decoration: underline;
}

.nowrap {
  white-space: nowrap;
}

/* ==========================================================================
   2. Meldung im Detail + „Weitere Meldungen“
   ========================================================================== */

.article {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.article-date {
  align-items: center;
  margin-bottom: var(--spacing--spacing-20);
  color: var(--neutral--color-neutral-60);
}

.article-heading {
  margin-bottom: var(--spacing--spacing-60);
  line-height: 135%;
}

.article-img {
  display: block;
  width: 100%;
  margin-bottom: var(--spacing--spacing-60);
  border-radius: var(--radius--radius-80);
}

.article-body {
  max-width: 44rem;
  color: var(--primary--color-primary-100);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.article-body a {
  color: var(--primary--color-primary-60);
  text-decoration: underline;
}

.news-title-link {
  color: inherit;
}

.news-title-link:hover {
  text-decoration: underline;
}

.news-more {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
}

.news-more .box-artikel.news {
  width: auto;
}

@media screen and (max-width: 991px) {
  .news-more {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 600px) {
  .news-more {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   3. Formular
   ========================================================================== */

.form-card {
  padding: var(--inset--inset-80);
  scroll-margin-top: 136px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing--spacing-45);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--spacing--spacing-45);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--spacing--spacing-15);
  min-width: 0;
}

.form-label {
  margin: 0;
  color: var(--primary--color-primary-100);
  font-size: var(--paragraph--l);
  font-weight: 600;
}

.form-optional {
  color: var(--neutral--color-neutral-60);
  font-weight: 400;
}

.form-input {
  width: 100%;
  margin: 0;
  padding: 11px var(--inset--inset-50);
  border: 1px solid var(--neutral--color-neutral-40);
  border-radius: var(--radius--radius-60);
  background-color: var(--neutral--color-neutral-0);
  color: var(--primary--color-primary-100);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
}

.form-input:hover {
  border-color: var(--neutral--color-neutral-60);
}

.form-input:focus-visible,
.form-check input:focus-visible,
.form-submit:focus-visible,
.job-link:focus-visible,
.notfound a:focus-visible {
  outline: 2px solid var(--primary--color-primary-40);
  outline-offset: 2px;
}

.form-input:focus {
  border-color: var(--primary--color-primary-60);
}

.form-input[aria-invalid="true"] {
  border-color: var(--error--color-error-20);
}

.form-select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23003356' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.form-textarea {
  min-height: 160px;
  resize: vertical;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing--spacing-30);
  margin: 0;
  color: var(--primary--color-primary-100);
  font-size: var(--paragraph--l);
  font-weight: 400;
  line-height: 1.5;
  cursor: pointer;
}

.form-check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--primary--color-primary-60);
}

.form-check a {
  color: var(--primary--color-primary-60);
  text-decoration: underline;
}

.form-error {
  margin: 0;
  color: var(--error--color-error-80);
  font-size: var(--paragraph--m);
}

.form-alert {
  margin-bottom: var(--spacing--spacing-45);
  padding: var(--inset--inset-40) var(--inset--inset-50);
  border-radius: var(--radius--radius-60);
  background-color: var(--error--color-error-60);
  color: #7d1f1f;
  font-size: var(--paragraph--l);
}

/* Hinweis im Testbetrieb (Formular verschickt nichts) */
.form-alert-test {
  background-color: #fff4d6;
  color: #6b4e00;
}

.form-submit {
  align-self: flex-start;
  border: 0;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.form-submit:hover {
  background-color: var(--primary--color-primary-100);
}

/* Verstecktes Feld gegen Spam: für Menschen unsichtbar, nicht per Tab erreichbar */
.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-sent {
  padding-left: 44px;
  background: url(../img/i-check.svg) 0 4px / 28px 28px no-repeat;
}

@media screen and (max-width: 600px) {
  .form-card {
    padding: var(--inset--inset-55);
  }

  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-submit {
    align-self: stretch;
    justify-content: center;
  }
}

/* ==========================================================================
   4. Karriere
   ========================================================================== */

.career-facts {
  padding: var(--spacing--spacing-80);
}

/* --- Arbeitsbereiche --- */

.area-list {
  margin: 0;
  border-bottom: 1px solid var(--neutral--color-neutral-20);
}

.area {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: var(--spacing--spacing-50);
  padding: var(--spacing--spacing-50) 0;
  border-top: 1px solid var(--neutral--color-neutral-20);
}

.area dt {
  margin: 0;
  color: var(--primary--color-primary-100);
  font-weight: 600;
}

.area dd {
  margin: 0;
}

.area-jobs {
  display: inline-block;
  margin-top: var(--spacing--spacing-20);
  color: var(--primary--color-primary-60);
  font-size: var(--paragraph--l);
  font-weight: 600;
  text-decoration: underline;
}

/* --- Stellenliste --- */

.job-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing--spacing-30);
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.job-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing--spacing-60);
  padding: var(--inset--inset-60) var(--inset--inset-80);
  border: 1px solid transparent;
  border-radius: var(--radius--radius-80);
  background-color: var(--neutral--color-neutral-0);
  box-shadow: 0 2px 3px 0 var(--shadow--box-shadow);
  color: inherit;
  transition: border-color 0.15s ease;
}

.job-link:hover {
  border-color: var(--primary--color-primary-40);
}

.job-link:hover .job-title {
  text-decoration: underline;
}

.job-main {
  display: flex;
  flex-direction: column;
  gap: var(--spacing--spacing-10);
  min-width: 0;
}

.job-title {
  color: var(--primary--color-primary-100);
  font-weight: 600;
}

.job-summary {
  max-width: 62ch;
  color: var(--neutral--color-neutral-60);
}

.job-meta {
  display: flex;
  flex: 0 0 32%;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--spacing--spacing-20);
}

.job-fact {
  padding: var(--inset--inset-20) var(--inset--inset-40);
  border: 1px solid var(--neutral--color-neutral-10);
  border-radius: var(--radius--radius-60);
  background-color: var(--neutral--color-neutral-5);
  color: var(--primary--color-primary-60);
  font-size: var(--paragraph--m);
  white-space: nowrap;
}

.job-example {
  border-color: var(--warning--color-warning-20);
  background-color: var(--warning--color-warning-20);
  color: #7a4f00;
}

/* --- Ablauf der Bewerbung --- */

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 6px 0 var(--spacing--spacing-80) 76px;
  counter-increment: step;
}

.step:last-child {
  padding-bottom: 0;
}

.step::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius--radius-full);
  background-color: var(--primary--color-primary-60);
  color: var(--neutral--color-neutral-0);
  font-size: 1.125rem;
  font-weight: 700;
}

.step::after {
  content: '';
  position: absolute;
  top: 56px;
  bottom: 12px;
  left: 21px;
  width: 2px;
  background-color: var(--neutral--color-neutral-20);
}

.step:last-child::after {
  display: none;
}

.step .h3 {
  margin-bottom: var(--spacing--spacing-10);
}

/* --- Stellenanzeige --- */

.job-example-note {
  display: inline-block;
  margin-bottom: var(--spacing--spacing-40);
  white-space: normal;
}

.job-body p,
.job-body ul,
.job-body ol,
.job-body blockquote {
  margin-top: 0;
  margin-bottom: 1.1em;
}

.job-body h2 {
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  font-size: var(--headline--h3);
  line-height: 145%;
}

.job-body h3 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-size: var(--headline--h4);
  line-height: 150%;
}

.job-body ul {
  padding-left: 0;
  list-style: none;
}

.job-body ul li {
  margin-bottom: var(--spacing--spacing-20);
  padding-left: 36px;
  background: url(../img/i-check.svg) 0 2px / 24px 24px no-repeat;
}

.job-body ol {
  padding-left: 1.4em;
}

.job-body hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px solid var(--neutral--color-neutral-20);
}

.job-card {
  position: sticky;
  top: 136px;
  padding: var(--inset--inset-80);
}

.job-facts {
  margin: 0 0 var(--spacing--spacing-50);
  border-top: 1px solid var(--neutral--color-neutral-10);
}

.job-facts > div {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing--spacing-40);
  padding: 10px 0;
  border-bottom: 1px solid var(--neutral--color-neutral-10);
  font-size: var(--paragraph--l);
}

.job-facts dt {
  margin: 0;
  color: var(--neutral--color-neutral-60);
  font-weight: 400;
}

.job-facts dd {
  margin: 0;
  color: var(--primary--color-primary-100);
  font-weight: 600;
  text-align: right;
}

.job-apply {
  width: 100%;
  justify-content: center;
  font-weight: 600;
  transition: background-color 0.15s ease;
}

.job-apply:hover {
  background-color: var(--primary--color-primary-100);
}

.job-hint {
  margin-top: var(--spacing--spacing-40);
  color: var(--neutral--color-neutral-60);
  line-height: 1.5;
}

@media screen and (max-width: 991px) {
  .job-card {
    position: static;
  }
}

@media screen and (max-width: 767px) {
  .career-facts {
    padding: var(--spacing--spacing-60);
  }

  .area {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--spacing--spacing-20);
  }

  .job-link {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing--spacing-40);
    padding: var(--inset--inset-55);
  }

  .job-meta {
    flex: none;
    justify-content: flex-start;
  }

  .step {
    padding-left: 60px;
  }
}

/* ==========================================================================
   5. 404-Seite: „Nicht auf Lager“
   Ziffern aus gebürstetem Stahl, die Null als Rohrquerschnitt.
   --light (0–1) und --angle (Grad) setzt site.js aus der Mausposition.
   ========================================================================== */

.notfound {
  --light: 0.35;
  --angle: 20;
  --steel-dark: #5e6e8e;
  --steel-mid: #a8b8d6;
  --steel-light: #f3f5f7;

  padding: 96px 72px 128px;
  overflow: hidden;
  background-color: var(--primary--color-primary-100);
  color: var(--neutral--color-neutral-30);
}

.notfound-inner {
  max-width: 1440px;
  margin: 0 auto;
}

.notfound-figure {
  display: flex;
  align-items: center;
  gap: 0.06em;
  margin-bottom: var(--spacing--spacing-80);
  font-size: clamp(11rem, 21vw, 19rem);
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.02em;
  user-select: none;
}

.notfound-digit {
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 1px, rgba(0, 30, 51, 0.06) 1px 3px),
    linear-gradient(105deg,
      var(--steel-dark) 0%, var(--steel-light) 12%, var(--steel-mid) 26%, #ffffff 40%,
      #6380ab 54%, #e0e6eb 68%, var(--steel-dark) 82%, var(--steel-light) 100%);
  background-size: auto, 220% 100%;
  background-position: 0 0, calc(var(--light) * 100%) 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Rohr im Querschnitt: gedrehter Stahl außen, dunkle Öffnung innen */
.notfound-tube {
  position: relative;
  flex: none;
  width: 0.7em;
  height: 0.7em;
  margin-top: 0.09em;
  border-radius: 50%;
  background-image:
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.12) 0 1px, rgba(0, 30, 51, 0.08) 1px 3px),
    conic-gradient(from calc(var(--angle) * 1deg),
      var(--steel-light), var(--steel-dark) 11%, #e0e6eb 23%, #6380ab 36%, #ffffff 50%,
      var(--steel-dark) 61%, #ebeff2 74%, #6380ab 87%, var(--steel-light));
  box-shadow: 0 0.04em 0.12em rgba(0, 0, 0, 0.45);
}

.notfound-tube::before {
  content: '';
  position: absolute;
  inset: 23%;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #003356 0%, #001e33 55%, #00121f 100%);
  box-shadow:
    inset 0 0.03em 0.08em rgba(0, 0, 0, 0.7),
    0 0 0 0.012em rgba(255, 255, 255, 0.55);
}

.notfound-content {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 8.33%;
  align-items: center;
}

.notfound-heading {
  margin-bottom: var(--spacing--spacing-50);
  line-height: 120%;
}

.notfound-lead {
  max-width: 34rem;
  margin-bottom: var(--spacing--spacing-60);
  font-size: 1.125rem;
  line-height: 1.6;
}

.notfound-stock {
  padding: var(--inset--inset-80);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius--radius-80);
  background-color: rgba(255, 255, 255, 0.04);
}

.notfound-stock-title {
  margin-bottom: var(--spacing--spacing-30);
}

.notfound-facts {
  margin: 0 0 var(--spacing--spacing-60);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.notfound-facts > div {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing--spacing-50);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-size: var(--paragraph--l);
}

.notfound-facts dt {
  margin: 0;
  font-weight: 400;
}

.notfound-facts dd {
  margin: 0;
  color: var(--neutral--color-neutral-0);
  font-weight: 600;
  text-align: right;
}

.notfound-path {
  overflow-wrap: anywhere;
}

.notfound-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 50%;
  background-color: var(--accent--color-accent-80);
}

.notfound-dot-out {
  background-color: #ff5a6e;
}

.notfound-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing--spacing-20) var(--spacing--spacing-50);
  margin: 0;
  padding: 0;
  list-style: none;
}

.notfound-links a {
  color: var(--neutral--color-neutral-0);
  font-size: var(--paragraph--l);
  font-weight: 500;
}

.notfound-links a:hover {
  text-decoration: underline;
}

/* Einmal beim Laden: das Rohr rollt herein, das Licht zieht über die Ziffern */
@media (prefers-reduced-motion: no-preference) {
  .notfound-tube {
    animation: notfound-roll 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .notfound-digit {
    animation: notfound-sheen 1.4s ease-out both;
  }

  .notfound.is-live .notfound-digit {
    transition: background-position 0.25s ease-out;
  }
}

@keyframes notfound-roll {
  from {
    transform: translateX(-60vw) rotate(-540deg);
  }
  to {
    transform: translateX(0) rotate(0deg);
  }
}

@keyframes notfound-sheen {
  from {
    background-position: 0 0, 100% 50%;
  }
}

@media screen and (min-width: 1440px) {
  .notfound {
    padding-left: 120px;
    padding-right: 120px;
  }
}

@media screen and (max-width: 991px) {
  .notfound {
    padding: 72px 48px 96px;
  }

  .notfound-content {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--spacing--spacing-80);
  }

  .notfound-figure {
    font-size: min(42vw, 19rem);
  }
}

@media screen and (max-width: 767px) {
  .notfound {
    padding: 56px 32px 72px;
  }

  .notfound-figure {
    margin-bottom: var(--spacing--spacing-60);
  }

  .notfound-stock {
    padding: var(--inset--inset-55);
  }
}

@media screen and (max-width: 479px) {
  .notfound {
    padding-left: 16px;
    padding-right: 16px;
  }
}
