.project-location {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(390px, 0.65fr);
  min-height: 760px;
  background: #f5f0ea;
  color: #2a211c;
}

.project-map-shell {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  background: #ded7cf;
}

.project-map-canvas {
  width: 100%;
  height: 100%;
  min-height: 760px;
  z-index: 1;
}

.project-map-legend {
  position: absolute;
  z-index: 500;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 13px 16px;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 12px 30px rgb(43 33 26 / 12%);
  font-size: 12px;
  color: #5d5149;
}

.project-map-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.project-map-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #766b62;
}

.project-map-legend .legend-project {
  background: #b98e61;
  box-shadow: 0 0 0 4px rgb(185 142 97 / 23%);
}

.project-location-content {
  padding: 70px 48px;
  align-self: center;
}

.project-location-content h2 {
  max-width: 430px;
  margin: 14px 0 18px;
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 500;
  line-height: 1.15;
}

.project-location-content > p {
  max-width: 520px;
  margin: 0 0 26px;
  color: #74675f;
  line-height: 1.9;
}

.map-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.map-filter {
  border: 1px solid #d9cec3;
  padding: 9px 13px;
  background: transparent;
  color: #66584f;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s ease;
}

.map-filter:hover,
.map-filter.active {
  border-color: #b98e61;
  background: #b98e61;
  color: #fff;
}

.nearby-places {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 20px;
}

.nearby-place {
  position: relative;
  min-height: 96px;
  border: 1px solid #ded4ca;
  padding: 14px 15px 12px;
  background: rgb(255 255 255 / 64%);
  color: #2a211c;
  text-align: right;
  font-family: inherit;
  cursor: pointer;
  transition: 0.2s ease;
}

.nearby-place:hover,
.nearby-place.active {
  transform: translateY(-2px);
  border-color: #b98e61;
  background: #fff;
  box-shadow: 0 9px 24px rgb(43 33 26 / 8%);
}

.nearby-place small,
.nearby-place strong,
.nearby-place span {
  display: block;
}

.nearby-place small {
  margin-bottom: 7px;
  color: #a27951;
  font-size: 11px;
}

.nearby-place strong {
  overflow: hidden;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nearby-place span {
  color: #75685f;
  font-size: 12px;
}

.nearby-empty {
  grid-column: 1 / -1;
  border: 1px dashed #cdbdaf;
  padding: 22px;
  background: rgb(255 255 255 / 42%);
  color: #75685f;
  line-height: 1.8;
}

.map-data-status {
  margin: 18px 0;
  border-right: 3px solid #b98e61;
  padding: 12px 15px;
  background: #eee5dc;
}

.map-data-status strong,
.map-data-status span {
  display: block;
}

.map-data-status strong {
  margin-bottom: 3px;
  font-size: 13px;
}

.map-data-status span {
  color: #76685f;
  font-size: 12px;
  line-height: 1.7;
}

.project-location-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.project-location-actions .map-distance-note {
  max-width: 280px;
  color: #887a70;
  font-size: 11px;
  line-height: 1.6;
}

.map-project-marker,
.map-place-marker {
  background: transparent;
  border: 0;
}

.map-project-marker span,
.map-place-marker span {
  display: block;
  border-radius: 50%;
}

.map-project-marker span {
  width: 22px;
  height: 22px;
  border: 5px solid #fff;
  background: #b98e61;
  box-shadow:
    0 0 0 4px rgb(185 142 97 / 35%),
    0 7px 16px rgb(44 33 26 / 25%);
}

.map-place-marker span {
  width: 14px;
  height: 14px;
  border: 3px solid #fff;
  background: #665b53;
  box-shadow: 0 4px 12px rgb(44 33 26 / 22%);
}

.map-place-marker.religious span {
  background: #6f846a;
}

.map-place-marker.transport span {
  background: #778692;
}

.map-place-marker.service span {
  background: #a27951;
}

.project-location .leaflet-popup-content-wrapper,
.project-location .leaflet-popup-tip {
  border-radius: 0;
  color: #2a211c;
}

.project-location .leaflet-popup-content {
  min-width: 150px;
  font-family: "Tajawal", sans-serif;
  line-height: 1.7;
  text-align: right;
}

.project-location .leaflet-control-attribution {
  font-size: 9px;
}

@media (max-width: 980px) {
  .project-location {
    grid-template-columns: 1fr;
  }

  .project-location-content {
    order: -1;
  }

  .project-map-shell,
  .project-map-canvas {
    min-height: 520px;
  }
}

@media (max-width: 620px) {
  .project-location-content {
    padding: 52px 20px;
  }

  .nearby-places {
    grid-template-columns: 1fr;
  }

  .nearby-place {
    min-height: 86px;
  }

  .project-map-shell,
  .project-map-canvas {
    min-height: 430px;
  }

  .project-map-legend {
    right: 14px;
    bottom: 14px;
  }
}
