/*
Theme Name: Twenty Twenty-Four Child
Theme URI: https://de.wordpress.org/themes/twentytwentyfour/
Description: Ein Child-Theme für Twenty Twenty-Four
Author: Dein Name
Template: twentytwentyfour
Version: 1.0
*/




/* ===========================
   Lokale Montserrat-Schriftarten
   =========================== */

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-Thin.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-ThinItalic.ttf') format('truetype');
  font-weight: 100;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-ExtraLight.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-ExtraLightItalic.ttf') format('truetype');
  font-weight: 200;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-LightItalic.ttf') format('truetype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-MediumItalic.ttf') format('truetype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-SemiBoldItalic.ttf') format('truetype');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-ExtraBoldItalic.ttf') format('truetype');
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-BlackItalic.ttf') format('truetype');
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

/* ===========================
   Standardschrift auf der Website
   =========================== */
body {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}


/* SCHRIFTART ENDE */



header.wp-block-template-part {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: white;
    transition: box-shadow 0.2s ease;
    box-shadow: none; /* kein Schatten initial */
}

/* Schatten nur wenn diese Klasse da ist */
header.wp-block-template-part.header-shadow {
    box-shadow: 10px 10px 15px rgba(0, 0, 0, 0.3);
}


.single-post .wp-post-image {
  display: block;
  width: 100%;          /* skaliert mit dem Container */
  max-width: 50vh;     /* nie breiter als 800px */
  height: auto;         /* behält Seitenverhältnis */
  object-fit: contain;  /* sorgt für korrekte Darstellung, falls Container andere Proportionen hat */
  margin-left: auto;
  margin-right: auto;
}


















/* Submenu im Header */
.wp-block-navigation .wp-block-navigation__submenu-container {
  position: absolute;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  transition: all 0.3s ease;
  min-width: 240px;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  z-index: 100;
  overflow: hidden; /* <<< WICHTIG für runde Ecken */
}

/* Sichtbar bei Hover */
.wp-block-navigation .wp-block-navigation-item:hover > .wp-block-navigation__submenu-container {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Einzelne Menülinks */
.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  padding: 12px 20px;
  display: block;
  color: #333;
  text-decoration: none;
  transition: background 0.2s ease;
  white-space: nowrap;
  font-size: 0.9rem;
}

/* Hover-Stil */
.wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
  background-color: #f5f5f5;
  color: #000;
}

/* Trennlinien zwischen Einträgen */
.wp-block-navigation__submenu-container .wp-block-navigation-item + .wp-block-navigation-item {
  border-top: 1px solid #eee;
}

/* >>> Diese beiden regeln die abgerundeten Ecken <<< */
.wp-block-navigation__submenu-container > li:first-child > a {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.wp-block-navigation__submenu-container > li:last-child > a {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}
/* Erster Menüpunkt im Submenü */
.wp-block-navigation__submenu-container > li:first-child.wp-block-navigation-item.wp-block-navigation-link {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

/* Letzter Menüpunkt im Submenü */
.wp-block-navigation__submenu-container > li:last-child.wp-block-navigation-item.wp-block-navigation-link {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}
/* Auch auf tiefer verschachtelte Submenüs anwenden */
.wp-block-navigation__submenu-container li.wp-block-navigation-submenu {
  border-radius: 10px;
  background-color: #fff;
}


/* SUBEMNU MOBIL */
/* ============================
   MOBILE OVERLAY MENÜ (<=767px)
   ============================ */
@media (max-width: 767px) {

  /* --- Overlay-Menü Basis --- */
  .overlay-menu {
    position: fixed;
    top: 69px; /* beginnt unterhalb des Headers */
    left: 0;
    width: 100%;
    height: calc(100vh - 69px);
    background-color: #f9f9f9;
    display: none;
    overflow-y: auto;
    padding: 10px 20px 80px 20px; /* extra Platz unten */
    box-sizing: border-box;
    z-index: 9999;
  }

  .overlay-menu.active {
    display: block;
  }

  /* --- Menü öffnen Button --- */
  #overlay-open {
    position: fixed;
    top: 34.5px; /* Mitte der 69px Header-Zeile */
    right: 20px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10000;
    color: #343a40;
    line-height: 1;
    padding: 4px;
  }

  /* --- Menü schließen Button (wird nicht verwendet) --- */
  #overlay-close {
    display: none !important;
  }

  /* --- Navigationsliste --- */
  .overlay-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .overlay-nav > ul > li {
    margin-bottom: 12px;
  }

  .overlay-nav a {
    text-decoration: none;
    color: #000;
    font-size: 1.2rem;
    display: block;
    padding: 12px 10px;
  }

  /* --- Submenüs --- */
  .overlay-nav li.has-child > a::after {
    content: "▶";
    float: right;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
  }

  .overlay-nav li.is-open > a::after {
    transform: rotate(90deg);
  }

  .overlay-nav li ul {
    display: none;
    margin-top: 8px;
    margin-left: 15px;
    border-left: 2px solid #ccc;
    padding-left: 12px;
  }

  .overlay-nav li.is-open > ul {
    display: block;
  }

  /* --- Letztes Element etwas Luft nach unten --- */
  .overlay-nav ul li:last-child {
    margin-bottom: 40px;
  }

  /* --- Scroll-Design --- */
  .overlay-menu::-webkit-scrollbar {
    width: 6px;
  }

  .overlay-menu::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
  }

  .overlay-menu::-webkit-scrollbar-track {
    background: transparent;
  }

  /* --- Body fixieren, wenn Menü offen --- */
  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  /* --- Original Gutenberg Mobile Menü verstecken --- */
  .wp-block-navigation__responsive-container,
  .wp-block-navigation__responsive-container-open {
    display: none !important;
  }
}

/* ============================
   DESKTOP: Overlay & Button ausblenden
   ============================ */
@media (min-width: 768px) {
  #overlay-open,
  .overlay-menu {
    display: none !important;
  }
}




/* SUBMENU MOBIL HEADER */
























.slide-container {
  overflow-x: hidden;
}

.hide-element{
	display: none;
}



/* Header Slider */
.slideshow-container {
  position: relative;
  width: 100%;
  min-height: 450px; /* je nach Bildgröße anpassen */
  overflow: hidden;
  border-radius: 16px;
}

@media (max-width: 768px) {
.slideshow-container {
  min-height: 200px; /* je nach Bildgröße anpassen */
  margin-top: 30px;
}

}

.slideshow-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  z-index: 0;
  border-radius: 16px;
  object-fit: cover;
  display: block;
}

.slideshow-image.active {
  opacity: 1;
  z-index: 1;
}




/* Kacheln für Beitragsslider */
.owl-stage {
  display: flex !important;
  flex-wrap: nowrap !important;
}

.owl-post-slider .owl-item {
  width: 360px !important;
  margin-right: 20px;
  margin-left: 5px;
}

.owl-post-slider {
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 0;
}

.owl-post-slider .post-slide-box {
  height: 575px;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s;
  margin: 10px 0;
}

.owl-post-slider .post-slide-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.post-thumb-container {
  height: 225px;
  overflow: hidden;
  border-bottom: 1px solid #ddd; /* leichter Trennstrich */
}

.post-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.post-title {
  font-size: 1.2em;
  font-weight: bold;
  margin: 0 0 4px; /* verkürzter Abstand */
  color: #222;
}

.post-title a {
  text-decoration: none;
  color: inherit;
}

.post-date {
  font-size: 0.85em;
  color: #777;
  margin-bottom: 6px; 
  margin-top: 5px;
  display: flex;
  align-items: center;
}

.post-date i {
  margin-right: 6px;
  color: #888;
}

.post-excerpt {
  font-size: 0.95em;
  color: #444;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4; /* max. 4 Zeilen */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-readmore {
  margin-top: 15px;
  font-size: 0.9em;
  color: #000;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.post-readmore:hover {
  text-decoration: underline;
  color: #000; 
}

.post-readmore i {
  transition: transform 0.3s ease;
}

.post-readmore:hover i {
  transform: translateX(4px);
}

.post-readmore span {
  margin-left: 5px;
}

@media (max-width: 599px) {
  .owl-carousel .owl-item {
    width: 100% !important;
  }

  .owl-post-slider .post-slide-box {
    margin: 10px 0;
  }
}
/* Kacheln für Beitragsslider Ende */



/* Kacheln für Bildslider */
/* Kacheln für Custom Owl Carousel Slider */
.owl-custom-slider .owl-stage {
  display: flex !important;
  flex-wrap: nowrap !important;
}

.owl-custom-slider .owl-item {
  width: 360px !important;
  margin-right: 20px;
  margin-left: 5px;
}

.owl-custom-slider {
  max-width: 1140px;
  margin: 0 auto;
  margin-top: 50px;
  padding: 20px 0;
}

.owl-custom-slider .post-slide-box {
  height: 600px; /* Höhe angepasst für größere Bilder */
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  margin: 10px 0;
  cursor: pointer;
}

.owl-custom-slider .post-slide-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}


.owl-custom-slider .post-thumb-container {
  height: 280px;  /* Max-Höhe */
  max-height: 280px;
  overflow: hidden;
  border-bottom: 1px solid #ddd;
  border-radius: 12px 12px 0 0;
}

.owl-custom-slider .post-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Bild füllt Container, wird beschnitten falls nötig */
  display: block;
  border-radius: 12px 12px 0 0;
}

.owl-custom-slider .post-content {
  padding: 0px 8px 0px 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex-grow: 1;
  color: #666666;
  font-size: 14px;
}

.owl-custom-slider .post-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: #666666;
  line-height: 1.3;
}

.owl-custom-slider .post-slide-box.no-text {
  border-radius: 12px; /* rund an allen Ecken */
}

.owl-custom-slider .post-slide-box.no-text .post-thumb-container {
  border-radius: 12px; /* Bildcontainer rund an allen Ecken */
  border-bottom: none; /* Trennlinie unten entfernen, damit Rundung sauber ist */
}


@media (max-width: 599px) {
  .owl-custom-slider .owl-item {
    width: 100% !important;
  }
  
  .owl-custom-slider .post-slide-box {
    margin: 10px 0;
    height: auto;
  }
  
  .owl-custom-slider .post-thumb-container {
    height: 220px;
  }
}
/* Kacheln für Bildslider Ende */


/* Bild groß machen bei Klick */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  display: none;
}


/* Das große Bild */
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.7);
  object-fit: contain;
}
/* Bild groß machen bei Klick Ende */



/* Pfeile für owl */
.custom-nav {
  text-align: center;
  user-select: none;
}

.custom-nav button {
  font-family: var(--wp--preset--font-family--inter, "Inter", sans-serif);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  color: #fff;
  background-color: #000;
  padding: 0.667em 1.333em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, 
              color 0.2s ease-in-out,
              box-shadow 0.2s ease-in-out;
  margin: 0 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  text-decoration: none;
  text-align: center;
}

.custom-nav button:hover,
.custom-nav button:focus {
  background-color: #333;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.2);
  outline: none;
}






.slide-from-left,
.slide-from-right {
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.6s ease-out;
  will-change: transform, opacity;
}

.slide-from-left {
  transform: translateX(-100px);
}

/* Klasse, die die Animation beendet */
.visible {
  opacity: 1 !important;
  transform: translateX(0) !important;
}


main {
  margin-top: 70px;
}


img {
  max-width: 100%;
  height: auto;
}