/* ============================================================================
   pages/karriere.css — Layer 3 · Page 59 (/karriere/)
   Scope:   body#s-59  (is-relaunch bereits aktiv)
   Prefix:  kr-
   Zweck:   (1) HERO/Intro modern gestaltet — Grün-Verlaufsband, große Headline,
                lesbarer Lead, 4 Vorteile als 2x2 Check-Karten, saubere
                Abschnitts-Überschrift.
            (2) Karriere-Rollen-Grid (`.teaser-box.var3`) im GLEICHEN Card-Layout
                wie Über uns: Titel oben, Bild links (~44%), Text rechts,
                Button am Kartenboden.
   v5-ready: Fallback-Token-Kette (--forest → --green-800 …).
   Erstellt: 2026-07-28 · Update: 2026-07-29 Hero-Bereich neu (modern) + Cards Grid
   ============================================================================ */

body#s-59 {
  --kr-primary:     var(--forest,     var(--green-800));   /* #1B3C34 */
  --kr-primary-mid: var(--forest-mid, var(--green-700));
  --kr-surface:     var(--white,      #ffffff);
  --kr-border:      var(--cream-3,    var(--gray-200));    /* #E5E7EB */
  --kr-ink:         var(--ink,        var(--gray-950));    /* #0A0A0B */
  --kr-body:        var(--muted,      var(--gray-600));    /* #4B5563 */
  --kr-radius:      var(--radius-lg,  16px);
}

/* ===========================================================================
   HERO / Intro  (erste Section: Headline + Lead + 4 Vorteile + Abschnittstitel)
   =========================================================================== */
body#s-59 section:first-of-type {
  padding-top: 40px;   /* = Service-Standard (frame-space-before-medium) */
}

/* Der Col wird zum Flex-Container: Headline/Lead/Titel voll, Vorteile 2-spaltig */
body#s-59 section:first-of-type .col {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: stretch;
}

/* STRUKTUR im RTE-Intro:
     1. Element = Titel-Überschrift (h1–h5) · dann Lead-Absatz · dann die Vorteile.
   Titel wird über "erste Überschrift" adressiert (robust ggü. Heading-Ebene),
   Lead/Vorteile über Absatz-Position. Leere Absätze werden ausgeblendet. */

/* Titel = erste Überschrift im Intro → wie Service/Über-uns (41,6px @ Desktop / 700) */
body#s-59 section:first-of-type > .con .col > :is(h1, h2, h3, h4, h5):first-child {
  flex: 0 0 100%;
  text-transform: none;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--kr-ink);
  margin: 0 0 12px;
}

/* RTE-Leerzeile nach dem Titel einklappen, damit der Lead BÜNDIG (ohne Einzug/Lücke)
   unter der Überschrift sitzt. Der Redakteur hat eine Leerzeile als <p>&nbsp;</p>
   erfasst — die liegt sonst als Flex-Element neben dem Lead und rückt ihn ein.
   Struktur: Titel-Überschrift → Leerzeile (1. Absatz) → Lead (2.) → Vorteile (ab 3.).
   ⚠️ Falls die Leerzeile im CMS gelöscht wird, diese Regel entfernen (sonst würde sie
   den dann-1. Absatz = Lead ausblenden). */
body#s-59 section:first-of-type > .con .col > p:first-of-type { display: none; }

/* Lead = 2. Absatz (nach der Leerzeile) */
body#s-59 section:first-of-type > .con .col > p:nth-of-type(2) {
  flex: 0 0 100%;
  max-width: 900px;
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  line-height: 1.7;
  color: var(--kr-body);
  margin: 0 0 8px;
}

/* Die Vorteile = ab dem 3. Absatz → Check-Karten, 2x2. */
body#s-59 section:first-of-type > .con .col > p:nth-of-type(n+3) {
  flex: 1 1 calc(50% - 12px);
  min-width: 260px;
  position: relative;
  margin: 0;
  background: #fff;
  border: 1px solid var(--kr-border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 16px 20px 16px 52px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--kr-body);
  transition: box-shadow .18s ease, transform .18s ease;
}
body#s-59 section:first-of-type > .con .col > p:nth-of-type(n+3):hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
/* grüner Check-Kreis links */
body#s-59 section:first-of-type > .con .col > p:nth-of-type(n+3)::before {
  content: "✓";
  position: absolute;
  left: 16px;
  top: 16px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: var(--kr-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
/* fettes Label in Forest, inline (liest sich "Label – Beschreibung") */
body#s-59 section:first-of-type > .con .col > p:nth-of-type(n+3) b {
  color: var(--kr-primary);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Abschnitts-Überschrift "Erfahre mehr …" — Sentence Case, sauber */
body#s-59 section:first-of-type h4 { flex: 0 0 100%; }
body#s-59 section:first-of-type h4:empty { display: none; }
body#s-59 section:first-of-type h4:last-of-type {
  text-transform: none;
  font-weight: 700;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--kr-ink);
  margin: 20px 0 0;
}

@media (max-width: 640px) {
  body#s-59 section:first-of-type > .con .col > p:nth-of-type(n+3) {
    flex: 1 1 100%;
  }
}

/* ===========================================================================
   Rollen-Grid — var3-Karten im Über-uns-Layout
   =========================================================================== */
/* Gleiche Kartenhöhe pro Zeile (nur Teaser-Zeilen) */
body#s-59 .row:has(.teaser-box) { display: flex; flex-wrap: wrap; align-items: stretch; }
body#s-59 .row:has(.teaser-box) > .col { display: flex; }

/* var3-Karte: Grid wie Über uns (Titel oben, Bild links, Text rechts) */
body#s-59 .teaser-box.var3 {
  display: grid;
  grid-template-columns: 44% 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 24px;
  background: var(--kr-surface);
  border: 1px solid var(--kr-border);
  border-radius: var(--kr-radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}
body#s-59 .teaser-box.var3 h3 {
  grid-column: 1 / -1;
  text-transform: none;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--kr-ink);
  margin: 0 0 16px;
}
body#s-59 .teaser-box.var3 .teaser-box-img {
  float: none;
  width: auto;
  margin: 0;
  align-self: start;
}
body#s-59 .teaser-box-img.corner img {
  border-radius: 12px;
  width: 100%;
  height: auto;
  display: block;
}
body#s-59 .teaser-box.var3 .teaser-box-con {
  float: none;
  width: auto;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
body#s-59 .teaser-box-con p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--kr-body);
  margin: 0;
}

/* Button → Pill im Relaunch-Stil, am Kartenboden */
body#s-59 .teaser-box .contentbutton {
  float: none;
  display: inline-block;
  min-width: 0;
  margin: auto 0 0;
  align-self: flex-start;
  padding: 11px 24px;
  border-radius: 999px;
  background: var(--kr-primary);
  color: #fff;
  border: 2px solid var(--kr-primary);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
body#s-59 .teaser-box .contentbutton:hover {
  background: #fff;
  color: var(--kr-primary);
  border-color: var(--kr-primary);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

@media (max-width: 767px) {
  body#s-59 .teaser-box.var3 { grid-template-columns: 1fr; padding: 20px; }
  body#s-59 .teaser-box.var3 .teaser-box-con { margin-top: 14px; }
}
