/* =========================================================
   1. SCHRIFTEN, HINTERGRUND & CONTAINER (BEIGE #F5F5DC)
   ========================================================= */

body, #container, #wrapper {
  background-color: #F5F5DC !important;
  margin: 0 !important;
  padding: 0 !important;
}

#content {
  background-color: transparent !important;
  min-height: 400px !important;
  padding-bottom: 40px !important;
}

#content, #content p {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  color: #1f2937 !important;
  line-height: 1.65 !important;
  font-size: 1rem !important;
}

#content h2, #content h3 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  color: #1e3a8a !important;
  font-weight: 700 !important;
  margin-top: 25px !important;
}


/* =========================================================
   2. HEADER-BEREICH (DUNKEL #1E293B MIT WEISSER SCHRIFT)
   ========================================================= */

#header, 
#header_wrapper, 
.altcolor#header_wrapper,
div#header {
  background-color: #1e293b !important;
  background: #1e293b !important;
  margin-bottom: 0 !important;
  padding: 20px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#header h2, 
#header_wrapper h2, 
#header h1, 
#header_wrapper h1,
#header *, 
#header_wrapper * {
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-weight: 700 !important;
  margin: 0 !important;
}


/* =========================================================
   3. NAVIGATION (WEISSER HINTERGRUND & HORIZONTAL)
   ========================================================= */

#sidebar {
  background: #ffffff !important;
  backdrop-filter: blur(10px) !important;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
  position: relative !important;
  z-index: 100 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#sidebar_content {
  max-width: 1200px !important;
  margin: 0 auto !important;
  display: flex !important;
  justify-content: center !important;
}

#sidebar ul {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 25px !important;
  list-style: none !important;
  padding: 18px 0 !important;
  margin: 0 !important;
}

#sidebar li {
  position: relative !important;
}

#sidebar a {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  text-decoration: none !important;
  padding: 6px 0 !important;
  position: relative !important;
  transition: color 0.2s ease !important;
}

#sidebar a::after {
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 0% !important;
  height: 2px !important;
  background-color: #1e3a8a !important;
  transition: width 0.25s ease !important;
}

#sidebar a:hover {
  color: #1e3a8a !important;
}

#sidebar a:hover::after {
  width: 100% !important;
}

/* Dropdowns mit weißem Hintergrund */
#sidebar li ul, 
#sidebar li div, 
#sidebar .subnav {
  display: none !important;
  position: absolute !important;
  top: 100% !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background-color: #ffffff !important;
  min-width: 210px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
  border-radius: 8px !important;
  border: 1px solid #e5e7eb !important;
  padding: 8px 0 !important;
  z-index: 9999 !important;
}

#sidebar li:hover > ul, 
#sidebar li:hover > div, 
#sidebar li:hover > .subnav {
  display: block !important;
}

#sidebar li ul a,
#sidebar li div a,
#sidebar .subnav a {
  font-size: 0.95rem !important;
  padding: 8px 16px !important;
}

#sidebar a[href*="Datenschutz"], 
#sidebar a[href*="Impressum"],
#sidebar a[href*="datenschutz"],
#sidebar a[href*="impressum"] {
  display: none !important;
}


/* =========================================================
   4. KACHEL-DESIGN & STANDARD-TEXTBOXEN
   ========================================================= */

#content .gutter, 
.cc-matrix {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: stretch !important;
}

#content .gutter > div, 
.cc-matrix > div, 
div[class*="cc-m-column"],
#content .cc-m-text,
#content .cc-m-imageText,
#content .n-content-element {
  position: relative !important;
  background-color: #F5F5DC !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
  border: 1px solid #e5e7eb !important;
  padding: 20px !important;
  margin-bottom: 20px !important;
  flex: 1 1 0px !important;
}


/* =========================================================
   5. BUTTONS & DOWNLOADS
   ========================================================= */

#content p a, 
#content li a, 
#content .button {
  display: inline-block !important;
  background-color: #1e3a8a !important;
  color: #ffffff !important;
  padding: 10px 22px !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
}

#content p a:hover, 
#content li a:hover {
  background-color: #2563eb !important;
}


/* =========================================================
   6. FOOTER (DUNKEL #1E293B) & SAUBERER ABSCHLUSS
   ========================================================= */

#footer, 
footer, 
div#footer {
  background-color: #1e293b !important;
  background: #1e293b !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100vw !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 10 !important;
  margin-top: 40px !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  left: 50% !important;
  right: 50% !important;
  padding: 30px 20px !important;
  border-top: none !important;
}

#footer .gutter, #footer div {
  text-align: center !important;
  width: 100% !important;
}

.footer-links, #footer ul {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 20px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 10px 0 !important;
}

#footer a, .footer-links a, #footer * {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 0.88rem !important;
  color: #cbd5e1 !important;
  text-decoration: none !important;
}

#footer a:hover, .footer-links a:hover {
  color: #ffffff !important;
  text-decoration: underline !important;
}

.copyright {
  font-size: 0.8rem !important;
  color: #94a3b8 !important;
  margin-top: 5px !important;
}


/* =========================================================
   7. SYSTEM-LINKS VOLLSTÄNDIG AUSBLENDEN
   ========================================================= */

body > a[href*="print"],
body > a[href*="sitemap"],
#container ~ a[href*="print"],
#container ~ a[href*="sitemap"],
#wrapper ~ a[href*="print"],
#wrapper ~ a[href*="sitemap"],
#content ~ a[href*="print"],
#content ~ a[href*="sitemap"],
div:not(#footer) > a[href*="print"],
div:not(#footer) > a[href*="sitemap"],
.diyPrint, 
.diySitemap,
#print-link,
#sitemap-link {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  pointer-events: none !important;
}


/* =========================================================
   8. RESPONSIVE DESIGN (MOBIL)
   ========================================================= */

@media (max-width: 768px) {
  #content .gutter, .cc-matrix {
    flex-direction: column !important;
    gap: 20px !important;
  }
}                            

/* =========================================================
   FOOTER ALS SAUBERER SEITENABSCHLUSS (OHNE GROSSE LÜCKE)
   ========================================================= */

/* Hebt das starre Flexbox-Korsett auf, damit der Footer natürlich folgt */
html, body {
  height: auto !important;
  min-height: 100% !important;
}

#container {
  min-height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
}

#content {
  flex: 1 !important;
  margin-bottom: 0 !important;
  padding-bottom: 30px !important;
}

/* Zwingt den Footer als sauberen Abschluss an das Ende des Inhalts */
#footer, footer, div#footer {
  margin-top: auto !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  left: auto !important;
  right: auto !important;
  padding: 25px 20px !important;
}

/* Stellt sicher, dass die Links im Footer (Druckversion, Sitemap etc.) sichtbar bleiben */
#footer a[href*="print"],
#footer a[href*="sitemap"],
.footer-links a[href*="print"],
.footer-links a[href*="sitemap"] {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}