/* ========================================
   HOMEPAGE CITY MAP
======================================== */

.home-city-map-section {
  overflow: hidden;
  padding: 40px 0;
}

/* ========================================
   LAYOUT
======================================== */

.map-layout {
  display: grid;

  grid-template-columns:
    minmax(0, 2fr)
    minmax(260px, 0.8fr);

  gap: 24px;

  align-items: stretch;
}

.map-card,
.map-neighborhood-panel {
  min-width: 0;
}

.map-card {
  display: flex;

  flex-direction: column;

  height: 100%;
}

.map-neighborhood-panel {
  display: flex;

  flex-direction: column;

  min-height: 0;

  height: 100%;
}

/* ========================================
   MAP
======================================== */

.home-city-map-shell {
  position: relative;

  width: 100%;
  height: 420px;

  flex: 0 0 auto;

  background: #f7f9fb;

  border-radius: 16px;

  overflow: hidden;
}

.home-city-map-svg {
  display: block;

  width: 100%;
  height: 100%;
}

/* ========================================
   MAP PATHS
======================================== */

.home-city-map-path {
  fill: rgba(38, 82, 115, 0.12);

  stroke: #557789;

  stroke-width: 1.5;

  vector-effect: non-scaling-stroke;

  cursor: pointer;

  transition:
    fill 150ms ease,
    stroke 150ms ease,
    stroke-width 150ms ease;
}

.home-city-map-path:hover,
.home-city-map-path:focus,
.home-city-map-path.is-active {
  fill: rgba(38, 82, 115, 0.42);

  stroke: #1d4d66;

  stroke-width: 2.5;

  outline: none;
}

/* ========================================
   TOOLTIP
======================================== */

.home-city-map-tooltip {
  position: absolute;

  left: 20px;
  bottom: 20px;

  display: flex;

  flex-direction: column;

  gap: 2px;

  max-width: 240px;

  padding: 12px 15px;

  background: rgba(255, 255, 255, 0.96);

  border: 1px solid rgba(0, 0, 0, 0.08);

  border-radius: 10px;

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);

  pointer-events: none;
}

.home-city-map-tooltip-label {
  color: #77838c;

  font-size: 10px;

  font-weight: 700;

  letter-spacing: 0.08em;

  text-transform: uppercase;
}

.home-city-map-tooltip strong {
  color: #222;

  font-family: 'Poppins', sans-serif;

  font-size: 17px;
}

/* ========================================
   MAP SOURCE
======================================== */

.map-source {
  flex: 0 0 auto;

  margin-top: 10px;
}

/* ========================================
   SIDEBAR LIST
======================================== */

.home-city-map-list {
  flex: 1 1 auto;

  min-height: 0;

  overflow-y: auto;
}

.home-city-map-list .map-list-item.is-active {
  color: #ffffff;

  background: #265273;
}

/* ========================================
   DESKTOP
======================================== */

@media (min-width: 992px) {
  .map-layout {
    display: grid;

    grid-template-columns:
      minmax(0, 2fr)
      minmax(260px, 0.8fr);

    gap: 24px;

    align-items: start;
  }

  .map-card {
    height: 450px;
  }

  .home-city-map-shell {
    height: 410px;
  }

  .map-source {
    margin-top: 10px;
  }

  .map-neighborhood-panel {
    height: 450px;

    min-height: 0;

    overflow: hidden;
  }

  .home-city-map-list {
    flex: 1 1 auto;

    min-height: 0;

    max-height: none;

    overflow-y: auto;
  }
}

/* ========================================
   TABLET
======================================== */

@media (max-width: 991.98px) {
  .map-layout {
    grid-template-columns: 1fr;
  }

  .map-card,
  .map-neighborhood-panel {
    height: auto;
  }

  .home-city-map-shell {
    height: 380px;
  }

  .home-city-map-list {
    max-height: 280px;
  }
}

/* ========================================
   MOBILE
======================================== */

@media (max-width: 767.98px) {
  .home-city-map-shell {
    height: 320px;
  }

  .home-city-map-tooltip {
    left: 12px;
    bottom: 12px;

    max-width: calc(100% - 24px);
  }

  .home-city-map-list {
    max-height: 260px;
  }
}
