@charset "UTF-8";
/* ✅ immobilien-neu.css — OPTIMIERT & CLEANUP */

/* Swiper Navigation ausblenden */
.swiper-button-disabled,
.swiper-button-next,
.swiper-button-prev {
  display: none !important;
}

.mapsWrapper {
  width: 100%;
  height: auto;
  margin: 0 auto;
  max-width: 100%;
}

/* Position Homepage Label */
.immoPositionHomepage {
  color: #ffffff;
  display: inline;
  position: absolute;
}

/* FILTER STYLES */
.filter-row {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  margin-bottom: 1.5em;
}

.filter-row input[type="range"] {
  width: 100%;
  appearance: none;
  height: 6px;
  background: #ddd;
  border-radius: 5px;
  outline: none;
  cursor: pointer;
}

.filter-row input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  background: #000;
  border-radius: 50%;
  cursor: pointer;
}

.filter-row input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #000;
  border-radius: 50%;
  cursor: pointer;
}

.filter-row label {
  font-weight: bold;
  font-size: 1em;
}

.filter-row span {
  font-size: 0.9em;
  color: #666;
  text-align: right;
}

.filter-group {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
}

.filter-group label {
  font-weight: bold;
  margin-bottom: 0.3em;
}

.filter-group input,
.filter-group select {
  padding: 0.4em;
  font-size: 1em;
}

#filter-reset {
  background: #000;
  color: #fff;
  padding: 0.6em;
  border: none;
  cursor: pointer;
}

/* Filter Bubbles */
.filter-bubble {
  display: inline-block;
  height: auto;
  font-family: "PT Sans", Arial, Helvetica, sans-serif;
  font-size: 14px;
  padding: 2px 10px;
  color: #000000;
  background: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border-radius: 3px;
  border: 2px solid #cccccc;
  cursor: pointer;
  margin-right: 6px;
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.filter-bubble.active {
  color: #ffffff;
  background: rgb(204, 148, 91);
  border-color: rgb(204, 148, 91);
  text-align: center;
}

/* ✅ NEU: Disabled state (verhindert Totfiltern) */
.filter-bubble.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  background: #f5f5f5 !important;
  color: #999 !important;
  border-color: #ddd !important;
  text-decoration: line-through;
}

/* Alte inactive-Klasse für Kompatibilität */
.filter-bubble.inactive {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.filter-bubble:hover:not(.disabled):not(.active):not(.inactive) {
  border-color: rgb(204, 148, 91);
  transform: translateY(-1px);
}

/* Swiper */
.swiper-slide {
  width: 400px !important;
}

/* ✅ Region Circle Styles */
.region-circle {
  transition: all 0.3s ease;
}

.region-circle:hover {
  fill-opacity: 0.6 !important;
  stroke-width: 4px !important;
  cursor: pointer;
}

/* Circle Label Styles */
.circle-label {
  background: transparent !important;
  border: none !important;
}

/* ✅ Custom Popup Styles */
.custom-popup .leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  padding: 0;
  overflow: hidden;
}

.custom-popup .leaflet-popup-content {
  margin: 0;
  font-family: "PT Sans", Arial, Helvetica, sans-serif;
  width: 320px !important;
}

.custom-popup .leaflet-popup-tip {
  background: #fff;
}

.custom-popup a {
  transition: all 0.2s ease;
}

/* Map Tile Filter (Bronze-Ton) */
#map-container .leaflet-tile {
  filter: sepia(0.15) hue-rotate(-10deg) brightness(0.95);
}

/* Leaflet Marker Styles */
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
  margin-top: 0 !important;
}

.leaflet-marker-icon.leaflet-interactive {
  display: flex;
  justify-content: center;
  align-items: center;
}

.leaflet-left .leaflet-control {
  margin-left: 23px;
  margin-top: 23px;
}

.leaflet-right .leaflet-control {
  margin-right: 23px;
  margin-top: 90px; /* Abstand unter ObjektID-Suchfeld (>800px) */
}

.leaflet-control-zoom {
  border: 2px solid rgba(0,0,0,0.2);
  border-radius: 4px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.leaflet-control-zoom a {
  width: 40px;
  height: 40px;
  font-size: 22px;
  line-height: 40px;
  background-color: white;
  color: #000;
  transition: all 0.2s;
}

.leaflet-control-zoom a:hover {
  background-color: rgb(204, 148, 91);
  color: white;
}

/* ✅ Loading States */
#load-spinner {
  color: rgb(204, 148, 91);
  font-weight: bold;
  font-size: 16px;
  padding: 20px;
}

/* ✅ Lazy Loading Animation */
img[loading="lazy"] {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========================================== */
/* ✅ KOMPAKTE FILTER-SIDEBAR                */
/* ========================================== */

.filter-row-compact {
  margin-bottom: 5px;
}
.sortiererei{
  width: 100%;
  height: auto;
  margin: 0;
  max-width: 100%;
}

.sort-select {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  color: #333;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23cc945b' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  transition: border-color .2s;
}

.sort-select:focus {
  outline: none;
  border-color: rgb(204, 148, 91);
}

.sort-buttons-container {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.sm-grid{
  display:grid;
  grid-template-columns:1fr 1fr 1fr 1fr;
  gap:10px;
}

.filter-row-compact label {
  display: block;
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 6px;
  color: #333;
}

.filter-row-compact .filter-bubble-group {
  margin-top: 6px;
}

.filter-row-compact .filter-bubble {
  font-size: 11px;
  padding: 1px 4px;
  margin-right: 8px;
  margin-bottom: 2px;
}

/* Slider Labels */
.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 12px;
  color: #000;
  font-weight: bold;
}

/* Toggle Label */
.toggle-label-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  cursor: pointer;
  color: #555;
  user-select: none;
  -webkit-user-select: none;
}

/* ✅ iOS-Fix: Custom Checkbox (native Checkbox wird versteckt) */
.toggle-label-compact input[type="checkbox"] {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #ccc;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
  margin: 0;
}

.toggle-label-compact input[type="checkbox"]:checked {
  background: rgb(204, 148, 91);
  border-color: rgb(204, 148, 91);
}

/* Häkchen-Symbol (✓) bei checked */
.toggle-label-compact input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
}

.toggle-label-compact input[type="checkbox"]:hover {
  border-color: rgb(204, 148, 91);
}

/* ✅ NEU: Sort Icon Buttons (Pills) */
.sort-btn-icon {
  position: relative;
  min-width: 80px;
  height: 40px;
  background: #ffffff;
  border: 2px solid #ddd;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sort-btn-icon:hover {
  border-color: rgb(204, 148, 91);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.sort-btn-icon .sort-icon {
  width: 20px;
  height: 20px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  display: block;
  flex-shrink: 0;
}

.sort-btn-icon .sort-icon.iconPreis::before {
  content: '';
  display: block;
  width: 24px;
  height: 24px;
  background-image: url("../images/preis.webp");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.sort-btn-icon .sort-icon.iconWohnflaeche::before {
  content: '';
  display: block;
  width: 24px;
  height: 24px;
  background-image: url("../images/groesse.webp");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.sort-btn-icon .sort-icon.iconGrundstuecksflaeche::before {
  content: '';
  display: block;
  width: 24px;
  height: 24px;
  background-image: url("../images/grund.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.sort-btn-icon .sort-icon.iconZimmer::before {
  content: '';
  display: block;
  width: 24px;
  height: 24px;
  background-image: url("../images/zimmer.webp");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.sort-btn-icon .sort-state {
  font-size: 16px;
  color: #999;
  line-height: 1;
  transition: all 0.2s;
  flex-shrink: 0;
  font-weight: normal;
  order: -1;
  min-width: 16px;
  text-align: center;
}

.sort-btn-icon .sort-label {
  font-size: 11px;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-left: 4px;
  white-space: nowrap;
  transition: all 0.2s;
}

/* State 1: Default (Position Homepage) - langer Strich */
.sort-btn-icon[data-state="default"] .sort-state {
  content: '—';
  color: #999;
  font-size: 12px;
}

/* State 2: Ascending (Aufsteigend) */
.sort-btn-icon[data-state="asc"] {
  background: rgb(204, 148, 91);
  border-color: rgb(204, 148, 91);
}

.sort-btn-icon[data-state="asc"] .sort-state {
  content: '↑';
  color: #fff;
  font-size: 18px;
  font-weight: bold;
}

.sort-btn-icon[data-state="asc"] .sort-icon::before {
  filter: brightness(0) invert(1);
}

.sort-btn-icon[data-state="asc"] .sort-label {
  color: #fff;
}

/* State 3: Descending (Absteigend) */
.sort-btn-icon[data-state="desc"] {
  background: rgb(204, 148, 91);
  border-color: rgb(204, 148, 91);
}

.sort-btn-icon[data-state="desc"] .sort-state {
  content: '↓';
  color: #fff;
  font-size: 18px;
  font-weight: bold;
}

.sort-btn-icon[data-state="desc"] .sort-icon::before {
  filter: brightness(0) invert(1);
}

.sort-btn-icon[data-state="desc"] .sort-label {
  color: #fff;
}

/* ✅ Filter Reset Bubble — fixed bottom-right, Kreis mit Zähler */
.filter-reset-bubble {
position: fixed;
  bottom: 25px;
  right: 20px;
  left: auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(204, 148, 91, 0.9);
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform .2s, background .2s, box-shadow .2s;
  font-family: "PT Sans", Arial, Helvetica, sans-serif;
  line-height: 1;
  backdrop-filter: blur(10px);
}
.filter-reset-bubble:hover {
  transform: scale(1.1);
  background: #222;
  box-shadow: 0 6px 22px rgba(0,0,0,0.4);
}
/* ✅ Android: left/right Konflikt auflösen + safe area für Navigationsleiste */
@media (max-width: 800px) {
  .filter-reset-bubble {
    bottom: env(safe-area-inset-bottom, 25px);
    right: 15px;  /* Basis-right explizit überschreiben */
    left: auto;   /* left löschen → kein left+right Konflikt auf Android */
    width: 50px;
    height: 50px;
  }
}
.frb-x {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
}
.frb-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  text-align: center;
  opacity: 0.9;
  line-height: 1.3;
  font-weight: bold;
}

/* ✅ NEU: Filter Reset Button (unter Sort-Buttons) */
.text-filter-reset-btn {
  margin-top: 30px;
  margin-bottom: 30px;
  padding: 7px 18px;
  background: rgb(204, 148, 91);
  border: 2px solid rgb(204, 148, 91);
  color: #ffffff;
  font-size: 80%;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: "PT Sans", Arial, Helvetica, sans-serif;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.frb-x {
  font-size: 18px;
  font-weight: bold;
  line-height: 0.8;
}

.text-filter-reset-btn:hover {
  background: #000;
  border-color: #000;
  transform: translateY(0px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* ✅ Search Button - IMMER sichtbar (alle Breakpoints!) */
.filter-search-compact {
  width: 100%;
  padding: 12px;
  margin-top: 15px;
  background: rgb(204, 148, 91);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s;
  font-family: "PT Sans", Arial, Helvetica, sans-serif;
  display: block;
}

.filter-search-compact:hover {
  background: #000;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.filter-search-compact.disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Reset Button */
.filter-reset-compact {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  background: #000;
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 12px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.2s;
  font-family: "PT Sans", Arial, Helvetica, sans-serif;
}

.filter-reset-compact:hover {
  background: rgb(204, 148, 91);
}

/* NoUI Slider Styles */
.noUi-horizontal {
  height: 8px;
}

.noUi-horizontal .noUi-handle {
  width: 20px;
  height: 20px;
  right: -17px;
  top: -8px;
  border-radius: 50%;
}

.noUi-connect {
  background: rgb(204, 148, 91);
}

/* Objektnummer Suche */
.id-objektnummer {
  position: absolute;
  z-index: 500;
  width: 200px;
  right: 23px;
  margin-top: 23px;
}
.id-objektnummer-mobile{
  display: none;
}

/* ✅ OID-Suche über Karte (Desktop) */
.oid-search-overlay {
  display: block;
}

/* ✅ OID-Suche im Sidebar (Desktop sichtbar, Mobile versteckt) */
.id-objektnummer-sidebar {
  display: block;
}

#reset-objektnummer{
font-size: 26px !important;
font-weight: bold;
}
#reset-objektnummer:hover{
color: #000;
}

.id-objektnummer input {
    font-size: 15px !important;
    border-radius: 10px;
}

/* ========================================== */
/* ✅ SLIDING SIDEBAR SYSTEM + FULLSCREEN    */
/* ========================================== */

.mapsWrapper {
  position: relative;
  width: 100%;
  transition: all 0.3s ease;
}

.seo-intro-section {
  transition: all 0.3s ease;
  overflow: hidden;
  max-height: 500px;
  opacity: 1;
}

.seo-intro-section.hidden {
  max-height: 0;
  opacity: 0;
  padding: 0 !important;
  margin: 0 !important;
}

/* ✅ NEU: Immobilien suchen Button (im SEO-Intro) */
.immobilien-suchen-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 7px 18px;
  background: rgb(204, 148, 91);
  border: 2px solid rgb(204, 148, 91);
  color: #ffffff;
  font-size: 80%;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: "PT Sans", Arial, Helvetica, sans-serif;
  border-radius: 3px;
  box-shadow: 0 4px 12px rgba(204, 148, 91, 0.3);
}

.immobilien-suchen-btn .btn-icon {
  font-size: 20px;
}

.immobilien-suchen-btn:hover {
  background: #000;
  border-color: #000;
  transform: translateY(0px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.filter-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 350px;
  height: 110vh;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(10px);
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  z-index: 99999;
  overflow-y: auto;
  padding: 50px 20px;
  box-sizing: border-box;
  transition: transform 0.3s ease;
  transform: translateX(0);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.filter-sidebar.closed {
  transform: translateX(-100%);
}

.sidebar-close-btn {
  position: fixed;
  top: /*calc(var(--admin-bar-height, 0px) + 16px)*/ 50px;
  left: calc(350px - 54px);
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(20px);
  color: #fff;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 100%;
  text-align: center;
  transition: left 0.3s ease, background 0.2s, transform 0.2s;
  z-index: 100002; /* ✅ Höher als Filter-Elemente (100002 > 100001) */
  /* ✅ Fix: Verhindert Mitscrollen durch Parent-Container */
  will-change: transform;
  pointer-events: auto;
}

.sidebar-close-btn:hover {
  background: rgba(204, 148, 91, 0.9);
  transform: rotate(90deg);
}

/* Close-Button verstecken wenn Sidebar geschlossen */
body:has(.filter-sidebar.closed) .sidebar-close-btn {
  display: none;
}

.sidebar-toggle-btn {
  position: fixed;
  top: 50%;
  left: 350px;
  transform: translateX(0) translateY(-50%);
  background: rgb(204, 148, 91);
  color: #fff;
  border: none;
  width: 45px;
  height: 60px;
  border-radius: 0 10px 10px 0;
  cursor: pointer;
  font-size: 21px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 100000;
  transition: transform 0.3s ease;
  padding: 1px 3px 5px 2px;
  opacity: 1;
  pointer-events: all;
}

/* Button verschiebt sich synchron mit dem Sidebar (350px nach links) */
body:has(.filter-sidebar.closed) .sidebar-toggle-btn {
  transform: translateX(-350px) translateY(-50%);
}

.sidebar-toggle-btn:hover {
  background: #000;
}

/* ✅ ENTFERNT: Schüttel-Animation - funktionierte auf Mobile nicht */
/* Button ist immer sichtbar ohne Animation */

/* ✅ Standard: Sidebar GESCHLOSSEN → Content volle Breite */
.content-wrapper {
  margin-left: 0;
  width: 100%;
  transition: margin-left 0.3s ease, width 0.3s ease;
}

/* ✅ Sidebar OFFEN → Content verschiebt sich synchron (nur Desktop >800px) */
@media (min-width: 801px) {
  body.sidebar-is-open .content-wrapper {
    margin-left: 350px;
    width: calc(100% - 350px);
  }
}

.map-sidebar {
  width: 100%;
  float: none;
  position: relative;
}

#map-container {
  width: 100%;
  height: calc(100vh - var(--header-height, 100px) - var(--admin-bar-height, 0px) - 20px);
  border-radius: 0;
  transition: height 0.3s ease;
  min-height: 400px;
  max-height: calc(100vh - var(--header-height, 100px) - var(--admin-bar-height, 0px) - 20px);
}

#map-container.halfscreen {
  height: calc(50vh - (var(--header-height, 100px) / 2) - (var(--admin-bar-height, 0px) / 2) - 20px);
  min-height: 400px;
  max-height: calc(50vh - (var(--header-height, 100px) / 2) - (var(--admin-bar-height, 0px) / 2) - 20px);
}

.map-scroll-btn {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgb(204, 148, 91);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 999;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: "PT Sans", Arial, Helvetica, sans-serif;
}

.map-scroll-btn:hover {
  background: #000;
  transform: translateX(-50%) translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.map-scroll-btn.hidden {
  opacity: 0;
  pointer-events: none;
}

.immobilien-section {
  scroll-margin-top: 20px;
}

/* ========================================== */
/* ✅ LEAFLET                             */
/* ========================================== */

.leaflet-container a.leaflet-popup-close-button {
  font: 30px/30px Tahoma, Verdana, sans-serif;
}
.leaflet-popup-content div h3{
  margin: 8px 10px 10px !important;
}
.leaflet-container a{
color: rgb(204, 148, 91);
}

.leaflet-container a.leaflet-popup-close-button {
  top: 7px;
  right: 5px;
  width: 30px;
  height: 30px;
}

/* ========================================== */
/* ✅ MAP POPUP STYLES (sm- Klassen)         */
/* ========================================== */

.sm-popup-container {
  max-width: 320px;
  font-family: 'PT Sans', Arial, sans-serif;
}

.sm-popup-header {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgb(204, 148, 91);
}

.sm-popup-title {
  color: #000;
  font-size: 18px;
  font-weight: bold;
}

.sm-popup-count-text {
  margin: 10px 0 !important;
  color: #666;
  font-size: 14px;
  text-align: center;
}

.sm-popup-count {
  color: rgb(204, 148, 91);
  font-size: 20px;
}

.sm-popup-list {
  max-height: 400px;
  overflow-y: auto;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.sm-popup-card {
  margin-bottom: 12px;
  padding: 0 5px 0 5px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sm-popup-image-link {
  display: block;
  text-decoration: none;
}

.sm-popup-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.sm-popup-info {
  padding: 10px;
}

.sm-popup-link {
  color: rgb(204, 148, 91);
  font-weight: bold;
  text-decoration: none;
  font-size: 14px;
  display: block;
  margin-bottom: 6px;
  line-height: 1.3;
  transition: color 0.2s;
}

.sm-popup-link:hover {
  color: #000;
}

.sm-popup-details {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

.sm-popup-details li {
  font-size: 14px;
  margin-bottom: 4px;
  padding-left: 22px;
  position: relative;
}

/* Icons verwenden die gleichen Klassen wie immoListe */
.sm-popup-details .iconID,
.sm-popup-details .iconLage,
.sm-popup-details .iconPreis {
  /* Icons werden automatisch aus deinem bestehenden CSS übernommen */
}
ul.immoListe.sm-popup-details{
  display: block;
  min-width: auto;
  margin-bottom: 10px;
}
ul.immoListe.sm-popup-details li {
  padding: 0;
  border-bottom: none;
  list-style-type: none;
}
ul.immoListe.sm-popup-details li::before {
  display: inline-block;
  height: 30px;
  width: 35px;
  background-size: 22px;
  background-position: left bottom;
  background-repeat: no-repeat;
  margin-bottom: -8px;
}


.sm-popup-cta {
  text-align: center;
}

.sm-popup-button {
  display: inline-block;
  padding: 6px 12px;
  background: rgb(204, 148, 91);
  color: #fff !important;
  text-decoration: none;
  border-radius: 3px;
  font-size: 12px;
  font-weight: bold;
  transition: background 0.2s;
}

.sm-popup-button:hover {
  background: rgb(184, 128, 71);
}

/* Mobile Anpassungen */
@media (max-width: 800px) {
  .sm-popup-container {
    max-width: 260px;
  }
  
  .sm-popup-image {
    height: 120px;
  }
  
  .sm-popup-title {
    font-size: 16px;
  }
  
  .sm-popup-count {
    font-size: 18px;
  }
}


/* ========================================== */
/* ✅ RESPONSIVE                             */
/* ========================================== */

/* Mobile (unter 800px) */
@media (max-width: 800px) {
  
  /* SEO-Text IMMER versteckt */
  .seo-intro-section {
    display: none !important;
  }
  
  /* Content IMMER volle Breite (egal ob Sidebar offen oder zu) */
  .content-wrapper,
  .content-wrapper.sidebar-open {
    margin-left: 0 !important;
    width: 100% !important;
  }
  
  /* Sidebar als Overlay - immer 350px! */
  .filter-sidebar {
    width: 350px;
    z-index: 100000;
  }
  
  /* Map volle Höhe - exakt sichtbarer Viewport (JS setzt Wert präzise) */
  #map-container,
  #map-container.halfscreen {
    /* dvh = Dynamic Viewport Height (ohne Browser-Chrome), Fallback auf svh/vh */
    height: calc(100dvh - var(--header-height, 0px) - var(--admin-bar-height, 0px)) !important;
    min-height: 200px !important;
    max-height: calc(100dvh - var(--header-height, 0px) - var(--admin-bar-height, 0px)) !important;
  }
  /* Fallback für Browser ohne dvh-Support */
  @supports not (height: 100dvh) {
    #map-container,
    #map-container.halfscreen {
      height: calc(100svh - var(--header-height, 0px) - var(--admin-bar-height, 0px)) !important;
      max-height: calc(100svh - var(--header-height, 0px) - var(--admin-bar-height, 0px)) !important;
    }
  }
  
  /* Kleinere Marker */
  .circle-label div {
    width: 35px !important;
    height: 35px !important;
    font-size: 14px !important;
  }
  
  /* Popup kompakt */
  .custom-popup .leaflet-popup-content {
    width: 260px !important;
  }
  
  /* Scroll Button */
  .map-scroll-btn {
    bottom: 15px;
    padding: 10px 10px;
    font-size: 11px;
  }

  
  /* Objektnummer */
  .id-objektnummer {
    right: 10px;
    margin-top: 10px;
    width: 300px;
    display: none;
  }
  .id-objektnummer-mobile {
    position: relative;
    width: 100%;
    margin: 20px 0 10px 0;
    display: block;
  }

  /* ✅ OID-Overlay auf Mobile verstecken */
  .oid-search-overlay {
    display: none !important;
  }

  /* ✅ OID-Sidebar auf Mobile VERSTECKEN (nutze stattdessen id-objektnummer-mobile) */
  .id-objektnummer-sidebar {
    display: none !important;
  }
  
  .id-objektnummer input {
    padding: 4px 4px 4px 20px !important;
  }
  
  /* Leaflet Controls */
  .leaflet-left .leaflet-control {
    margin-left: 10px;
    margin-top: 10px;
  }

  .leaflet-right .leaflet-control {
    margin-right: 10px;
    margin-top: 10px;
  }

  .leaflet-control-zoom a {
    width: 35px;
    height: 35px;
    font-size: 20px;
    line-height: 35px;
  }
  
  /* Filter Touch-optimiert */
  .filter-bubble {
    font-size: 13px;
    padding: 6px 12px;
  }
  
  .filter-row-compact .filter-bubble {
    font-size: 13px;
    padding: 6px 10px;
  }
  
  /* Slider Touch */
  .noUi-horizontal .noUi-handle {
    width: 28px;
    height: 28px;
  }
  
  /* Sort Icon Buttons auf Mobile anpassen */
  .sort-btn-icon {
    min-width: 70px;
    height: 36px;
    padding: 0 10px;
    gap: 4px;
  }

  .sort-btn-icon .sort-icon {
    width: 18px;
    height: 18px;
  }

  .sort-btn-icon .sort-icon::before {
    width: 18px;
    height: 18px;
  }

  .sort-btn-icon .sort-state {
    font-size: 12px;
  }

  .sort-btn-icon[data-state="asc"] .sort-state,
  .sort-btn-icon[data-state="desc"] .sort-state {
    font-size: 16px;
  }

  /* Floating Bubble auf Mobile anpassen */
  .floating-filter-bubble {
    width: 45px;
    height: 45px;
  }

  .floating-filter-bubble .filter-count {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .floating-filter-bubble .filter-close {
    font-size: 20px;
  }

  /* Sort Container auf Mobile */
  .sort-buttons-container {
    flex-wrap: nowrap;
    overflow-x: none;
    -webkit-overflow-scrolling: touch;
  }

  /* Search Button - bereits global sichtbar */

  /* Toggle Button */
  .sidebar-toggle-btn {
    top: 50vh;
  }

  .immobilien-section {
    padding-top: 20px !important;
  }

  .sortiererei{
  max-width: 100%;
}

}

/* ========================================== */
/* ✅ RESPONSIVE 2                            */
/* ========================================== */

/* Mobile (unter 500px) */
@media (max-width: 500px) {

  .sm-popup-list {
    max-height: 270px;
  }

  .sm-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sortiererei {
    max-width: 100%;
  }
}

/* ✅ Mobile (<550px): Sidebar FULLSCREEN */
@media (max-width: 550px) {

  /* Sidebar komplett fullscreen */
  .filter-sidebar {
    width: 99.9vw !important;
    height: 110vh !important;
    top: 0 !important;
    left: 0 !important;
    border-radius: 0;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    /* ✅ iOS 15+ Fix: Position muss relativ sein für touch scrolling */
    position: fixed !important;
    padding: 50px 25px 130px 25px;
  }

  /* Toggle-Button bei offenem Fullscreen-Sidebar verstecken */
  body:has(.filter-sidebar:not(.closed)) .sidebar-toggle-btn {
    display: none;
  }

  /* Toggle-Button zeigen wenn Sidebar geschlossen */
  body:has(.filter-sidebar.closed) .sidebar-toggle-btn {
    display: block;
    left: 0;
    transform: translateX(0) translateY(-50%);
  }

  /* Desktop Close-Button (oben links am Sidebar-Rand) ausblenden */
  .sidebar-close-btn {
    display: none;
  }

  /* ✅ Close-Button NUR zeigen wenn Sidebar OFFEN ist - fix oben rechts */
  body:has(.filter-sidebar:not(.closed)) .sidebar-close-btn {
    display: block;
    position: fixed !important;
    top: /*calc(var(--admin-bar-height, 0px) + 16px)*/ 50px !important;
    left: auto !important;
    right: 20px !important;
    width: 40px;
    height: 40px;
    font-size: 20px;
    line-height: 40px;
    z-index: 100002;
    background: #000;
    /* ✅ Fix: Verhindert Mitscrollen - bleibt immer sichtbar über Filter-Elementen */
    will-change: transform;
    pointer-events: auto;
  }
}
  

/* Tablet (801px - 1024px) - Sidebar bleibt 350px, kein Hüpfen! */
@media (min-width: 801px) and (max-width: 1024px) {
  #map-container {
    height: calc(60vh - var(--header-height, 100px) - var(--admin-bar-height, 0px));
  }

  #map-container.halfscreen {
    height: calc(40vh - (var(--header-height, 100px) / 2) - (var(--admin-bar-height, 0px) / 2));
  }
}