/* --- VARIABLES & RESET --- */
:root {
  --primary: #ba0606;       /* Dein Rot */
  --primary-hover: #900404;
  --bg-body: #f8f9fa;       /* Heller Hintergrund wie moderne Doku-Seiten */
  --bg-paper: #ffffff;      /* Weißer Content-Bereich */
  --text-main: #2d3748;     /* Dunkles Grau statt hartes Schwarz */
  --text-muted: #718096;
  --border-color: #e2e8f0;
  --sidebar-width: 260px;
  --header-height: 70px;
  --font-main: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.6;
}

/* --- GRID LAYOUT ENGINE --- */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr 240px; /* Nav | Content | News */
  grid-template-rows: var(--header-height) 1fr;
  grid-template-areas: 
    "header header header"
    "nav    main   sidebar";
  min-height: 100vh;
}

/* --- HEADER --- */
.site-header {
  grid-area: header;
  background: var(--bg-paper);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-inner {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.brand img.logo {
  height: 115px;
  width: auto;
  margin-right: 15px;
}

.brand h1 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-main);
  line-height: 1.1;
}

.brand span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: normal;
}

.menu-toggle { display: none; } /* Nur Mobile sichtbar */

/* --- NAVIGATION (LEFT) --- */
.site-nav {
  grid-area: nav;
  background: #f1f3f5; /* Leichter Kontrast zum Content */
  border-right: 1px solid var(--border-color);
  padding: 20px;
  overflow-y: auto;
  height: calc(100vh - var(--header-height));
  position: sticky;
  top: var(--header-height);
}

.search-box form {
  display: flex;
  margin-bottom: 20px;
}

.search-input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px 0 0 4px;
}

.search-btn {
  padding: 8px 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

/* Bereinigung der alten Listen-Styles für modernen Look */
.menu-tree ul {
  list-style: none !important;
  padding-left: 15px !important;
  margin: 0 !important;
}

.menu-tree li {
  margin: 4px 0;
}

.menu-tree a {
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.95rem;
  display: block;
  padding: 2px 0;
  transition: color 0.2s;
}

.menu-tree a:hover, .menu-tree a.pfad_selected {
  color: var(--primary);
  font-weight: 600;
}

/* --- MAIN CONTENT --- */
.site-content {
  grid-area: main;
  padding: 30px 40px;
  background: var(--bg-paper);
  max-width: 100%;
}

.content-wrapper {
  max-width: 900px; /* Lesbarkeit: Zeilen nicht zu lang */
  margin: 0 auto;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }

/* Typography für den Content */
.prose h1 { font-size: 2rem; margin-bottom: 1rem; color: var(--primary); }
.prose h2 { font-size: 1.5rem; margin-top: 2rem; margin-bottom: 1rem; color: #2d3748; border-bottom: 1px solid #edf2f7; padding-bottom: 0.5rem;}
.prose p { margin-bottom: 1.2rem; text-align: left !important; } /* Justify schwer lesbar im Web */
.prose code { background: #edf2f7; padding: 2px 5px; border-radius: 3px; font-family: monospace; font-size: 0.9em; }
.prose pre { background: #2d3748; color: #fff; padding: 15px; border-radius: 5px; overflow-x: auto; }
.prose a { color: var(--primary); text-decoration: underline; }

/* --- SIDEBAR (RIGHT/NEWS) --- */
.site-sidebar {
  grid-area: sidebar;
  padding: 20px;
  background: var(--bg-body);
  border-left: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.sidebar-section { margin-bottom: 30px; }
.sidebar-section h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); border-bottom: 2px solid var(--primary); display: inline-block; padding-bottom: 5px; }

/* --- FOOTER --- */
.site-footer {
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.site-footer ul { list-style: none; padding: 0; display: flex; gap: 20px; }
.site-footer a { color: var(--text-muted); text-decoration: none; }

/* --- RESPONSIVE / MOBILE --- */
@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas: 
      "header"
      "main"
      "sidebar"
      "footer"; /* Nav ist versteckt */
  }

  /* Nav wird Off-Canvas oder Toggle-Bereich */
  .site-nav {
    display: none; /* Standardmäßig aus auf Mobile */
    grid-area: auto;
    position: fixed;
    top: 70px; left: 0; right: 0; bottom: 0;
    z-index: 99;
    width: 100%;
    border-right: none;
  }

  .nav-open .site-nav { display: block; }
  
  .menu-toggle {
    display: block;
    background: none;
    border: 1px solid #ccc;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
  }
  
  .site-content { padding: 20px; }
  .site-sidebar { display: none; } /* Optional: News auf Mobile ausblenden oder nach unten */
}
/* Container resetten und Flexbox aktivieren */
#breadcrumb ol {
    display: flex;           /* Macht die Kinder (li) horizontal */
    flex-wrap: wrap;         /* Umbruch erlauben bei kleinen Screens */
    list-style: none;        /* Entfernt die Nummern/Punkte */
    padding: 0;
    margin: 0;
    align-items: center;     /* Vertikal zentrieren */
}

/* Die Listenelemente selbst */
#breadcrumb li {
    display: inline-flex;    /* Damit sie nebeneinander fließen */
    align-items: center;
}

/* Der Separator (Pfeil oder Slash) NACH jedem Element */
#breadcrumb li::after {
    content: '›';           /* Modernes Zeichen statt "/" */
    font-size: 1.2em;
    margin: 0 8px;          /* Abstand links/rechts */
    color: #cbd5e0;         /* Helles Grau für den Trenner */
}

/* Den Separator beim allerletzten Element ausblenden */
#breadcrumb li:last-child::after {
    display: none;
}

/* Links stylen */
#breadcrumb a {
    text-decoration: none;
    color: var(--text-muted, #718096);
    transition: color 0.2s;
}

#breadcrumb a:hover {
    color: var(--primary, #ba0606);
    text-decoration: underline;
}


/* +++++++++++++++++++++++++++++++++++++ */
/* --- 1. Das neue SVG Icon Stylen --- */
.sidebar-title {
  display: flex;
  align-items: center;
  gap: 10px; /* Abstand zwischen Icon und Text */
  /* Die border-bottom ist schon im h3 definiert, passt also */
}

.icon-news {
  width: 20px;
  height: 20px;
  color: var(--primary); /* Nimmt dein Rot (#ba0606) an */
}


/* --- 2. Listen in der Sidebar (Aktuelles) modernisieren --- */
/* Reset des alten Styles */
.sidebar-section ul {
  list-style: none !important;
  padding-left: 0 !important;
  margin-top: 10px !important;
}

.sidebar-section li {
  margin-bottom: 8px;
  padding-left: 15px; /* Platz für das eigene Bullet */
  position: relative;
}

/* Das Bullet-Point als roter Winkel */
.sidebar-section li::before {
  content: '›';
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--primary);
  font-weight: bold;
  font-size: 1.2em;
  line-height: 1;
}

.sidebar-section a {
  text-decoration: none;
  color: var(--text-main);
  transition: color 0.2s;
  display: inline-block;
}

.sidebar-section a:hover {
  color: var(--primary);
  transform: translateX(3px); /* Leichte Bewegung nach rechts beim Hover */
}


/* --- 3. Listen im Hauptinhalt (Prose) modernisieren --- */
/* Nur Listen im Artikel-Bereich ansprechen */
.prose ul {
  list-style: none; /* Standard-Punkte weg */
  padding-left: 0;
  margin: 1.5em 0;
}

.prose ul li {
  position: relative;
  padding-left: 24px; /* Einrückung */
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Das Bullet-Point als schickes Quadrat */
.prose ul li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 10px; /* Vertikal ausrichten relativ zur Zeilenhöhe */
  width: 6px;
  height: 6px;
  background-color: var(--primary); /* Dein Rot */
  border-radius: 1px; /* Leicht abgerundet sieht edler aus */
}

/* Optional: Verschachtelte Listen anders darstellen (z.B. hohler Kreis) */
.prose ul ul li::before {
  background-color: transparent;
  border: 1px solid var(--primary);
}