
/* === MBD Galerie Grid Add-on ===
   Diese Datei kann zusätzlich zur bestehenden styles.css eingebunden werden
   ODER ans Ende der bestehenden CSS eingefügt werden.
   Ziel: 3×4 Kachelraster für die Galerie (.gallery) mit sauberem Responsive-Verhalten.
*/

/* Basislayout: 3 Spalten auf Desktop */
.gallery {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 18px;
}

/* Kachelbilder */
.gallery img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  /* optional: weiche Kanten */
  border-radius: 8px;
}

/* Tablet: 2 Spalten */
@media (max-width: 991px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Mobile: 1 Spalte */
@media (max-width: 759px) {
  .gallery {
    grid-template-columns: 1fr !important;
  }
}

/* Optional: Lightbox-Links ohne Unterstreichung */
.gallery a.lightbox-item {
  text-decoration: none;
}
/* Fix: Bilder in der Lightbox sollen immer in den Viewport passen */
#baguetteBox-overlay .full-image img {
  max-width: 100%;
  max-height: 100vh; /* volle Höhe, aber nicht größer als Bildschirm */
  object-fit: contain; /* Bild bleibt vollständig sichtbar */
  margin: auto;
  display: block;
}
/* 1) Overlay immer über der Kopfzeile und auf volle Höhe */
#baguetteBox-overlay{
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100vh !important;
  z-index: 999999 !important; /* über Header/Nav */
}

/* 2) Bild immer vollständig im Viewport zeigen */
#baguetteBox-overlay .full-image img{
  max-width: 100% !important;
  max-height: 100vh !important;
  object-fit: contain !important; /* nichts abschneiden */
  display: block;
  margin: auto;
}

/* (optional) Pfeile nie verdeckt */
#baguetteBox-overlay .baguetteBox-button{
  z-index: 1000000 !important;
  opacity: 1 !important;
}

/* Overlay immer über der Kopfzeile */
#baguetteBox-overlay{
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
}

/* Bild vollständig in den Viewport einpassen */
#baguetteBox-overlay .full-image img{
  max-width: calc(100vw - 48px) !important;
  max-height: calc(100vh - 120px) !important; /* Platz für Caption / Buttons */
  object-fit: contain !important;
  display: block;
  margin: 0 auto;
}

/* Pfeile sicher sichtbar */
#baguetteBox-overlay .baguetteBox-button{
  z-index: 1000000 !important;
  opacity: 1 !important;
}
/* Lightbox Bild mittig zentrieren */
.lb-image {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

/* Lightbox Overlay-Inhalt vertikal zentrieren */
.lb-outerContainer {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
/* Wrapper mit Poster (16:9) */
.yt-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  overflow: hidden;
}

/* Iframe auf die Fläche legen, anfangs transparent */
.yt-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity .2s ease;
}

/* Sobald geladen, Iframe sichtbar machen */
.yt-wrap.loaded iframe {
  opacity: 1;
}

.machine-box {
  display: flex;
  align-items: flex-start;
  margin-bottom: 40px;
  gap: 30px;
}

.machine-img img {
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.machine-text {
  flex: 1;
}

