.bd-bildangebot .bd-intro-section h2 {
  margin-block:18px 8px;
  font-size:22px;
}

.bd-bildangebot .bd-intro-section p { margin:0 0 14px }
.bd-bildangebot .bd-intro-section .bd-bildangebot-stand { margin-block:12px; font-size:14px }
.bd-bildangebot .bd-intro-section h1 { margin-bottom:0 }

@media (min-width:1101px) {
  .bd-bildangebot .bd-home-card { min-height:0 }
  .bd-bildangebot .bd-start-media { contain:size }
}

.bd-gallery-card {
  border-radius:var(--bd-radius);
  background:var(--farbe-weiss);
  box-shadow:var(--bd-shadow);
}

.bd-gallery-card h2 { margin:0 0 10px }
.bd-gallery-card p { margin:0 0 24px }

.bd-linked-references {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.bd-linked-references a {
  display:block;
  overflow:hidden;
  border-radius:var(--bd-submenu-radius);
  box-shadow:var(--bd-image-shadow);
}

.bd-linked-references img {
  display:block;
  width:100%;
  height:auto;
}

@media (min-width:768px) {
  .bd-linked-references {
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

.gallery-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}

@media (min-width:1101px) {
  .gallery-grid { grid-template-columns:repeat(5,minmax(0,1fr)) }
}

.gallery-item {
  display:block;
  overflow:hidden;
  aspect-ratio:1;
  border-radius:var(--bd-submenu-radius);
}

.gallery-item img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform 400ms ease;
}

.gallery-justified .gallery-item {
  min-width:0;
  aspect-ratio:auto;
  background:var(--farbe-weiss);
  box-shadow:var(--bd-image-shadow);
}

.gallery-justified .gallery-item img {
  height:auto;
  object-fit:contain;
}

.gallery-justified.is-justified {
  position:relative;
  display:block;
  height:var(--gallery-height);
}

.gallery-justified.is-justified .gallery-item {
  position:absolute;
  inset:var(--gallery-item-top) auto auto var(--gallery-item-left);
  width:var(--gallery-item-width);
  height:var(--gallery-item-height);
}

.gallery-justified.is-justified .gallery-item img {
  height:100%;
}

@media (hover:hover) {
  a.gallery-item:hover img { transform:scale(1.04) }
}

html.lightbox-open { overflow:hidden; scrollbar-gutter:stable }

.lightbox {
  position:fixed;
  inset:0;
  width:100%;
  max-width:none;
  height:100%;
  height:100dvh;
  max-height:none;
  margin:0;
  padding:72px 24px 24px;
  border:0;
  overflow:hidden;
  background:rgba(0,0,0,.88);
  color:var(--farbe-weiss);
}

.lightbox[open] {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:16px;
}
.lightbox::backdrop { background:transparent }
.lightbox-stage {
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  flex:1;
  min-height:0;
  width:min(100%,1400px);
}
.lightbox-viewport {
  position:relative;
  align-self:stretch;
  width:calc(100% - 116px);
  overflow:hidden;
}
.lightbox-viewport.is-opening { overflow:visible }
.lightbox-layer {
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
}
.lightbox-image {
  display:block;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}

.lightbox .lightbox-close, .lightbox .lightbox-nav {
  position:absolute;
  z-index:2;
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  padding:0;
  border:0;
  border-radius:50%;
  background:var(--farbe-weiss);
  color:var(--farbe-06);
}
.lightbox-close { top:12px; right:24px }
.lightbox-prev { left:0 }
.lightbox-next { right:0 }
.lightbox button:focus-visible { outline:3px solid var(--farbe-02); outline-offset:3px }
.lightbox .lightbox-caption {
  margin:0;
  color:var(--farbe-weiss);
  text-align:center;
  font-size:16px;
}

.lightbox.lightbox-preview {
  width:min(760px,calc(100% - 32px));
  height:fit-content;
  max-height:calc(100dvh - 32px);
  margin:auto;
  padding:48px 64px 20px;
  overflow:auto;
  border-radius:var(--bd-radius);
  background:var(--farbe-weiss);
  color:var(--farbe-06);
  box-shadow:var(--bd-shadow);
}

@media (min-width:1101px) {
  .bd-wide-reference-preview .lightbox.lightbox-preview {
    width:1000px;
  }
}

.lightbox-preview::backdrop {
  background:color-mix(in srgb,var(--farbe-weiss) 50%,transparent);
  backdrop-filter:blur(20px);
}

@media (prefers-reduced-motion:no-preference) {
  .lightbox-preview[open]::backdrop {
    animation:lightbox-preview-backdrop 220ms ease-out;
  }

  .lightbox-preview.lightbox-preview-closing::backdrop {
    animation:lightbox-preview-backdrop 180ms ease-in reverse both;
  }
}

@keyframes lightbox-preview-backdrop {
  from { opacity:0 }
  to { opacity:1 }
}

.lightbox-preview .lightbox-stage {
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);
  gap:8px 24px;
  flex:none;
  width:100%;
}

.lightbox-preview .lightbox-viewport {
  grid-area:1 / 1;
  aspect-ratio:8 / 5;
  width:100%;
  border-radius:var(--bd-submenu-radius);
  box-shadow:var(--bd-image-shadow);
}

.lightbox-preview .lightbox-image {
  width:100%;
}

.lightbox-preview .lightbox-details {
  grid-area:1 / 2;
}

.lightbox-preview .lightbox-category {
  display:inline-block;
  margin-block-end:6px;
  padding:3px 9px;
  border-radius:50px;
  background:var(--farbe-03);
  color:var(--farbe-06);
  font-size:12px;
  font-weight:700;
}

.lightbox-preview .lightbox-details h2 {
  margin:0 0 4px;
  font-size:clamp(18px,2.2vw,21px);
  overflow-wrap:anywhere;
}

.lightbox-preview .lightbox-domain {
  margin:0 0 16px;
  color:var(--farbe-08);
  overflow-wrap:anywhere;
}

.lightbox-preview .lightbox-details .bd-button {
  font-size:18px;
  font-weight:700;
  text-decoration:none;
}

.lightbox-preview .lightbox-close {
  top:6px;
  right:10px;
}

.lightbox.lightbox-preview .lightbox-nav {
  background:var(--farbe-button-sekundaer);
}

@media (hover:hover) {
  .lightbox.lightbox-preview .lightbox-nav:hover {
    background:var(--farbe-01);
    color:var(--farbe-weiss);
  }
}

.lightbox-preview .lightbox-prev { left:-54px }
.lightbox-preview .lightbox-next { right:-54px }
.lightbox-preview .lightbox-caption {
  grid-area:2 / 1;
  color:var(--farbe-06);
  text-align:left;
}

@media (max-width:767px) {
  .bd-gallery-card { border-radius:0 }
  .gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)) }
  .lightbox { padding:68px 12px 20px }
  .lightbox-viewport { width:100% }
  .lightbox-close { right:12px }
  .lightbox.lightbox-preview {
    padding:52px 16px 16px;
    border-radius:var(--bd-submenu-radius);
  }
  .lightbox-preview .lightbox-stage {
    grid-template-columns:minmax(0,1fr) 48px 48px;
    gap:8px;
  }
  .lightbox-preview .lightbox-viewport,
  .lightbox-preview .lightbox-caption,
  .lightbox-preview .lightbox-details {
    grid-column:1 / -1;
  }
  .lightbox-preview .lightbox-nav {
    position:relative;
    align-self:end;
    left:auto;
    right:auto;
  }
  .lightbox-preview .lightbox-prev { grid-area:3 / 2 }
  .lightbox-preview .lightbox-next { grid-area:3 / 3 }
  .lightbox-preview .lightbox-details {
    grid-row:3;
    margin-block-start:8px;
  }
}

@media (min-width:361px) and (max-width:767px) {
  .lightbox-preview .lightbox-stage:has(> .lightbox-prev:not([hidden])) .lightbox-details .bd-button {
    max-width:calc(100% - 112px);
    text-align:center;
  }
}

@media (max-width:360px) {
  .lightbox-preview .lightbox-prev,
  .lightbox-preview .lightbox-next {
    grid-row:4;
  }
}
