/* =========================================================
   GRUNDLAYOUT
========================================================= */
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #f4f7fb;
  color: #2a3a4a;
}

:root {
  --magenta: #e20074;
}

/* =========================================================
   NAVIGATIONSBEREICH
========================================================= */
nav {
  width: 100%;
  background: #e9eff5;
  border-bottom: 1px solid #cfd8e3;
  padding: 12px 24px;
  box-sizing: border-box;
  position: relative;
  z-index: 5000;
}

.nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Logo */
.logo img {
  height: 140px;
  width: auto;
  display: block;
}

/* =========================================================
   NAVIGATION (DESKTOP)
========================================================= */
.nav-links,
.nav-links li {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  flex: 1;
}

.nav-item {
  position: relative;
  display: block;
  min-width: 160px;
}

/* =========================================================
   LEVEL‑1 TABS (Kästchen)
========================================================= */
.nav-links > .nav-item > a {
  display: block;
  text-align: center;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  color: #33475b;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nav-links > .nav-item > a:hover,
.nav-links > .nav-item > a.active {
  background: var(--magenta);
  border-color: var(--magenta);
  color: #ffffff;
}

/* =========================================================
   DROPDOWN EBENE 2
========================================================= */
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);

  background: #ffffff;
  border: 1px solid #cfd8e3;
  padding: 6px 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);

  width: max-content;
  min-width: 240px;
  max-width: calc(100vw - 40px);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 6000;
}

.nav-item.open > .dropdown {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* Dropdown-Einträge */
.dropdown li {
  padding-left: 14px;
  position: relative;
  display: flex;
  align-items: center;
}

.dropdown li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 12px;
  background: var(--magenta);
  transform: translateY(-50%);
  border-radius: 2px;
}

/* =========================================================
   LEVEL‑2 & LEVEL‑3 LINKS: KEINE KÄSTCHEN
========================================================= */
.dropdown a {
  display: block;
  padding: 8px 16px;
  color: #2a3a4a;
  text-decoration: none;
  border-bottom: 1px solid #e3e8ef;
  white-space: nowrap;
  background: none;
  border: none;
}

.dropdown a:hover {
  background: var(--magenta);
  color: #ffffff;
}

.dropdown a:last-child {
  border-bottom: none;
}

/* =========================================================
   LEVEL‑3 DROPDOWN (KORRIGIERT)
========================================================= */
.level3-list {
  display: none;
  background: #ffffff;
  border: 1px solid #cfd8e3;
  padding: 6px 0;
  margin-left: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Level-2 geöffnet → Level-3 anzeigen */
.nav-item.level2.open > .level3-list {
  display: block !important;
}

/* Level‑3 Links */
.level3-list a {
  display: block;
  padding: 8px 16px;
  color: #2a3a4a;
  text-decoration: none;
  border-bottom: 1px solid #e3e8ef;
  background: none;
}

.level3-list a:hover {
  background: var(--magenta);
  color: #ffffff;
}

.level3-list li {
  padding-left: 14px;
  position: relative;
}

.level3-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 12px;
  background: var(--magenta);
  transform: translateY(-50%);
  border-radius: 2px;
}

/* =========================================================
   MOBILE NAVIGATION
========================================================= */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #333;
  border-radius: 2px;
}

@media (max-width: 700px) {

  .logo img {
    height: 70px;
  }

  .nav-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    margin-top: 10px;
    width: 100%;
  }

  .nav-links.open {
    display: flex;
  }

  /* Level 1 Items */
  .nav-item {
    position: static;
    width: 100%;
    min-width: 100%;
  }

  /* Level 2 Dropdown */
  .dropdown {
    position: static !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    border: none;
    box-shadow: none;
    width: 100%;
    padding-left: 20px;
    opacity: 1 !important;
    pointer-events: auto !important;
    display: none;
  }

  .nav-item.open > .dropdown {
    display: block;
  }

  /* Level 2 Items */
  .nav-item.level2 {
    position: static;
    display: block;
    flex-direction: column;
    width: 100%;
  }

  /* Level 3 Dropdown */
  .level3-list {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    display: none;
    width: 100%;
    margin-left: 20px;
    margin-top: 0;
    padding-left: 20px;
    border: none !important;
    box-shadow: none !important;
    background: #f9f9f9;
  }

  .nav-item.level2.open > .level3-list {
    display: block !important;
  }

  /* Level 3 Links */
  .level3-list li {
    display: block;
    width: 100%;
  }

  .level3-list a {
    display: block;
    width: 100%;
    padding: 10px 16px;
  }
}


/* =========================================================
   INHALTSBEREICH
========================================================= */
main {
  padding: 40px 40px 120px;
  box-sizing: border-box;

  max-width: 1300px;
  margin: 40px auto;

  background: #ffffff;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.blocks img,
.text img {
  max-width: 100%;
  height: auto;
  display: block;
}

.blocks figure {
  max-width: 600px;
  margin: 0 auto;
}

/* =========================================================
   FOOTER
========================================================= */
.footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;

  background: #e9eff5;
  border-top: 1px solid #cfd8e3;
  padding: 10px 20px;
  box-sizing: border-box;

  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;

  font-size: 0.9rem;
  color: #33475b;
  z-index: 9999;
}

.footer-nav a {
  text-decoration: none;
  color: #33475b;
  font-weight: 500;
}

.footer-nav a:hover {
  color: #1f2f3f;
  text-decoration: underline;
}

/* =========================================================
   DESKTOP: Logo + Navigation nebeneinander
========================================================= */
@media (min-width: 900px) {

  .nav-links {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: stretch;
    align-items: stretch;
    gap: 8px;
    margin-top: 0;
  }

  .nav-item {
    flex: 1 1 auto;
    min-width: 200px;
  }
}

