@font-face {
  font-family: 'Lato';
  src: url('/css/font/Lato-Regular.woff2') format('woff2'),
       url('/css/font/Lato-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Lato';
  src: url('/css/font/Lato-Bold.woff2') format('woff2'),
       url('/css/font/Lato-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal; /* FIX: war "bold", ungültiger Wert */
}

@font-face {
  font-family: 'Lato';
  src: url('/css/font/Lato-Italic.woff2') format('woff2'),
       url('/css/font/Lato-Italic.woff') format('woff');
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: 'OpenSans';
  src: url('/css/font/OpenSans-Regular.woff2') format('woff2'),
       url('/css/font/OpenSans-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'OpenSans';
  src: url('/css/font/OpenSans-Bold.woff2') format('woff2'),
       url('/css/font/OpenSans-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal; /* FIX: war "bold", ungültiger Wert */
}

@font-face {
  font-family: 'OpenSans';
  src: url('/css/font/OpenSans-Italic.woff2') format('woff2'),
       url('/css/font/OpenSans-Italic.woff') format('woff');
  font-weight: 400;
  font-style: italic;
}

/* ==== Browserverhalten ==== */

html {
  scrollbar-gutter: stable;
}

/* ==== Grundtypografie ==== */

body {
  font-family: 'Lato', sans-serif;
  color: #404040;
  margin: 0;
  line-height: 1.3;
}

p {
  font-size: 16px;
  line-height: 1.3;
  margin-top: 0.15rem;
  margin-bottom: 0.45rem;   
}

blockquote {
  font-style: italic;
  background-color: transparent;
  border-radius: 12px;
  /*padding: 15px;*/
  max-height: 400px;
  overflow: auto;
}

a {
  color: inherit;
  text-decoration: underline;
}

a:hover {
  color: #2a5485;
}

h1 { 
  /*font-size: 36px;*/
  color: #367714;
  font-size: 2.25rem;
  margin-top: 0.15rem;
  margin-bottom: 0.45rem; 
 }

h2 {
  /*font-size: 24px;*/
  color: #5081B9;
  font-size: 1.625rem;    /* 22px */
  /*line-height: 1.3;*/
  margin-top: 0.15rem;
  margin-bottom: 0.45rem;  
}

h3 {
  font-size: 1.25rem;
  /*line-height: 1.3;*/
  margin-bottom: 0;
  margin-top: 0.15rem;
  margin-bottom: 0.45rem;   
}

h4 {
  font-weight: normal;
  font-size: 1.25rem;        /* 16px */
  font-weight: normal;
  /*line-height: 1.5;*/
  margin-top: 0.15rem;
  margin-bottom: 0.45rem;  
}

ul {
  padding-left: 16px;
  margin: 0px 0;
}

ol {
  padding-left: 20px;
  margin: 0px 0;
}

li {
  margin-bottom: 5px; 
}

hr {
  border: none;
  border-top: 1px solid rgb(119, 119, 119);
  margin: 20px 0;
}

pre {
  background-color: #f2f2f2;
  border-radius: 12px;
  padding: 20px;
  max-height: 400px;
  overflow: auto;
}

code {
  color: rgb(19, 95, 170);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

button {
  font-size: 14px;
  color: #ffffff;
  background-color: green;
  border-radius: 12px;
  padding: 10px 20px;
  margin: 10px;
  cursor: pointer;
  border: none;
}

/* ==== Tabelle ==== */

table {
  border-collapse: collapse;
  width: 100%;
}

th {
  /*font-size: 14px;*/
  font-weight: bold; /* FIX: war "font-style: bold", ungültig */
}

td {
  /*font-size: 14px;*/
}

/* ==== Kachel-Layout 400px ==== */

.kachel400-seite {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 10px;
  padding: 0 20px;
}

.kacheln400-einzeln {
  display: grid;
  grid-template-columns: repeat(auto-fill, 400px);
  justify-content: center;
  grid-gap: 0rem;
}

@media only screen and (max-width: 600px) {
  .kacheln400-einzeln {
    grid-template-columns: auto;
  }
}

.kacheln400-einzeln div {
  max-width: 360px;
  max-height: none;
  min-width: 360px;
  min-height: auto;
  margin-bottom: 0.5rem;
  padding: 1rem;
  background: #f6f6f6;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
}

@media only screen and (max-width: 600px) {
  .kacheln400-einzeln div {
    max-width: 100%;
    min-width: unset;
    max-height: none;
    min-height: auto;
  }
}

.kacheln400-einzeln div p {
  word-wrap: break-word;
  overflow: hidden;
}

.kacheln400-einzeln div a {
  text-decoration: underline;
  color: inherit;
}

@media only screen and (max-width: 600px) {
  .kacheln400-einzeln div p {
    margin-bottom: 0rem;
    padding-bottom: 0rem;
    font-size: 70%;
  }
}

.kacheln400-einzeln div img,
.kacheln400-einzeln div video {
  margin: auto;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
}

@media only screen and (max-width: 600px) {
  .kacheln400-einzeln div img,
  .kacheln400-einzeln div video {
    max-width: 100%;
    max-height: 250px;
  }
}

/* ==== Kachel-Layout 600px (groß) ==== */

.kachel-seite {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 10px;
  padding: 0 20px;
}

.kacheln-einzeln {
  display: grid;
  grid-template-columns: repeat(auto-fill, 600px);
  justify-content: center;
  grid-gap: 0rem;
}

@media only screen and (max-width: 600px) {
  .kacheln-einzeln {
    grid-template-columns: auto;
  }
}

.kacheln-einzeln div {
  max-width: 550px;
  max-height: none;
  min-width: 550px;
  min-height: auto;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f6f6f6;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
}


@media only screen and (max-width: 600px) {
  .kacheln-einzeln div {
    max-width: 100%;
    min-width: unset;
    max-height: none;
    min-height: auto;
  }
}

.kacheln-einzeln div p {
  word-wrap: break-word;
  overflow: hidden;
}

.kacheln-einzeln div a {
  text-decoration: underline;
  color: inherit;
}

@media only screen and (max-width: 600px) {
  .kacheln-einzeln div p {
    margin-bottom: 0rem;
    padding-bottom: 0rem;
    font-size: 70%;
  }
}

.kacheln-einzeln div img,
.kacheln-einzeln div video {
  margin: auto;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
}

@media only screen and (max-width: 600px) {
  .kacheln-einzeln div img,
  .kacheln-einzeln div video {
    max-width: 100%;
    max-height: 400px;
  }
}

/* ==== Kachel-Layout 1200px (Vollbreite) ==== */
.kachel1200-seite {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.kacheln1200-einzeln {
  display: grid;
  grid-template-columns: 1fr;
  justify-content: center;
  grid-gap: 0rem;
}

.kacheln1200-einzeln div {
  width: 100%;
  max-width: 1200px;
  max-height: none;
  min-height: auto;
  margin: 0 auto 1rem auto;  /* <-- geändert: war nur "margin-bottom: 1rem" */
  padding: 1.5rem;
  background: #f6f6f6;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Stufe 2: ab < 1240px → auf Breite von 2×400er-Kacheln (~800px) */
@media only screen and (max-width: 1214px) {
  .kachel1200-seite {
    max-width: 840px;
  }

  .kacheln1200-einzeln div {
    max-width: 800px;
  }
}

/* Stufe 3: ab < 840px → auf Breite der 600er-Kachel (~550px) */
@media only screen and (max-width: 814px) {
  .kachel1200-seite {
    max-width: 640px; /* 600px Grid + 40px padding */
  }

  .kacheln1200-einzeln div {
    max-width: 550px;
  }
}

/* Stufe 4: unter 600px → volle Breite wie alle anderen */
@media only screen and (max-width: 600px) {
  .kachel1200-seite {
    max-width: 100%;
  }

  .kacheln1200-einzeln div {
    max-width: 100%;
  }
}

/* Medien – analog zu den anderen Layouts */
.kacheln1200-einzeln div img,
.kacheln1200-einzeln div video {
  margin: auto;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
}

@media only screen and (max-width: 600px) {
  .kacheln1200-einzeln div img,
  .kacheln1200-einzeln div video {
    max-width: 100%;
    max-height: 400px;
  }
}

.kacheln1200-einzeln div p {
  word-wrap: break-word;
  overflow: hidden;
}

.kacheln1200-einzeln div a {
  text-decoration: underline;
  color: inherit;
}

@media only screen and (max-width: 600px) {
  .kacheln1200-einzeln div p {
    margin-bottom: 0rem;
    padding-bottom: 0rem;
    font-size: 70%;
  }
}

/* ==== Text-Layout (gestapelt) ==== */

.text-container {
  width: 100%;
  max-width: 800px;
  padding-top: 0px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
}

.text-container > div {
  box-sizing: border-box;
  padding-left: 1rem;
  padding-right: 1rem;
}

.text-container .text-item {
  width: 800px;
  margin: 0px; 
  background: transparent;
  text-align: left;
  word-wrap: break-word;
  border-radius: 10px;
}

/* ==== Spalten-Alignment: erstes Element ohne Top-Abstand ==== */
.text-container > div > *:first-child {
  margin-top: 0;
}

.text-container > div > img:first-child,
.text-container > div > video:first-child {
  margin-top: var(--bild-versatz, 10px);
}

/* ==== Text-Layout halbe Breite (gestapelt) ==== */

.text-container .text-item-half {
  width: 50%;
}

@media only screen and (max-width: 600px) {
  .text-container .text-item-half {
    width: 100%;
  }
}

/* ==== Text-Layout Drittel (gestapelt) ==== */
.text-container .text-item-third {
  width: 33.333%;
}

@media only screen and (max-width: 600px) {
  .text-container .text-item-third {
    width: 100%;
  }
}

/* ==== Text-Layout Viertel (gestapelt) ==== */
.text-container .text-item-quarter {
  width: 25%;
}

@media only screen and (max-width: 600px) {
  .text-container .text-item-quarter {
    width: 100%;
  }
}

/* ==== Medien allgemein ==== */

.responsive-image {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: 10px;
  margin-bottom: 10px;
  max-width: 100%;
  height: auto;
}

@media screen and (max-width: 600px) {
  .responsive-image {
    max-width: 80%;
  }
}

/* ==== Lightbox Overlay ==== */

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}

.lightbox-overlay.aktiv {
  display: flex;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

/* ==== Footer ==== */

.footer {
  background-color: #ffffff;
  color: #B6B6B6;
  text-align: center;
  margin-top: 50px;
  padding: 10px 10px;
}

.footer a {
  color: #B6B6B6;
  text-decoration: none;
}

.footer a:hover {
  color: #2a5485;
}

/* ==== Navigation ==== */

.navigation {
  text-align: center;
  font-family: 'OpenSans', sans-serif;
  color: #e8e8e8;
  font-size: 16px;
  margin-top: 15px; /* Nav1: Abstand zum Logo, Nav2: Position Navigation */
}

.navigation a {
  text-decoration: none;
  color: #B6B6B6;
  padding: 7px 20px 5px 10px;
}

.navigation a:hover {
  color: #2a5485;
}

.navigation a.current {
  background-color: #A0BA8B;
  color: #ffffff;
}

@media screen and (max-width: 768px) {
  .navigation a {
    display: block;
    margin-top: 0;
    margin-right: auto;
    margin-bottom: 5px;
    /* Abstand zwischen den Navigationspunkten */
    margin-left: auto;
    width: fit-content;
  }
}

/* ==== Kopfbereich (Logo + Navigation) ==== */

/* Variante 1 (Standard): Logo oben, Navigation darunter, zentriert */
.kopfbereich {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;   /* Abstand des gesamten Kopfbereichs zum Seiteninhalt */
}

.kopfbereich-logo img {
  display: block;
  margin-top: 5px;
}

/* Variante 2: Logo links, Navigation rechts, vertikal zentriert */
.kopfbereich.kopfbereich-split {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin-top: 0;
  margin-right: auto;
  margin-bottom: 35px;
  margin-left: auto;
  padding: 0 20px;
  box-sizing: border-box;
  line-height: 1.8;
}

@media only screen and (max-width: 768px) {
  .kopfbereich.kopfbereich-split {
    flex-direction: column;
    align-items: center;
  }
}

/* ==== Eingebtte iFrame inhalte ==== */

.embed-facade {
  position: relative;
  width: 100%;              
  max-width: 100%;          
  margin: 20px auto;
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
}

.embed-facade img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.embed-facade::after {
  content: "▶";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40px;
  color: #fff;
  text-shadow: 0 0 6px rgba(0,0,0,.6);
}

.embed-hinweis {
  position: absolute;
  bottom: 5px; left: 0; right: 0;
  padding: 15px 15px 15px 15px; /* oben | rechts | unten | links */
  font-size: 16px;
  line-height: 1.4;
  color: #ddd;
  background: rgb(151, 41, 1);
  pointer-events: none; /* Klick geht durch ans Facade-Div, nicht am Text hängen */
}

@media only screen and (max-width: 600px) {
  .embed-hinweis {
    font-size: 12px;
    padding: 8px 10px;
  }
}