/* ==========================================================================
   ALLGEMEINES SETUP & HEADER-BASIS
   ========================================================================== */
#topnav {
  font-family: sans-serif;
}
.float-left { float: left; }


/* ==========================================================================
   1. SCHRITT: DIE MOBIL-STYLES (Ganz oben in der Datei)
   Hier wird das Menü standardmäßig versteckt und für Handys gestylt.
   ========================================================================== */

/* Alle echten Input-Checkboxen (links und rechts) unsichtbar machen */
 
#hamburg, #menu-toggle-right { 
  display: none !important; 
}

/* Das umschließende DIV darf mobil NICHT auf display:none stehen! */
div.menu-toggle {
  display: inline-block !important;
}

/* Der linke Hamburger-Button (die 3 Striche) */
.hamburg {
  display: inline-block;
  width: 30px;
  height: 22px;
  cursor: pointer;
  position: relative;
  z-index: 1902;
  margin-top: 13px;
}
.hamburg .line {
  display: block;
  position: absolute;
  height: 4px;
  width: 100%;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}
.hamburg .line:nth-child(1) { top: 0px; }
.hamburg .line:nth-child(2) { top: 9px; }
.hamburg .line:nth-child(3) { top: 18px; }

/* X-Animation linker Hamburger */
#hamburg:checked + .hamburg .line:nth-child(1) { transform: rotate(45deg); top: 9px; }
#hamburg:checked + .hamburg .line:nth-child(2) { opacity: 0; }
#hamburg:checked + .hamburg .line:nth-child(3) { transform: rotate(-45deg); top: 9px; }

/* ==========================================================================
   EBENE 1 (Hauptmenü): JETZT IN GELB + SCHRIFT #010101 (Mobil)
   ========================================================================== */
.nav-menu {
  position: absolute;
  top: 48px;
  left: 0;
  width: 170px !important; 
  background-color: rgb(248, 228, 92) !important; /* Dein Gelbton für die Box */
  box-shadow: 4px 4px 15px rgba(0,0,0,0.15);
  padding: 0;
  margin: 0;
  list-style: none;
  z-index: 1901;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-30px);
  transition: all 0.3s ease-in-out;
}

/* KORREKTUR-SELEKTOR: Klappt das Menü mobil bei Klick auf das X auf */
.menu-toggle:has(#hamburg:checked) ~ .nav-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(0) !important;
}

.nav-menu li {
  position: relative;
  width: 100% !important;
  border-bottom: 1px solid #333333 !important; /* Dunkler Rahmen zur Trennung auf Gelb */
  background-color: rgb(248, 228, 92) !important; /* Gelb für das Listenelement */
  white-space: normal;
}

/* ZIELGERICHTETES FIX: Färbt den Hintergrund und den Text der Links direkt ein */
.nav-menu li a, 
.nav-menu li a.dropblue {
  background-color: rgb(248, 228, 92) !important; /* Zerstört das hartnäckige Weiß der Links */
  color: #010101 !important;                       /* Deine fixe Wunsch-Schriftfarbe */
  display: block;
  padding: 12px 15px !important;
  font-size: 15px;
  line-height: 1.3;
}

/* Touch- & Hover-Feedback für Ebene 1 auf Gelb */
.nav-menu li a:hover,
.nav-menu li a.dropblue:hover {
  background-color: rgba(0, 0, 0, 0.08) !important; /* Dunkelt das Gelb beim Drücken dezent ab */
  color: #010101 !important;
}


/*
.nav-menu li {
  position: relative;
  width: 100% !important;
  border-bottom: 1px solid #eef2f5;
  background-color: #ffffff;
  white-space: normal;
}
.nav-menu a {
  display: block;
  padding: 12px 15px !important;
  color: #333;
  text-decoration: none;
  font-size: 15px;
  line-height: 1.3;
}
*/
/* EBENE 2 (Gelbes Untermenü): Schmal & fliegend daneben */
.nav-menu .nodrop {
  position: absolute;
  top: 0;
  left: 100%; 
  width: 180px !important; 
  z-index: 1905;
  padding: 0;
  margin: 0;
  list-style: none;
  box-shadow: 4px 4px 10px rgba(0,0,0,0.15);
  
  /* Versteckt das gelbe Untermenü standardmäßig */
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease-in-out;
}
.nav-menu li:hover .nodrop,
.nav-menu li:focus-within .nodrop {
  opacity: 1 !important;
  visibility: visible !important;
}
.nav-menu .nodrop li {
  width: 100% !important;
  background-color: rgb(248, 228, 92) !important;
  border-bottom: 1px solid #333333 !important;
  white-space: normal;
}
.nav-menu .nodrop li a {
  background: transparent !important;
  color: #333333 !important;
  padding: 10px 12px !important;
  line-height: 1.3;
  font-size: 14px;
}


/* ==========================================================================
   2. SCHRITT: DIE DESKTOP-STYLES (Muss UNBEDINGT UNTER den Mobil-Styles stehen!)
   Schaltet ab 1024px Breite den Hamburger aus und das Menü auf "nebeneinander".
   ========================================================================== */
@media (min-width: 64em) {
  
  /* Versteckt den linken Hamburger auf dem großen Desktop komplett */
  div.menu-toggle {
    display: none !important;
  }
  
  /* Verwandelt die versteckte Mobil-Liste in die breite Desktop-Leiste */
  .nav-menu {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    width: auto !important;
    background-color: transparent !important;
    box-shadow: none !important;
    
    /* Erzwingt Sichtbarkeit auf Desktop */
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
  
  .nav-menu li {
    width: auto !important;
    border-bottom: none !important;
    background-color: transparent !important;
  }
  
  .nav-menu a {
    padding: 14px 15px !important;
    font-size: 16px;
  }
  
  /* Auf Desktop fällt das gelbe Untermenü nach UNTEN statt zur Seite */
  .nav-menu .nodrop {
    position: absolute !important;
    top: 48px !important;
    left: 0 !important;
    width: 240px !important; /* Komfortable Breite für große Monitore */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
  
  .nav-menu li:hover .nodrop {
    transform: translateY(0) !important;
  }
}


/* ==========================================================================
   RECHTES MENÜ (Immer als Hamburger fixiert, zentriert im 48px Kopf)
   ========================================================================== */

.menu-container-right {
  position: fixed;
  top: 0px; 
  right: 40px;
  height: 48px;
  z-index: 1950;
  font-family: sans-serif;
}

/* Rechter Hamburger-Button gezielt stylen */
.menu-container-right .hamburger-icon {
  display: block;
  width: 30px;
  height: 22px;
  cursor: pointer;
  position: relative;
  z-index: 1952;
  margin-top: 13px; /* Exakt gleiche Höhe wie links */
}

.menu-container-right .hamburger-icon span {
  display: block;
  position: absolute;
  height: 4px;
  width: 100%;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

.menu-container-right .hamburger-icon span:nth-child(1) { top: 0px; }
.menu-container-right .hamburger-icon span:nth-child(2) { top: 9px; }
.menu-container-right .hamburger-icon span:nth-child(3) { top: 18px; }

/* X-Animation rechter Hamburger bei Klick */
#menu-toggle-right:checked + .hamburger-icon span:nth-child(1) { transform: rotate(45deg); top: 9px; }
#menu-toggle-right:checked + .hamburger-icon span:nth-child(2) { opacity: 0; }
#menu-toggle-right:checked + .hamburger-icon span:nth-child(3) { transform: rotate(-45deg); top: 9px; }

/* Ebene 1 (Rechts): Klappt nach unten auf */
.main-menu-right {
  position: absolute;
  top: 48px; /* Direkt bündig unter der Kopfleiste */
  right: -20px; /* Leicht verschoben, um rechts bündig abzuschließen */
  width: 220px;
  background: #fff;
  box-shadow: -4px 4px 15px rgba(0,0,0,0.15);
  padding: 0;
  margin: 0;
  list-style: none;
  z-index: 1951;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

/* Zeigt das rechte Menü bei Aktivierung */
#menu-toggle-right:checked ~ .main-menu-right {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-menu-right li {
  position: relative;
  border-bottom: 1px solid #eee;
  background: rgb(248, 228, 92) !important; /* Dein gelber Hintergrund */
}

.main-menu-right a {
  display: block;
  padding: 12px 15px;
  color: #333;
  text-decoration: none;
}

.main-menu-right a:hover {
  background: #f5f5f5;
}

/* Ebene 2 (Rechts): Klappt nach LINKS in den Bildschirm hinein */
.submenu-right {
  position: absolute;
  top: 0;
  right: 100%; /* Wichtig: Platziert das Untermenü links neben der 1. Ebene */
  width: 190px;
  background: #f9f9f9;
  box-shadow: -4px 4px 10px rgba(0,0,0,0.1);
  border: solid 1px red;
  padding: 0;
  margin: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: all 0.25s ease;
}

.submenu-right li { 
  border-bottom: solid 1px black; 
}

/* Untermenü-Einblendung bei Hover oder Fokus (Touch) */
.has-submenu-right:hover .submenu-right,
.has-submenu-right:focus-within .submenu-right {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  background: rgb(248, 228, 92) !important;
}


/* ==========================================================================
   MEDIA QUERY: NUR FÜR GROSSE BILDSCHIRME (Schaltet NUR links auf Breitbild)
   ========================================================================== */

