/* Verbindliche KS24-Typographie und letzte proportionale Korrekturen. */
.ks24,
.ks24-formular,
.ks24-cockpit-wrap,
.ks24-legal {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.ks24 h1 { font-size: 52px; line-height: 1.08; }
.ks24 h2 { font-size: 34px; line-height: 1.18; }
.ks24 h3 { font-size: 22px; line-height: 1.28; }
.ks24 p,
.ks24 li { line-height: 1.55; }

.ks24-head-in { min-height: 82px; align-items: center; }
.ks24-head a[aria-label*="Startseite"] { display: flex; align-items: center; }
.ks24-logo { display: block; height: auto; }
.ks24-fuss-logo { display: block; height: auto; }
.ks24-fuss-claim { display: none !important; }
.ks24-fuss { color: #fff; background: #0d2b4f; }
.ks24-fuss a {
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
}
.ks24 { width: 100%; max-width: 100%; overflow-x: clip; }
.ks24 a { overflow-wrap: anywhere; }
.ks24-wrap,
.ks24-hero-grid,
.ks24-hero-text { min-width: 0; max-width: 100%; }
.ks24-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ks24-hero-text,
.ks24-hero-text h1,
.ks24-hero-text p { overflow-wrap: break-word; word-break: normal; }

/* Die vollständige Desktopnavigation bleibt einzeilig. Unterhalb der dafür
   nötigen Breite übernimmt bewusst das kompakte Menü. */
@media (min-width: 1181px) {
  .ks24-head-in {
    width: 100%;
    max-width: 1320px !important;
    gap: 20px !important;
  }
  .ks24-logo { width: 250px !important; flex: 0 0 auto; }
  .ks24-menu { gap: 18px !important; flex-wrap: nowrap; }
  .ks24-menu a { white-space: nowrap; overflow-wrap: normal; }
}

@media (min-width: 701px) and (max-width: 1180px) {
  .ks24-head-in > nav { display: none !important; }
  .ks24-head .ks24-btn,
  .ks24-head-schlank .ks24-btn { display: inline-flex !important; width: auto !important; }
  .ks24-burger { display: block !important; }
}

.ks24-spanne-marken {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
.ks24-spanne-marken > span {
  min-width: 0;
  text-align: center !important;
}
.ks24-spanne-marken b,
.ks24-spanne-marken em {
  display: block;
  text-align: center;
  overflow-wrap: anywhere;
}

@media (max-width: 820px) {
  .ks24 h1 { font-size: 38px; line-height: 1.12; }
  .ks24 h2 { font-size: 28px; line-height: 1.2; }
  .ks24 h3 { font-size: 20px; }
  .ks24,
  .ks24-formular,
  .ks24-cockpit-wrap,
  .ks24-legal { font-size: 17px; }
  .ks24-fuss { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
  .ks24-fuss-pflicht,
  .ks24-fuss-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; }
}

/* Die Kurzbeschriftung muss nach allen in den Seitentemplates enthaltenen
   Regeln gewinnen. Sonst schiebt der lange Header-CTA die Mobilseite auf. */
@media (max-width: 700px) {
  .ks24-head-in {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto;
    width: 100%;
    max-width: 100%;
    min-height: 70px;
    padding: 10px 12px !important;
    gap: 8px !important;
  }
  .ks24-head-in .ks24-logo {
    width: min(180px, 44vw) !important;
    max-width: 100% !important;
  }
  .ks24-head-in > nav { display: none !important; }
  .ks24-head .ks24-btn,
  .ks24-head-schlank .ks24-btn {
    width: auto !important;
    min-width: 0;
    max-width: 96px;
    min-height: 40px !important;
    padding: 0 10px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
  }
  .ks24-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .ks24-nur-gross { display: none !important; }
  .ks24-nur-klein { display: inline !important; }
  .ks24-burger {
    display: block;
    width: 40px;
    min-width: 40px;
    padding: 8px 10px !important;
  }
  .ks24-wrap { width: 100%; }
  .ks24-hero-grid,
  .ks24-hero-text,
  .ks24-hero-cta { width: 100%; }
  .ks24 h1,
  .ks24 h2,
  .ks24 h3 {
    hyphens: auto;
    overflow-wrap: break-word;
    word-break: normal;
  }
}

@media (max-width: 390px) {
  .ks24 h1 { font-size: 34px; }
  .ks24-rat-kopf .ks24-sek-kopf { min-width: 0; width: 100%; }
  .ks24-rat-kopf h1 { font-size: 30px; hyphens: auto; overflow-wrap: break-word; }
  .ks24-head-in { min-height: 70px; }
  .ks24-head-in .ks24-logo { width: 42vw !important; max-width: 145px !important; }
  .ks24-head .ks24-btn,
  .ks24-head-schlank .ks24-btn { max-width: 88px; padding: 0 8px !important; }
}
