/*
 * GEWO-Startseite: Status + gemeinsame Uebersicht
 * Gilt fuer die echte Startseite (101) und die Testseite (374).
 *
 * Erwartete Joomla-Struktur:
 * - Statusmodul in Position top-2a
 * - Kombiniertes Uebersichtsmodul mit Klasse .gewo-home-overview in top-2d
 * - Darin werden die J51-Module 230 (Wohnungen) und 231 (Neuigkeiten) geladen.
 */

body:is(.itemid-101, .itemid-374) #container_top2_modules {
  overflow: visible;
  background: #fff;
}

body:is(.itemid-101, .itemid-374) #container_top2_modules > .wrapper960,
body:is(.itemid-101, .itemid-374) #top2_modules {
  width: 100% !important;
  max-width: none !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

body:is(.itemid-101, .itemid-374) #top2_modules {
  padding: 0 clamp(14px, 3vw, 42px) clamp(36px, 5vw, 68px);
  box-sizing: border-box;
}

body:is(.itemid-101, .itemid-374) #wrapper_top-2 {
  display: block !important;
  width: min(100%, 1320px) !important;
  margin: 0 auto !important;
}

body:is(.itemid-101, .itemid-374) #wrapper_top-2 > .top-2 {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Status: volle Breite und keine alte graue Template-Flaeche. */
body:is(.itemid-101, .itemid-374) #wrapper_top-2 > .top-2a {
  position: relative;
  z-index: 4;
  display: block !important;
  background: transparent !important;
  color: #26292c !important;
}

body:is(.itemid-101, .itemid-374) .top-2a > .module,
body:is(.itemid-101, .itemid-374) .top-2a .module_surround,
body:is(.itemid-101, .itemid-374) .top-2a .module_content {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  color: #26292c !important;
  box-sizing: border-box;
}

body:is(.itemid-101, .itemid-374) .top-2a .module_content > p {
  margin: 0 !important;
}

body:is(.itemid-101, .itemid-374) .top-2a iframe {
  display: block;
  width: 100% !important;
  max-width: none !important;
  border: 0;
}

/* Die J51-Module werden innerhalb der gemeinsamen Uebersicht geladen.
 * Eventuell noch einzeln zugewiesene Ausgaben werden auf dieser Seite
 * vorsorglich ausgeblendet, damit nichts doppelt erscheint.
 */
body:is(.itemid-101, .itemid-374) #wrapper_top-2 > .top-2b {
  display: none !important;
}

body:is(.itemid-101, .itemid-374) #wrapper_top-2 > .top-2d {
  display: block !important;
}

body:is(.itemid-101, .itemid-374) .top-2d > .module {
  display: none !important;
}

body:is(.itemid-101, .itemid-374) .top-2d > .module.gewo-home-overview-host,
body:is(.itemid-101, .itemid-374) .top-2d > .module.gewo-home-overview-host > .module_surround,
body:is(.itemid-101, .itemid-374) .top-2d > .module.gewo-home-overview-host > .module_surround > .module_content {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-sizing: border-box;
}

/* Gemeinsamer Bereich fuer Wohnungen und Neuigkeiten. */
body:is(.itemid-101, .itemid-374) .gewo-home-overview {
  width: 100%;
  margin: clamp(22px, 3vw, 34px) 0 0;
  padding: 0 !important;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview > .container {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview > .container > .row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch !important;
  gap: clamp(20px, 2.6vw, 32px) !important;
  margin: 0 !important;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column {
  display: flex !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  flex: none !important;
  flex-direction: column;
  margin: 0 !important;
  padding: clamp(18px, 2.2vw, 26px) !important;
  border: 1px solid #e4e7e9;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(32, 38, 45, 0.07);
  box-sizing: border-box;
  transition: opacity 520ms ease, transform 520ms ease, box-shadow 220ms ease;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview.gewo-motion-ready .gewo-home-overview__column {
  opacity: 0;
  transform: translateY(16px);
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview.gewo-motion-ready.is-visible .gewo-home-overview__column {
  opacity: 1;
  transform: translateY(0);
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview.gewo-motion-ready.is-visible .gewo-home-overview__column--news {
  transition-delay: 90ms;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__header {
  position: relative;
  margin: 0 0 18px !important;
  padding: 0 0 12px;
  border-bottom: 2px solid #e0e2e3;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__header::after {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 64px;
  height: 3px;
  background: linear-gradient(90deg, #f47700 0 52%, #a8cf18 52% 100%);
  content: "";
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__header h2 {
  margin: 0 !important;
  padding: 0 !important;
  color: #2d3033 !important;
  font-size: clamp(21px, 2.2vw, 27px) !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
  text-align: left !important;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__header hr {
  display: none !important;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__content {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__content > .moduletable,
body:is(.itemid-101, .itemid-374) .gewo-home-overview__content > .moduletable > .module,
body:is(.itemid-101, .itemid-374) .gewo-home-overview__content .module_surround,
body:is(.itemid-101, .itemid-374) .gewo-home-overview__content .module_content,
body:is(.itemid-101, .itemid-374) .gewo-home-overview__content .j51news {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__actions {
  margin: auto 0 0 !important;
  padding-top: 16px;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__actions .btn {
  display: flex !important;
  width: 100% !important;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 10px 14px !important;
  border-radius: 5px !important;
  box-sizing: border-box;
}

/* Wohnungen: zwei gleichmaessige Karten. */
body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .j51news_inside {
  display: grid !important;
  width: 100% !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
  transform: none !important;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .newsitem {
  display: block !important;
  width: auto !important;
  min-width: 0;
  height: 100%;
  margin: 0 !important;
  overflow: hidden;
  border: 1px solid #e5e7e9;
  border-radius: 10px;
  background: #fff;
  transform: none !important;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .newsitem > figure {
  display: flex !important;
  height: 100%;
  flex-direction: column;
  margin: 0 !important;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .j51news-image {
  float: none !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .j51news-image img {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments figcaption {
  flex: 1 1 auto;
  padding: 13px !important;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .j51news-title {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 16px !important;
  line-height: 1.3 !important;
  text-align: left !important;
}

/* Neuigkeiten: zwei ruhige Karten; die neueste Meldung wird hervorgehoben. */
body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news_inside {
  display: grid !important;
  width: 100% !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  transform: none !important;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem {
  display: none !important;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem:nth-child(-n + 2) {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  transform: none !important;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem {
  position: relative;
  transition: transform 190ms ease, box-shadow 190ms ease;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem.gewo-news-latest::before {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #97c310;
  color: #fff;
  box-shadow: 0 0 0 0 rgba(151, 195, 16, 0.38);
  content: "Neueste Meldung";
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  animation: gewo-latest-pulse 3.4s ease-out 1.1s 2;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem > figure {
  display: grid !important;
  margin: 0 !important;
  overflow: hidden;
  border: 1px solid #e5e7e9;
  border-radius: 10px;
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem.gewo-news-latest > figure {
  min-height: 225px;
  grid-template-columns: minmax(150px, 42%) minmax(0, 1fr);
  border-color: rgba(151, 195, 16, 0.55);
  box-shadow: 0 8px 22px rgba(56, 72, 24, 0.09);
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem:nth-child(2) > figure {
  min-height: 155px;
  grid-template-columns: minmax(120px, 34%) minmax(0, 1fr);
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news-image,
body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news-image > a,
body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news-image img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news-image img {
  object-fit: cover;
  transition: transform 420ms ease;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news figcaption {
  display: flex !important;
  min-width: 0;
  flex-direction: column;
  padding: 18px !important;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news-btn {
  margin-top: auto !important;
}

@media (hover: hover) {
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .newsitem:hover,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem:hover {
    box-shadow: 0 10px 24px rgba(32, 38, 45, 0.11);
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem:hover {
    transform: translateY(-3px) !important;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem:hover .j51news-image img {
    transform: scale(1.025);
  }
}

@keyframes gewo-latest-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(151, 195, 16, 0.38);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(151, 195, 16, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(151, 195, 16, 0);
  }
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview .j51news-nav {
  display: none !important;
}

/* Die Wischanzeige wird nur auf kleinen Bildschirmen eingeblendet. */
body:is(.itemid-101, .itemid-374) .gewo-home-overview__swipe {
  display: none;
}

@media (max-width: 900px) {
  body:is(.itemid-101, .itemid-374) #top2_modules {
    padding-right: 14px;
    padding-left: 14px;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview > .container > .row {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px !important;
  }
}

@media (max-width: 600px) {
  body:is(.itemid-101, .itemid-374) #top2_modules {
    padding-right: 10px;
    padding-bottom: 34px;
    padding-left: 10px;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview {
    margin-top: 16px;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column {
    padding: 14px !important;
    border-radius: 13px;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__header {
    margin-bottom: 14px !important;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__header h2 {
    font-size: 21px !important;
  }

  /* Bestehende J51-Automatik visuell stilllegen und echtes Fingerwischen
   * verwenden. Bild, Text und Link bleiben dadurch immer eine Karte.
   */
  body:is(.itemid-101, .itemid-374) .gewo-home-overview .j51news,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview .j51news_inside {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview .j51news_inside {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: stretch !important;
    gap: 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    transform: none !important;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview .j51news_inside::-webkit-scrollbar {
    display: none;
  }

  /* Wohnungen wie Auswahl Bild 2: genau eine vollstaendige Karte. */
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .j51news_inside {
    padding: 1px !important;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .newsitem {
    width: calc(100% - 2px) !important;
    min-width: calc(100% - 2px) !important;
    max-width: calc(100% - 2px) !important;
    flex: 0 0 calc(100% - 2px) !important;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .j51news-image img {
    aspect-ratio: 16 / 9;
  }

  /* Neuigkeiten: zwei vollstaendige Karten untereinander. Das Bild steht
   * immer oben, Titel und Datum darunter; kein automatisches Karussell.
   */
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news_inside {
    display: grid !important;
    gap: 12px !important;
    padding: 1px !important;
    overflow: visible !important;
    scroll-snap-type: none;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem:nth-child(-n + 2) {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex: none !important;
    margin: 0 !important;
    transform: none !important;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem > figure,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem.gewo-news-latest > figure,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem:nth-child(2) > figure {
    display: block !important;
    min-height: 0;
    margin: 0 !important;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news-image,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news-image > a,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news-image img {
    display: block;
    width: 100% !important;
    height: auto !important;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news-image img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news figcaption {
    padding: 12px !important;
    overflow-wrap: anywhere;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news-title {
    font-size: 15px !important;
    line-height: 1.28 !important;
    hyphens: auto;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news-intro,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news-desc {
    display: none !important;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news-btn {
    width: 100% !important;
    margin-top: auto !important;
    white-space: normal !important;
  }

  /* Dezente Fortschrittsanzeigen unter den beiden Wischbereichen. */
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__swipe {
    display: flex;
    min-height: 24px;
    align-items: center;
    gap: 12px;
    margin-top: 9px;
    color: #626970;
    font-size: 11px;
    line-height: 1;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__progress {
    position: relative;
    display: block;
    height: 3px;
    flex: 1 1 auto;
    overflow: hidden;
    border-radius: 999px;
    background: #e1e4e5;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__progress-fill {
    display: block;
    width: 50%;
    height: 100%;
    border-radius: inherit;
    background: #97c310;
    transition: width 180ms ease;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__swipe--apartments .gewo-home-overview__progress {
    max-width: 72px;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__actions {
    padding-top: 10px;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__actions .btn {
    min-height: 40px;
    padding: 9px 10px !important;
    font-size: 12px !important;
    letter-spacing: 0.05em !important;
  }
}

/* ================================================================
   v4.5.1 – lebendigere Desktop-Slider, Handyansicht unveraendert
   ================================================================ */
body:is(.itemid-101, .itemid-374) .gewo-home-overview__column {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(168, 207, 24, 0.065), transparent 30%),
    radial-gradient(circle at 0 100%, rgba(244, 119, 0, 0.045), transparent 28%),
    #fff;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__actions .btn,
body:is(.itemid-101, .itemid-374) .gewo-home-overview .j51news-btn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(105deg, #acd516 0%, #91c600 62%, #7eb600 100%) !important;
  box-shadow: 0 7px 18px rgba(126, 182, 0, 0.16);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__actions .btn::after,
body:is(.itemid-101, .itemid-374) .gewo-home-overview .j51news-btn::after {
  position: absolute;
  top: -70%;
  left: -30%;
  width: 28%;
  height: 240%;
  background: rgba(255, 255, 255, 0.24);
  content: "";
  pointer-events: none;
  transform: rotate(18deg) translateX(-220%);
  transition: transform 560ms ease;
}

@media (hover: hover) {
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__actions .btn:hover,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview .j51news-btn:hover {
    box-shadow: 0 10px 24px rgba(126, 182, 0, 0.24);
    filter: saturate(1.06);
    transform: translateY(-2px);
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__actions .btn:hover::after,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview .j51news-btn:hover::after {
    transform: rotate(18deg) translateX(560%);
  }
}

@media (min-width: 901px) {
  /* Auf grossen Bildschirmen bleiben genau zwei Wohnungen sichtbar. Das
   * Modul darf trotzdem drei Eintraege liefern, damit das Handy drei Karten
   * zum Wischen besitzt. */
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .newsitem:nth-child(n + 3) {
    display: none !important;
  }

  /* Der Neuigkeiten-Slider ist auf dem Desktop eindeutig als Slider
   * erkennbar: Zaehler, Pfeile und Punkte bleiben sichtbar. */
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .gewo-home-overview__slider-meta {
    display: flex;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .gewo-home-overview__slider-meta button {
    width: 36px;
    height: 36px;
    border: 1px solid #e1e5dd;
    background: #fff;
    box-shadow: 0 5px 14px rgba(32, 38, 45, 0.08);
    transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .gewo-home-overview__slider-meta button:hover {
    border-color: #f47700;
    color: #f47700;
    transform: translateY(-1px);
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .gewo-home-overview__swipe {
    display: flex;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    margin-top: 13px;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .gewo-home-overview__progress,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .gewo-home-overview__swipe-text {
    display: none;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .gewo-home-overview__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .gewo-home-overview__dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #d4d9dc;
    cursor: pointer;
    transition: width 180ms ease, border-radius 180ms ease, background 180ms ease;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .gewo-home-overview__dots button[aria-current="true"] {
    width: 27px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f47700 0 48%, #97c310 48% 100%);
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem.is-active .j51news-image img {
    animation: gewo-news-breathe 7.1s ease-out both;
  }
}

@keyframes gewo-news-breathe {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.035);
  }
}

@media (prefers-reduced-motion: reduce) {
  body:is(.itemid-101, .itemid-374) .gewo-home-overview *,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview *::before,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================================================================
   v4.5.0 – Zielansichten Desktop und Handy
   ================================================================ */
body:is(.itemid-101, .itemid-374) #wrapper_top-2 {
  width: min(100%, 1680px) !important;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview > .container > .row {
  gap: 18px !important;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column {
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(32, 38, 45, 0.08);
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__slider-meta {
  display: none;
  align-items: center;
  gap: 10px;
  color: #2d3033;
  font-size: 0.9rem;
  white-space: nowrap;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__slider-meta button {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #25282b;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

/* Wohnungen: auf dem Desktop zwei kompakte Zeilen. */
body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .j51news_inside {
  display: flex !important;
  flex-direction: column;
  gap: 12px;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .newsitem {
  width: 100% !important;
  min-height: 156px;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .newsitem > figure {
  display: grid !important;
  grid-template-columns: minmax(170px, 40%) minmax(0, 1fr);
  min-height: 156px;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .j51news-image,
body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .j51news-image > a,
body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .j51news-image img {
  width: 100% !important;
  height: 100% !important;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .j51news-image img {
  aspect-ratio: auto;
  object-fit: cover;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments figcaption {
  display: flex !important;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 18px !important;
}

/* Aktuelles: manueller Slider, neuester Beitrag zuerst. */
body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news {
  overflow: hidden;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news_inside {
  display: flex !important;
  align-items: stretch;
  gap: 16px;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news_inside::-webkit-scrollbar {
  display: none;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem,
body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem:nth-child(-n + 2) {
  display: block !important;
  width: 100% !important;
  min-width: 100% !important;
  flex: 0 0 100% !important;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem > figure,
body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem.gewo-news-latest > figure,
body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem:nth-child(2) > figure {
  display: grid !important;
  min-height: 324px;
  grid-template-columns: minmax(260px, 55%) minmax(0, 1fr);
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem.gewo-news-latest::before {
  background: #f47700;
  content: "Neu";
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news figcaption {
  justify-content: center;
  padding: 24px !important;
}

body:is(.itemid-101, .itemid-374) .gewo-home-overview__dots {
  display: none;
}

@media (max-width: 900px) {
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .j51news_inside,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news_inside {
    display: flex !important;
    width: 100% !important;
    flex-direction: row;
    align-items: stretch !important;
    gap: 14px !important;
    padding: 1px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .newsitem,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem:nth-child(-n + 2) {
    display: block !important;
    width: 88% !important;
    min-width: 88% !important;
    max-width: 88% !important;
    flex: 0 0 88% !important;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .newsitem > figure,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem > figure,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem.gewo-news-latest > figure,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem:nth-child(2) > figure {
    display: block !important;
    min-height: 0;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .j51news-image,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .j51news-image > a,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .j51news-image img,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news-image,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news-image > a,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news-image img {
    width: 100% !important;
    height: auto !important;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .j51news-image img,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news-image img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments figcaption,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news figcaption {
    padding: 14px !important;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__slider-meta {
    display: flex;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__swipe {
    display: flex;
    min-height: 28px;
    justify-content: center;
    margin-top: 8px;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__progress,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__swipe-text {
    display: none;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #d7dbde;
    cursor: pointer;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__dots button[aria-current="true"] {
    background: #86bc00;
  }
}

@media (max-width: 600px) {
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__slider-meta [data-gewo-slider-previous] {
    display: none;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column {
    padding: 14px !important;
    border-radius: 20px;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__header h2 {
    font-size: clamp(19px, 5.2vw, 23px) !important;
    line-height: 1.14 !important;
    white-space: nowrap;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__slider-meta {
    gap: 4px;
    font-size: 0.78rem;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__slider-meta button {
    width: 26px;
    height: 26px;
    font-size: 1.5rem;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--apartments .newsitem,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .newsitem:nth-child(-n + 2) {
    width: 91% !important;
    min-width: 91% !important;
    max-width: 91% !important;
    flex-basis: 91% !important;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news-intro,
  body:is(.itemid-101, .itemid-374) .gewo-home-overview__column--news .j51news-desc {
    display: block !important;
    margin-top: 9px !important;
    font-size: 0.88rem !important;
    line-height: 1.45 !important;
  }

  body:is(.itemid-101, .itemid-374) .gewo-home-overview__actions .btn {
    min-height: 52px;
    border: 1px solid currentColor !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: #7fad00 !important;
    font-size: 0.9rem !important;
  }
}
