body {
  margin: 0;
  font-family: Helvetica, Arial, sans-serif;
  background: white;
  color: black;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Desktop Standard-Layout (min-width: 768px) === */
.sidebar {
  width: 150px;
  background: white;
  padding-left: 40px;
  padding-top: 40px;
  padding-bottom: 40px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  box-sizing: border-box;
  display: flex; /* Für Oben/Unten-Ausrichtung von Main/Footer Nav */
  flex-direction: column;
  justify-content: space-between;
  z-index: 10;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-nav ul li {
  margin-bottom: 10px; /* Vertikaler Abstand Desktop */
}

.main-nav ul li a {
  text-decoration: none;
  color: black;
  font-size: 15px;
  text-transform: lowercase;
}

.footer-nav {
   /* Wird durch Flexbox im .sidebar nach unten geschoben */
}

.footer-nav ul li {
  margin-bottom: 0;
}

.footer-nav ul li a {
  text-decoration: none;
  color: #aaa; /* Helles Grau Desktop */
  font-size: 15px;
  text-transform: lowercase;
}

.content {
  margin-left: 190px; /* Platz für Sidebar */
  padding-top: 40px;
  padding-left: 40px;
  padding-right: 40px;
  box-sizing: border-box;
  width: calc(100% - 190px);
}

.mobile-footer {
    display: none; /* Auf Desktop ausgeblendet */
}


/* === Galerie Stile (Desktop Standard) === */
.gallery-instance {
  margin-bottom: 60px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

#works .gallery-instance h2 {
    font-size: 15px;
    font-weight: normal;
    text-transform: lowercase;
    margin-bottom: 15px;
    text-align: center;
}

.gallery {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.slides {
   /* Auf Desktop wird dies durch Media Query zu display:flex */
   display: flex;
   overflow-x: hidden;
   width: 100%;
   scroll-behavior: smooth;
}

.slide {
  flex: 0 0 100%;
  margin-bottom: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.slide img {
  max-height: 80vh;
  object-fit: contain;
  width: auto;
  max-width: 100%;
  height: auto; /* Höhe zurücksetzen */
  display: block;
}

.gallery-button {
  display: block; /* Auf Desktop sichtbar */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.7);
  border: none;
  color: black;
  font-size: 24px;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .gallery-instance:hover .gallery-button {
        opacity: 1;
    }
}

.gallery-button.prev { left: 10px; }
.gallery-button.next { right: 10px; }
.gallery-button:disabled { opacity: 0.3; cursor: default; }


/* === Textseiten Stile (Desktop Standard) === */
section:not(#works) {
  max-width: 700px;
  margin-bottom: 80px;
  margin-left: auto; /* Zentriert Text-Sektionen auf Desktop */
  margin-right: auto; /* Zentriert Text-Sektionen auf Desktop */
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}
.about-container { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px; }
.about-text { flex: 1 1 50%; min-width: 280px; }
.about-image { flex: 1 1 45%; min-width: 280px; }
.about-image img { width: 100%; height: auto; display: block; margin-bottom: 15px; }

section:not(#works) h2 { font-size: 22px; font-weight: normal; text-transform: lowercase; margin-top: 0; margin-bottom: 20px; text-align: left; padding: 0; }
section:not(#works) h3 { font-size: 17px; font-weight: normal; text-transform: none; margin-top: 30px; margin-bottom: 10px; }
section:not(#works) p { font-size: 15px; line-height: 1.6; margin-bottom: 15px; overflow-wrap: break-word; word-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; }
section:not(#works) ul, section:not(#works) ol { padding-left: 20px; font-size: 15px; line-height: 1.6; }


/* === Mobile Layout Override (max-width: 767px) === */
@media (max-width: 767px) {
  .sidebar {
    position: static; /* Nicht mehr fixiert */
    width: 100%;
    height: auto;
    padding: 10px 15px; /* Weniger Padding oben/unten */
    display: block; /* Kein Flex mehr */
    border-bottom: 1px solid #eee; /* Optionale Trennlinie */
    z-index: auto;
  }

  .main-nav ul {
    display: flex; /* Horizontale Anordnung */
    flex-wrap: wrap; /* Umbruch erlauben */
    justify-content: space-around; /* Verteilen */
    align-items: center;
  }

  .main-nav ul li {
    margin-bottom: 5px; /* Abstand bei Umbruch */
    margin-right: 10px; /* Horizontaler Abstand */
  }
   .main-nav ul li:last-child {
       margin-right: 0; /* Kein Abstand beim letzten Element */
   }

  .footer-nav {
    display: none; /* Impressum im "Sidebar" mobil ausblenden */
  }

  .content {
    margin-left: 0; /* Kein linker Rand mehr */
    width: 100%;
    padding: 20px 15px; /* Angepasstes Mobile Padding */
  }

  /* Galerie-Anpassungen Mobile */
  #works .gallery-instance h2 {
      text-align: center; /* Titel zentrieren mobil */
  }
  .gallery {
      max-width: none; /* Volle Breite mobil */
  }
  .slides {
      display: block; /* Sicherstellen, dass Slides untereinander sind */
  }
  .slide {
      display: block;
      width: 100%;
      margin-bottom: 10px;
      flex: none; /* Flex-Eigenschaft zurücksetzen */
  }
   .slide img {
       max-height: none; /* Keine Höhenbegrenzung mobil */
       object-fit: cover;
       width: 100%; /* Volle Breite mobil */
   }
   .gallery-button {
       display: none; /* Buttons mobil ausblenden */
   }

  /* About-Seite Layout mobil (bereits in vorheriger Version enthalten, hier zur Sicherheit) */
  .about-container {
      flex-direction: column;
      gap: 20px;
  }
  .about-text,
  .about-image {
      flex-basis: 100%;
      width: 100%;
      max-width: 100%;
  }
   .about-image {
      max-width: 300px;
      margin: 0 auto;
    }

  /* Text-Sektionen mobil */
   section:not(#works) {
       margin-left: 0;
       margin-right: 0;
       max-width: none; /* Volle Breite erlauben */
       padding-left: 0; /* Padding kommt von .content */
       padding-right: 0;
   }


  /* NEU: Footer für Mobile sichtbar machen und stylen */
  .mobile-footer {
    display: block; /* Nur auf Mobile sichtbar */
    text-align: center;
    padding: 30px 15px;
    margin-top: 30px; /* Abstand zum Inhalt */
  }

  .footer-imprint-link {
    font-size: 13px; /* Etwas kleiner */
    color: #aaa; /* Hellgrau */
    text-decoration: none;
    text-transform: lowercase;
  }
}