/********** STANDARD **********/

.unsichtbar {
	display: none;
}

* {
  scroll-behavior: smooth !important;
}

.wp-lightbox-container {
  margin-bottom: 1em;
}

.wp-block-list {
  padding-left: 15px;
}

.wp-block-image.alignleft, .wp-block-image.alignright {
  margin-bottom: 15px !important;
}

@media (max-width: 540px) {

  .is-layout-constrained > .alignright, .is-layout-constrained > .alignleft {
  width: 100%;

}

  .wp-container-core-columns-is-layout-c1ca6ac9 {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

figcaption {
  font-size: var(--wp--preset--font-size--sm);
  margin-bottom: 0px !important;
  font-style: italic;
}

header {
  position: sticky;
  top: 32px;
  z-index: 999;
}

.entry-content > .wp-block-group {
  padding-top: var(--wp--preset--spacing--48);
  padding-bottom: var(--wp--preset--spacing--32);
}

.wp-singular .taxonomy-category.wp-block-post-terms {
  position: absolute;
  top: 0;
  right: 0;
  padding: 5% 7% 0 0;
}

header nav a span:hover {
  color: var(--wp--preset--color--primary)
}

.col-tg header, .kasten {
box-shadow: 10px 10px 30px 0 rgba(0,0,0,.1);
}

.clear {
  clear: both;
  padding-top: 15px
}


.backstretch {
  position: fixed;   /* bleibt am Viewport kleben */
  inset: 0;          /* = top:0; right:0; bottom:0; left:0 */
  width: 100vw;
  height: 100dvh;    /* volle Höhe, auch auf Mobile korrekt */
  overflow: hidden;
  z-index: -1;       /* liegt unter dem restlichen Content */
}

.backstretch > .bs-img {
  position: absolute; /* relativ zum Container */
  left: 0;
  top: 0;
  max-width: none;    /* wichtig für Cover-Skalierung */
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.backstretch > .bs-img.is-active {
  opacity: 1;
}


.slb_template_tag.slb_template_tag_item.slb_template_tag_item_title {
font-family: 'Roboto';
}

.slb_data_title {
  margin-top: 10px !important;
}

/* Gallery immer als Grid rendern und Spaltenanzahl respektieren */
.wp-block-gallery.is-layout-flex {
  display: grid !important;
  gap: var(--wp--style--gallery-gap, 1rem);
}

/* 4 Spalten, wenn im Block ausgewählt */
.wp-block-gallery.columns-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

/* Bremsende Flex/Width-Regeln neutralisieren */
.wp-block-gallery .wp-block-image {
  width: auto !important;
  margin: 0;
  flex: 0 0 auto;
}

@media (max-width: 1024px) {
  .wp-block-gallery.columns-4 { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 768px) {
  .wp-block-gallery.columns-4 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
  .wp-block-gallery.columns-4 { grid-template-columns: 1fr !important; }
}



/* BACK TO TOP */

.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  color: #fff;
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  opacity: 0;
  /* Unsichtbar am Anfang */
  visibility: hidden;
  transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
  z-index: 1000;
  cursor: pointer;
}

.back-to-top .has-petrol-background-color:hover {
  background: #1A444D !important;
}

.back-to-top.show {
  opacity: 1;
  /* Button wird eingeblendet */
  visibility: visible;
}

/********** ACCORDION **********/

summary {
  hyphens: auto;
}



.wp-block-group > .wp-block-details {
  border-bottom: 1px var(--wp--preset--color--primary) solid;
}

.accordion-inner > p {
  padding-bottom: 0;
}

.wp-block-details {
  padding-bottom: 11px;
  padding-top: 15px;
}

summary {
  display: flex;
  align-items: center;
  list-style: none;
  cursor: pointer;
  padding-right: 50px;
}

/* Nur aktiv, wenn JavaScript läuft (Klasse js-enabled) */
.js-enabled .wp-block-details>.accordion-inner {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.3s ease;
}

/* Geöffneter Zustand */
.js-enabled .wp-block-details.open>.accordion-inner {
  max-height: 1000px;
  opacity: 1;
}

.wp-block-details summary::-webkit-details-marker { display: none; }

.wp-block-details summary {
  position: relative;
  padding-left: 1.5rem;
  cursor: pointer;
}

/* Chevron ">" als SVG-Maske */
.wp-block-details summary::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.9em;
  height: 0.9em;
  transform: translateY(-50%) rotate(0deg);
  transform-origin: 50% 50%;
  transition: transform .25s ease;

  /* Farbe über currentColor steuern */
  background-color: currentColor;

/* SVG als Maske (Chrome/Safari/Firefox) */
-webkit-mask-image: url('data:image/svg+xml;utf8,\
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\
  <line x1="12" y1="5" x2="12" y2="19" stroke="black" stroke-width="2" stroke-linecap="round"/>\
  <line x1="5" y1="12" x2="19" y2="12" stroke="black" stroke-width="2" stroke-linecap="round"/>\
</svg>');
mask-image: url('data:image/svg+xml;utf8,\
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\
  <line x1="12" y1="5" x2="12" y2="19" stroke="black" stroke-width="2" stroke-linecap="round"/>\
  <line x1="5" y1="12" x2="19" y2="12" stroke="black" stroke-width="2" stroke-linecap="round"/>\
</svg>');
-webkit-mask-repeat: no-repeat; 
mask-repeat: no-repeat;
-webkit-mask-position: 50% 50%; 
mask-position: 50% 50%;
-webkit-mask-size: 22px;     
mask-size: 22px;
}

/* drehen, wenn geöffnet */
.wp-block-details[open] summary::before {
  transform: translateY(-50%) rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
  .wp-block-details summary::before { transition: none; }
}




