.map-toggle {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease;
}

.map-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 36, 29, 0.3);
}

.map-toggle:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 107, 87, 0.14);
}

.map-toggle-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.map-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background:
    radial-gradient(900px 450px at 100% -10%, rgba(208, 131, 47, 0.16), transparent 60%),
    radial-gradient(700px 340px at -10% 110%, rgba(15, 107, 87, 0.14), transparent 65%),
    linear-gradient(145deg, #f7f3e8, #ece4d3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 220ms ease, visibility 220ms ease, transform 220ms ease;
}

.map-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.map-head {
  min-height: 70px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
}

.map-title {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.12rem;
  letter-spacing: 0.2px;
}

.map-subtitle {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.map-close {
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.map-close svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
}

.map-shell {
  min-height: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
}

#tiberiaMap {
  width: 100%;
  height: 100%;
  min-height: 440px;
  border: 1px solid rgba(31, 36, 29, 0.16);
  border-radius: 18px;
  overflow: hidden;
  background: #dce8dd;
  box-shadow: 0 16px 34px rgba(32, 37, 30, 0.12);
}

.map-panel {
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(31, 36, 29, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  padding: 12px;
}

.map-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.map-filter {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  min-height: 34px;
  padding: 6px 10px;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
}

.map-filter.active {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}

.map-place-list {
  display: grid;
  gap: 8px;
}

.map-place {
  border: 1px solid rgba(31, 36, 29, 0.12);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.map-place:hover {
  border-color: rgba(15, 107, 87, 0.36);
}

.map-place-image {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(31, 36, 29, 0.12);
  background: #eef2ec;
}

.map-place-copy {
  min-width: 0;
}

.map-place strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.92rem;
}

.map-place span {
  display: block;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.35;
}

.tiberia-map-marker {
  border: 0;
}

.tiberia-map-marker span {
  width: 30px;
  height: 30px;
  border: 2px solid #fff;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
  box-shadow: 0 8px 18px rgba(31, 36, 29, 0.25);
}

.tiberia-map-marker span[data-category='sight'],
.map-category-sight { background: #0f6b57; }

.tiberia-map-marker span[data-category='beach'],
.map-category-beach { background: #0b73a8; }

.tiberia-map-marker span[data-category='parking'],
.map-category-parking { background: #3f5f7a; }

.tiberia-map-marker span[data-category='walk'],
.map-category-walk { background: #9b5a1a; }

.tiberia-map-marker span[data-category='warning'],
.map-category-warning { background: #9f2b2b; }

.tiberia-map-marker span[data-category='ticket'],
.map-category-ticket { background: #176c8f; }

.tiberia-map-marker span[data-category='nave'],
.map-category-nave { background: #5746a6; }

.tiberia-map-marker span[data-category='bus'],
.map-category-bus { background: #2f7d91; }

.tiberia-map-marker span[data-category='town'],
.map-category-town { background: #d0832f; }

.tiberia-map-marker span[data-category='church'],
.map-category-church { background: #6b4f9f; }

.tiberia-map-marker span[data-category='pharmacy'],
.map-category-pharmacy { background: #17805c; }

.tiberia-map-marker span[data-category='shopping'],
.map-category-shopping { background: #8a3f68; }

.tiberia-map-marker span[data-category='arte'],
.map-category-arte { background: #7b5f24; }

.tiberia-map-marker span[data-category='service'],
.map-category-service { background: #577244; }

.map-popup {
  max-width: 230px;
}

.map-popup-image {
  display: block;
  width: 100%;
  height: 112px;
  margin-bottom: 9px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(31, 36, 29, 0.12);
  background: #eef2ec;
}

.map-popup strong {
  display: block;
  margin-bottom: 5px;
  color: #1f241d;
}

.map-popup p {
  margin: 0 0 10px;
  color: #4f5748;
  line-height: 1.35;
}

.map-popup button {
  width: 100%;
  border: 0;
  border-radius: 10px;
  min-height: 36px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.map-locate {
  border: 0;
  border-radius: 10px;
  min-height: 36px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(31, 36, 29, 0.18);
}

@media (max-width: 820px) {
  .map-toggle-label {
    display: none;
  }

  .map-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    padding: 10px;
  }

  #tiberiaMap {
    min-height: 0;
  }

  .map-panel {
    max-height: 34svh;
  }
}
