/* ===========================================
   styleNav_1.css
   Navigation mit Flexbox & mobilem Menü
   =========================================== */

/* =========================
   Layout: Header
   ========================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-image: linear-gradient(to left, #ffffff, #974715);
  border-bottom: 2px solid #ffffff;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
}

/* =========================
   Mobile: Hamburger-Symbol
   ========================= */
.menu-toggle {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  padding: 10px;
  color: #974715;
  z-index: 101;
  order: 2;
}

.submenu-toggle {
  display: none;
}

/* =========================
   Home-Link
   ========================= */
.nav-home-desktop {
  display: block;
}

.nav-home {
  display: none;
  font-size: 2rem;
  font-family: "Ink Free", "Trebuchet MS", Verdana, sans-serif;
  font-style: italic;
  font-weight: 700;
  color: #f6dd9f;
  background-color: #974715;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  box-shadow: 1px 2px 5px 3px #f6dd9f;
  margin-right: 10px;
  transition: all 0.4s ease;
  order: 1;
}

.LinkNavLeite{
font-size:2.4rem;
font-family:'Ink free','Trebuchet MS',Verdana;
line-height:45px;
font-style:italic;
font-weight:700;
color:#f6dd9f}
/* =========================
   Navigation: Container
   ========================= */
nav {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 1rem;
  flex-wrap: wrap;
  background-color: transparent;
  width: 100%;
  order: 3;
}

/* =========================
   Navigation: Liste
   ========================= */
nav ul {
  display: flex;
  flex-wrap: nowrap;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  gap: 10px;
  justify-content: stretch;
}

/* =========================
   Navigation: Listenelemente
   ========================= */
nav ul li {
  flex: 1 1 0;
  text-align: center;
  margin: 0 5px;
  background-color: #974715;
  border-radius: 5px;
  box-shadow: 1px 2px 5px 3px #f6dd9f;
  opacity: 0.9;
  transition: all 0.5s ease;
}

/* Hover-Effekt für Listenelemente */
nav ul li:hover {
  background-color: #f6dd9f;
  border-bottom: 2px solid #ffffff;
  color: #000000;
  border-radius: 20px;
}

/* =========================
   Navigation: Links
   ========================= */
nav ul li a {
  display: block;
  padding: 0.8rem 1.2rem;
  width: 100%;
  text-decoration: none;
  font-size: 2.1rem;
  font-family: "Ink Free", "Trebuchet MS", Verdana, sans-serif;
  color: #f6dd9f;
  font-style: italic;
  font-weight: 700;
  transition: all 0.4s ease;
}

nav ul li a:hover {
  background-color: #f6dd9f;
  color: crimson;
  border-radius: 20px;
}

/* =========================
   Dropdown-Menü
   ========================= */
nav ul li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  flex-direction: column;
}

nav ul li.has-submenu {
  position: relative;
}

nav ul li ul.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #974715;
  border-radius: 10px;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
  padding: 0.5rem 0;
  z-index: 110;
  flex-direction: column;
  min-width: 180px;
}

nav ul li.has-submenu:hover ul.submenu {
  display: flex;
}

nav ul li ul.submenu li {
  flex: none;
  margin: 0;
  width: 100%;
  background-color: #974715;
  border-radius: 0;
  box-shadow: none;
  position: relative;
}

nav ul li ul.submenu li::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px; /* Höhe der Trennlinie */
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: shimmer 2s infinite ease-in-out;
}

/* Schimmernde Animation */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Die "Hover"-Effekte bleiben erhalten */
nav ul li ul.submenu li a {
  padding: 0.6rem 1rem;
  font-size: 1.6rem;
  color: #f6dd9f;
}

nav ul li ul.submenu li a:hover {
  background-color: #f6dd9f;
  color: crimson;
}
nav ul li ul.submenu li a {
  padding: 0.6rem 1rem;
  font-size: 1.6rem;
  color: #f6dd9f;
}

nav ul li ul.submenu li a:hover {
  background-color: #f6dd9f;
  color: crimson;
}

/* =========================
   Desktop: Label-Stil & Hover-Effekt
   ========================= */
@media screen and (min-width: 801px) {
  .has-submenu label {
    display: block;
    padding: 0.8rem 1.2rem;
    font-size: 2.1rem;
    font-family: "Ink Free", "Trebuchet MS", Verdana, sans-serif;
    color: #f6dd9f;
    font-style: italic;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.4s ease-in-out, background-color 0.4s ease-in-out;
  }

  .has-submenu label:hover {
    color: #000000;
    background-color: #f6dd9f;
    border-radius: 20px;
  }
}

/* =========================
   Mobile: Navigation & Dropdown
   ========================= */
@media screen and (max-width: 800px) {
  header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .menu-toggle {
    display: block;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
    color: #974715;
    z-index: 102;
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    order: 1;
  }

  .nav-home {
    display: block;
    order: 1;
  }

  .nav-home-desktop {
    display: none;
  }

  nav {
    display: none;
    flex-direction: column;
    align-items: center;
    background-color: #f6dd9f;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	z-index: 101; /* Höher als der Header (100), aber unter dem Button (102) */
    order: 3;
  }

  nav.active {
    display: flex;
  }

  nav ul {
    flex-direction: column;
    gap: 1rem;
  }

  nav ul li {
    width: 100%;
    text-align: center;
  }

  nav ul li ul.submenu.open {
    display: flex;
  }

  .submenu-toggle {
    display: none;
  }

  .has-submenu ul.submenu {
    display: none;
  }

  .submenu-toggle:checked + label + ul.submenu {
    display: flex;
    flex-direction: column;
    position: static;
    background-color: #974715;
    border-radius: 10px;
    padding: 0.5rem 0;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
    margin-top: 0.5rem;
  }

  .has-submenu label {
    display: block;
    padding: 0.8rem 1.2rem;
    font-size: 2.1rem;
    font-family: "Ink Free", "Trebuchet MS", Verdana, sans-serif;
    color: #f6dd9f;
    font-style: italic;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.4s ease-in-out, background-color 0.4s ease-in-out;
  }

  .has-submenu label:hover {
    background-color: #f6dd9f;
    color: crimson;
    border-radius: 20px;
  }
}
