/* Karta 360° šetnji: oznake, kartica na prelazak mišem, šetnja preko cijelog ekrana (uz landing.css) */

/* Podloga karte malo smirena da se slaže s bojama stranice; oznake ostaju žive */
.smap { position: relative; background: #E9EEF3; font-family: var(--sans); z-index: 0; }
.smap .leaflet-tile-pane { filter: saturate(.55) contrast(.96) brightness(1.03); }
.smap .leaflet-control-zoom { border: 0; box-shadow: 0 8px 24px -10px rgba(13,27,42,.35); border-radius: 12px; overflow: hidden; }
.smap .leaflet-control-zoom a { width: 38px; height: 38px; line-height: 36px; color: var(--ink); font-size: 20px; border-color: var(--line); }
.smap .leaflet-control-attribution { font-size: 11px; background: rgba(255,255,255,.75); }

/* Oznaka: narančasta točka s bijelim prstenom; na prelazak se poveća */
.mp { background: none; border: 0; }
.mp i { position: absolute; inset: 6px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 4px 12px rgba(13,27,42,.35); transition: transform .18s ease; }
.mp i::after { content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s; }
.mp:hover i, .mp:focus i { transform: scale(1.25); }
.mp:hover i::after, .mp:focus i::after { opacity: .5; transform: scale(1); }
.mp:focus { outline: none; }

/* Kartica točke (tooltip na računalu, popup na dodir) */
.mc-tip.leaflet-tooltip, .mc-pop .leaflet-popup-content-wrapper { padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 18px 40px -14px rgba(13,27,42,.45); }
.mc-tip.leaflet-tooltip::before { border-top-color: #fff; }
.mc-tip.mc-float { position: fixed; z-index: 15; margin: 0; pointer-events: none; font: 12px/1.5 var(--sans); } /* iznad sekcija, ispod glavnog izbornika */
.mc-pop .leaflet-popup-content { margin: 0; width: 260px !important; }
.mc-pop .leaflet-popup-tip { box-shadow: none; }
.mc { width: 260px; font: 14px/1.4 var(--sans); color: var(--ink); white-space: normal; }
.mc-img { position: relative; height: 132px; background: #0c0f14 center / cover no-repeat; }
.mc-360 { position: absolute; left: 10px; top: 10px; padding: 3px 8px; border-radius: 999px; background: rgba(13,27,42,.72); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.mc-body { display: grid; gap: 3px; padding: 12px 14px 14px; }
.mc-cat { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-dk); }
.mc-t { font-size: 16px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.mc-by { color: var(--muted); font-size: 13px; }
.mc-hint { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.mc-go { margin-top: 10px; height: 40px; border: 0; border-radius: 999px; background: var(--brand); color: var(--ink); font: 600 14px var(--sans); cursor: pointer; }

/* Šetnja preko cijelog ekrana */
.mv-open, .mv-open body { overflow: hidden; }
.mv { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: #0B121B; opacity: 0; transition: opacity .2s ease; }
.mv[hidden] { display: none; } /* inače nevidljiv sloj ostaje preko stranice i hvata klikove */
.mv.on { opacity: 1; }
.mv-bar { display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 20px; color: #fff; }
.mv-t { flex: 1; min-width: 0; display: grid; }
.mv-t b { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-t span { font-size: 13px; color: rgba(255,255,255,.65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-t span a { color: #fff; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(255,255,255,.4); text-underline-offset: 3px; }
.mv-t span a:hover { text-decoration-color: var(--brand); }
.mv-acts { display: flex; gap: 8px; align-items: center; }
.mv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; min-width: 42px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font: 600 14px var(--sans); cursor: pointer; text-decoration: none; }
.mv-btn:hover { background: rgba(255,255,255,.2); }
.mv-btn svg { width: 18px; height: 18px; flex: none; }
.mv-new, .mv-icon { padding: 0; }
[data-rotate].mv-icon { background: var(--brand); color: var(--ink); } /* okretanje zaključano: narančasto i prekriženo */
[data-rotate].mv-icon.on { background: rgba(255,255,255,.12); color: #fff; }
[data-rotate].mv-icon.on:hover { background: rgba(255,255,255,.2); }
[data-rotate] .rot-x { display: none; }
[data-rotate]:not(.on) .rot-x { display: inline; }
[data-rotate].on svg { animation: mvrot 3.5s linear infinite; }
@keyframes mvrot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { [data-rotate].on svg { animation: none; } }
.mv-sep { width: 1px; height: 24px; margin: 0 4px; background: rgba(255,255,255,.18); }
.mv-menu button.on { font-weight: 700; background: var(--ground); }
.mv-x { padding: 0; background: #fff; color: var(--ink); }
.mv-x:hover { background: var(--brand); }
.mv-share { position: relative; }
.mv-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 2; display: grid; min-width: 180px; padding: 6px; border-radius: 12px; background: #fff; box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); }
.mv-menu[hidden] { display: none; }
.mv-menu a, .mv-menu button { display: block; padding: 10px 12px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: 500 14px var(--sans); text-align: left; text-decoration: none; cursor: pointer; }
.mv-menu a:hover, .mv-menu button:hover { background: var(--ground); }
.mv-frame { position: relative; flex: 1; margin: 0 12px 12px; border-radius: 16px; overflow: hidden; background: #0c0f14; }
.mv-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mv-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 10px); padding: 10px 16px; border-radius: 999px; background: #fff; color: var(--ink); font: 600 14px var(--sans); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.mv-toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 640px) {
  .mv-bar { padding: 8px 8px 8px 14px; gap: 8px; }
  .mv-btn span { display: none; }
  .mv-new, .mv-sep { display: none; } /* na mobitelu manje gumba: nova kartica je ionako „Podijeli“ */
  .mv-btn { padding: 0; width: 40px; height: 40px; min-width: 40px; }
  .mv-frame { margin: 0; border-radius: 0; }
}

/* Stranica /mapa */
.map-page { display: flex; flex-direction: column; height: calc(100vh - 73px); height: calc(100dvh - 73px); }
.map-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 18px 28px; border-bottom: 1px solid var(--line); background: #fff; }
.map-head h1 { margin: 0; font-size: 26px; line-height: 1.2; letter-spacing: -.02em; }
.map-head p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.map-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.map-chips button { height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font: 500 14px var(--sans); cursor: pointer; }
.map-chips button:hover { border-color: var(--ink); }
.map-chips button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.map-chips small { margin-left: 4px; opacity: .6; }
.map-page .smap { flex: 1; }
.map-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 500; max-width: 360px; padding: 22px 24px; border-radius: 16px; background: #fff; box-shadow: 0 18px 40px -14px rgba(13,27,42,.4); text-align: center; }
.map-empty b { display: block; font-size: 17px; margin-bottom: 6px; }
.map-empty p { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
@media (max-width: 560px) { .map-page { height: calc(100vh - 65px); height: calc(100dvh - 65px); } }
@media (max-width: 640px) {
  .map-head { padding: 14px 20px; gap: 10px; }
  .map-head h1 { font-size: 21px; }
  .map-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 0 20px; width: calc(100% + 40px); scrollbar-width: none; }
  .map-chips button { flex: none; }
}

/* Odjeljak na naslovnici: karta preko cijele širine, spojena s odjeljcima iznad i ispod; tekst u kartici lijevo */
.map-sec { position: relative; z-index: 0; isolation: isolate; height: 640px; background: #E3E8EE; overflow: hidden; } /* kartica i karta ostaju ispod glavnog izbornika */
.map-sec .smap { position: absolute; inset: 0; background: #E3E8EE; }
.map-sec .smap .leaflet-tile-pane { filter: grayscale(.9) contrast(.9) brightness(1.07); } /* smirena siva podloga, narančaste točke se ističu */
.map-sec .smap .leaflet-control-zoom { margin: 0 24px 24px 0; }
.map-sec .leaflet-top.leaflet-left { top: auto; bottom: 0; left: auto; right: 0; } /* zum dolje desno, ne ispod kartice */
.map-sec-in { position: relative; height: 100%; pointer-events: none; }
.map-sec-card { position: absolute; left: 28px; top: 50%; transform: translateY(-50%); z-index: 800; width: 400px; padding: 34px 34px 32px; border-radius: 22px; background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 30px 70px -30px rgba(13,27,42,.45); pointer-events: auto; }
.map-sec-card h2 { margin: 0 0 12px; }
.map-sec-lead { margin: 0 0 22px; color: var(--ink-2); font-size: 16.5px; }
.map-sec-stat { display: flex; align-items: baseline; gap: 10px; padding: 16px 0; margin-bottom: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.map-sec-stat b { font-size: 34px; line-height: 1; letter-spacing: -.03em; }
.map-sec-stat span { color: var(--muted); font-size: 15px; }
.map-sec-cats { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.map-sec-cats li { padding: 5px 11px; border-radius: 999px; background: var(--ground); color: var(--ink-2); font-size: 13px; }
.map-sec-cats li::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--brand); vertical-align: 1px; }
@media (max-width: 760px) {
  /* Mobitel: tekst iznad, karta ispod, i dalje od ruba do ruba */
  .map-sec { height: auto; overflow: visible; background: #fff; display: flex; flex-direction: column; }
  .map-sec-in { order: -1; height: auto; pointer-events: auto; }
  .map-sec-card { position: static; transform: none; width: auto; padding: 56px 0 28px; border-radius: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .map-sec .smap { position: relative; inset: auto; height: 440px; }
}

/* Profil autora: mreža javnih šetnji */
.au-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.au-card { display: grid; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; text-align: left; font: inherit; color: var(--ink); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.au-card:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -20px rgba(13,27,42,.4); }
.au-img { position: relative; height: 170px; background: #0c0f14 center / cover no-repeat; }
.au-body { display: grid; gap: 4px; padding: 14px 16px 16px; }
.au-body b { font-size: 17px; line-height: 1.3; }

/* Stranica /mapa: popis mjesta u kadru — proziran sloj uz desni rub karte, može se sakriti */
.map-body { position: relative; flex: 1; min-height: 0; display: flex; overflow: hidden; }
.map-body .smap { flex: 1; min-width: 0; }
.mlist { position: absolute; right: 0; top: 0; bottom: 0; z-index: 500; width: 340px; display: flex; flex-direction: column;
  background: rgba(255,255,255,.62); -webkit-backdrop-filter: blur(6px) saturate(1.2); backdrop-filter: blur(6px) saturate(1.2);
  border-left: 1px solid rgba(255,255,255,.7); box-shadow: -18px 0 40px -28px rgba(13,27,42,.45); transition: transform .25s ease; }
.list-closed .mlist { transform: translateX(100%); }
.map-body:not(.list-closed) .smap .leaflet-bottom.leaflet-right { right: 340px; } /* oznaka OpenStreetMapa ne ide ispod popisa */
.mlist-tab { position: absolute; left: -34px; top: 50%; transform: translateY(-50%); width: 34px; height: 64px; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 1px solid rgba(13,27,42,.12); border-right: 0; border-radius: 12px 0 0 12px; background: rgba(242,244,247,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #5E6B7A; box-shadow: -6px 0 16px -10px rgba(13,27,42,.35); }
.mlist-tab:hover { background: #E6EAF0; color: var(--ink); }
.mlist-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mlist-tab svg { width: 18px; height: 18px; transition: transform .25s ease; }
.list-closed .mlist-tab svg { transform: rotate(180deg); }
.mlist-head { display: flex; align-items: baseline; gap: 6px; padding: 16px 18px 12px; border-bottom: 1px solid rgba(13,27,42,.1); font-size: 14px; color: var(--muted); }
.mlist-head b { color: var(--ink); font-size: 15px; }
.mlist-items { flex: 1; overflow-y: auto; padding: 8px; overscroll-behavior: contain; }
.mli { display: flex; gap: 12px; align-items: center; width: 100%; padding: 8px; border: 0; border-radius: 12px; background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.mli:hover, .mli:focus-visible { background: rgba(255,255,255,.75); outline: none; }
.mli-img { flex: none; width: 92px; height: 62px; border-radius: 9px; background: #0c0f14 center / cover no-repeat; }
.mli-t { min-width: 0; display: grid; gap: 2px; }
.mli-t small { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-dk); }
.mli-t b { font-size: 15px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mli-t em { font-style: normal; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mlist-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; display: grid; gap: 12px; justify-items: center; }
.mlist-empty button { height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: 500 14px var(--sans); cursor: pointer; }
.mlist-empty button:hover { border-color: var(--ink); }
.mp.hl i { transform: scale(1.35); }
.mp.hl i::after { opacity: .55; transform: scale(1); }
@media (max-width: 760px) {
  .mlist { width: min(86vw, 340px); background: rgba(255,255,255,.8); }
  .map-body:not(.list-closed) .smap .leaflet-bottom.leaflet-right { right: 0; }
  .mli-img { width: 76px; height: 52px; }
}

/* Cijeli zaslon gdje ga preglednik ne dopušta (iPhone): šetnja preko cijelog prozora, plutajući gumbi */
.mv.mv-max .mv-bar { position: absolute; top: 0; right: 0; z-index: 3; padding: calc(10px + env(safe-area-inset-top)) 10px 10px; background: none; pointer-events: none; }
.mv.mv-max .mv-bar > * { pointer-events: auto; }
.mv.mv-max .mv-t, .mv.mv-max .mv-acts > :not([data-fs]):not(.mv-x) { display: none; }
.mv.mv-max .mv-btn { background: rgba(13,27,42,.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.mv.mv-max .mv-x { background: #fff; }
.mv.mv-max .mv-frame { margin: 0; border-radius: 0; }
