.ehmu-wrap{--ehmu-red:#e53935;--ehmu-blue:#1976d2;margin:24px 0 40px;position:relative;z-index:0;isolation:isolate}
.ehmu-head{display:flex;justify-content:space-between;gap:18px;align-items:end;margin-bottom:14px}
.ehmu-head h2{font-size:clamp(28px,3vw,42px);line-height:1.1;margin:0 0 8px;color:#2474a6;font-weight:800}
.ehmu-head p{margin:0;color:#5f6573;max-width:760px}
.ehmu-map{border-radius:26px;overflow:hidden;border:1px solid #e9edf4;box-shadow:0 18px 48px rgba(16,24,40,.12);position:relative;z-index:0;isolation:isolate}
.ehmu-map::before{content:'';position:absolute;left:0;top:0;right:0;height:4px;background:linear-gradient(90deg,var(--ehmu-red),var(--ehmu-blue));z-index:500}
.ehmu-legend{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0 0}
.ehmu-legend-item{display:inline-flex;align-items:center;gap:8px;background:#fff;border:1px solid #eceff4;border-radius:999px;padding:10px 14px;font-size:14px;color:#24324a;box-shadow:0 6px 18px rgba(15,23,42,.05)}
.ehmu-legend-item i{width:12px;height:12px;border-radius:50%;display:inline-block}
.ehmu-list-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;margin-top:22px}
.ehmu-card{background:#fff;border:1px solid #edf1f6;border-radius:24px;overflow:hidden;box-shadow:0 16px 40px rgba(16,24,40,.08);display:flex;flex-direction:column}
.ehmu-card-img{aspect-ratio:16/10;overflow:hidden}.ehmu-card-img img{width:100%;height:100%;object-fit:cover;display:block}
.ehmu-card-body{padding:18px 18px 20px}.ehmu-card h3{margin:0 0 8px;font-size:24px;line-height:1.2;color:#111827}.ehmu-card p{margin:0 0 10px;color:#5f6573}.ehmu-address{font-weight:600;color:#1f2937}
.ehmu-pill{display:inline-flex;align-items:center;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:700;margin-bottom:10px}
.ehmu-btn,.ehmu-popup-btn{display:inline-flex;align-items:center;justify-content:center;background:linear-gradient(90deg,var(--ehmu-red),#ff4e45);color:#fff!important;text-decoration:none;border-radius:12px;padding:12px 18px;font-weight:700;box-shadow:0 10px 24px rgba(229,57,53,.24)}
.ehmu-btn:hover,.ehmu-popup-btn:hover{filter:brightness(.98);transform:translateY(-1px)}
.ehmu-popup{min-width:240px;max-width:300px}.ehmu-popup-image{border-radius:14px;overflow:hidden;margin-bottom:10px}.ehmu-popup-image img{width:100%;display:block}.ehmu-popup-subtitle{display:inline-flex;border-radius:999px;background:#eef6ff;color:#1457b8;padding:5px 9px;font-size:12px;font-weight:700;margin-bottom:8px}.ehmu-popup h3{margin:0 0 6px;font-size:20px;line-height:1.2;color:#10213a}.ehmu-popup p{margin:0 0 8px;color:#5f6573;font-size:14px}.ehmu-popup-address{font-size:13px;color:#344054;margin-bottom:8px;font-weight:600}.ehmu-popup-services{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 14px}.ehmu-popup-services span{font-size:12px;background:#fff4f2;color:#c02b25;border-radius:999px;padding:4px 8px;border:1px solid #ffd7d2}
.ehmu-pin-wrap{background:transparent;border:none}.ehmu-pin{display:block;width:26px;height:26px;border-radius:50% 50% 50% 0;background:var(--pin,#e53935);transform:rotate(-45deg);position:relative;box-shadow:0 8px 24px rgba(0,0,0,.25)}.ehmu-pin::before{content:'';position:absolute;left:6px;top:6px;width:14px;height:14px;border-radius:50%;background:#fff}
.leaflet-popup-content-wrapper{border-radius:20px;box-shadow:0 20px 40px rgba(15,23,42,.18)}
@media (max-width: 1024px){.ehmu-list-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width: 767px){.ehmu-head h2{font-size:30px}.ehmu-list-grid{grid-template-columns:1fr}.ehmu-card h3{font-size:22px}.ehmu-map{border-radius:20px}}

/* Zablokowana mapa nie przechwytuje przewijania strony na ekranie dotykowym. */
.ehmu-map.ehmu-map-locked { touch-action: pan-y; }
.ehmu-map.ehmu-map-locked .leaflet-container { touch-action: pan-y; }
.ehmu-map.ehmu-map-locked .leaflet-marker-icon { cursor: pointer; }

/* v1.6 – zwężony kadr mapy 5:4: większe przycięcie boków przy
   zachowaniu pionowego zakresu Zielona Góra – Sulechów – Nowa Sól.
   Wszystkie sekcje pozostają wyśrodkowane. */
.ehmu-wrap .ehmu-head,
.ehmu-wrap .ehmu-map,
.ehmu-wrap .ehmu-legend,
.ehmu-wrap .ehmu-list-grid {
  box-sizing: border-box;
  max-width: var(--ehmu-map-width, 650px);
  margin-left: auto;
  margin-right: auto;
}
/* Ustawione w PHP max-height nadal obowiązuje, więc format nie rozciąga
   mapy do pełnej szerokości motywu Plumer / Elementora. */
.ehmu-wrap .ehmu-map { width:100%; height:auto; aspect-ratio:5/4; min-height:420px; }
@media (max-width:767px) {
  .ehmu-wrap .ehmu-map { aspect-ratio:4/5; min-height:420px; }
}
/* Stałe etykiety miejscowości nie przechwytują dotyku ani myszki. */
.ehmu-map .ehmu-city-tooltip {
  pointer-events:none;
  border:1px solid #d5e3f6;
  border-radius:8px;
  background:rgba(255,255,255,.96);
  box-shadow:0 5px 18px rgba(22,40,80,.12);
  color:#153a68;
  font-weight:800;
  font-size:12px;
  padding:4px 8px;
}

/* v1.6.1 – osobne konteksty warstwowania ograniczają wysokie z-index
   elementów Leaflet do mapy; nie nadpisujemy stylów menu Plumer. */

/* v1.6.4 — poprawione napisy miejscowości: pineski muszą pozostać
   w pełni widoczne i klikalne. Etykiety są przesunięte dalej od markerów,
   mają niższą warstwę niż pineski i można regulować ich wielkość w ustawieniach. */
.ehmu-map .ehmu-city-label-icon,
.ehmu-map .ehmu-city-label-icon * {
  pointer-events: none !important;
}
.ehmu-map .ehmu-city-label-icon {
  background: transparent;
  border: 0;
}
.ehmu-map .ehmu-city-name {
  position: absolute;
  display: inline-block;
  width: max-content;
  max-width: min(80vw, 260px);
  white-space: nowrap;
  box-sizing: border-box;
  font-family: inherit;
  font-size: var(--ehmu-city-label-size, 24px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: #176b9e;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(26,103,164,.27);
  border-radius: 9px;
  padding: 4px 8px 5px;
  box-shadow: 0 3px 10px rgba(18,51,80,.21);
  text-shadow: 0 1px 0 #fff;
}
.ehmu-map .ehmu-city-main { color: #155f93; font-weight: 900; }

/* Bazowe pozycje względem środka pineski. */
.ehmu-map .ehmu-city-up { transform: translate(-50%, calc(-100% - 46px)); }
.ehmu-map .ehmu-city-up-left { transform: translate(calc(-100% - 12px), calc(-100% - 26px)); }
.ehmu-map .ehmu-city-up-right { transform: translate(12px, calc(-100% - 26px)); }
.ehmu-map .ehmu-city-right { transform: translate(18px, calc(-50% - 4px)); }
.ehmu-map .ehmu-city-down-right { transform: translate(12px, 14px); }

/* Indywidualne korekty dla zagęszczonych miejscowości. */
.ehmu-map .ehmu-city-nowa-sol { transform: translate(16px, calc(-100% - 8px)); }
.ehmu-map .ehmu-city-otyn { transform: translate(36px, calc(-100% - 34px)); }
.ehmu-map .ehmu-city-niedoradz { transform: translate(calc(-100% - 18px), calc(-100% - 18px)); }
.ehmu-map .ehmu-city-kozuchow { transform: translate(-50%, calc(-100% - 24px)); }

@media (max-width: 767px) {
  .ehmu-map .ehmu-city-name {
    font-size: clamp(16px, calc(var(--ehmu-city-label-size, 24px) * .80), 22px);
    padding: 3px 5px 4px;
    border-radius: 7px;
    max-width: 78vw;
  }
  .ehmu-map .ehmu-city-up { transform: translate(-50%, calc(-100% - 40px)); }
  .ehmu-map .ehmu-city-up-left { transform: translate(calc(-100% - 10px), calc(-100% - 20px)); }
  .ehmu-map .ehmu-city-up-right { transform: translate(10px, calc(-100% - 20px)); }
  .ehmu-map .ehmu-city-right { transform: translate(14px, calc(-50% - 4px)); }
  .ehmu-map .ehmu-city-down-right { transform: translate(10px, 12px); }
  .ehmu-map .ehmu-city-nowa-sol { transform: translate(12px, calc(-100% - 6px)); }
  .ehmu-map .ehmu-city-otyn { transform: translate(26px, calc(-100% - 28px)); }
  .ehmu-map .ehmu-city-niedoradz { transform: translate(calc(-100% - 12px), calc(-100% - 15px)); }
  .ehmu-map .ehmu-city-kozuchow { transform: translate(-50%, calc(-100% - 20px)); }
}
