/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* SDG-Farben (offizielle UN-Farben) */
  --sdg-1: #E5243B;
  --sdg-2: #DDA63A;
  --sdg-3: #4C9F38;
  --sdg-4: #C5192D;
  --sdg-5: #FF3A21;
  --sdg-6: #26BDE2;
  --sdg-7: #FCC30B;
  --sdg-8: #A21942;
  --sdg-9: #FD6925;
  --sdg-10: #DD1367;
  --sdg-11: #FD9D24;
  --sdg-12: #BF8B2E;
  --sdg-13: #3F7E44;
  --sdg-14: #0A97D9;
  --sdg-15: #56C02B;
  --sdg-16: #00689D;
  --sdg-17: #19486A;

  /* Baustein-Farben */
  --baustein-umwelt: #3F7E44;
  --baustein-soziales: #C5192D;
  --baustein-wirtschaft: #A21942;
  --baustein-partner: #19486A;
  --baustein-rahmen: #4E5F6D;
  --baustein-querschnitt: #2D6A8F;

  /* Typographie */
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-size-base: 16px;
  --line-height: 1.7;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #6b7280;

  /* Layout */
  --sidebar-width: 280px;
  --content-max: 920px;
  --gap: 1.5rem;

  /* UI-Farben */
  --bg-page: #f8f9fa;
  --bg-sidebar: #1a1a2e;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-radius: 8px;
  --shadow: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: var(--font-size-base); scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: var(--line-height);
  display: flex;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ===== SIDEBAR ===== */
#sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: #c8cfe0;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 100;
}
#sidebar-logo {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
#sidebar nav { flex: 1; padding: 1rem 0; }
#sidebar nav ul { list-style: none; }
#sidebar nav > ul > li { margin-bottom: 0.25rem; }

.nav-section-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none;
}
.nav-section-label:hover { color: #fff; }
.nav-section-label.active { color: #fff; border-left-color: var(--accent, #56C02B); }

.nav-children { display: none; }
.nav-children.open { display: block; }
.nav-children a {
  display: block;
  padding: 0.3rem 1rem 0.3rem 2.25rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-children a:hover { color: #fff; }
.nav-children a.active { color: #fff; font-weight: 600; }

[data-baustein="umwelt"] .nav-section-label { --accent: var(--baustein-umwelt); }
[data-baustein="soziales"] .nav-section-label { --accent: var(--baustein-soziales); }
[data-baustein="wirtschaft"] .nav-section-label { --accent: var(--baustein-wirtschaft); }
[data-baustein="partner"] .nav-section-label { --accent: var(--baustein-partner); }

/* ===== MAIN LAYOUT ===== */
#main-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.page-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  position: sticky;
  top: 0;
  z-index: 50;
}
.page-header a { text-decoration: none; }
.page-header a:hover { text-decoration: underline; }
.breadcrumb-sep { opacity: 0.4; }

.page-content {
  max-width: var(--content-max);
  width: 100%;
  padding: 2rem 2.5rem 4rem;
  margin: 0 auto;
}

/* ===== TYPOGRAPHIE ===== */
h1 { font-size: 2rem; font-weight: 800; line-height: 1.2; margin-bottom: 0.5rem; }
h2 { font-size: 1.5rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.75rem; margin-top: 2rem; }
h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; margin-top: 1.5rem; color: var(--text-secondary); }
h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.4rem; }
p { margin-bottom: 1rem; }
ul, ol { padding-left: 1.4rem; margin-bottom: 1rem; }
li { margin-bottom: 0.3rem; }
strong { font-weight: 700; }
blockquote {
  border-left: 4px solid var(--border);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  color: var(--text-secondary);
  background: #f1f5f9;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* ===== MOBILE ===== */
#menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  background: var(--bg-sidebar);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

@media (max-width: 768px) {
  body { flex-direction: column; }
  #sidebar {
    position: fixed;
    left: -100%;
    width: 85vw;
    height: 100vh;
    transition: left 0.25s ease;
  }
  #sidebar.open { left: 0; }
  #menu-toggle { display: block; }
  .page-content { padding: 4rem 1rem 2rem; }
  .page-header { padding: 0.75rem 1rem 0.75rem 3.5rem; }
}
