.project-map {
  margin: 0 auto;
  padding: 0 2rem;
}

.project-map .content-wrapper__fullwidth {
  max-width: calc(100% + 4rem);
  width: calc(100% + 4rem);
  margin: 0 -2rem;
}

@media (max-width: 767px) {
  .project-map .content-wrapper__fullwidth {
    max-width: 100%;
    width: 100%;
    margin: 0;
  }

  /*.project-map__map {
    width: calc(100% + 4rem);
    margin: 0 -2rem;
  }*/
}

.project-map__button {
  cursor: pointer;
  width: 29px;
  height: 29px;
  padding: 0;
  appearance: none;
  color: #fff;
  position: absolute;
  top: 10px;
  z-index: 2;
  border: 0;
  background: none;
}

#map-expand {
  left: 49px;
}

#map-fullscreen {
  left: 10px;
}

/*.project-map.expanded .project-map__button {
  top: calc(var(--scroll-padding-top, 124px) + 10px);
  position: fixed;
}*/

.project-map.fullscreen #map-expand {
  display: none;
}

.project-map__button svg path {
  fill: #fff;
}

.legend {
  list-style-type: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0px;
  margin: 20px 0 0 20px;
  position: absolute;
  right: 30px;
  bottom: 20px;
  z-index: 2;
  color: #fff;
}

.fullscreen .legend {
  position: fixed;
}

.legend li:before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-right: 4px;
}

.legend li.l_red:before {
  background: #FF0000;
}

.legend li.l_green:before {
  background: #46BE00;
}

.legend li.l_blue:before {
  background: #0046FF;
}

.project-map__rows {
  display: grid;
}
.project-map__row {
  display: grid;
  position: relative;
}
.project-map__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
  width: 100%;
  max-width: 59rem;
}

.project-map__buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--gap);
}

.project-map__map {
  position: relative;
  height: 35rem;
}

.map__wrapper {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
}

#map {
  height: 100%;
  max-height: 100%;
  width: 100%;
  /*position: absolute;
  z-index: 1;
  top: 0;
  right: 0;*/
}

.map-only #map-expand {
  display: none;
}

.expanded .map__wrapper {
  width: 100%;
}

.expanding .map__wrapper {
  transition: width .5s ease-in;
}

.project-map.expanded #map {
  /*position: absolute;
  z-index: 1;
  width: 100%;
  /*top: var(--scroll-padding-top, 124px);
  left: 0;
  right: 0;
  width: 100%;
  max-height: calc(100% - var(--scroll-padding-top, 124px));*/
}

/*.project-map.fullscreen #map {
  position: fixed;
  z-index: 1;
  top: var(--scroll-padding-top, 124px);
  left: 0;
  right: 0;
  width: 100%;
  max-height: calc(100% - var(--scroll-padding-top, 124px));
}*/

.fullscreen .map__wrapper {
  position: fixed;
  z-index: 3;
  top: var(--scroll-padding-top, 124px);
  left: 0;
  right: 0;
  width: 100%;
  max-height: calc(100% - var(--scroll-padding-top, 124px));
}

@media (min-width: 768px) {
  .project-map__row {
    grid-auto-flow: dense;
    /*grid-template-columns: auto calc(50% + ((100% - 1180px) / 2));*/
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }
  .map-only .project-map__row {
    grid-template-columns: 1fr;
  }
  .project-map__row:nth-of-type(odd) .project-map__content {
    padding-right: 4rem;
    justify-self: flex-end;
  }
  .project-map__row:nth-of-type(even) .project-map__content {
    padding-left: 4rem;
  }
  .project-map__row:nth-of-type(odd) .project-map__map {
    grid-column-end: -1;
    height: 55rem;
  }
  .project-map__map {
    position: initial;
  }
  .map__wrapper {
    width: 50%;
  }

  .map-only .map__wrapper {
    width: 100%;
  }
}



.project-map .content-wrapper__fullwidth .project-map__map {
  height: calc(100vh - var(--scroll-padding-top));
  min-height: 20rem;
}

@media (min-width: 992px) {
  .project-map__row:nth-of-type(odd) .project-map__content {
    padding-right: 11.2rem;
  }
  .project-map__row:nth-of-type(even) .project-map__content {
    padding-left: 11.2rem;
  }
}

@media (max-width: 767px) {
  .project-map {
    padding: 3rem 2rem;
  }

  .project-map.map-only {
    padding: 0;
  }

  .project-map__rows {
    gap: 5rem;
  }

  /*.project-map__button {*/
  #map-expand {
    display: none;
  }

  #map {
    width: 100%;
    position: relative;
  }
}





.project-map .mapboxgl-map {
  overflow: unset;
  position: unset;
}

.project-map .mapboxgl-canvas {
  left: unset !important;
  right: 0;
}


.mapboxgl-popup {
  z-index: 2;
}

.mapboxgl-popup-content {
  border-radius: 18px;
  -webkit-box-shadow: 0 0 40px 0 rgba(0, 0, 0, .2);
  box-shadow: 0 0 40px 0 rgba(0, 0, 0, .2);
  overflow: hidden;
  padding: 0;
  background: #fff;
  pointer-events: auto;
  position: relative;
}

.mapboxgl-popup-content .map-card {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex
;
  padding: 0;
  width: 650px;
  -webkit-box-align: stretch;
  -ms-flex-align: stretch;
  align-items: stretch;
}

.mapboxgl-popup-content .map-card .image {
  -webkit-box-flex: 0;
  -ms-flex: 0 1 250px;
  flex: 0 1 250px;
  max-height: 300px;
  min-height: 200px;
  overflow: hidden;
}

.mapboxgl-popup-content .map-card .info {
  padding: 30px;
  -webkit-box-flex: 1;
  -ms-flex: 1 2 250px;
  flex: 1 2 250px;
}


.mapboxgl-popup h3 {
  margin-bottom: 10px;
}

.mapboxgl-popup p.description {
  margin-bottom: 10px;
  font-size: 1.6rem;
  font-family: var(--primary-font-family);
  line-height: var(--base-line-height);
}

.mapboxgl-popup p.link {
  margin-bottom: 0;
}

.mapboxgl-popup .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


@media (max-width: 690px) {
  .mapboxgl-popup-content .map-card {
    max-width: 50vw;
    flex-direction: column;
  }

  .mapboxgl-popup-content .map-card .info {
    padding: 20px 10px 0;
  }

  .mapboxgl-popup-content .map-card .image {
    flex: unset;
    max-height: unset;
    min-height: unset;
  }
}
