/* Trang chủ – bản đồ hệ thống cơ sở */
.hmap{position:relative;height:640px;background:#eef0f2;overflow:hidden;isolation:isolate}
.hmap__map{position:absolute;inset:0;z-index:0}
.hmap__panel{position:absolute;z-index:500;top:32px;left:max(20px,calc((100% - var(--w))/2));width:360px;max-height:calc(100% - 64px);display:flex;flex-direction:column;background:#fff;border-radius:var(--r);box-shadow:var(--sh-2);overflow:hidden;transition:max-height .3s}
.hmap__toggle{position:absolute;top:10px;right:10px;z-index:2;font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);padding:6px 10px;border-radius:999px;background:var(--bg-2)}
.hmap__toggle:hover{color:var(--pri)}
.hmap__head{padding:22px 24px 16px;text-align:center;border-bottom:1px solid var(--line)}
.hmap__head h2{font-family:var(--f-disp);font-size:28px;margin:0 0 6px}
.hmap__head p{margin:0;font-size:14px;color:var(--muted)}
.hmap__groups{overflow:auto}
.hmap__gbtn{display:flex;width:100%;align-items:center;justify-content:space-between;padding:16px 24px;font-weight:700;font-size:15px;letter-spacing:.03em;text-transform:uppercase;color:var(--ink);border-bottom:1px solid var(--line);background:#fff}
.hmap__gbtn small{font-weight:500;color:var(--muted)}
.hmap__gbtn svg{transition:transform .2s;color:var(--pri)}
.hmap__group.is-open .hmap__gbtn{background:var(--pri-bg)}
.hmap__group.is-open .hmap__gbtn svg{transform:rotate(180deg)}
.hmap__list{list-style:none;margin:0;padding:0;display:none;background:var(--pri-bg);border-bottom:1px solid var(--line)}
.hmap__group.is-open .hmap__list{display:block}
.hmap__list button{display:block;width:100%;text-align:left;padding:12px 24px 12px 32px;border-left:3px solid transparent}
.hmap__list button strong{display:block;color:var(--ink);font-weight:600;font-size:15px}
.hmap__list button span{display:block;font-size:13px;color:var(--muted);line-height:1.45}
.hmap__list button:hover strong,.hmap__list button.is-on strong{color:var(--pri)}
.hmap__list button.is-on{border-left-color:var(--pri);background:#fff}
.hmap__panel.is-collapsed .hmap__head,.hmap__panel.is-collapsed .hmap__groups{display:none}
.hmap__panel.is-collapsed{width:auto;min-width:140px;height:48px}
.hmap__panel.is-collapsed .hmap__toggle{position:static;margin:9px 10px}

/* marker */
.hmap__pin{background:none;border:0}
.hmap__pin svg{display:block;filter:drop-shadow(0 4px 6px rgba(0,0,0,.35));transition:transform .15s;transform-origin:50% 100%}
.hmap__pin svg>path:first-child{fill:var(--ink);stroke:#fff;stroke-width:1}
.hmap__pin:hover svg,.hmap__pin.is-active svg{transform:scale(1.18)}
.hmap__pin.is-active svg>path:first-child{fill:var(--pri)}

/* thẻ thông tin */
.hmap__popup .leaflet-popup-content-wrapper{padding:0;border-radius:var(--r);overflow:hidden}
.hmap__popup .leaflet-popup-content{margin:0;width:260px!important;font-family:var(--f-body)}
.hmap__card img{width:100%;height:140px;object-fit:cover}
.hmap__card-b{padding:12px 14px 14px}
.hmap__card-b strong{display:block;font-size:15px;color:var(--ink);margin-bottom:2px}
.hmap__card-b span{display:block;font-size:13px;color:var(--muted);line-height:1.45}
.hmap__card-b p{display:flex;gap:14px;margin:10px 0 0!important;font-size:13px;font-weight:600}
.hmap__card-b a,.hmap .leaflet-popup-content a{color:var(--pri)!important}
.hmap__card-b a:hover{text-decoration:underline}
.hmap .leaflet-container{font-family:var(--f-body);background:#f2f1ee}
/* nền OSM tông xám nhạt để marker nổi bật (giống mẫu) */
.hmap__tiles{filter:grayscale(1) brightness(1.06) contrast(.9)}
.hmap .leaflet-control-zoom a{color:var(--ink)}

@media (max-width:767px){
  .hmap{height:auto;display:flex;flex-direction:column-reverse}
  .hmap__map{position:relative;height:420px}
  .hmap__panel{position:relative;top:auto;left:auto;width:auto;max-height:none;border-radius:0;box-shadow:none;border-bottom:1px solid var(--line)}
  .hmap__toggle{display:none}
  .hmap__head{padding:24px 20px 14px}
  .hmap__gbtn,.hmap__list button{padding-left:20px;padding-right:20px}
}
