/* FREYTAG Bauelemente. Farben zentral hier ändern. Keine externen Schriften (DSGVO). */
:root {
  --dunkel: #1d2a35;      /* Anthrazit, wie das Menü im CRM */
  --dunkel-2: #2b3c4b;
  --akzent: #1f418d;      /* Blau aus dem Logo */
  --akzent-dunkel: #17316a;
  --gelb: #fbec05;        /* Gelb aus dem Logo */
  --text: #22303b;
  --leise: #5d6b77;
  --linie: #dfe4e8;
  --grau: #f3f5f6;
  --weiss: #fff;
  --rund: 6px;
  --breite: 1160px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; color: var(--text); background: var(--weiss);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--akzent-dunkel); }
a:hover { color: var(--akzent); }
:focus-visible { outline: 3px solid #2f7ed8; outline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; color: var(--dunkel); text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; margin-top: 1.8em; }
p { margin: 0 0 1em; }
.breite { max-width: var(--breite); margin: 0 auto; padding: 0 20px; }
.schmal { max-width: 46em; }
.sprung { position: absolute; left: -999px; top: 0; background: var(--weiss); padding: 10px 16px; z-index: 100; }
.sprung:focus { left: 10px; top: 10px; }

/* Kopf */
.leiste { background: var(--dunkel); color: #d5dde3; font-size: .85rem; }
.leiste-innen { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; }
.leiste a { color: #fff; text-decoration: none; }
.leiste a:hover { text-decoration: underline; }
.leiste-rechts { display: flex; gap: 22px; flex-wrap: wrap; }
.kopf { background: var(--weiss); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 50; }
.kopf-innen { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 74px; }
.logo img { width: 196px; height: auto; }
.menue ul { list-style: none; margin: 0; padding: 0; }
.menue > ul { display: flex; align-items: center; gap: 4px; }
.menue a { display: block; padding: 10px 14px; color: var(--dunkel); text-decoration: none; font-weight: 600; border-radius: var(--rund); }
.menue a:hover, .menue a[aria-current] { color: var(--akzent); }
.hat-unter { position: relative; }
.hat-unter > a::after { content: ""; display: inline-block; margin-left: 7px; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-3px) rotate(45deg); }
.hat-unter ul { position: absolute; left: 0; top: 100%; min-width: 270px; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--rund); box-shadow: 0 12px 30px rgba(29,42,53,.14); padding: 6px; visibility: hidden; opacity: 0; transition: opacity .15s; }
.hat-unter:hover ul, .hat-unter:focus-within ul { visibility: visible; opacity: 1; }
.hat-unter ul a { font-weight: 500; padding: 8px 12px; }
.hat-unter ul a:hover { background: var(--grau); }
.anmelden { margin-left: 10px; }
.menue .anmelden a { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--dunkel); padding: 8px 14px; }
.menue .anmelden a:hover { background: var(--dunkel); color: #fff; }
.menue-knopf { display: none; font: inherit; font-weight: 600; background: none; border: 1.5px solid var(--dunkel); color: var(--dunkel); border-radius: var(--rund); padding: 8px 14px; cursor: pointer; }

/* Titelbild */
.titelbild { position: relative; background: var(--dunkel) center/cover no-repeat; color: #fff; padding: 90px 0 70px; isolation: isolate; }
.titelbild::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(20,30,39,.88) 0%, rgba(20,30,39,.62) 55%, rgba(20,30,39,.3) 100%); }
.titelbild.gross { padding: 130px 0 110px; }
.titelbild h1 { color: #fff; max-width: 16em; margin-bottom: .3em; }
.titelbild .ueber { text-transform: uppercase; letter-spacing: .12em; font-size: .82rem; font-weight: 700; color: #d6e0ff; margin-bottom: .8em; }
.titelbild .unter { font-size: 1.15rem; max-width: 34em; color: #e8edf1; }
.knoepfe { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.6em; }
.knopf { display: inline-block; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; background: var(--akzent); color: #fff; border: 2px solid var(--akzent); border-radius: var(--rund); padding: 11px 22px; }
.knopf:hover { background: var(--akzent-dunkel); border-color: var(--akzent-dunkel); color: #fff; }
.knopf.gelb { background: var(--gelb); border-color: var(--gelb); color: #17316a; }
.knopf.gelb:hover { background: #ffe000; border-color: #ffe000; color: #17316a; }
.knopf.hell { background: transparent; border-color: #fff; color: #fff; }
.knopf.hell:hover { background: #fff; color: var(--dunkel); }
.knopf.rand { background: transparent; border-color: var(--dunkel); color: var(--dunkel); }
.knopf.rand:hover { background: var(--dunkel); color: #fff; }

/* Abschnitte */
.abschnitt { padding: 70px 0; }
.abschnitt.grau { background: var(--grau); }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.zwei.oben { align-items: start; }
.zwei video, .text video { aspect-ratio: 16/9; }
.zwei video, .text video, .text img.haupt { width: 100%; border-radius: var(--rund); background: #000; margin-bottom: 1.4em; }
.text img.haupt { background: var(--grau); aspect-ratio: 16/9; object-fit: cover; }

.kacheln { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.kacheln.gr-klein { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.kacheln.gr-klein span { font-size: .92rem; padding: 28px 10px 10px; }
.kacheln.gr-gross { grid-template-columns: repeat(3, 1fr); gap: 22px; }
.kacheln.gr-gross span { font-size: 1.25rem; padding: 46px 20px 18px; }
.kacheln a { position: relative; display: block; border-radius: var(--rund); overflow: hidden; background: var(--dunkel-2); aspect-ratio: 4/3; text-decoration: none; }
.kacheln img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.kacheln a:hover img { transform: scale(1.05); }
.kacheln span { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 16px 14px; color: #fff; font-weight: 700; font-size: 1.05rem; line-height: 1.25; background: linear-gradient(transparent, rgba(20,30,39,.9)); }

.partner { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.partner a { display: flex; align-items: center; justify-content: center; height: 110px; padding: 18px; border: 1px solid var(--linie); border-radius: var(--rund); background: #fff; }
.partner a:hover { border-color: var(--dunkel); }
.partner img { max-height: 100%; width: auto; object-fit: contain; }

.mit-seite { display: grid; grid-template-columns: 260px 1fr; gap: 50px; align-items: start; }
.seite { position: sticky; top: 100px; }
.seite ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--linie); border-radius: var(--rund); overflow: hidden; }
.seite a { display: block; padding: 11px 16px; text-decoration: none; color: var(--dunkel); font-weight: 600; border-bottom: 1px solid var(--linie); }
.seite li:last-child a { border-bottom: 0; }
.seite a:hover { background: var(--grau); }
.seite a[aria-current] { background: var(--dunkel); color: #fff; }

.galerie { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.galerie a { display: block; border-radius: var(--rund); overflow: hidden; aspect-ratio: 4/3; background: var(--linie); cursor: zoom-in; }
.galerie img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.galerie a:hover img { transform: scale(1.04); }
dialog.gross { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; }
dialog.gross::backdrop { background: rgba(15,22,28,.9); }
dialog.gross img { max-width: 96vw; max-height: 92vh; border-radius: var(--rund); }
dialog.gross button { position: fixed; top: 12px; right: 16px; width: 44px; height: 44px; font-size: 30px; line-height: 1; border: 0; border-radius: 50%; background: #fff; color: var(--dunkel); cursor: pointer; }

.beratung { background: var(--dunkel); color: #d5dde3; padding: 46px 0; }
.beratung h2 { color: #fff; margin-bottom: .3em; }
.beratung p { margin: 0; }
.beratung-innen { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.beratung .knoepfe { margin-top: 0; }

/* Formular */
.formular { background: var(--grau); border-radius: var(--rund); padding: 28px; display: grid; gap: 16px; }
.formular h2 { margin: 0; }
.formular label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.formular input[type=text], .formular input[type=email], .formular input[type=tel], .formular select, .formular textarea {
  font: inherit; width: 100%; padding: 11px 12px; border: 1px solid #b9c3cb; border-radius: var(--rund); background: #fff; color: var(--text);
}
.formular textarea { resize: vertical; }
.reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.formular .haken { grid-template-columns: auto 1fr; align-items: start; font-weight: 400; }
.formular .haken input { width: 20px; height: 20px; margin-top: 3px; }
.formular .haken .fehler { grid-column: 2; }
.formular .knopf { justify-self: start; }
.fehler { color: #a30d22; font-weight: 600; font-size: .9rem; }
.falle { position: absolute; left: -9999px; }
.hinweis { border-radius: var(--rund); padding: 16px 20px; margin: 0; }
.hinweis.gut { background: #e6f4ea; border: 1px solid #9ccfab; padding: 26px 28px; }
.hinweis.schlecht { background: #fdecee; border: 1px solid #efa9b3; color: #7d0a1b; }
address { font-style: normal; margin-bottom: 1em; }
.recht-text { max-width: 50em; }
.recht-text h2 { margin-top: 1.8em; }

/* Fuß */
.fuss { background: #141e27; color: #b9c5ce; font-size: .95rem; padding: 54px 0 0; }
.fuss-innen { display: grid; grid-template-columns: 1.1fr 1.6fr .9fr; gap: 40px; }
.fuss h2 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; }
.fuss ul { list-style: none; margin: 0; padding: 0; }
.fuss li { margin-bottom: 6px; }
.fuss a { color: #e6ecf0; text-decoration: none; }
.fuss a:hover { text-decoration: underline; color: #fff; }
.zweispaltig { columns: 2; column-gap: 30px; }
.recht { border-top: 1px solid #2a3947; margin-top: 40px; padding-top: 18px; padding-bottom: 22px; font-size: .85rem; }

@media (max-width: 980px) {
  .kacheln, .kacheln.gr-gross { grid-template-columns: repeat(2, 1fr); }
  .partner { grid-template-columns: repeat(3, 1fr); }
  .zwei, .mit-seite, .fuss-innen { grid-template-columns: 1fr; gap: 30px; }
  .seite { position: static; }
  .menue-knopf { display: block; }
  .menue { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--linie); box-shadow: 0 14px 24px rgba(29,42,53,.12); padding: 8px 20px 18px; max-height: calc(100vh - 80px); overflow: auto; }
  .menue.offen { display: block; }
  .menue > ul { display: block; }
  .hat-unter > a::after { display: none; }
  .hat-unter ul { position: static; visibility: visible; opacity: 1; border: 0; box-shadow: none; padding: 0 0 0 14px; min-width: 0; }
  .anmelden { margin: 10px 0 0; }
}
@media (max-width: 560px) {
  .kacheln.gr-gross { grid-template-columns: 1fr; }
  body { font-size: 16px; }
  .breite { padding: 0 16px; }
  .leiste-innen > span:first-child { display: none; }
  .logo img { width: 160px; }
  .titelbild, .titelbild.gross { padding: 64px 0 52px; }
  .abschnitt { padding: 48px 0; }
  .kacheln { gap: 12px; }
  .kacheln span { font-size: .92rem; padding: 28px 10px 10px; }
  .partner { grid-template-columns: repeat(2, 1fr); }
  .reihe { grid-template-columns: 1fr; }
  .formular { padding: 20px; }
  .zweispaltig { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .leiste, .kopf, .beratung, .fuss, .seite { display: none; }
}
