.map-section {
  padding: 30px 0;
}

.map-section__title {
  font-size: 28px;
  line-height: 36px;
  font-weight: 700;
  margin-bottom: 30px;
}

.map-section__description {
  margin-bottom: 24px;
  font-size: 16px;
  line-height: 24px;
  color: var(--color-three);
  max-width: 820px;
}

.contacts-map {
  display: grid;
  grid-template-columns: 392px 1fr;
  gap: 24px;
  align-items: stretch;
}

.contacts-map__panel {
  background: var(--color-gray);
  padding: 24px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-height: 560px;
}

.contacts-map__panel-title {
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  margin-bottom: 18px;
}

.contacts-map__search {
  width: 100%;
  display: block;
  padding: 12px 16px;
  border: 1px solid #D9D9D9;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  background: #fff;
  color: #000;
  margin-bottom: 16px;
}

.contacts-map__search::placeholder {
  color: #B0B0B0;
}

.contacts-map__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  max-height: 450px;
  padding-right: 4px;
}

.contacts-map__item {
  width: 100%;
  border: 0;
  background: #fff;
  color: #000;
  cursor: pointer;
  padding: 14px 16px;
  text-align: left;
  transition: all .15s ease-in-out;
  display: grid;
  gap: 4px;
  border-left: 4px solid transparent;
}

.contacts-map__item:hover {
  color: var(--color-one);
}

.contacts-map__item.active {
  border-left-color: var(--color-one);
}

.contacts-map__item-name {
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
}

.contacts-map__item-meta {
  font-size: 14px;
  line-height: 20px;
  color: var(--color-three);
  font-weight: 500;
}

.contacts-map__empty {
  padding: 16px;
  background: #fff;
  color: var(--color-three);
  font-size: 15px;
  line-height: 22px;
}

.contacts-map__map-wrap {
  position: relative;
  min-height: 560px;
  background: var(--color-gray);
  overflow: hidden;
}

#yandexMapDemo {
  width: 100%;
  height: 100%;
  min-height: 560px;
}

.contacts-map__info {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 2;
  background: #fff;
  padding: 20px 24px;
  max-width: 390px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.contacts-map__info-title {
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  margin-bottom: 14px;
}

.contacts-map__info-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.contacts-map__info-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--color-three);
  font-size: 15px;
  line-height: 22px;
}

.contacts-map__info-row svg {
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.contacts-map__info-row svg path {
  fill: var(--color-one);
}

.contacts-map__info-row a {
  color: #000;
  text-decoration: none;
  transition: all .15s ease-in-out;
}

.contacts-map__info-row a:hover {
  color: var(--color-one);
}

.contacts-map__callback {
  display: inline-flex;
  color: var(--color-one);
  text-decoration: none;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  margin-top: 2px;
  transition: all .15s ease-in-out;
  cursor: pointer;
}

.contacts-map__callback:hover {
  color: var(--color-two);
  text-decoration: underline;
}

.contacts-map__messengers {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 16px 0;
}

.contacts-map__messenger {
  width: 44px;
  height: 44px;
  background: var(--color-one);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease-in-out;
}

.contacts-map__messenger:hover {
  background: var(--color-two);
}

.contacts-map__messenger svg {
  width: 22px;
  height: 22px;
}

.contacts-map__messenger svg path {
  fill: #fff;
}

.contacts-map__messenger--max {
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.contacts-map__info-btn {
  background-color: var(--color-one);
  border: 1px solid var(--color-one);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  text-align: center;
  text-decoration: none;
  padding: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  column-gap: 12px;
  transition: all .15s ease-in-out;
  min-width: 220px;
}

.contacts-map__info-btn:hover {
  background-color: var(--color-two);
  border-color: var(--color-two);
}

.contacts-map-marker-hit {
  width: 64px;
  height: 64px;
  position: relative;
  cursor: pointer;
}

.contacts-map-marker {
  width: 38px;
  height: 38px;
  background: var(--color-one);
  border: 4px solid #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  transform: rotate(45deg);
  position: absolute;
  left: 13px;
  top: 6px;
  transition: all .15s ease-in-out;
  pointer-events: none;
}

.contacts-map-marker-hit:hover .contacts-map-marker {
  background: var(--color-two);
  transform: rotate(45deg) scale(1.08);
}

.contacts-map-marker::after {
  content: "";
  width: 11px;
  height: 11px;
  background: #fff;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.contacts-map-marker--active {
  background: var(--color-red);
}

.ymaps-2-1-79-balloon__content {
  font-family: "Inter", Arial, sans-serif !important;
}

.map-balloon__title {
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.map-balloon__text {
  color: var(--color-three);
  font-size: 14px;
  line-height: 20px;
}

@media (max-width: 991px) {
  .map-section__title {
    font-size: 24px;
    line-height: 32px;
    margin-bottom: 16px;
  }

  .map-section__description {
    margin-bottom: 18px;
  }

  .contacts-map {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .contacts-map__map-wrap {
    order: 2;
    min-height: auto;
    display: flex;
    flex-direction: column;
    background: transparent;
    overflow: visible;
  }

  #yandexMapDemo {
    min-height: 420px;
    order: 1;
    background: var(--color-gray);
  }

  .contacts-map__info {
    order: 2;
    position: relative;
    left: auto;
    bottom: auto;
    max-width: none;
    width: 100%;
    margin: 0;
    box-shadow: none;
    border: 1px solid #ededed;
    border-top: 0;
  }

  .contacts-map__panel {
    order: 1;
    min-height: auto;
    padding: 20px;
    display: block;
  }

  .contacts-map__panel-title {
    font-size: 22px;
    line-height: 28px;
    margin-bottom: 14px;
  }

  .contacts-map__search {
    margin-bottom: 12px;
  }

  .contacts-map__list {
    max-height: 300px;
  }

  .contacts-map__item {
    padding: 16px;
  }
}

@media (max-width: 575px) {
  .map-section {
    padding: 24px 0;
  }

  .map-section__description {
    font-size: 15px;
    line-height: 22px;
  }

  .contacts-map {
    gap: 12px;
  }

  .contacts-map__panel {
    padding: 16px;
  }

  .contacts-map__panel-title {
    font-size: 20px;
    line-height: 26px;
  }

  #yandexMapDemo {
    min-height: 360px;
  }

  .contacts-map__info {
    padding: 18px 16px;
  }

  .contacts-map__info-btn {
    width: 100%;
  }

  .contacts-map__messenger {
    width: 42px;
    height: 42px;
  }
}

#yandexMapDemo {
  height: 560px !important; 
}

@media (max-width: 991px) {
  .contacts-map__map-wrap {
    display: block !important; 
  }
  
  #yandexMapDemo {
    height: 420px !important; 
  }
}

@media (max-width: 575px) {
  #yandexMapDemo {
    height: 360px !important; 
  }
}