.kpm-map {
  position: relative;
  z-index: 0;
  isolation: isolate;

  --kpm-accent: #b49a61;
  --kpm-hover: #f0c300;
  --kpm-thumb: 150px;
  --kpm-map-height: 72vh;

  --kpm-light-bg: #ffffff;
  --kpm-light-text: #535857;
  --kpm-light-title: #1a171b;
  --kpm-border: rgba(0, 0, 0, 0.12);

  padding-bottom: 42px;
}

.kpm-map,
.kpm-map * {
  font-family: inherit;
}

.kpm-map__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.kpm-map__filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: var(--kpm-light-bg);
  color: var(--kpm-light-text);
  text-decoration: none;
  font-weight: 700;
}

.kpm-map__filter:hover {
  background: var(--kpm-hover);
  border-color: var(--kpm-hover);
  color: #1a171b;
}

.kpm-map__filter.is-active {
  background: var(--kpm-accent);
  border-color: var(--kpm-accent);
  color: #fff;
}

.kpm-map__layout {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 50vw;
  gap: 28px;
  width: 100%;
  height: var(--kpm-map-height);
  align-items: start;
}

.kpm-map__left {
  min-width: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 24px 0;
}

.kpm-map__title {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3.6vw, 60px);
  line-height: 1.05;
  font-weight: 900;
  color: var(--kpm-light-title) !important;
  border-bottom: 8px solid #f0c300;
}

.kpm-map__list {
  width: 100%;
  height: auto;
  overflow: visible;
  max-height: none;
  border: 0;
  background: rgba(255, 255, 255, 0.96);
  color: var(--kpm-light-text);
  padding: 10px 0;
  -webkit-overflow-scrolling: touch;
}

.kpm-map__list::-webkit-scrollbar {
  width: 16px;
}

.kpm-map__list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.06);
}

.kpm-map__list::-webkit-scrollbar-thumb {
  background: var(--kpm-accent);
  border: 3px solid rgba(0, 0, 0, 0.06);
}

.kpm-map__loading,
.kpm-map__empty,
.kpm-map__error {
  padding: 16px;
}

.kpm-map__card {
  display: grid;
  grid-template-columns: var(--kpm-thumb) 1fr;
  gap: 16px;
  align-items: start;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  margin: 0;
  cursor: default;
  background: transparent;
  position: relative;
}

.kpm-map__card:hover {
  background: rgba(0, 0, 0, 0.03);
}

.kpm-map__card:last-child {
  border-bottom: 0;
}

.kpm-map__thumb {
  width: var(--kpm-thumb);
  height: var(--kpm-thumb);
  object-fit: cover;
  display: block;
}

.kpm-map__thumbLink {
  display: block;
  line-height: 0;
}

.kpm-map__cardBody {
  min-width: 0;
}

.kpm-map__cardTitle {
  margin: 0 0 6px;
  font-weight: 900;
  line-height: 1.2;
  font-size: 22px;
  color: var(--kpm-light-title) !important;
}

.kpm-map__kontakt {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.78);
}

.kpm-map__kontakt a {
  color: #b49a61;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.kpm-map__kontakt a:hover {
  color: var(--kpm-hover);
}

.kpm-map__location {
  margin: 0 0 8px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.72);
}

.kpm-map__route {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.35;
}

.kpm-map__routeLink {
  color: #b49a61;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.kpm-map__routeLink:hover {
  color: var(--kpm-hover);
}

.kpm-map__open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 15px;
  border: 1px solid var(--kpm-accent);
  background: var(--kpm-accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  position: absolute;
  right: 18px;
  bottom: 12px;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.kpm-map__open:hover {
  background: var(--kpm-hover);
  border-color: var(--kpm-hover);
  color: #1a171b;
}

.kpm-map__card:hover .kpm-map__open,
.kpm-map__card:focus-within .kpm-map__open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.kpm-map__right {
  min-width: 0;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.kpm-map__switcher {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 500;
  display: inline-flex;
  gap: 8px;
}

.kpm-map__switchBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.96);
  color: var(--kpm-light-text);
  cursor: pointer;
  font-weight: 800;
}

.kpm-map__switchIcon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.kpm-map__switchIcon svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}

.kpm-map__switchBtn:hover {
  background: #f0c300;
  border-color: #f0c300;
  color: #1a171b;
}

.kpm-map__switchBtn.is-active {
  background: var(--kpm-accent);
  border-color: var(--kpm-accent);
  color: #fff;
}

.kpm-map__switchBtn.is-active:hover {
  background: #f0c300;
  border-color: #f0c300;
  color: #1a171b;
}

.kpm-map__canvas {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  overflow: hidden;
  position: relative;
}

.leaflet-tooltip.kpm-map__tooltip {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  color: inherit;
}

.leaflet-tooltip.kpm-map__tooltip::before {
  border-top-color: rgba(255, 255, 255, 0.98);
}

.kpm-map__tooltipCard {
  width: 210px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.14);
  overflow: hidden;
}

.kpm-map__tooltipImg {
  width: 210px;
  height: 110px;
  object-fit: cover;
  display: block;
}

.kpm-map__tooltipImg--placeholder {
  background: rgba(0, 0, 0, 0.08);
}

.kpm-map__tooltipTitle {
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 800;
  color: #1a171b;
}

.kpm-map.is-view-grid .kpm-map__layout,
.kpm-map.is-view-map .kpm-map__layout {
  grid-template-columns: 1fr;
}

.kpm-map.is-view-grid .kpm-map__left {
  padding-top: 82px;
}

.kpm-map.is-view-grid .kpm-map__layout {
  height: auto;
}

.kpm-map.is-view-grid .kpm-map__right {
  position: absolute;
  top: 0;
  right: 0;
  width: auto;
  height: auto;
  min-width: 0;
  overflow: visible;
  pointer-events: none;
}

.kpm-map.is-view-grid .kpm-map__switcher {
  pointer-events: auto;
}

.kpm-map.is-view-grid .kpm-map__canvas {
  display: none;
}

.kpm-map.is-view-grid .kpm-map__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding: 8px 0;
  align-content: start;
}

.kpm-map.is-view-grid .kpm-map__card {
  display: flex;
  flex-direction: column;
  border: 0;
  background: rgba(255, 255, 255, 0.98);
  overflow: hidden;
  min-height: 100%;
  padding: 0;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(26, 23, 27, 0.10);
  transition: box-shadow 0.16s ease, transform 0.16s ease;
}

.kpm-map.is-view-grid .kpm-map__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(26, 23, 27, 0.16);
}

.kpm-map.is-view-grid .kpm-map__thumb {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 0;
}

.kpm-map.is-view-grid .kpm-map__thumbLink {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  line-height: 0;
}

.kpm-map.is-view-grid .kpm-map__cardBody {
  padding: 14px 14px 16px;
}

.kpm-map.is-view-grid .kpm-map__cardTitle {
  margin: 0 0 8px;
  font-size: 22px;
}

.kpm-map.is-view-grid .kpm-map__kontakt {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.72);
}

.kpm-map.is-view-map .kpm-map__left {
  display: none;
}

.kpm-single-map {
  width: 100%;
  --kpm-single-map-height: calc(72vh - 100px);
}

.kpm-single-map__canvas {
  width: 100%;
  height: var(--kpm-single-map-height);
  min-height: 420px;
  border: 0;
  overflow: hidden;
  position: relative;
}

.kpm-single-map__list {
  margin-top: 12px;
}

.kpm-single-map__routeDl {
  display: inline-flex;
  align-items: center;
  color: #b49a61;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  font-weight: 700;
  font-size: 14px;
}

.kpm-single-map__routeDl:hover {
  color: var(--kpm-hover);
}

.leaflet-tooltip.kpm-single-map__pinLabel {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  color: #fff;
}

.leaflet-tooltip.kpm-single-map__pinLabel::before {
  display: none;
}

.kpm-single-map__pinLabelText {
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.leaflet-tooltip.kpm-map__pinLabel {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  color: #fff;
}

.leaflet-tooltip.kpm-map__pinLabel::before {
  display: none;
}

.kpm-map__pinLabelText {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

@media (max-width: 991px) {
  .kpm-map {
    padding-bottom: 24px;
  }

  .kpm-map__layout {
    grid-template-columns: 1fr;
    gap: 16px;
    height: auto;
  }

  .kpm-map__left {
    padding: 0;
  }

  .kpm-map__title {
    margin-bottom: 10px;
    border-bottom-width: 6px;
  }

  .kpm-map__list {
    height: auto;
    max-height: none;
  }

  .kpm-map__card {
    grid-template-columns: 96px 1fr;
    gap: 12px;
    padding: 12px 14px;
  }

  .kpm-map__thumb {
    width: 96px;
    height: 96px;
  }

  .kpm-map__canvas {
    min-height: 56vh;
  }

  .kpm-map__switcher {
    top: 10px;
    right: 10px;
  }

  .kpm-map__switchBtn {
    padding: 7px 10px;
    min-height: 34px;
  }

  .kpm-map__open {
    right: 14px;
    bottom: 10px;
  }

  .kpm-map.is-view-grid .kpm-map__left {
    padding-top: 68px;
  }

  .kpm-map.is-view-grid .kpm-map__list {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 8px;
  }

  .kpm-map.is-view-grid .kpm-map__thumb {
    height: 100% !important;
  }

  .kpm-single-map__canvas {
    min-height: 56vh;
  }
}
