.legacy-education-map {
  max-width: var(--legacy-education-map-max-w, 900px);
  width: 100%;
  position: relative;
  aspect-ratio: var(--legacy-education-map-ar, 3/4);
  font: 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0 auto;
}

.legacy-education-map__stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.legacy-education-map__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

/* Marker + pin */
.legacy-education-map__marker {
  position: absolute;
  transform: translate(-50%, -100%);
  z-index: 2;
}

/* hover/focus color swap */
.legacy-education-map__marker:hover .legacy-education-map__pin,
.legacy-education-map__marker:focus-within .legacy-education-map__pin {
  color: var(--le-pin-hover-color, var(--le-pin-color, #cc2b2b));
}

.legacy-education-map__marker button {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  outline: none;
}

.legacy-education-map__pin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  position: relative;

  /* Default colors; per-marker overrides via CSS vars set inline */
  color: var(--le-pin-color, #cc2b2b);
  background: currentColor;

  /* pulse shadow color set via --le-pin-shadow (JS computes from hex) */
  box-shadow: 0 0 0 0 rgba(0,0,0,.0);
  transition: color .18s ease;
}

/* small stem */
.legacy-education-map__pin::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 2px;
  height: 6px;
  background: currentColor;
  transform: translateX(-50%);
  opacity: .85;
}

/* Themes */
.legacy-education-map[data-pin-style="pulse"] .legacy-education-map__pin {
  animation: le-pulse 1.8s infinite;
}
@keyframes le-pulse {
  0%   { box-shadow: 0 0 0 0 var(--le-pin-shadow, rgba(204,43,43,.5)); }
  70%  { box-shadow: 0 0 0 10px rgba(0,0,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
}

.legacy-education-map[data-pin-style="drop"] .legacy-education-map__pin {
  animation: le-drop .6s ease-out both;
}
@keyframes le-drop {
  0%   { transform: translateY(-12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Popup */
.legacy-education-map__popup {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  background: #ffffff;
  color: #222222;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.18);
  min-width: min(360px, 92vw);
  max-width: min(360px, 92vw);
  z-index: 5;
  padding: 33px 14px 14px;
  display: none;
}

.legacy-education-map__popup[data-state="visible"] { display: block; }

.legacy-education-map__popup-close {
  position: absolute;
  right: 6px;
  top: 4px;
  background: transparent;
  border: #282c3d 1px solid;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 3px 3px 3px;
  color: #282c3d;
}
.legacy-education-map__popup-close:hover {
  background: #282c3d !important;
  color: #ffffff !important;
}

.legacy-education-map__popup-content h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: #282c3d !important;
}
.legacy-education-map__popup-content p {
  margin: 0 0 8px;
  color: #777777 !important;
}
.legacy-education-map__popup-content a {
  color: #34c6f2 !important;
  text-decoration: underline;
}