.map {
  position: relative;
  margin: 160px auto;
  padding: 0 32px;
  max-width: 1304px;
}

.map-top {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: flex-end;
}

.map-h2 {
  font-size: 54px;
  font-family: Semi;
  max-width: 460px;
}

.map-top-filters {
  display: flex;
  gap: 8px;
}

.map-wrap {
  position: relative;
  margin-top: 64px;
  border-radius: 12px;
  overflow: hidden;
}

.map-view-inner {
  width: 100%;
  height: 66vh;
}

.search-location {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px solid #E9E9EA;
  border-radius: 8px;
  font-family: Medium;
  line-height: 1.5;
  padding: 10px 16px;
  transition: ease 0.5s;
  min-width: 170px;
}
.search-location svg {
  width: 22px;
  height: 22px;
  fill: #1582E7;
}
.search-location:hover {
  border: 1px solid #D3D3D6;
  cursor: pointer;
}

.map-sec-search {
  position: relative;
}
.map-sec-search input {
  min-width: 450px;
}
.map-sec-search > svg {
  position: absolute;
  right: 16px;
  width: 18px;
  height: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.search-list {
  display: none;
  position: absolute;
  bottom: -4px;
  left: 0;
  transform: translateY(100%);
  z-index: 1;
  width: 100%;
  padding: 8px;
  background: white;
  border-radius: 6px;
  border: 1px solid #E9E9EA;
  box-shadow: 0px 20px 25px -5px #64666E;
  max-height: 200px;
  overflow-y: scroll;
}
.search-list::-webkit-scrollbar {
  width: 6px;
}
.search-list::-webkit-scrollbar-thumb {
  background: #E9E9EA;
  border-radius: 5px;
  border: 1px solid #D3D3D6;
}
.search-list::-webkit-scrollbar-button {
  display: none;
}

.search-item {
  width: 100%;
  padding: 4px 8px;
  background: white;
  border-radius: 6px;
  display: flex;
  gap: 8px;
  transition: 0.3s;
}
.search-item svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 5px;
  fill: #64666E;
  transition: 0.3s;
}
.search-item:hover {
  background: #E8F2FD;
}
.search-item:hover .src-item-link {
  color: #1582E7;
}
.search-item:hover svg {
  fill: #1582E7;
}
.search-item:not(:last-child) {
  margin-bottom: 4px;
}

.src-item-link {
  all: unset;
  color: #64666E;
  cursor: pointer;
  transition: 0.3s;
}

.miss-container {
  color: #64666E;
}

.map-pin {
  position: relative;
  width: max-content;
  padding: 4px 6px;
  background: #062745;
  border-radius: 6px;
  transition: 0.3s;
}
.map-pin::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 100%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #062745;
  transition: 0.3s;
}
.map-pin .map-icon {
  color: white;
}
.map-pin:hover {
  background: #1582E7;
}
.map-pin:hover::before {
  border-top: 6px solid #1582E7;
}
.map-pin.highlight {
  background: #1582E7;
}
.map-pin.highlight::before {
  border-top: 6px solid #1582E7;
}
.map-pin.highlight .pin-details {
  display: block;
}

.pin-details {
  display: none;
  position: absolute;
  left: 0;
  bottom: -10px;
  transform: translate(0, 100%);
  width: 260px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.mob-pin-details {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  max-width: 260px;
  width: 100%;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  z-index: 10;
}
.mob-pin-details.visible {
  display: block;
}

.pin-img {
  position: relative;
  width: 100%;
  aspect-ratio: 13/8;
}
.pin-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pin-btn {
  position: absolute;
  top: 8px;
  width: 24px;
  height: 24px;
  background: rgba(33, 37, 48, 0.3);
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.pin-btn-favorite {
  left: 8px;
}
.pin-btn-favorite svg {
  width: 17px;
  height: 15px;
  fill: white;
}
.pin-btn-close {
  right: 8px;
}
.pin-btn-close svg {
  width: 12px;
  height: 12px;
  fill: white;
}

.pin-footer {
  padding: 10px 12px;
}

.pin-tags {
  margin: 6px 0 4px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pin-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #E9E9EA;
  border-radius: 4px;
  padding: 4px 6px;
  color: #7A7C83;
  line-height: 1;
  font-size: 14px;
  font-family: Medium;
}
.pin-tag svg {
  width: 13px;
  height: 13px;
  fill: #BCBEC1;
}

.pin-location {
  margin: 4px 0 12px 0;
  font-family: Medium;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .map-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .map-h2 {
    max-width: unset;
  }
}
@media (max-width: 900px) {
  .search-location {
    padding: 10px 12px;
  }
  .search-location span {
    display: none;
  }
  .map-sec-search input {
    min-width: 380px;
  }
}
@media (max-width: 768px) {
  .map {
    margin: 64px 0;
    padding: 16px;
  }
  .map-h2 {
    font-size: 24px;
    line-height: 1.3;
  }
  .map-top {
    gap: 24px;
  }
  .map-sec-search {
    max-width: 100%;
    width: 100%;
  }
  .map-sec-search input {
    min-width: unset;
    width: 100%;
  }
  .search-list {
    width: calc(100vw - 32px);
    left: unset;
    right: 0;
  }
  .map-wrap {
    margin-top: 24px;
  }
  .map-view-inner {
    height: 74vh;
  }
  .search-location {
    min-width: unset !important;
    padding: 8px 10px;
    border-radius: 6px;
  }
  .map-top-filters {
    width: 100%;
  }
  .mob-pin-details {
    max-width: calc(100vw - 32px);
    top: unset;
    bottom: 16px;
    left: 50%;
    transform: translate(-50%, 0);
  }
  .mob-pin-details .pin-img {
    aspect-ratio: 20/9;
  }
  .mob-pin-details .pin-footer {
    padding: 8px 10px;
  }
  .mob-pin-details .pin-tags {
    gap: 4px;
  }
  .mob-pin-details .pin-tag {
    padding: 0;
    gap: 5px;
    color: #64666E;
  }
  .mob-pin-details .pin-tag:not(:last-child)::after {
    content: "";
    width: 4px;
    height: 4px;
    margin-top: 1px;
    border-radius: 10px;
    background: #64666E;
  }
  .mob-pin-details .pin-location {
    display: none;
  }
}