/* === Linkliste (erste Spalte) === */
.linkliste li {
  margin-bottom: 3px;
  line-height: 1.2;
}


/* === Container für 3 Spalten === */
.responsive-three-columns {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: stretch; /* alle Spalten gleich hoch */
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

/* Alle Spalten */
.responsive-three-columns > .wp-block-column {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

/* Linkliste (erste Spalte) */
.responsive-three-columns > .wp-block-column:first-child {
  flex: 0 0 25%;
  max-width: 25%;
  padding: 0 0.5rem;
}

/* Überschriften, Absätze, Listen in linker Spalte */
.responsive-three-columns > .wp-block-column:first-child h1,
.responsive-three-columns > .wp-block-column:first-child h2,
.responsive-three-columns > .wp-block-column:first-child h3,
.responsive-three-columns > .wp-block-column:first-child h4,
.responsive-three-columns > .wp-block-column:first-child p,
.responsive-three-columns > .wp-block-column:first-child ul,
.responsive-three-columns > .wp-block-column:first-child ol {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  padding-left: 1.2em;
  line-height: 1.5;
}

/* Links in Linkliste */
.responsive-three-columns > .wp-block-column:first-child ul li a {
  display: block;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Bild (zweite Spalte) */
.responsive-three-columns > .wp-block-column:nth-child(2) {
  flex: 0 0 50%;
  max-width: 50%;
}

.responsive-three-columns > .wp-block-column:nth-child(2) > * {
  flex: 1;
}

.responsive-three-columns > .wp-block-column:nth-child(2) img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* === Google Maps (dritte Spalte) === */
.responsive-three-columns > .wp-block-column:last-child {
  flex: 0 0 25%;
  max-width: 25%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
}

/* Sicherstellen, dass Spaltenhöhe synchronisiert bleibt */
.responsive-three-columns {
  align-items: stretch !important;
}

/* Karte sichtbar & flexibel */
.responsive-three-columns > .wp-block-column:last-child iframe {
  flex: 1 1 auto;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3; /* Grundhöhe – verhindert Verschwinden */
  border: none;
  display: block;
}

/* Wenn Nachbarspalten höher sind, dehnt sich die Karte mit */
.responsive-three-columns > .wp-block-column:last-child > * {
  flex-grow: 1;
}

/* === Mobile Ansicht === */
@media (max-width: 768px) {
  .responsive-three-columns {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0;
  }

  .responsive-three-columns > .wp-block-column {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 0.5rem;
    box-sizing: border-box;
  }

  .responsive-three-columns > .wp-block-column:first-child {
    padding-left: 0 !important;
    padding-right: 0.5rem;
  }

  .responsive-three-columns > .wp-block-column:first-child h1,
  .responsive-three-columns > .wp-block-column:first-child h2,
  .responsive-three-columns > .wp-block-column:first-child h3,
  .responsive-three-columns > .wp-block-column:first-child h4,
  .responsive-three-columns > .wp-block-column:first-child p,
  .responsive-three-columns > .wp-block-column:first-child ul,
  .responsive-three-columns > .wp-block-column:first-child ol {
    margin-top: 0.4em;
    margin-bottom: 0.4em;
    padding-left: 0 !important;
  }

  .responsive-three-columns img,
  .responsive-three-columns iframe {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle !important;
    line-height: 0 !important;
  }

  .responsive-three-columns > .wp-block-column:nth-child(2),
  .responsive-three-columns > .wp-block-column:last-child {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 0.5rem;
  }

  /* Karte wieder normales Verhalten */
  .responsive-three-columns > .wp-block-column:last-child iframe {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    display: block !important;
  }

  .responsive-three-columns .wp-block-embed,
  .responsive-three-columns .wp-block-embed__wrapper,
  .responsive-three-columns .wp-block-html,
  .responsive-three-columns figure {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    line-height: 0 !important;
  }

  .responsive-three-columns p:has(iframe) {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
  }
	
@media (max-width: 768px) {
  /* Bildunterschrift richtig umbrechen */
  .responsive-three-columns figure figcaption {
    display: block !important;         /* Block-Level, damit Zeilen untereinander kommen */
    white-space: normal !important;    /* Zeilenumbruch erlaubt */
    word-break: break-word !important; /* Lange Wörter umbrechen */
    overflow-wrap: break-word !important;
    line-height: 1.3em !important;     /* Zeilenhöhe für Abstand zwischen Zeilen */
    width: 100% !important;
    margin-top: 0.3em !important;      /* Abstand zum Bild */
  }

  /* Flex-Eigenschaften der Spalte aufheben, die Caption quetschen könnten */
  .responsive-three-columns > .wp-block-column:nth-child(2) > * {
    flex: unset !important;
  }

.wp-block-gallery img {
    height: 800px;       /* gewünschte Höhe */
    object-fit: cover;   /* schneidet überstehende Ränder sauber ab */
    width: 100%;
}
