
:root {
  --akzent:       #820000;
  --akzent-weich: rgba(130, 0, 0, 0.05);
  --akzent-fest:  rgba(130, 0, 0, 0.15);

  --ueberschrift: #333333;
  --text:         #555555;
  --leise:        #888888;

  --linie:        rgba(200, 200, 200, 0.75);
  --linie-zart:   rgba(220, 220, 220, 0.4);

  --leiste:       #f6f6f6;
  --leiste-alt:   #ededed;

  --radius:       0.375em;
  --mn-breite:    19.5rem;
  --mobilbar:     3.5rem;

  --ff-text: Verdana, Tahoma, Arial, sans-serif;
  --ff-head: Verdana, Tahoma, Arial, sans-serif;
}

/* ---- Grundgerüst (Flexbox) ---- */
#wrapper {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  min-height: 100vh;
}
#site-nav { order: -1 !important; flex: 0 0 auto !important; }
#main    { order: 1 !important; flex: 1 1 0% !important; min-width: 0 !important; width: auto !important; float: none !important; box-sizing: border-box; }

/* Alte Float-Regeln fuer #contents neutralisieren - lebt jetzt in #main */
#main #contents { width: 100%; float: none; box-sizing: border-box !important; }

#site-nav { background: #ffffff; font-size: 1rem; padding-left: 1rem; }

@media screen and (min-width: 1281px) {
  #site-nav {
    position: sticky; top: 0; align-self: start; height: 100vh;
    width: var(--mn-breite); border-right: 1px solid #e3e7e9;
  }
  #main > .inner { padding-left: 2.5rem !important; }
  #menu-neu { width: 100%; height: 100%; }
  .mn-kopf { height: 3rem; padding-left: 0.9rem; }
  .mn-kopf__marke { font-size: 0.98rem; }
  #menu-neu .mn-zurueck { height: 2.5rem; font-size: 0.92rem; padding: 0 0.9rem; }
  .mn-liste a, #menu-neu .mn-weiter { padding: 0.55rem 0.7rem 0.55rem 0.9rem; font-size: 0.92rem; }
  .mn-service { margin-top: 0.9rem; }
  .mn-service a { font-size: 0.86rem; }
  #menu-neu .mn-schliessen { display: none; }
}

@media screen and (max-width: 1280px) {
  #site-nav {
    position: fixed; top: var(--mobilbar); left: 0;
    width: min(24rem, 92%); height: calc(100% - var(--mobilbar));
    margin-left: 0; transform: translateX(0);
    transition: transform 0.28s ease;
    box-shadow: 0 0 3em rgba(0, 0, 0, 0.25); z-index: 940;
  }
  #site-nav.inactive { margin-left: 0; transform: translateX(-101%); box-shadow: none; }
  #menu-neu { height: 100%; }
}

/* ---- Mobile Kopfleiste + Schleier ---- */
.mobilbar, .menue-schleier { display: none; }

@media screen and (max-width: 1280px) {
  .mobilbar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    position: sticky; top: 0; z-index: 950; height: var(--mobilbar);
    padding: 0 0.5rem 0 1rem; background: #ffffff; border-bottom: 1px solid var(--linie);
  }
  .mobilbar__marke {
    font-family: var(--ff-head); font-size: 1.05rem; font-weight: 700;
    color: var(--ueberschrift); border-bottom: 0; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
  }
  .mobilbar__marke span { color: var(--akzent); }
  .mobilbar .mobilbar__knopf {
    flex: 0 0 auto; position: relative; width: 3rem; height: 3rem; padding: 0;
    background: transparent; box-shadow: none; border: 0; border-radius: var(--radius);
    color: var(--ueberschrift); line-height: normal;
  }
  .mobilbar .mobilbar__knopf:hover, .mobilbar .mobilbar__knopf:active { background: var(--leiste); }
  .mobilbar__knopf::before {
    content: ''; position: absolute; left: 50%; top: 50%; width: 1.4rem; height: 2px;
    background: currentColor; transform: translate(-50%, -50%);
    box-shadow: 0 -0.45rem 0 currentColor, 0 0.45rem 0 currentColor;
  }
  .mobilbar__knopf[aria-expanded="true"]::before { box-shadow: none; transform: translate(-50%, -50%) rotate(45deg); }
  .mobilbar__knopf[aria-expanded="true"]::after {
    content: ''; position: absolute; left: 50%; top: 50%; width: 1.4rem; height: 2px;
    background: currentColor; transform: translate(-50%, -50%) rotate(-45deg);
  }
  .menue-schleier {
    display: block; position: fixed; top: var(--mobilbar); left: 0; right: 0; bottom: 0;
    background: rgba(30, 33, 36, 0.45); z-index: 930;
  }
  .menue-schleier[hidden] { display: none; }
  body.menue-offen { overflow: hidden; }
  #wrapper { min-height: calc(100vh - var(--mobilbar)); }
}

/* ---- Panel-Optik ---- */
#site-nav, #site-nav *, .mobilbar, .mobilbar * { box-sizing: border-box; }
#main .inner { box-sizing: border-box; }
#site-nav { overflow-x: hidden; }
#menu-neu { display: flex; flex-direction: column; background: #ffffff; font-family: var(--ff-text); }
.mn-kopf {
  display: flex; align-items: center; justify-content: space-between; height: 3.5rem;
  padding: 0 0.5rem 0 1rem; border-bottom: 1px solid #e3e7e9; flex: 0 0 auto;
}
.mn-kopf__marke { font-family: var(--ff-head); font-size: 1.05rem; font-weight: 700; color: var(--ueberschrift); }
.mn-kopf__marke span { color: var(--akzent); }
.mn-kopf__marke.mn-heim {
  appearance: none; background: transparent; border: 0; box-shadow: none; border-radius: var(--radius);
  padding: 0.4rem 0.5rem; margin: -0.4rem -0.5rem; height: auto; line-height: normal;
  text-align: left; text-transform: none; letter-spacing: normal; white-space: nowrap; cursor: pointer;
}
.mn-kopf__marke.mn-heim:hover, .mn-kopf__marke.mn-heim:active { background: #f5f6f7; }
#menu-neu .mn-schliessen {
  position: relative; width: 3rem; height: 3rem; padding: 0; border: 0; box-shadow: none;
  background: transparent; border-radius: var(--radius); color: var(--ueberschrift); line-height: normal;
}
#menu-neu .mn-schliessen::before, #menu-neu .mn-schliessen::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 1.3rem; height: 2px; background: currentColor;
}
#menu-neu .mn-schliessen::before { transform: translate(-50%, -50%) rotate(45deg); }
#menu-neu .mn-schliessen::after { transform: translate(-50%, -50%) rotate(-45deg); }
.mn-balken { flex: 0 0 auto; }
#menu-neu .mn-zurueck {
  display: flex; align-items: center; gap: 0.75rem; width: 100%; height: 3rem; padding: 0 1rem;
  background: var(--akzent); color: #ffffff; border: 0; box-shadow: none; border-radius: 0;
  font: inherit; font-size: 1rem; font-weight: 600; letter-spacing: 0; text-transform: none;
  text-align: left; line-height: normal;
}
#menu-neu .mn-zurueck::before {
  content: ''; flex: 0 0 auto; width: 0.5rem; height: 0.5rem;
  border-left: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); margin-left: 0.15rem;
}
.mn-buehne { position: relative; flex: 1 1 auto; overflow: hidden; }
.mn-panel {
  position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: #ffffff; transform: translateX(100%); transition: transform 0.28s ease; visibility: hidden;
}
.mn-panel.aktiv { transform: translateX(0); visibility: visible; }
.mn-panel.links { transform: translateX(-30%); visibility: hidden; }
.mn-liste { list-style: none; margin: 0; padding: 0; }
.mn-liste li { margin: 0; padding: 0; }
.mn-liste a, #menu-neu .mn-weiter {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%;
  padding: 0.9rem 1rem 0.9rem 1.5rem; border: 0; border-bottom: 1px solid #e8ecee; border-radius: 0;
  background: transparent; box-shadow: none; color: #1c2226; font: inherit; font-size: 1.02rem;
  font-weight: 400; letter-spacing: 0; text-transform: none; text-align: left; text-decoration: none;
  line-height: 1.35; height: auto;
}
.mn-liste a:hover, #menu-neu .mn-weiter:hover, #menu-neu .mn-weiter:active { background: #f5f6f7; color: #1c2226; }
#menu-neu .mn-weiter::after {
  content: ''; flex: 0 0 auto; width: 0.5rem; height: 0.5rem;
  border-right: 2px solid #8a9298; border-top: 2px solid #8a9298;
  transform: rotate(45deg); margin-right: 0.35rem;
}
.mn-liste a[aria-current="page"], #menu-neu .mn-weiter[aria-current="true"] {
  background: var(--akzent-weich); box-shadow: inset 4px 0 0 var(--akzent); font-weight: 600;
}
.mn-service { margin-top: 1.25rem; border-top: 1px solid #e8ecee; }
.mn-service a { font-size: 0.95rem; color: #5c626b; }

/* skiplink */
.skiplink {
  position: absolute; left: -999px; top: 0; background: var(--akzent); color: #fff;
  padding: 0.6rem 1rem; z-index: 1000;
}
.skiplink:focus { left: 0.5rem; top: 0.5rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Breadcrumb: Reset des alten UL-Standardabstands + neuer, dezenter Pill-Stil */
.navigation {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.4rem;
  line-height: normal !important;
  padding: 0.6rem 0 !important;
}
ul.breadcrumb {
  display: contents;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.navigation div,
.navigation span {
  display: contents;
}
.navigation a {
  display: inline-flex !important;
  align-items: center;
  margin: 0 !important;
  padding: 0.35rem 0.75rem !important;
  border: 0 !important;
  border-radius: 999px;
  background: var(--akzent-weich) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  color: var(--akzent) !important;
  font-weight: 600;
  font-size: 0.85rem !important;
  line-height: normal !important;
  text-decoration: none;
  white-space: nowrap;
}
.navigation a:hover {
  background: var(--akzent-fest) !important;
  color: var(--akzent) !important;
}

/* Grosses Profilbild auf der Ueber-mich-Seite: #contents img (90%/Schatten/Rahmen) ueberschreiben */
#contents .profilbild-gross {
  width: 200px !important;
  height: 200px !important;
  border-radius: 50% !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 auto !important;
  display: block;
}

/* Fliesstext-Bilder (.ads) auf schmalen Bildschirmen nicht mehr floaten lassen,
   sonst laeuft Text rechts daneben aus dem sichtbaren Bereich */
@media screen and (max-width: 1280px) {
  #contents .ads {
    float: none !important;
    margin: 0 0 1rem 0 !important;
    text-align: center;
  }
  #contents .ads img {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* Sicherheitsnetz gegen horizontales Verschieben auf dem Handy (z.B. durch
   Werbeanzeigen oder Bilder mit fester Breite ohne max-width) */

@media screen and (max-width: 1280px) {
  #main, #main .inner, #contents {
    max-width: 100vw !important;
    overflow-x: hidden;
  }
  #contents img,
  #contents ins.adsbygoogle,
  #contents iframe,
  #contents table {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
  }
}
