@import url("../webfonts/Open_Sans/stylesheet.css");
/* ====== Grundlayout ===== */
body {
	margin: 0;
	font-family: "Open Sans", sans-serif;
	font-size: 18px;
	font-weight: 400;
}
nav a,
nav a:link,
nav a:visited {
	color: #000;
	font-weight: 400;
}
nav a:hover{
	color: #C6027F;
	font-weight: 400;

}
nav {
	position: relative; /* Bezugspunkt für Desktop-Untermenüs */
}


nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;      /* Hauptpunkte umbrechen */
	gap: 10px;
}

nav ul li {
	position: relative;
}

nav ul li a {
	display: block;
	color: #000000;
	text-decoration: none;
	font-size: 18px;
	padding: 15px 25px 15px 10px;
	transition: all 0.3s ease;
	position: relative;
	z-index: 2;
}

/* Pfeil Hauptmenü */
nav > ul > li.has-sub > a::after {
  content: " ▾";
  font-size: 28px;
  color: #000;
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
  z-index: 3;
}

nav > ul > li.has-sub:hover > a::after {
	transform: translateY(-50%) rotate(180deg);
}

/* ===== Desktop-Untermenü ===== */
@media (min-width: 769px) {
  nav ul li .subnav {
    position: absolute;
    top: 100%;               
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background-color: #96C2C1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    max-width: calc(100vw - 20px);
    box-sizing: border-box;
  }

  nav ul li.has-sub:hover .subnav {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }

  nav ul li .subnav li a {
	padding: 12px 15px;
	white-space: nowrap;
	color: #000;
	font-size: 18px;
  }

  /* Staggered Animation Desktop */
  nav ul li .subnav li {
    opacity: 0;
    transform: translateY(-10px);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  nav ul li.has-sub:hover .subnav li {
    opacity: 1;
    transform: translateY(0);
  }

  nav ul li .subnav li:nth-child(1) { transition-delay: 0.15s; }
  nav ul li .subnav li:nth-child(2) { transition-delay: 0.2s; }
  nav ul li .subnav li:nth-child(3) { transition-delay: 0.25s; }
  nav ul li .subnav li:nth-child(4) { transition-delay: 0.3s; }
}

/* ===== Mobile ===== */
@media (max-width: 768px) {

  /* Hamburger */
  .hamburger {
    display: block;
    width: 30px;
    height: 25px;
    margin: 10px auto;
    cursor: pointer;
    position: relative;
    z-index: 9999;
  }

  .hamburger span {
    display: block;
    height: 3px;
    margin: 5px 0;
    background-color: #E360A6;
    transition: 0.3s ease;
  }

  .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* Hauptnavigation */
  nav ul {
    overflow: hidden;
    max-height: 0;
    flex-direction: column;
    transition: max-height 0.4s ease;
  }

  nav.active ul { max-height: 1000px; }

  nav ul li a {
	display: block;
	padding: 12px 25px 12px 10px;
	color: #000000;
	text-decoration: none;
	border-bottom: 1px solid #888;
	position: relative;
	font-size: 18px;
  }

  nav > ul > li.has-sub > a::after {
    content: " ▾";
    font-size: 18px;
    color: #000;
    position: absolute;
    right: 5px;
    transition: transform 0.4s ease;
  }

  nav > ul > li.has-sub.open > a::after {
    transform: rotate(180deg);
  }

  /* Untermenü Mobile - untereinander */
  nav ul li .subnav {
    display: block;             /* ⚡ Block sorgt für Untereinander */
    width: 100%;                /* volle Breite unter Hauptpunkt */
    position: relative;         /* Teil des normalen Flusses */
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    background-color: #96C2C1;
    transition: max-height 0.4s ease, opacity 0.4s ease;
  }

  nav ul li.open .subnav {
    max-height: 1000px;
    opacity: 1;
  }

  nav ul li .subnav li a {
	display: block;
	padding: 12px 15px;
	color: #000;
	font-size: 18px;
	white-space: nowrap;
  }

  /* Staggered Animation Unterpunkte Mobile */
  nav ul li .subnav li {
    opacity: 0;
    transform: translateY(-10px);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  nav ul li.open .subnav li {
    opacity: 1;
    transform: translateY(0);
  }

  nav ul li .subnav li:nth-child(1) { transition-delay: 0s; }
  nav ul li .subnav li:nth-child(2) { transition-delay: 0.03s; }
  nav ul li .subnav li:nth-child(3) { transition-delay: 0.06s; }
  nav ul li .subnav li:nth-child(4) { transition-delay: 0.09s; }
}
