header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background-color: #B74234;
  color: #F2E8D0;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0 20px;
  z-index: 1000; /* Über allem anderen */
  box-shadow: 0 4px 5px rgba(0,0,0,0.1);
}

#header-logo {
  height: 30px;
  width: auto;
  border-radius: 4px;
  margin-left: 50px;
  margin-right: 50px;
}

#headline {
  color: #F2E8D0;
  font-size: 28px;
  margin-left: auto;
  margin-right: auto;
}

#headline a {
  color: #F2E8D0;
  text-decoration: none;
}

#menu-button {
  display: none;
  background-color: #C84B3C;
  border: none;
}

#menu-button-hidden {
  display: none;
}

body {
  display: flex;
  margin: 0;
  padding: 0;
  color: #2C3E50;
  background-color: #F2E8D0;
  font-family: Georgia, serif; /* klassisch, gut lesbar */
}

h1 {
  color: #C84B3C;
  font-size: 32px;
}

h2 {
  color: #C84B3C;
  font-size: 32px;
}

h3 {
  color: #2C3E50;
  font-size: 26px;
}

p {
  color: #2C3E50;
}

#sidebar {
  width: 250px;
  background-color: #CB5648;
  height: 100vh;
  position: fixed;  /* Bleibt an der Position, auch beim Scrollen */
  left: 0;
  top: 0;
  overflow-y: auto;  /* Scrollbar wenn Inhalt zu lang */
  margin-top: 30px;
  z-index: 999; 
  font-size: 20px;
}

/* Links in der Navigation */
#sidebar a {
  color: #F2E8D0;
  text-decoration: none;
  font-size: 16px;
}

/*#sidebar nav > ul > li + ul */
#sidebar li {
    list-style-type: none;
    padding-left: 0;
}

.dropdown-menu-button {
  background-color: #2c3e5000;
  color: #2C3E50;
  border: none;
  padding: 5px 5px 5px 15px; /* Platz links für den Pfeil */
  position: relative; /* Wichtig für die Positionierung des Pfeils */
  font-size: 16px;  
  font-family: Georgia, serif; /* klassisch, gut lesbar */
}

.dropdown-menu-button::before {
  content: '▶';
  position: absolute; /* Pfeil wird fest links platziert */
  left: 0px;
  font-size: 0.8em;
  color: #2C3E50;
  display: inline-block;
}

.dropdown-menu-button.active::before {
  transform: rotate(90deg);
}

.dropdown-menu-button + ul{
  display: none;
}

.dropdown-menu-button + ul.open{
  display: block;
}

.menue-eintrag a::before {
  content: '◦ ';
  margin-right: 6px;
}

#hauptbereich {
  margin-left: 250px;  /* Gleiche Breite wie Sidebar */
  margin-top: 30px;
  padding: 20px;
  flex: 1;  /* Nimmt den restlichen Platz */
  background-color:  #F2E8D0;;
}

#startseite {
  display: none;
}

#titelbild {
  width: 100%;
  max-width: 1200px;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

#rezept-anzeige {
  display: block;
}

.rezept-karte {
  background-color: #F2E8D0;
  padding: 20px;
}

.container-start {
  display: flex; 
  flex-wrap: wrap; 
  gap: 60px; 
  justify-content: center;
}

.generator-box {
  display: flex;
  flex-direction: column;  /* h2 und filter untereinander */
  align-items: center;     
  gap: 0px;
}

.container-filter {
  display: flex; 
  flex-wrap: wrap; 
  gap: 60px; 
  justify-content: center;
}

.toggleFilters {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

.toggleFilter-btn{
  position: relative;
  width: 48px;
  height: 26px;
  cursor: pointer;
}

.toggleFilter-btn input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background: #8d97a1;
  border-radius: 26px;
  transition: background 0.2s;
}

.slider:before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #2C3E50;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggleFilter-btn input:checked + .slider {
  background: #C84B3C;
}

.toggleFilter-btn input:checked + .slider:before {
  transform: translateX(22px);
}

.dauer-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

.dauer-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

/* Die Schiene (Track) */
#dauer-slider {
  -webkit-appearance: none; /* wichtig! sonst ignoriert der Browser alles */
  appearance: none;
  height: 6px;
  background: #ffffff; /* Farbe der Schiene */
  border-radius: 4px;
  border: 1px solid #2C3E50;
  outline: none;
}

/* Der Griff (Thumb) - Chrome/Safari */
#dauer-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #2C3E50;
  border-radius: 50%;
  cursor: pointer;
}

/* Der Griff (Thumb) - Firefox */
#dauer-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #2C3E50;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

#dauer-anzeige {
  color:  #2C3E50;
  min-width: 55px;
}

#generator-btn img {
  width: 100%;        /* relativ zur Elternbreite */
  max-width: 140px;  /* aber nie größer als 150px */
  height: auto;      /* Seitenverhältnis beibehalten */
  display: block;
}

#generator-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  max-width: 140px;
}

#filter-bereich-dauer-btn {
    display: flex;
    flex-direction: column;  /* Standard: Button unter Schieberegler */
    align-items: left;
    justify-content: center;
    gap: 2px;
}

@media (max-width: 768px) {
  #headline {
  color: #F2E8D0;
  font-size: 16px;
  margin-left: auto;
  margin-right: auto;
  }

  #header-logo {
  height: 35px;
  width: auto;
  border-radius: 4px;
  margin-left: 0px;
  margin-right: 0px;
  ;
  }
  
  #menu-button {
    display: block;
  }

  #sidebar{
    transform: translateX(-250px);
  }

  #sidebar.open {
    transform: translateX(0);
  }

  #hauptbereich {
    margin-left: 0;
  }

  body.menu-open::before {
    opacity: 1;
    pointer-events: auto;
  }

  #generator-btn img {
    width: 100px;  /* Kleiner auf Mobilgeräten */
  }

  #generator-btn {
    width: 100px;
  }
}

@media (min-width: 1000px) {
  #sidebar {
    width: 300px;
  }
  #hauptbereich {
    margin-left: 300px;
  }
}