.masonry-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: block; /* optional, default für ul */
}

.masonry-item {
  width: 33.333%;   /* 3 Spalten Desktop */
  padding-bottom: 1.5rem;
  padding-right: 1.5rem;
  box-sizing: border-box;
}
@media (min-width: 1400px) {
  .masonry-item {
    width: 25%; /* 4 Spalten auf großen Screens */
  }
}
/* Responsive */
@media (max-width: 991px) {
  .masonry-item { width: 50%; } /* 2 Spalten */
}
@media (max-width: 575px) {
  .masonry-item { width: 100%; } /* 1 Spalte */
}

/* Link */
.masonry-link {
  display: block;
  text-decoration: none;
  color: inherit;
  opacity: 1 !important;
}

/* Bild-Wrapper */
.masonry-image {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, .2);
  /*min-height: 250px;*/
}

/* Bild */
.masonry-image img {
  display: block;
  width: 100%;
  height: auto;
  filter: brightness(0.7);
  transition: transform 0.3s ease, filter 0.3s ease;
}

/* Hover */
.masonry-link:hover img {
  transform: scale(1.05);
  filter: brightness(0.6);
}

/* Abdunkelungs-Overlay */
.masonry-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55),
    rgba(0, 0, 0, 0.15)
  );
}

/* Titel */
.masonry-title {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 0.5rem 0.75rem;
  max-width: calc(100% - 2rem);
  z-index: 1;
}
.masonry-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    padding-top: 4rem;
    box-sizing: border-box;
    transform: translateY(80%);
    transform-origin: bottom;
    transition: all 0.6s ease-out;
    z-index:1;
  }

  .masonry-item:has(.masonry-content):hover .masonry-content {
    transform: translateY(0);
  }
  .masonry-item:has(.masonry-content):hover .masonry-title {
    bottom: 80%;
  }
  .masonry-content .masonry-teaser {
      display: -webkit-box;
      -webkit-line-clamp: 6;
      -webkit-box-orient: vertical;
      overflow: hidden;
      color:white;
  }