/* --- Header Navigation Desktop --- */
.simple-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.5rem;
}

.simple-nav > li {
  position: relative; /* wichtig für Dropdown */
}

.simple-nav > li > a {
  display: block;
  padding: 0.5rem 0.75rem;
  margin: 0.5rem 0;
  color: var(--color-black);
  text-decoration: none;
  font-family: var(--font-headings);
  font-weight: normal;
  /* border-radius: 0.5rem; */
  transition: background 0.2s ease;
}

/* .simple-nav.simple-nav--cta > li:last-child > a {
  color: var(--color-white);
  font-size: 1.2rem;
  padding: 0;
  margin: 0.8rem 0 0;
  height: 2rem;
  width: 2rem;
  text-align: center;
  border-radius: 50%;
  background: #57B14C;
  border: 1px solid transparent;
  background: linear-gradient(45deg, rgba(87, 177, 76, 1) 0%, rgba(119, 205, 109, 1) 100%);
} */

.simple-nav > li:hover > a,
.simple-nav > li.open > a,
.simple-nav > li.current-menu-parent > a,
.simple-nav > li.current_page_item > a,
.simple-nav > li > a.is-anchor-active {
  color: var(--color-black);
  background: var(--gradient-btn-secondary);
  /* box-shadow: var(--box-shadow); */
}

/* .simple-nav.simple-nav--cta > li:last-child:hover > a,
.simple-nav.simple-nav--cta > li:last-child.open > a,
.simple-nav.simple-nav--cta > li:last-child.current-menu-parent > a,
.simple-nav.simple-nav--cta > li:last-child.current_page_item > a {
  color: #57b14c;
  border-color: #57b14c;
  background: none;
} */

/* --- Dropdown --- */
.simple-nav li ul.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 250px;

  list-style: none;
  text-align: right;

  margin: 0;
  padding: 0.5rem 0.5rem 0.25rem;

  background: #fff;
  /* border-radius: 0.5rem; */
  /* box-shadow: var(--box-shadow); */

  box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;

  white-space: nowrap;
  overflow: hidden;
  z-index: 999;
}

.simple-nav li:hover > ul.sub-menu {
  display: block;
}

.simple-nav li ul.sub-menu li a {
  display: block;
  padding: 0.25rem 0.75rem;
  margin-bottom: 0.25rem;
  color: #444;
  font-family: var(--font-headings);
  font-weight: normal;
  text-decoration: none;
  transition: background 0.2s ease;
}

.simple-nav li ul.sub-menu li a:hover,
.simple-nav li ul.sub-menu li a:focus,
.simple-nav li ul.sub-menu li a:active,
.simple-nav li ul.sub-menu li.current-menu-item a {
  color: var(--color-black);
  /* border-radius: 0.5rem; */
  background: #f0f0f0;
}

/* --- Pfeil bei Unterpunkten --- */
.simple-nav > li.menu-item-has-children > a::after {
  font-family: 'Font Awesome 7 Free';
  font-weight: 900;
  content: '\f078';
  font-size: 0.75em;
  margin-left: 0.5rem;
  color: var(--color-black);
}
.simple-nav > li.menu-item-has-children.current_page_item > a::after,
.simple-nav > li.menu-item-has-children:hover > a::after,
.simple-nav > li.current-menu-parent > a::after {
  color: var(--color-text);
}

.nav-toggle {
  display: none;
}

/* --- Mobil-Styles --- */
@media (max-width: 767px) {
  .nav-toggle {
    display: inline-block;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
  }

  .simple-nav {
    position: fixed;
    top: 0;
    right: -100%; /* ausgeblendet */
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    gap: 0;
    padding: 2rem 1rem;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    transition: right 0.3s ease;
    z-index: 1000;
  }

  .simple-nav.open {
    right: 0; /* einfaden/reinfahren */
  }

  .simple-nav > li {
    border-bottom: 1px solid #eee;
  }

  .simple-nav > li > a {
    display: block;
    text-decoration: none;
  }

  /* Submenü: nicht überlagern, sondern Accordion */
  .simple-nav .sub-menu {
    display: none;
    flex-direction: column;

    background: #f9f9f9;
  }

  .simple-nav li ul.sub-menu {
    position: static;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: all 0.3s ease;
    text-align: left;
    white-space: inherit;
    background: #f9f9f9;
  }

  .simple-nav li.open > ul.sub-menu {
    max-height: 500px;
    opacity: 1;
  }
}
