/* =====================================================
   MAP PAGE – "אנחנו על המפה"
   ===================================================== */

/* ---------- Opening ---------- */
.mv-hero { position: relative; overflow: hidden; padding: calc(var(--header-h) + 64 * var(--s)) 0 calc(50 * var(--s)); background: linear-gradient(180deg, var(--bg) 0%, #dfe6f3 100%); }
.mv-hero-grid { position: relative; z-index: 1; display: block; }
.mv-title { margin-top: calc(24 * var(--s)); font-weight: 400; font-size: max(calc(104 * var(--s)), 42px); line-height: .8; letter-spacing: -.035em; }
.mv-title .line { display: block; overflow: hidden; padding-block: .1em .06em; margin-block: -.1em -.06em; }
.mv-title .line > span { display: inline-block; transform: translateY(110%); animation: lineUp 1.1s var(--ease) forwards; }
.mv-title .line:nth-child(2) > span { animation-delay: .12s; }
.mv-lead { margin-top: calc(30 * var(--s)); font-size: max(calc(22 * var(--s)), 16px); line-height: 1.3; color: #3b4150; max-width: calc(900 * var(--s)); }
.mv-lines { position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(31,46,184,.06) 0 1px, transparent 1px calc(80 * var(--s))),
    repeating-linear-gradient(0deg, rgba(31,46,184,.06) 0 1px, transparent 1px calc(80 * var(--s)));
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 60%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 80% at 30% 60%, #000 20%, transparent 75%); }

/* ---------- Map app ---------- */
.mv { padding-top: calc(40 * var(--s)); }
.mv-app { position: relative; height: min(78vh, 780px); min-height: 520px; border-radius: 12px; overflow: hidden; background: #e3e8f2; box-shadow: 0 40px 80px -50px rgba(14,20,90,.5); }
.mv-map { position: absolute; inset: 0; z-index: 1; }
.mv-map .leaflet-tile-pane { filter: grayscale(1) contrast(.85) brightness(1.12) sepia(.35) hue-rotate(180deg) saturate(1.6); }
.mv-map .leaflet-control-attribution { font-size: 10px; direction: ltr; background: rgba(255,255,255,.75); }
.mv-map .leaflet-bar { border: 0; box-shadow: 0 8px 20px -10px rgba(14,20,90,.4); }
.mv-map .leaflet-bar a { color: var(--blue); border-color: #e3e8f2; }

/* side panel */
.mv-panel {
  position: absolute; z-index: 5; top: 16px; right: 16px; bottom: 16px; width: 360px;
  display: flex; flex-direction: column; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-radius: 10px; box-shadow: 0 24px 50px -28px rgba(14,20,90,.5); overflow: hidden;
}
.mv-search { position: relative; display: flex; align-items: center; margin: 16px 16px 0; }
.mv-search svg { position: absolute; right: 16px; width: 18px; height: 18px; fill: none; stroke: var(--blue); stroke-width: 1.8; pointer-events: none; }
.mv-search input { width: 100%; height: 50px; padding: 0 46px 0 16px; border: 1px solid #c9d1e1; border-radius: 6px; background: #fff; font: inherit; font-size: 16px; color: var(--ink); transition: border-color .25s, box-shadow .25s; }
.mv-search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,46,184,.14); }
.mv-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 14px; }
.mv-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px 0 12px; border-radius: 999px; border: 1px solid #c9d1e1; background: #fff; font-size: 13px; transition: border-color .25s, color .25s, background .25s; }
.mv-chip .n { font-size: 11px; color: #8a92a6; }
.mv-chip:hover { border-color: var(--blue); }
.mv-chip.on { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); color: var(--blue); }
.mv-chip[data-cat="all"].on { background: var(--blue); color: #fff; }
.mv-chip[data-cat="all"].on .n { color: rgba(255,255,255,.75); }
.mv-chip .tico { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; }
.mv-chip .tico svg { width: 11px; height: 11px; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tico[data-cat="private"], .tbadge[data-cat="private"] { background: var(--lime); }
.tico[data-cat="private"] svg, .tbadge[data-cat="private"] svg { stroke: var(--ink); }
.tico[data-cat="inst"], .tbadge[data-cat="inst"] { background: var(--violet); }
.tico[data-cat="public"], .tbadge[data-cat="public"] { background: var(--blue); }
.tico[data-cat="inst"] svg, .tbadge[data-cat="inst"] svg, .tico[data-cat="public"] svg, .tbadge[data-cat="public"] svg { stroke: #fff; }

.mv-list { flex: 1; overflow: auto; padding: 4px 8px 12px; scrollbar-width: thin; }
.mv-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 8px; text-align: right; transition: background .2s; }
.mv-item:hover, .mv-item.hl { background: var(--bg); }
.mv-item.on { background: #e4e8fb; }
.mv-item .tbadge { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.mv-item .tbadge svg { width: 17px; height: 17px; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mv-item b { display: block; font-weight: 400; font-size: 15px; line-height: 1.1; }
.mv-item small { display: block; margin-top: 3px; font-size: 12px; color: #8a92a6; }
.mv-item .thumb { margin-inline-start: auto; flex: none; width: 44px; height: 34px; border-radius: 5px; object-fit: cover; }
.mv-empty { padding: 20px 16px; color: #5d6475; font-size: 14px; }
.mv-empty[hidden] { display: none; }

/* floating tools (bottom-left of the map) */
.mv-tools { position: absolute; z-index: 5; left: 16px; bottom: 16px; display: flex; gap: 8px; }
.mv-tool { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 14px; border-radius: 999px; background: #fff; font-size: 14px; color: var(--ink); box-shadow: 0 10px 24px -14px rgba(14,20,90,.5); transition: background .25s, color .25s, transform .3s var(--ease); }
.mv-tool svg { width: 15px; height: 15px; fill: var(--blue); stroke: var(--blue); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: fill .25s, stroke .25s; }
#mvReset svg { fill: none; }
.mv-tool:hover { transform: translateY(-2px); }
.mv-tool[aria-pressed="true"] { background: var(--blue); color: #fff; }
.mv-tool[aria-pressed="true"] svg { fill: #fff; stroke: #fff; }
.mv-tool .i-stop, .mv-tool[aria-pressed="true"] .i-play { display: none; }
.mv-tool[aria-pressed="true"] .i-stop { display: block; }
.mv-tool-icon { width: 42px; padding: 0; justify-content: center; }

/* tour caption */
.mv-tourcap { position: absolute; z-index: 6; left: 50%; top: 18px; translate: -50% 0; display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 14px; box-shadow: 0 14px 30px -16px rgba(14,20,90,.6); animation: capIn .45s var(--ease); }
.mv-tourcap[hidden] { display: none; }
.mv-tourcap b { font-weight: 400; }
.mv-tourstep { font-size: 12px; color: var(--lime); letter-spacing: .06em; }
@keyframes capIn { from { opacity: 0; transform: translateY(-8px); } }

/* pins */
.mv-pin { background: none; border: 0; }
.mv-pin svg { width: 100%; height: 100%; overflow: visible; display: block; filter: drop-shadow(0 2px 3px rgba(25,25,60,.3)); transform-origin: 50% 100%; transition: transform .3s var(--ease); animation: pinDrop .7s cubic-bezier(.3,1.6,.5,1) var(--pd, 0s) both; }
.mv-pin.hl svg, .mv-pin:hover svg { transform: scale(1.45) translateY(-2px); }
.mv-pin.dim { opacity: .25; }
.mv-heat { pointer-events: none; }

.mv-note { margin-top: 14px; font-size: 14px; color: #5d6475; }
.mv-note a { color: var(--blue); }

.page-map .talk { padding-top: calc(260 * var(--s)); }

@media (max-width: 900px) {
  .mv-hero-grid { grid-template-columns: 1fr; }
  .mv-app { height: auto; min-height: 0; display: flex; flex-direction: column; overflow: visible; background: none; box-shadow: none; }
  .mv-map { position: relative; height: 62vh; border-radius: 12px; overflow: hidden; }
  .mv-panel { position: static; width: 100%; margin-top: 12px; max-height: 420px; }
  .mv-tools { left: 10px; bottom: auto; top: calc(62vh - 54px); }
  .mv-tool span { display: none; }
  .mv-tool { width: 42px; padding: 0; justify-content: center; }
  .page-map .talk { padding-top: 90px; }
}
