/* -------------------------------------------------------
   Insights / News Slider
   Desktop: 3 Kacheln + Pfeile
   Tablet: 2 Kacheln + Pfeile
   Mobile: Swipe ohne Pfeile
------------------------------------------------------- */

/* Grundcontainer */
.insights_swiper {
  outline: none !important;
}

.mod_newslist.insights_swiper {
  position: relative !important;
  overflow: visible !important;
}

/* Horizontale Slider-Bühne */
.mod_newslist.insights_swiper > .autogrid_wrapper {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 28px !important;

  width: 100% !important;
  max-width: 100% !important;

  overflow-x: auto !important;
  overflow-y: hidden !important;

  scroll-snap-type: x mandatory !important;
  scroll-behavior: smooth !important;

  padding-bottom: 24px !important;

  scrollbar-width: none !important;
  cursor: default !important;
  user-select: auto !important;
}

/* Scrollbar verstecken */
.mod_newslist.insights_swiper > .autogrid_wrapper::-webkit-scrollbar {
  display: none !important;
}

/* Contao / Theme Autogrid überschreiben */
.mod_newslist.insights_swiper > .autogrid_wrapper > .newsteaser_v7,
.mod_newslist.insights_swiper > .autogrid_wrapper > .autogrid,
.mod_newslist.insights_swiper > .autogrid_wrapper > .one_third {
  float: none !important;
  clear: none !important;

  flex: 0 0 calc((100% - 56px) / 3) !important;
  width: calc((100% - 56px) / 3) !important;
  max-width: calc((100% - 56px) / 3) !important;

  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;

  scroll-snap-align: start !important;
}

/* Links normal klickbar */
.mod_newslist.insights_swiper a {
  cursor: pointer !important;
}

/* Bilder sauber füllen */
.mod_newslist.insights_swiper .image_container {
  width: 100% !important;
  aspect-ratio: 289 / 400;
  overflow: hidden !important;
}

.mod_newslist.insights_swiper .image_container img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* Pagination ausblenden, falls sie vom Template noch ausgegeben wird */
.mod_newslist.insights_swiper .pagination,
.mod_newslist.insights_swiper .pagelinks,
.mod_newslist.insights_swiper .pagecount {
  display: none !important;
}

/* Alte Fade-Flächen sicher deaktivieren */
.mod_newslist.insights_swiper::before,
.mod_newslist.insights_swiper::after {
  display: none !important;
  content: none !important;
}

/* Drag-Reste sicher deaktivieren */
.insights-draghint {
  display: none !important;
}

.mod_newslist.insights_swiper > .autogrid_wrapper.is-dragging {
  scroll-snap-type: x mandatory !important;
}

.mod_newslist.insights_swiper > .autogrid_wrapper.is-dragging a {
  pointer-events: auto !important;
}

/* -------------------------------------------------------
   Slider-Pfeile
------------------------------------------------------- */

button.insights-arrow,
.insights-arrow {
  position: absolute !important;
  top: 42% !important;
  transform: translateY(-50%) !important;

  z-index: 50 !important;

  width: 68px !important;
  height: 68px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  padding: 0 !important;
  margin: 0 !important;

  border: 1px solid rgba(0,0,0,.10) !important;
  border-radius: 999px !important;

  background: rgba(255,255,255,.96) !important;
  color: #1f1f1f !important;

  font-size: 44px !important;
  font-weight: 200 !important;
  line-height: 1 !important;
  text-align: center !important;

  cursor: pointer !important;

  box-shadow: 0 12px 34px rgba(0,0,0,.16) !important;
  backdrop-filter: blur(10px);

  transition:
    background .22s ease,
    color .22s ease,
    transform .22s ease,
    box-shadow .22s ease,
    border-color .22s ease !important;

  appearance: none !important;
  -webkit-appearance: none !important;
}

button.insights-arrow.prev,
.insights-arrow.prev {
  left: -34px !important;
  padding-right: 4px !important;
}

button.insights-arrow.next,
.insights-arrow.next {
  right: -34px !important;
  padding-left: 4px !important;
}

button.insights-arrow:hover,
.insights-arrow:hover {
  background: #1f1f1f !important;
  color: #fff !important;
  border-color: #1f1f1f !important;
  transform: translateY(-50%) scale(1.05) !important;
  box-shadow: 0 16px 42px rgba(0,0,0,.22) !important;
}

button.insights-arrow:active,
.insights-arrow:active {
  transform: translateY(-50%) scale(.98) !important;
}

button.insights-arrow:focus,
.insights-arrow:focus {
  outline: none !important;
}

button.insights-arrow:focus-visible,
.insights-arrow:focus-visible {
  outline: 2px solid rgba(0,0,0,.35) !important;
  outline-offset: 4px !important;
}

/* -------------------------------------------------------
   Tablet
------------------------------------------------------- */

@media (max-width: 1024px) {
  .mod_newslist.insights_swiper > .autogrid_wrapper > .newsteaser_v7,
  .mod_newslist.insights_swiper > .autogrid_wrapper > .autogrid,
  .mod_newslist.insights_swiper > .autogrid_wrapper > .one_third {
    flex: 0 0 calc((100% - 28px) / 2) !important;
    width: calc((100% - 28px) / 2) !important;
    max-width: calc((100% - 28px) / 2) !important;
  }

  button.insights-arrow,
  .insights-arrow {
    width: 58px !important;
    height: 58px !important;
    font-size: 38px !important;
  }

  button.insights-arrow.prev,
  .insights-arrow.prev {
    left: -24px !important;
  }

  button.insights-arrow.next,
  .insights-arrow.next {
    right: -24px !important;
  }
}

/* -------------------------------------------------------
   Mobile
------------------------------------------------------- */

@media (max-width: 767px) {
  .mod_newslist.insights_swiper {
    overflow: hidden !important;
  }

  .mod_newslist.insights_swiper > .autogrid_wrapper {
    gap: 18px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    padding-bottom: 18px !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
  }

  .mod_newslist.insights_swiper > .autogrid_wrapper > .newsteaser_v7,
  .mod_newslist.insights_swiper > .autogrid_wrapper > .autogrid,
  .mod_newslist.insights_swiper > .autogrid_wrapper > .one_third {
    flex: 0 0 82% !important;
    width: 82% !important;
    max-width: 82% !important;
  }

  button.insights-arrow,
  .insights-arrow {
    display: none !important;
  }
}