/* z-index: 1 — карта должна рисоваться поверх фиксированного
   .page__background, иначе она пропадает под ним. */
.map {
  position: relative;
  z-index: 1;
  border-color: var(--color-gray, #585858);
  border-width: 1px 0 1px 0;
  border-style: solid;
  width: 100%;
}

.map .card {
  box-shadow: 0px 3px 18px 3px #00000096;
}

.map__inner {
  position: absolute;
  top: 100px;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;

  pointer-events: none;
}

.map__title {
  color: #fff;
  margin: 0;
  line-height: 1;
  pointer-events: none;
}

.map__project {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;

  pointer-events: all;
  max-width: 300px;
}
.map__project._active {
  opacity: 1;
  pointer-events: all;
}

.map__wrapper {
  position: relative;
}   
.map__place-for-map {
  height: 800px;
  width: 100%;
}

/* Состояние "карта не загрузилась": WordPress недоступен, не пришли
координаты или не поднялся API Яндекса. Без него на месте карты
остаётся пустой чёрный прямоугольник на 800px без объяснений. */
.map__place-for-map._failed {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
  height: 300px;
  color: var(--color-gray-text, #9c9c9c);
  background-color: var(--color-dark, #1f1f1f);
  font-size: 18px;
  line-height: 1.4;
}

.marker {
  width: 42px;
  height: 42px;
  padding: 4px;
  border: 3px solid #1f1f1f;
  background-color: #fff;
  transition: background-color 0.4s;
  border-radius: 50%;
  cursor: pointer;
}
.marker._active {
  background-color: var(--color-accent, #dfb673);
}

.cluster {
  width: 42px;
  height: 42px;
  border: 3px solid #1f1f1f;
  background-color: #fff;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
  font-family: Roboto, Arial, Helvetica, sans-serif;
}

.map__wheel-scroll-tip {
  position: absolute;
  inset: 0;
  font-size: 20px;
  z-index: 1;
  background-color: #1f1f1fbb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.05s;
  
  box-shadow: inset 0 0 20px 20px #1f1f1f, inset 0 0 20px 8px #1f1f1f;
}
.map__wheel-scroll-tip._active {
  opacity: 1;
  pointer-events: all;
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 20px 20px #1f1f1f, inset 0 0 20px 8px #1f1f1f;
  z-index: 1;
}

.map__project-mobile {
  display: none;
}

@media (width <1000px) {
  .map__inner {
    top: 20px;
    flex-direction: column;
    gap: 10px;
    pointer-events: all;
  }

  .map .card {
    display: none;
  }

  .map__place-for-map {
    height: 400px;
  }

  .map__place-for-map._failed {
    height: 200px;
    font-size: 16px;
  }

  .marker {
    width: 22px;
    height: 22px;
    padding: 2px;
  }

  .map__wheel-scroll-tip {
    display: none;
  }

  .map__project-mobile {
    display: block;
    color: #fff;
    padding: 5px;
    font-size: 16px;
    background-color: #1f1f1f;
    width: fit-content;
  }
}