/* ── Section wrapper ── */
#expertise-section {
  width: 100%;
  box-sizing: border-box;
}

/* ── Split panel layout ── */
.split-panel {
  display: flex;
  align-items: stretch; /* change from flex-start to stretch */
  width: 100%;
  box-sizing: border-box;
}

/* ── Sticky map (left) ── */
.map-panel {
  width: 50%;
  position: relative;
  box-sizing: border-box;
  min-height: 500px;
}

#leaflet-map {
  width: 100%;
  height: 100%;
  min-height: 500px;
  overflow: hidden;
}

/* ── Cards panel (right) ── */
.cards-panel {
  width: 50%;
  box-sizing: border-box;
  padding: 24px;
  padding-top: 24px;
  padding-bottom: 24px;
  align-self: flex-start;
}

/* ── Desktop card styles ── */
.neighborhood-card {
  background: #ffffff;
  border: 1px solid #efefef;
  border-left: 3px solid transparent;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 12px;
  transition: border-left-color 0.3s ease, background 0.3s ease;
}

.neighborhood-card.is-active {
  border-left: 3px solid var(--gold, #c9a96e);
  background: #fdfaf5;
}

.neighborhood-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.neighborhood-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark, #1a1a2e);
  margin: 0;
}

.property-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold, #c9a96e);
  white-space: nowrap;
  background: #fdf6e3;
  padding: 2px 10px;
  border-radius: 20px;
}

.neighborhood-desc {
  font-size: 0.85rem;
  color: var(--text-light, #888);
  margin: 6px 0 0 0;
}

/* ── Mobile carousel hidden on desktop ── */
.mobile-carousel-wrapper {
  display: none;
}

/* ════════════════════════════════════
   MOBILE (max-width: 768px)
   ════════════════════════════════════ */
@media (max-width: 768px) {

  .split-panel {
    display: block;
    position: relative;
  }

  .map-panel {
    width: 100%;
    position: relative;
    height: 60svh;
    touch-action: pan-y;
    /* Tells the browser: vertical swipe = page scroll,
       not map interaction */
  }

  #leaflet-map::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 400;
    /* Transparent overlay — blocks touch events to map,
       lets page scroll pass through */
    pointer-events: none;
  }

  /* Hide desktop card list */
  .cards-panel {
    display: none;
  }

  /* Show mobile carousel */
  .mobile-carousel-wrapper {
    display: block;
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    z-index: 1000;
    overflow: hidden;
  }

  .mobile-carousel {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0 10vw;
    gap: 12px;
    scrollbar-width: none;
  }

  .mobile-carousel::-webkit-scrollbar {
    display: none;
  }

  /* Override card styles for mobile carousel */
  .mobile-carousel .neighborhood-card {
    flex-shrink: 0;
    width: 80vw;
    scroll-snap-align: center;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-left: 3px solid transparent;
  }

  .mobile-carousel .neighborhood-card.is-active {
    border-left: 3px solid var(--gold, #c9a96e);
  }
}

#skip-expertise {
  display: none !important;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--gold, #c9a96e);
  color: var(--text-dark, #1a1a2e);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 30px;
  cursor: pointer;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  transition: background 0.2s ease, color 0.2s ease;
}

#skip-expertise:hover {
  background: var(--gold, #c9a96e);
  color: #fff;
}

/* Hide on mobile — carousel is already fast to swipe */
@media (max-width: 768px) {
  #skip-expertise { display: none; }
}

.custom-div-icon {
  background: transparent;
  border: none;
}

.marker-pin {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--gold, #c9a96e);
  box-shadow: 0 0 0 2px rgba(201, 169, 110, 0.3);
}

/* ── Leaflet Marker Cluster Overrides ── */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-color: rgba(227, 205, 132, 0.6) !important; /* #e3cd84 with opacity */
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background-color: rgba(213, 178, 63, 0.9) !important; /* #d5b23f with opacity */
  color: #1a1a2e !important;
}

/* ── Leaflet Attribution Styling ── */
.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(4px);
  font-size: 0.6rem !important;
  color: #aaa !important;
  padding: 2px 6px !important;
  border-radius: 4px 0 0 0;
  box-shadow: none !important;
}

.leaflet-control-attribution a {
  color: #bbb !important;
  text-decoration: none;
}

.leaflet-control-attribution svg {
  display: none;  /* hides the Leaflet logo leaf icon */
}

