﻿/* Live UX fixes (D2) */

/* Mobile/zoom menu: remove collapse animation delay */
@media (max-width: 991px) {
  .collapsing {
    height: auto !important;
    overflow: hidden;
  }

  .navbar-collapse,
  .navbar-collapse.collapsing {
    -webkit-transition: none !important;
    -o-transition: none !important;
    transition: none !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }

  .navbar-toggle {
    touch-action: manipulation;
    -ms-touch-action: manipulation;
  }

  #main-menu .navbar-collapse .container,
  #main-menu .navbar-collapse.in .container {
    -webkit-transition: none !important;
    -o-transition: none !important;
    transition: none !important;
  }

}

/* Mobile/touch: use one viewport-fixed background layer for all pages.
   This avoids per-page zoom differences on iOS and scroll jumps on Android. */
@media (hover: none) and (pointer: coarse), (max-width: 991px) {
  html,
  body {
    background: #f6f6f6;
  }

  body {
    position: relative;
  }

  body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    background-image: url("../backgrounds/bg_IMG_1457.jpg");
    background-position: left top;
    background-repeat: no-repeat;
    background-size: cover;
    pointer-events: none;
    z-index: 0;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
  }

  .page {
    position: relative;
    z-index: 1;
    background-image: none !important;
    background-attachment: scroll !important;
    background-size: auto !important;
    background-color: transparent;
  }

  /* Keep the gray footer/panel surface stable above the mobile background layer. */
  #panel_second .container {
    position: relative;
    z-index: 1;
    background-color: #3c4043 !important;
  }
}

/* Keep anchor target readable below fixed header/nav */
#wir-suchen-aktuell {
  scroll-margin-top: 120px;
}

/* Modern static slider replaces the legacy Jssor block on all active pages. */
#block-views-block-referenzen-block-1 [id^="slider-dom-id-"] {
  display: none !important;
}

#block-views-block-referenzen-block-1 .alwert-modern-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  border-radius: 5px;
  background: #111;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  touch-action: pan-y;
  user-select: none;
}

#block-views-block-referenzen-block-1 .alwert-modern-slider__viewport {
  position: relative;
  aspect-ratio: 13 / 6;
  overflow: hidden;
  border-radius: 5px;
}

#block-views-block-referenzen-block-1 .alwert-modern-slider__track {
  display: flex;
  height: 100%;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

#block-views-block-referenzen-block-1 .alwert-modern-slider__track.is-animated {
  transition: transform 460ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

#block-views-block-referenzen-block-1 .alwert-modern-slider__slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  overflow: hidden;
}

#block-views-block-referenzen-block-1 .alwert-modern-slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  border-radius: 5px;
}

#block-views-block-referenzen-block-1 .alwert-modern-slider__dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}

#block-views-block-referenzen-block-1 .alwert-modern-slider__dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease;
}

#block-views-block-referenzen-block-1 .alwert-modern-slider__dot.is-active {
  transform: scale(1.25);
  background: #fff;
}

#block-zircon-content .text-formatted img[src^="images/content/"] {
  border-radius: 5px;
  -webkit-border-radius: 5px;
}

@media (max-width: 767px) {
  #block-views-block-referenzen-block-1 .alwert-modern-slider {
    border-radius: 5px;
  }
}

/* S8: keep emphasis on real text links, but leave all menus untouched. */
#main .text-formatted a[href],
#block-zircon-content p a[href],
.sidebar .text-formatted a[href],
#panel_second .text-formatted a[href],
#footer .text-formatted a[href] {
  font-weight: 700;
  text-decoration: none !important;
}

#main .text-formatted a[href]:hover,
#main .text-formatted a[href]:focus,
#main .text-formatted a[href]:active,
#block-zircon-content p a[href]:hover,
#block-zircon-content p a[href]:focus,
#block-zircon-content p a[href]:active,
.sidebar .text-formatted a[href]:hover,
.sidebar .text-formatted a[href]:focus,
.sidebar .text-formatted a[href]:active,
#panel_second .text-formatted a[href]:hover,
#panel_second .text-formatted a[href]:focus,
#panel_second .text-formatted a[href]:active,
#footer .text-formatted a[href]:hover,
#footer .text-formatted a[href]:focus,
#footer .text-formatted a[href]:active {
  font-weight: 700;
  text-decoration: none !important;
}
