/*
 * Startseiten-Kacheln (Masonry, Titel "on_hover")
 * - Kacheln etwas kleiner (je Bildschirmbreite eine Spalte mehr)
 * - Titel dauerhaft unten in Weiß
 * - ganze Kachel klickbar
 */

/* ---------- 1) Kachelgrößen: eine Spalte mehr als das Parent-Theme ---------- */
@media screen and (max-width: 500px) {
  #content .image_list_item.masonry_list_item { width: 50%; }
}
@media screen and (min-width: 501px) and (max-width: 750px) {
  #content .image_list_item.masonry_list_item { width: 33.3333%; }
}
@media screen and (min-width: 751px) and (max-width: 1000px) {
  #content .image_list_item.masonry_list_item { width: 25%; }
}
@media screen and (min-width: 1001px) and (max-width: 1023px) {
  #content .image_list_item.masonry_list_item { width: 20%; }
}
@media screen and (min-width: 1024px) and (max-width: 1273px) {
  #content .image_list_item.masonry_list_item { width: 25%; }
}
@media screen and (min-width: 1274px) and (max-width: 1523px) {
  #content .image_list_item.masonry_list_item { width: 20%; }
}
@media screen and (min-width: 1524px) and (max-width: 1773px) {
  #content .image_list_item.masonry_list_item { width: 16.6667%; }
}
@media screen and (min-width: 1774px) and (max-width: 2023px) {
  #content .image_list_item.masonry_list_item { width: 14.2857%; }
}
@media screen and (min-width: 2024px) and (max-width: 2273px) {
  #content .image_list_item.masonry_list_item { width: 12.5%; }
}
@media screen and (min-width: 2274px) {
  #content .image_list_item.masonry_list_item { width: 11.1111%; }
}

/* ---------- 2) Titel dauerhaft unten, weiße Schrift ---------- */
#content .masonry_list_item.on_hover:not(.da-empty) .masonry_item_content {
  display: flex !important;
  flex-direction: column;
  justify-content: flex-end;
  position: absolute !important;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 0;
  padding: 0 10px 8px;
  margin: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.35) 22%, rgba(0, 0, 0, 0) 42%);
  animation: none;
  -webkit-animation: none;
  text-align: left;
  z-index: 3;
}

#content .masonry_list_item.on_hover .masonry_item_content h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  -webkit-line-clamp: 2;
}

#content .masonry_list_item.on_hover .masonry_item_content h4 a,
#content .masonry_list_item.on_hover .masonry_item_content h4 a:visited {
  color: #fff;
  text-decoration: none;
}

/* Kurzbeschreibung und Lupen-Symbol ausblenden */
#content .masonry_list_item.on_hover .masonry_item_content .home_description_hover,
#content .masonry_list_item.on_hover .masonry_item_content .zoom {
  display: none !important;
}

/* ---------- 3) Ganze Kachel klickbar ---------- */
#content .masonry_list_item.on_hover .masonry_item_content h4 a::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

#content .masonry_list_item.on_hover .masonry_item_content h4 a:focus-visible {
  outline: none;
}
#content .masonry_list_item.on_hover .masonry_item_content h4 a:focus-visible::after {
  outline: 2px solid #fff;
  outline-offset: -4px;
}

/* ---------- 4) H1 und Intro über der Galerie ---------- */
#content .mv-home-intro {
  padding: 28px 24px 24px;
  box-sizing: border-box;
}
#content .mv-home-intro h1 {
  margin: 0 0 10px;
  padding: 0;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #fff;
}
#content .mv-home-intro p {
  margin: 0;
  max-width: 820px;
  font-size: 15px;
  line-height: 1.6;
  color: #b9b9b9;
}
@media screen and (max-width: 750px) {
  #content .mv-home-intro { padding: 20px 14px 16px; }
  #content .mv-home-intro h1 { font-size: 21px; }
  #content .mv-home-intro p { font-size: 14px; }
}

/* Leichter Hover-Effekt als Rückmeldung */
#content .masonry_list_item.on_hover .masonry_item_img img {
  transition: filter 0.2s ease;
}
#content .masonry_list_item.on_hover:hover .masonry_item_img img {
  filter: brightness(1.08);
}
