/* Mapa wydarzeń na stronie głównej (hero). */
.hero { display: grid; grid-template-columns: minmax(360px, 440px) 1fr; height: calc(100vh - var(--pasek) - 56px); height: calc(100dvh - var(--pasek) - 56px); min-height: 560px; max-height: 860px; background: var(--ziemia); }
.hero-panel { display: flex; flex-direction: column; min-height: 0; background: var(--papier); border-right: 1px solid var(--kreska); }
.hero-head { padding: 32px 28px 20px; }
.hero h1 { font-size: clamp(32px, 3.4vw, 46px); font-weight: 900; line-height: 1.08; letter-spacing: -0.025em; margin: 0; }
.hero h1 span { display: block; }
.hero-intro { margin: 14px 0 0; color: var(--granat-2); font-size: 18px; line-height: 1.5; }
.hero-list-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 28px 10px; border-top: 1px solid var(--kreska); }
.hero-list-h h2 { font-size: 20px; font-weight: 800; line-height: 1.2; margin: 0; }
.hero-list-h a { white-space: nowrap; }
.ev-more { display: none; margin: 0; padding: 4px 20px 28px; background: var(--papier); }
.ev-more a { display: inline-flex; align-items: center; min-height: 48px; font: 800 17px/1 var(--f-ui); color: var(--woda); text-decoration: underline; text-underline-offset: 3px; }
.hero-list-h a { font: 700 16px/1 var(--f-ui); display: inline-flex; align-items: center; min-height: 44px; color: var(--woda); text-decoration: underline; text-underline-offset: 3px; }
.ev-empty a, .leaflet-control-attribution a, .leaflet-popup-content a { color: var(--woda); text-decoration: underline; }
.leaflet-control-zoom a { text-decoration: none !important; }
.ev-list { list-style: none; margin: 0; padding: 0 12px 16px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.ev { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; padding: 12px 16px; border-radius: 12px; }
.ev + .ev { margin-top: 2px; }
.ev:hover, .ev.on { background: var(--ziemia); }
.ev.on { box-shadow: inset 4px 0 0 var(--zolty); }
.ev-date { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 64px; border-radius: 10px; background: var(--granat); color: #fff; font-family: var(--f-ui); line-height: 1; }
.ev-date b { font-size: 26px; font-weight: 900; }
.ev-date small { margin-top: 4px; font-size: 16px; font-weight: 600; color: var(--zolty); }
.ev-title { font: 800 18px/1.25 var(--f-ui); color: var(--granat); text-decoration: none; }
.ev-title::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.ev:hover .ev-title { text-decoration: underline; }
.ev-title:focus-visible { outline: none; box-shadow: none; }
.ev:focus-within { outline: 3px solid var(--zolty); outline-offset: -3px; box-shadow: inset 0 0 0 6px var(--granat); }
.ev-meta { margin-top: 4px; font: 400 16px/1.4 var(--f-ui); color: var(--szary); }
.ev-meta .nomap { color: var(--szary); font-style: italic; }
.ev-empty { padding: 16px; font: 400 17px/1.5 var(--f-ui); color: var(--granat-2); }

.hero-map { position: relative; min-height: 0; isolation: isolate; } /* warstwy mapy (z-index Leaflet do 1000) zostają pod paskiem i menu */
/* Znak pod mapą: niżej jest dalsza część strony. */
.hero-next { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 600; display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 20px 0 16px; border-radius: 999px; background: var(--granat); color: #fff; font: 800 17px/1 var(--f-ui); text-decoration: none;
  box-shadow: 0 6px 18px rgba(17,24,39,.28); white-space: nowrap; }
.hero-next:hover { background: #000; color: #fff; }
.hero-next svg { width: 22px; height: 22px; flex: none; color: var(--zolty); }
@media (prefers-reduced-motion: no-preference) {
  .hero-next svg { animation: hero-next 1.6s ease-in-out 1.2s 3; }
  @keyframes hero-next { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
}
#mapa { position: absolute; inset: 0; background: var(--ziemia); }
.leaflet-tile-pane { filter: grayscale(1) contrast(.82) brightness(1.1); }
.leaflet-container { font-family: var(--f-ui); }
.leaflet-control-zoom a { width: 44px !important; height: 44px !important; line-height: 44px !important; font-size: 22px !important; color: var(--granat) !important; }
.leaflet-control-attribution { font-size: 14px; }
.map-legend { position: absolute; right: 16px; top: 16px; margin: 0; z-index: 500; background: rgba(255,255,255,.94); border-radius: 10px; padding: 10px 14px; font: 600 16px/1.3 var(--f-ui); color: var(--granat-2); pointer-events: none; }
.map-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--zolty); border: 3px solid var(--granat); vertical-align: -2px; margin-right: 8px; }

/* Punkt na mapie: żółte koło z liczbą wydarzeń. */
.pin { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; background: var(--zolty); color: var(--granat);
  border: 3px solid var(--granat); font: 900 16px/1 var(--f-ui); box-shadow: 0 2px 6px rgba(17,24,39,.3); }
.pin.on { background: var(--granat); color: var(--zolty); }
.pin-label { font: 800 16px/1 var(--f-ui); color: var(--granat); background: none; border: 0; box-shadow: none; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 6px #fff; white-space: nowrap; }
.pin-label::before { display: none; }
.leaflet-popup-content-wrapper { border-radius: 12px; }
.leaflet-popup-content { margin: 14px 18px; font: 400 16px/1.4 var(--f-ui); }
.pop h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.pop ul { margin: 0; padding: 0; list-style: none; }
.pop li + li { margin-top: 6px; }
.pop a { font-weight: 700; }

@media (max-width: 1023px) {
  .hero { display: block; height: auto; max-height: none; min-height: 0; }
  .hero-panel { display: contents; }
  .hero-head { padding: 24px 20px 16px; background: var(--papier); }
  .hero-map { height: 30vh; height: 30svh; min-height: 220px; }
  .hero-list-h { padding: 18px 20px 8px; background: var(--papier); }
  .ev-list { padding: 0 6px 24px; background: var(--papier); overflow: visible; }
  .map-legend { display: none; }
  .hero-next { display: none; }
  .ev-list .ev:nth-child(n+7) { display: none; }
  .ev-more { display: block; order: 5; }
}
@media (max-width: 1023px) {
  /* Kolejność na telefonie: nagłówek, mapa, lista. */
  .hero { display: flex; flex-direction: column; }
  .hero-head { order: 1; } .hero-map { order: 2; } .hero-list-h { order: 3; } .ev-list { order: 4; }
}
