body {
    overflow-x: hidden;
  }
 
 .gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  .gallery img {
    width: 200px;
    height: 200px;
    margin: 10px;
    cursor: pointer;
    object-fit: cover;
    transition: transform 0.3s ease;
  }
  .gallery img:hover {
    transform: scale(1.1);
  }
  #overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  #overlay.active {
    display: flex;
    opacity: 1;
  }
  #image-container {
    text-align: center;
    position: relative;
    max-height: calc(100vh - 20px); /* 20px Platz für das Schließen-Symbol */
    max-width: calc(100vw - 20px); /* 20px Platz für das Schließen-Symbol */
    margin: auto;
  }
  #image-container.active {
    opacity: 1;
  }
  #image-container img {
    width: 80vh;
    height: auto;
  }
  #close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    color: #fff;
    font-size: 24px;
  }
  #close:hover {
    color: #ccc;
  }
  #close::before,
  #close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background-color: #fff;
    z-index: 1001;
  }
  #close::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }
  #close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }
  #close-circle {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #555;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
  }
  #arrow-left,
  #arrow-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
  }
  #arrow-left {
    left: 10px;
  }
  #arrow-right {
    right: 10px;
  }