/* Shared improvements for all BBU pages; full logo, touch gestures and controls. */
.bbu-site.bbu-v4 .bbu-footer-logo {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  overflow: visible;
  padding: 0;
}
.bbu-site.bbu-v4 .bbu-footer-logo img {
  display: block;
  position: static;
  width: 100% !important;
  max-width: 100% !important;
  height: auto;
  inset: auto;
  object-fit: contain;
  transform: none;
}
.bbu-v4 [data-bbu-swipe] {
  touch-action: pan-y pinch-zoom;
}
.bbu-v4 [data-bbu-swipe] img {
  -webkit-user-drag: none;
  user-select: none;
}
.bbu-site.bbu-v4 .bbu-mobile { position: relative; }
.bbu-site.bbu-v4 .bbu-mobile:not([open]) > div { display: none; }
.bbu-site.bbu-v4 .bbu-mobile > div { right: 0; left: auto; }
.bbu-site.bbu-v4 .bbu-related-link { min-width: 0; max-width: 100%; }
.bbu-site.bbu-v4 .bbu-related-link > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.bbu-site.bbu-v4 .bbu-related-link > span[aria-hidden] { flex-shrink: 0; }
.bbu-site.bbu-v4 .bbu-gallery-arrow {
  position: absolute;
  top: calc(50% - 22px);
  z-index: 3;
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 3px;
  border: 1px solid #ffffff70;
  border-radius: 50%;
  background: #123626d9;
  color: #fff;
  font: 32px/1 Arial, sans-serif;
  cursor: pointer;
}
.bbu-site.bbu-v4 .bbu-gallery-prev { left: 8px; }
.bbu-site.bbu-v4 .bbu-gallery-next { right: 8px; }
.bbu-site.bbu-v4 .bbu-gallery-arrow:focus-visible {
  outline: 3px solid white;
  outline-offset: 2px;
}
@media (max-width: 1100px) {
  .bbu-site.bbu-v4 .bbu-shell > *,
  .bbu-site.bbu-v4 .bbu-detail-items,
  .bbu-site.bbu-v4 .bbu-detail-item > *,
  .bbu-site.bbu-v4 .bbu-qual-card > * { min-width: 0; }
  .bbu-site.bbu-v4 h2,
  .bbu-site.bbu-v4 h3,
  .bbu-site.bbu-v4 p { overflow-wrap: anywhere; hyphens: auto; }
}
@media (max-width: 760px) {
  .bbu-site.bbu-v4 .v7-gallery-dots { min-height: 44px; gap: 0; flex-wrap: wrap; }
  .bbu-site.bbu-v4 .v7-gallery-dots button { width: 28px; min-width: 28px; height: 44px; }
  .bbu-site.bbu-v4 .v7-gallery-toggle { min-height: 44px; }
  .bbu-site.bbu-v4 .v4-ref-controls,
  .bbu-site.bbu-v4 .v13-photo-controls { flex-wrap: wrap; gap: 12px; }
  .bbu-site.bbu-v4 .v4-ref-dots { flex-wrap: wrap; max-width: 100%; gap: 0; }
  .bbu-site.bbu-v4 [data-ref-dot],
  .bbu-site.bbu-v4 [data-project-dot] { width: 28px; min-width: 28px; height: 44px; padding: 0; }
  .bbu-site.bbu-v4 [data-ref-prev],
  .bbu-site.bbu-v4 [data-ref-next],
  .bbu-site.bbu-v4 [data-ref-pause],
  .bbu-site.bbu-v4 [data-project-prev],
  .bbu-site.bbu-v4 [data-project-next],
  .bbu-site.bbu-v4 [data-project-pause] { min-width: 44px; min-height: 44px; }
  .bbu-site.bbu-v4 .bbu-mobile > summary { min-height: 44px; display: flex; align-items: center; }
  .bbu-site.bbu-v4 .bbu-mobile > div { max-height: calc(100svh - 140px); overflow-y: auto; overscroll-behavior: contain; }
}

/* Remove the empty theme title band above the custom BBU header. */
.wp-site-blocks > main:has(> .entry-content .bbu-site) > .wp-block-group.has-tertiary-background-color:not(.entry-content) {
  display: none !important;
}
/* Decorative hero playback remains automatic; no visible playback control. */
.bbu-site.bbu-v4 .v5-motion-toggle { display: none !important; }
/* Third Altlasten photograph: correct orientation on every service gallery. */
.bbu-site.bbu-v4 .v7-gallery img.v11-alt-horizontal {
  transform: translate(-50%, -50%) rotate(-90deg) !important;
}
@media (max-width: 760px) {
  /* Full landscape above the copy, without cropping or an obscuring overlay. */
  .bbu-site.bbu-v4 .v5-hero { background: #f3f6ef; }
  .bbu-site.bbu-v4 .v5-hero::before { display: none; }
  .bbu-site.bbu-v4 .v5-hero-media {
    position: relative;
    inset: auto;
    z-index: 0;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
  }
  .bbu-site.bbu-v4 .v5-hero-media img,
  .bbu-site.bbu-v4 .v5-hero-media video {
    object-position: center;
    object-fit: contain;
  }
  .bbu-site.bbu-v4 .v5-hero-content { padding: 32px 0; }
}

/* A single underline treatment for all primary navigation items. */
.bbu-site.bbu-v4 .bbu-links > a:not(.bbu-cta),
.bbu-site.bbu-v4 .bbu-dropdown > summary {
  position: relative;
  padding: 12px 0;
  text-decoration: none !important;
  transition: color .2s ease;
}
.bbu-site.bbu-v4 .bbu-links > a:not(.bbu-cta)::after,
.bbu-site.bbu-v4 .bbu-dropdown > summary::after {
  content: '' !important;
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  width: auto;
  height: 2px;
  background: #52834d;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.bbu-site.bbu-v4 .bbu-links > a:not(.bbu-cta):is(:hover, :focus-visible, [aria-current])::after,
.bbu-site.bbu-v4 .bbu-dropdown > summary:is(:hover, :focus-visible, [aria-current])::after,
.bbu-site.bbu-v4 .bbu-dropdown[open] > summary::after { transform: scaleX(1); }
.bbu-site.bbu-v4 .bbu-links > a:not(.bbu-cta):hover,
.bbu-site.bbu-v4 .bbu-dropdown > summary:hover { color: #4b774d; }
/* Mouse clicks need no focus box; keyboard navigation retains a clear green cue. */
.bbu-site.bbu-v4 :is(a, summary, button):focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}
.bbu-site.bbu-v4 .bbu-head :is(a, summary, button):focus-visible {
  outline: 2px solid #52834d !important;
  outline-offset: 4px;
}
.bbu-site.bbu-v4 .bbu-mobile a[aria-current] {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-color: #52834d;
}
@media (prefers-reduced-motion: reduce) {
  .bbu-site.bbu-v4 .bbu-links > a:not(.bbu-cta)::after,
  .bbu-site.bbu-v4 .bbu-dropdown > summary::after { transition: none; }
}
