/* Mapa ofert na stronie głównej, pełna szerokość pod hero.
   Markup: includes/home_map.php, interakcje i efekty przewijania: assets/js/home-map.js.
   Hero i kremowa część strony dostają zmiany tylko przy klasie .home-landing--map (index.php). */

.home-map, .home-map *, .home-map *::before, .home-map *::after { box-sizing:border-box; }

/* ---------- Kolorystyka (HOME_MAP_THEME w includes/home_map.php) ---------- */
.home-map--karaiby {
  --map-sea: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1.3px) 0 0/16px 16px,
             radial-gradient(55% 60% at 40% 50%, rgba(122,146,164,.28) 0%, rgba(122,146,164,0) 100%),
             linear-gradient(180deg, #132538 0%, #1a2e43 22%, #25394e 48%, #344a5e 72%, #536a7b 90%, #7d909c 100%);
  --map-label: rgba(255,255,255,.7); --map-haiti: #5a5f62; --map-line: #e6c47f;
  --map-title: #fff; --map-eyebrow: #e6c47f; --map-title-shadow: 0 6px 24px rgba(4,20,35,.45); --map-sea-top: 19,37,56;
}
.home-map--granat {
  --map-sea: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1.3px) 0 0/16px 16px,
             radial-gradient(55% 60% at 40% 50%, rgba(52,96,150,.5) 0%, rgba(52,96,150,0) 100%),
             linear-gradient(180deg, #060e1b 0%, #0b1d38 25%, #12305a 55%, #1d4677 80%, #4f74a0 94%, #8fa9c4 100%);
  --map-label: rgba(230,196,127,.9); --map-haiti: rgba(255,255,255,.85); --map-line: #e6c47f;
  --map-title: #fff; --map-eyebrow: #e6c47f; --map-title-shadow: 0 6px 24px rgba(0,0,0,.4); --map-sea-top: 6,14,27;
}
.home-map--jasny {
  --map-sea: radial-gradient(rgba(16,35,63,.07) 1px, transparent 1.3px) 0 0/14px 14px,
             radial-gradient(120% 90% at 30% 15%, #f4f7f7, #e3eaed 70%, #d9e3e8);
  --map-label: #5d6b7b; --map-haiti: #77726a; --map-line: #10233f;
  --map-title: #131b2c; --map-eyebrow: #a9762b; --map-title-shadow: none; --map-sea-top: 244,247,247;
}

/* ---------- Hero -> mapa -> kremowa część (tylko z klasą .home-landing--map) ---------- */
/* Hero stoi w miejscu (sticky), mapa nachodzi na jego dół o 240px, a kremowa część nachodzi na mapę. */
.home-landing--map .home-hero { position:sticky; top:0; z-index:0; min-height:calc(100vh + 300px); }
.home-landing--map .home-hero-image { transform-origin:50% 70%; transform:scale(calc(1.04 + var(--hero-p, 0) * .18)); }
.home-landing--map .home-hero-scrim {
  background:
    linear-gradient(180deg, rgba(6,14,27,.78) 0%, rgba(6,14,27,.5) 30%, rgba(6,14,27,.52) calc(100% - 440px), rgba(12,26,40,.74) calc(100% - 230px), rgba(17,34,52,.92) 100%),
    radial-gradient(130% 90% at 12% calc(100% - 240px), rgba(10,24,45,.6), transparent 62%);
}
.home-landing--map .home-hero::after {
  content:""; position:absolute; inset:0; z-index:1; pointer-events:none; background:#132538;
  opacity:clamp(0, calc(var(--hero-p, 0) * 1.2 - .3), .72);
}
.home-landing--map .home-hero-inner {
  padding-bottom:calc(clamp(56px, 8vh, 104px) + 240px);
  transform:translateY(calc(var(--hero-p, 0) * -120px));
}
/* Przygaszanie na dzieciach, nie na całym bloku: przezroczystość rodzica wyłącza rozmycie tła
   (backdrop-filter) boksów ze statystykami, przez co migały przy przewijaniu. */
.home-landing--map .home-hero-inner > :not(.home-hero-stats),
.home-landing--map .home-hero-stat { opacity:clamp(0, calc(1.1 - var(--hero-p, 0) * 4.4), 1); }
.home-landing--map .home-hero-scrollcue { bottom:262px; opacity:clamp(0, calc(1 - var(--hero-p, 0) * 5), 1); }
.home-landing--map .home-map { margin-top:-240px; }
.home-landing--map .home-flow {
  z-index:2; margin-top:-40px; border-radius:40px 40px 0 0; box-shadow:0 -30px 80px rgba(4,15,30,.45);
}

/* ---------- Pas mapy ---------- */
.home-map { position:relative; z-index:1; overflow:hidden; font-family:"Montserrat", ui-sans-serif, system-ui, sans-serif; }
.home-map-band {
  position:relative; height:max(680px, calc(100vh + 40px)); overflow:hidden;
  container-type:size; container-name:home-map-band;
  user-select:none; -webkit-user-select:none; -webkit-touch-callout:none;
}
.home-map-sea {
  position:absolute; inset:0; pointer-events:none; background:var(--map-sea);
  -webkit-mask-image:linear-gradient(180deg, transparent 0, rgba(0,0,0,.3) 80px, rgba(0,0,0,.78) 165px, #000 240px);
  mask-image:linear-gradient(180deg, transparent 0, rgba(0,0,0,.3) 80px, rgba(0,0,0,.78) 165px, #000 240px);
}
.home-map-shimmer {
  position:absolute; inset:0; mix-blend-mode:screen; background-size:170% 170%;
  background-image:radial-gradient(38% 30% at 30% 40%, rgba(205,218,228,.1), transparent 70%), radial-gradient(34% 26% at 72% 66%, rgba(205,218,228,.08), transparent 70%);
  animation:homeMapShimmer 16s ease-in-out infinite alternate;
}

.home-map-title { position:absolute; left:48px; top:104px; z-index:7; max-width:540px; pointer-events:none; transition:opacity .3s ease; }
/* Przybliżona mapa wychodzi pod tytuł, więc na komputerze tytuł wtedy znika (wraca po oddaleniu). */
@media (min-width: 900px) {
  .home-map.is-zoomed .home-map-title { opacity:0; }
}
/* Komputer: pierwsza część tytułu w jednej linii, wyróżnik w drugiej, w każdym języku.
   Tytuł w trzech liniach nachodziłby na mapę, dlatego dłuższe wersje (angielska, turecka, ukraińska) mają mniejszą czcionkę. */
@media (min-width: 900px) {
  .home-map-title { max-width:min(720px, calc(100% - 520px)); }
  .home-map-title em { display:block; }
  .home-map-title:not(:lang(pl)) h2 { font-size:clamp(1.4rem, 2.15vw, 2rem); }
}
.home-map-eyebrow {
  margin:0 0 10px; color:var(--map-eyebrow); font-family:"Cinzel", Georgia, serif; font-size:11.5px; font-weight:600;
  letter-spacing:.26em; text-transform:uppercase; transition:opacity .9s ease, letter-spacing 1.2s cubic-bezier(.2,.8,.2,1);
}
.home-map-title h2 {
  margin:0; color:var(--map-title); font-family:"Montserrat", ui-sans-serif, system-ui, sans-serif; font-weight:800;
  font-size:clamp(1.6rem, 2.6vw, 2.4rem); line-height:1.1; letter-spacing:-.02em; text-shadow:var(--map-title-shadow);
}
.home-map-title em { font-family:"Cinzel", Georgia, serif; font-style:italic; font-weight:500; color:var(--map-eyebrow); }
/* Zapas wewnątrz ramki słowa, żeby kursywa i polskie znaki nie były przycinane. */
.home-map-wordbox { display:inline-block; vertical-align:top; padding:.16em .2em .14em .06em; margin:-.16em -.2em -.14em -.06em; }
/* Ramka przycina słowo tylko na czas wjazdu. Potem przycięcie znika, żeby cień tekstu nie był ucięty w prostokąt. */
.home-map[data-in="0"] .home-map-wordbox { clip-path:inset(0); }
.home-map[data-in="1"] .home-map-wordbox { clip-path:inset(-80px); transition:clip-path 0s linear 1.5s; }
.home-map-word { display:inline-block; transition:transform .9s cubic-bezier(.2,.8,.2,1), opacity .9s ease; }

/* Ramka samej wyspy (pinezki liczone w % tej ramki). Obraz bazowy jest dużo większy, żeby Haiti i wyspy nie były ucięte. */
.home-map-canvas {
  /* Na niskich ekranach (laptop) mapa ma co najmniej 420px wysokości, żeby nie robiła się malutka. */
  --map-h:min(max(calc(100cqh - 380px), 420px), calc((100cqw - 500px) / 1.387));
  /* Góra mapy nie wyżej niż 215px od góry pasa, żeby tytuł sekcji nie nachodził na mapę i napis oceanu. */
  position:absolute; top:max(calc(50% + 34px), calc(215px + var(--map-h) / 2)); left:calc((100% - 430px) / 2);
  height:var(--map-h); aspect-ratio:1000/721;
  transform:translate(-50%, -50%); container-type:inline-size; container-name:home-map;
}
.home-map-3d {
  position:absolute; inset:0; transform-origin:50% 62%; will-change:transform;
  transform:perspective(1600px) translateY(calc((1 - var(--enter, 1)) * 90px)) rotateX(calc((1 - var(--enter, 1)) * 26deg)) scale(calc(.8 + var(--enter, 1) * .2));
}
.home-map-viewport { position:absolute; inset:0; transform-origin:0 0; transition:transform .35s ease; touch-action:pan-y; }
.home-map.is-zoomed .home-map-viewport { cursor:grab; touch-action:none; }
.home-map.is-dragging .home-map-viewport { cursor:grabbing; transition:none; }
.home-map.is-dragging .home-map-group, .home-map.is-dragging .home-map-airport { transition:none; }
.home-map-group, .home-map-airport { transition:left .35s ease, top .35s ease; }
.home-map-base {
  position:absolute; left:-100%; top:-194.17%; display:block; width:370%; height:457.7%; max-width:none;
  pointer-events:none; user-select:none; -webkit-user-drag:none;
}
.home-map-overlay {
  position:absolute; inset:0; display:block; width:100%; height:100%; overflow:visible;
  user-select:none; -webkit-user-select:none; font-family:"Montserrat", ui-sans-serif, system-ui, sans-serif;
}
.home-map-overlay .home-map-sea-label { fill:var(--map-label); }
.home-map-overlay .home-map-haiti-label { fill:var(--map-haiti); }
.home-map.hide-roads .home-map-roads,
.home-map.hide-airports .home-map-airports,
.home-map.hide-airports .home-map-airport { display:none; }

/* ---------- Pinezki ---------- */
.home-map-pins { position:absolute; inset:0; pointer-events:none; }
.home-map-group { position:absolute; width:0; height:0; z-index:2; }
.home-map-group.is-hot { z-index:5; }
.home-map-group.is-active { z-index:6; }

.home-map-dot {
  position:absolute; left:-16px; top:-16px; display:grid; place-items:center;
  width:32px; height:32px; padding:0; background:transparent; border:0; cursor:pointer; pointer-events:auto;
}
.home-map-dot > span {
  display:block; width:14px; height:14px; background:#10233f; border:2.5px solid #fff; border-radius:50%;
  box-shadow:0 0 0 1.5px #10233f, 0 4px 10px rgba(16,35,63,.3); transition:background .2s ease, box-shadow .2s ease;
}
.home-map-group.is-active .home-map-dot > span { background:#c79a45; box-shadow:0 0 0 1.5px #c79a45, 0 4px 10px rgba(16,35,63,.3); }
.home-map-dot:focus-visible { outline:2px solid #c79a45; outline-offset:2px; border-radius:50%; }
.home-map-dot b { display:none; color:#fff; font-size:12px; font-weight:800; line-height:1; }

.home-map-stem { position:absolute; background:#10233f; pointer-events:none; }
.home-map-chip {
  position:absolute; display:inline-flex; align-items:stretch; overflow:hidden; padding:0; white-space:nowrap;
  background:#fff; border:1px solid #e3dccd; border-radius:999px; box-shadow:0 10px 24px rgba(16,35,63,.18);
  font-family:"Montserrat", ui-sans-serif, system-ui, sans-serif; line-height:1; cursor:pointer; pointer-events:auto;
  transition:transform .2s ease, background .25s ease, border-color .25s ease;
}
.home-map-chip-name { display:flex; align-items:center; padding:8px 10px 8px 13px; color:#10233f; font-size:13px; font-weight:700; transition:color .25s ease; }
.home-map-chip-count { display:flex; align-items:center; padding:8px 12px 8px 10px; color:#241703; background:linear-gradient(150deg,#ecd096,#d2a856); font-size:12px; font-weight:800; }
.home-map-group.is-active .home-map-chip { background:#10233f; border-color:#10233f; }
.home-map-group.is-active .home-map-chip-name { color:#fff; }

.is-side-top .home-map-chip { left:0; bottom:16px; transform:translateX(-50%); transform-origin:50% 100%; }
.is-side-top .home-map-stem { left:-1px; bottom:5px; width:2px; height:12px; }
.is-side-bottom .home-map-chip { left:0; top:16px; transform:translateX(-50%); transform-origin:50% 0; }
.is-side-bottom .home-map-stem { left:-1px; top:5px; width:2px; height:12px; }
.is-side-left .home-map-chip { right:16px; top:0; transform:translateY(-50%); transform-origin:100% 50%; }
.is-side-left .home-map-stem { right:5px; top:-1px; width:12px; height:2px; }
.is-side-left-low .home-map-chip { right:16px; top:-9px; transform-origin:100% 0; }
.is-side-left-low .home-map-stem { right:5px; top:-1px; width:12px; height:2px; }
.is-side-right .home-map-chip { left:16px; top:0; transform:translateY(-50%); transform-origin:0 50%; }
.is-side-right .home-map-stem { left:5px; top:-1px; width:12px; height:2px; }
.is-side-left-low.is-hot:not(.is-active) .home-map-chip { transform:scale(1.05); }
.is-side-top.is-hot:not(.is-active) .home-map-chip,
.is-side-bottom.is-hot:not(.is-active) .home-map-chip { transform:translateX(-50%) scale(1.05); }
.is-side-left.is-hot:not(.is-active) .home-map-chip,
.is-side-right.is-hot:not(.is-active) .home-map-chip { transform:translateY(-50%) scale(1.05); }

/* Gdy wybrana jest jedna lokalizacja, pozostałe znikają z mapy (wracają po "Lokalizacje", Esc lub kliknięciu w tło). */
.home-map[data-active] .home-map-group:not(.is-active) { display:none; }

/* Lotniska: klikalne pola nad ikonami z warstwy SVG */
.home-map-airport {
  position:absolute; z-index:1; width:30px; height:30px; margin:-15px 0 0 -15px; padding:0;
  background:transparent; border:2.5px solid transparent; border-radius:50%; cursor:pointer; pointer-events:auto;
  transition:border-color .2s ease, background .2s ease, left .35s ease, top .35s ease;
}
.home-map-airport:hover, .home-map-airport:focus-visible, .home-map-airport[aria-pressed="true"] { border-color:#c79a45; background:rgba(199,154,69,.15); outline:none; }

/* Rozsunięte oferty (szybko i bez sprężynowania) */
.home-map-fan { display:none; }
.home-map-group.is-active .home-map-fan,
.home-map-group.is-closing .home-map-fan { display:block; }
.home-map-group.is-closing .home-map-pulse { display:none; }
.home-map-line {
  position:absolute; left:0; top:0; width:var(--r); height:1.5px; margin-top:-.75px;
  background:var(--map-line); opacity:.55; transform-origin:0 50%; rotate:var(--a);
  animation:homeMapLine .22s ease both; animation-delay:var(--d, 0ms);
}
.home-map-pulse {
  position:absolute; left:-9px; top:-9px; width:18px; height:18px; border:2px solid #c79a45; border-radius:50%;
  animation:homeMapPulse 1.8s ease-out infinite;
}
.home-map-tag {
  position:absolute; left:0; top:0; translate:var(--dx) var(--dy);
  display:inline-flex; align-items:center; min-height:28px; padding:0 11px; white-space:nowrap;
  color:#10233f; background:#fff; border:1.5px solid #10233f; border-radius:999px;
  box-shadow:0 8px 18px rgba(16,35,63,.2); font-size:12px; font-weight:800; line-height:1; text-decoration:none;
  pointer-events:auto; transition:background .2s ease, color .2s ease;
  animation:homeMapFan .3s cubic-bezier(.2,.8,.2,1) both; animation-delay:var(--d, 0ms);
}
.home-map-tag.is-right { transform:translate(0,-50%); transform-origin:0 50%; }
.home-map-tag.is-left { transform:translate(-100%,-50%); transform-origin:100% 50%; }
.home-map-tag.is-center { transform:translate(-50%,-50%); }
.home-map-tag:hover, .home-map-tag.is-hot { color:#fff; background:#10233f; }
/* "+N więcej": pozostałe oferty lokalizacji (komplet jest w panelu i na liście ofert). */
.home-map-tag--more { color:#241703; background:linear-gradient(150deg,#ecd096,#d2a856); border-color:#c79a45; }
.home-map-tag--more:hover, .home-map-tag--more.is-hot { color:#fff; background:#10233f; border-color:#10233f; }
.home-map-group.is-closing .home-map-tag { animation:homeMapFanOut .18s ease-in both; animation-delay:var(--o, 0ms); }
.home-map-group.is-closing .home-map-line { animation:homeMapLineOut .16s ease both; animation-delay:var(--o, 0ms); }
.home-map.is-reopening .home-map-group:not(.is-closing) { animation:homeMapPinIn .2s ease-out both; animation-delay:var(--gi, 40ms); }

/* ---------- Powiększenie, podpowiedź ---------- */
.home-map-zoom {
  position:absolute; top:104px; right:428px; z-index:8; display:flex; flex-direction:column; overflow:hidden;
  background:#fff; border:1px solid #e3dccd; border-radius:14px; box-shadow:0 8px 20px rgba(16,35,63,.12);
}
.home-map-zoom button {
  display:grid; place-items:center; width:40px; height:40px; padding:0; color:#10233f; background:#fff; border:0;
  font:600 20px/1 "Montserrat", ui-sans-serif, system-ui, sans-serif; cursor:pointer;
}
.home-map-zoom button + button { border-top:1px solid #ece3cf; }
.home-map-zoom button:hover:not(:disabled) { background:#f6f1e7; }
.home-map-zoom button:disabled { color:#b7b0a3; cursor:default; }

.home-map-hint {
  position:absolute; right:428px; bottom:max(64px, calc(100cqh - 100vh + 24px)); z-index:8;
  padding:7px 12px; color:#10233f; background:rgba(255,255,255,.92); border:1px solid #e3dccd; border-radius:999px;
  box-shadow:0 6px 16px rgba(16,35,63,.1); font-size:12px; font-weight:600;
  pointer-events:none; opacity:0; transform:translateY(6px); transition:opacity .25s ease, transform .25s ease;
}
.home-map.is-zoomed .home-map-hint { opacity:1; transform:none; }

/* ---------- Legenda (ciemne szkło na morzu, lewy dolny róg) ---------- */
.home-map-legend {
  position:absolute; left:24px; bottom:max(64px, calc(100cqh - 100vh + 24px)); z-index:8; max-width:min(364px, calc(100% - 476px));
  display:flex; flex-direction:column; gap:10px; padding:12px 14px; color:#fff;
  background:rgba(18,32,48,.66); border:1px solid rgba(255,255,255,.16); border-radius:20px;
  -webkit-backdrop-filter:blur(16px) saturate(140%); backdrop-filter:blur(16px) saturate(140%);
  box-shadow:0 18px 44px rgba(3,16,30,.35);
}
.home-map-legend-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 22px; }
.home-map-legend-list {
  display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; margin:0; padding:0 0 0 2px; list-style:none;
  color:rgba(255,255,255,.92); font-size:12.5px; font-weight:600; line-height:1.2;
}
.home-map-legend-list li { display:flex; align-items:center; gap:9px; }
.home-map-legend-loc { display:inline-flex; align-items:center; gap:6px; }
.home-map-legend-loc i { width:11px; height:11px; background:#10233f; border:2px solid #fff; border-radius:50%; }
/* Miniatury tych samych znaków, które są na mapie: kropka z etykietą (komputer) albo kropka z liczbą (telefon), cena, lotnisko, droga. */
.home-map-legend-chip { display:inline-flex; align-items:stretch; overflow:hidden; background:#fff; border-radius:999px; font-size:10.5px; line-height:1; white-space:nowrap; }
.home-map-legend-chip span { display:flex; align-items:center; padding:5px 6px 5px 9px; color:#10233f; font-weight:700; }
.home-map-legend-chip b { display:flex; align-items:center; padding:5px 8px 5px 6px; color:#241703; background:linear-gradient(150deg,#ecd096,#d2a856); font-weight:800; }
/* Podpis "Liczba ofert" tylko na telefonie: na komputerze mówi to sama etykieta. */
.home-map-legend-count-label { display:none; }
.home-map-legend-count {
  display:none; place-items:center; width:24px; height:24px; color:#fff; background:#10233f; border:2.5px solid #fff; border-radius:50%;
  box-shadow:0 0 0 1.5px #10233f; font-size:11px; font-weight:800; line-height:1;
}
.home-map-legend-tag {
  display:grid; place-items:center; min-width:118px; height:24px; padding:0 9px; color:#10233f; background:#fff; border:1.5px solid #10233f; border-radius:999px;
  font-size:11px; font-weight:800; white-space:nowrap; transition:background .2s ease, border-color .2s ease;
}
/* Po najechaniu na lokalizację etykieta pokazuje jej ceny od (np. "od 90 tys. USD"). */
.home-map-legend-tag.is-info { background:linear-gradient(150deg,#ecd096,#d2a856); border-color:#c79a45; color:#241703; }
.home-map-legend-airport { flex:0 0 auto; width:20px; height:20px; overflow:visible; }
.home-map-layers { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.home-map-layers button {
  display:inline-flex; align-items:center; gap:9px; min-height:36px; padding:0 14px 0 8px;
  color:rgba(255,255,255,.72); background:transparent; border:1px solid rgba(255,255,255,.16); border-radius:999px;
  font:700 12.5px/1 "Montserrat", ui-sans-serif, system-ui, sans-serif; cursor:pointer;
  transition:background .2s ease, border-color .2s ease, color .2s ease;
}
.home-map-layers button[aria-pressed="true"] { color:#fff; background:rgba(255,255,255,.12); border-color:rgba(255,255,255,.26); }
.home-map-layers button:focus-visible { outline:2px solid #e6c47f; outline-offset:2px; }
.home-map-switch { position:relative; flex:0 0 auto; width:30px; height:18px; background:rgba(255,255,255,.26); border-radius:999px; transition:background .2s ease; }
.home-map-switch::after {
  content:""; position:absolute; top:2px; left:2px; width:14px; height:14px; background:#fff; border-radius:50%;
  box-shadow:0 1px 3px rgba(0,0,0,.35); transition:translate .2s ease;
}
.home-map-layers button[aria-pressed="true"] .home-map-switch { background:#d2a856; }
.home-map-layers button[aria-pressed="true"] .home-map-switch::after { translate:12px 0; }
.home-map-road-swatch { display:inline-block; width:18px; height:3px; margin:0 2px; background:#c39a52; border-radius:2px; box-shadow:0 0 0 1.75px #fdfaf3; }
.home-map-note {
  display:flex; align-items:flex-start; gap:8px; margin:0; padding:10px 2px 0; border-top:1px solid rgba(255,255,255,.14);
  color:rgba(255,255,255,.82); font-size:12.5px; line-height:1.45;
}
.home-map-note svg { flex:0 0 auto; width:16px; height:16px; margin-top:1px; fill:none; stroke:#e6c47f; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

/* Na komputerze legenda leży na mapie, więc jest niższa, żeby zasłaniać jak najmniej. */
@media (min-width: 900px) {
  .home-map-legend { gap:8px; padding:10px 12px; }
  .home-map-layers button { min-height:30px; }
  .home-map-note { padding-top:8px; font-size:12px; line-height:1.4; }
}
/* Niski ekran: legenda bez dopisku, żeby nie zasłaniała południowo-zachodniego wybrzeża. */
@media (min-width: 900px) and (max-height: 780px) {
  .home-map-note { display:none; }
}

/* ---------- Panel ofert ---------- */
.home-map-panel {
  position:absolute; top:104px; right:24px; z-index:9; width:380px; max-height:calc(100% - 170px);
  display:flex; flex-direction:column; padding:22px; color:#171716;
  background:#fff; border-radius:22px; box-shadow:0 24px 60px rgba(8,30,50,.28);
  user-select:text; -webkit-user-select:text;
}
.home-map-view { display:flex; flex:1; flex-direction:column; gap:14px; min-height:0; }
.home-map-view[hidden] { display:none; }
.home-map-view:not([hidden]) { animation:homeMapViewIn .3s ease both; }
.home-map-head { padding:2px 4px 0; }
.home-map-head h3 { margin:0; color:#131b2c; font-size:21px; font-weight:800; line-height:1.2; letter-spacing:-.01em; }
.home-map-head h3.is-large { font-size:24px; line-height:1.15; }
.home-map-head p { margin:4px 0 0; color:#5b584f; font-size:14px; font-weight:600; }
.home-map-head .home-map-teaser { margin-top:8px; color:#6d6a62; font-size:13.5px; font-weight:400; line-height:1.5; }

.home-map-list { display:flex; flex-direction:column; min-height:0; margin:0; padding:0; overflow-y:auto; list-style:none; border-top:1px solid #f0e9db; }
.home-map-list li { border-bottom:1px solid #f0e9db; }
.home-map-row {
  display:flex; align-items:center; gap:14px; min-height:64px; padding:12px 8px 12px 6px;
  color:inherit; text-decoration:none; border-radius:12px; transition:background .2s ease;
}
.home-map-row:hover, .home-map-row:focus-visible, .home-map-row.is-hot { background:#faf6ee; }
.home-map-row-count {
  flex:0 0 auto; display:grid; place-items:center; width:36px; height:36px; color:#241703;
  background:linear-gradient(150deg,#ecd096,#d2a856); border-radius:50%; font-size:14px; font-weight:800;
}
.home-map-row-body { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.home-map-row-body strong { color:#131b2c; font-size:16px; font-weight:700; line-height:1.2; }
.home-map-row-body span { color:#5b584f; font-size:13.5px; font-weight:600; }
.home-map-row-arrow { flex:0 0 auto; width:18px; height:18px; fill:none; stroke:#a9762b; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }

.home-map-topbar { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.home-map-back {
  display:inline-flex; align-items:center; gap:7px; min-height:36px; padding:0 13px 0 10px; color:#10233f;
  background:#f6f2ea; border:0; border-radius:999px; font:700 13px/1 "Montserrat", ui-sans-serif, system-ui, sans-serif; cursor:pointer;
}
.home-map-back:hover { background:#efe7d8; }
.home-map-back svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.home-map-all-link { color:#a9762b; font-size:13px; font-weight:700; }
.home-map-all-link:hover { color:#10233f; }

.home-map-cards { display:grid; gap:10px; min-height:0; margin:0; padding:0 4px 4px 0; overflow-y:auto; list-style:none; }
.home-map-card {
  display:flex; align-items:center; gap:14px; padding:10px; color:inherit; text-decoration:none;
  background:#fff; border:1px solid #ece3cf; border-radius:16px; box-shadow:0 6px 16px rgba(16,35,63,.04);
  transition:border-color .2s ease, box-shadow .2s ease;
}
.home-map-card:hover, .home-map-card:focus-visible, .home-map-card.is-hot { border-color:rgba(185,138,58,.7); box-shadow:0 14px 30px rgba(16,35,63,.13); }
.home-map-card-media { flex:0 0 88px; height:72px; overflow:hidden; background:#e7dccb; border-radius:12px; }
.home-map-card-media img { display:block; width:100%; height:100%; object-fit:cover; }
.home-map-card-body { flex:1; min-width:0; display:flex; flex-direction:column; gap:5px; }
.home-map-card-title {
  display:-webkit-box; overflow:hidden; color:#131b2c; font-size:14.5px; font-weight:700; line-height:1.3;
  -webkit-line-clamp:2; -webkit-box-orient:vertical;
}
.home-map-card-price { color:#10233f; font-size:16px; font-weight:800; line-height:1.1; }
.home-map-card-info { color:#6d6a62; font-size:12.5px; font-weight:600; }
.home-map-all { justify-content:center; margin-top:4px; }

/* Panel lotniska */
.home-map-airport-head { display:flex; align-items:center; gap:12px; padding:0 4px; }
.home-map-airport-head h3 { margin:0; color:#131b2c; font-size:21px; font-weight:800; line-height:1.15; letter-spacing:-.01em; }
.home-map-airport-head p { margin:3px 0 0; color:#6d6a62; font-size:13.5px; font-weight:600; }
.home-map-airport-icon { flex:0 0 auto; display:grid; place-items:center; width:42px; height:42px; color:#fff; background:#10233f; border-radius:50%; }
.home-map-airport-icon svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.home-map-airport-body { display:flex; flex-direction:column; gap:16px; min-height:0; padding:0 4px 4px; overflow-y:auto; }
.home-map-label { margin:0 0 6px; color:#a9762b; font-size:12px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.home-map-rows { margin:0; padding:0; list-style:none; border-top:1px solid #f0e9db; }
.home-map-rows li { padding:11px 0; border-bottom:1px solid #f0e9db; }
.home-map-rows li.is-drive { padding:0; }
.home-map-rows-top { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.home-map-rows-top strong { color:#131b2c; font-size:15px; font-weight:700; }
.home-map-rows-top span { flex:0 0 auto; color:#10233f; font-size:14px; font-weight:800; }
.home-map-rows p { margin:3px 0 0; color:#5b584f; font-size:13.5px; line-height:1.45; }
.home-map-drive {
  display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:46px; padding:0 4px 0 0;
  color:#10233f; text-align:left; background:none; border:0; font:700 14.5px/1.3 "Montserrat", ui-sans-serif, system-ui, sans-serif; cursor:pointer;
}
.home-map-drive:hover, .home-map-drive:focus-visible { color:#a9762b; }
.home-map-drive.is-plain { color:#2c3443; font-weight:600; cursor:default; }
.home-map-drive.is-plain:hover { color:#2c3443; }
.home-map-drive span:last-child { flex:0 0 auto; color:#5b584f; font-size:14px; font-weight:600; }
.home-map-drive b {
  display:inline-grid; place-items:center; min-width:22px; height:22px; margin-left:4px; padding:0 6px; color:#241703;
  background:linear-gradient(150deg,#ecd096,#d2a856); border-radius:999px; font-size:11.5px; font-weight:800; vertical-align:1px;
}
.home-map-airport-note { margin:0; color:#8a8578; font-size:12px; }

/* ---------- Wjazd mapy przy przewijaniu (data-in / data-fresh ustawia home-map.js) ---------- */
.home-map[data-in="0"] .home-map-word { transform:translateY(105%); opacity:0; }
.home-map[data-in="0"] .home-map-eyebrow { opacity:0; letter-spacing:.7em; }
.home-map[data-in="0"] .home-map-dot,
.home-map[data-in="0"] .home-map-chip,
.home-map[data-in="0"] .home-map-stem { opacity:0; }
/* Pinezki "spadają" tylko przy pierwszym wjeździe mapy, nie przy zamykaniu lokalizacji. */
.home-map[data-fresh="1"] .home-map-dot,
.home-map[data-fresh="1"] .home-map-chip,
.home-map[data-fresh="1"] .home-map-stem { animation:homeMapDrop .45s cubic-bezier(.2,.8,.2,1) both; animation-delay:var(--gd, 0ms); }
.home-map-panel, .home-map-legend, .home-map-zoom { transition:opacity .8s ease, translate .9s cubic-bezier(.2,.8,.2,1); }
.home-map[data-in="0"] .home-map-panel { opacity:0; translate:70px 0; }
.home-map[data-in="0"] .home-map-legend { opacity:0; translate:0 36px; }
.home-map[data-in="0"] .home-map-zoom { opacity:0; translate:0 -24px; }
.home-map[data-in="1"] .home-map-panel { transition-delay:.45s; }
.home-map[data-in="1"] .home-map-zoom { transition-delay:.55s; }
.home-map[data-in="1"] .home-map-legend { transition-delay:.65s; }

@keyframes homeMapFan { from { translate:0 0; scale:.3; opacity:0; } }
@keyframes homeMapLine { from { scale:0 1; opacity:0; } }
@keyframes homeMapFanOut { to { translate:0 0; scale:.3; opacity:0; } }
@keyframes homeMapLineOut { to { scale:0 1; opacity:0; } }
@keyframes homeMapPinIn { from { scale:.85; opacity:0; } }
@keyframes homeMapDrop { from { opacity:0; translate:0 -22px; scale:.8; } }
@keyframes homeMapViewIn { from { opacity:0; transform:translateY(6px); } }
@keyframes homeMapPulse { from { transform:scale(1); opacity:.6; } to { transform:scale(2.3); opacity:0; } }
@keyframes homeMapShimmer { from { background-position:0% 0%, 100% 100%; } to { background-position:100% 60%, 0% 25%; } }

/* Gdy Santo Domingo ma oferty, jego nazwę pokazuje etykieta lokalizacji, więc podpis miasta z mapy znika
   (na telefonie etykiet nie ma, tam podpis zostaje). */
@media (min-width: 521px) {
  .home-map-viewport:has(~ .home-map-pins [data-map-group="santo-domingo"]) .home-map-city-santo-domingo { display:none; }
}

/* ---------- Mniejsze ekrany ---------- */
@container home-map (max-width: 600px) {
  .home-map-chip-name, .home-map-chip-count { padding:6px 8px; font-size:11px; }
}
/* Telefon: bez etykiet, kropka pokazuje liczbę ofert, nazwy są w panelu pod mapą.
   Próg liczony od szerokości ekranu, nie mapy: na laptopie z niskim oknem mapa bywa węższa niż 520px,
   a tam etykiety i ceny mają zostać. */
@media (max-width: 520px) {
  .home-map-chip, .home-map-stem { display:none !important; }
  .home-map-dot > span { display:grid; place-items:center; width:26px; height:26px; }
  .home-map-dot b { display:block; }
  .home-map-legend-loc i, .home-map-legend-chip, .home-map-legend-list .home-map-legend-price { display:none; }
  .home-map-legend-count { display:grid; }
  .home-map-legend-count-label { display:inline; }
  /* Ceny przy kropce nie mieszczą się na wąskiej mapie (wychodzą poza ekran): oferty są w panelu pod mapą. */
  .home-map-tag, .home-map-line { display:none; }
  /* Bez rozsuniętych cen nie ma powodu chować pozostałych lokalizacji po wybraniu jednej. */
  .home-map[data-active] .home-map-group:not(.is-active) { display:block; }
}
/* Telefon: mapa jest przybliżona na obszar z ofertami (home-map.js), więc ramka ją przycina,
   a góra i dół miękko przechodzą w morze zamiast urywać się pod tytułem. */
@media (max-width: 520px) {
  .home-map-canvas {
    overflow:hidden;
    -webkit-mask-image:linear-gradient(180deg, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
    mask-image:linear-gradient(180deg, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
  }
}

@media (max-width: 899px) {
  .home-landing--map .home-flow { border-radius:28px 28px 0 0; }
  /* Telefon: hero przewija się normalnie (bez przyklejania, przygaszania i powiększania zdjęcia przy każdej klatce),
     a mapa nie obraca się w 3D. Przyklejone hero wyższe niż ekran ucinało dół treści i zacinało przewijanie. */
  .home-landing--map .home-hero { position:relative; min-height:calc(100vh + 240px); min-height:calc(100svh + 240px); }
  .home-landing--map .home-hero-image { transform:scale(1.04); }
  .home-landing--map .home-hero::after { display:none; }
  .home-landing--map .home-hero-inner { transform:none; }
  .home-landing--map .home-hero-inner > :not(.home-hero-stats),
  .home-landing--map .home-hero-stat { opacity:1; }
  .home-landing--map .home-hero-scrollcue { opacity:1; }
  .home-map-3d { transform:none; will-change:auto; }
  .home-map-shimmer { display:none; }
  /* Przejście hero w morze bez maski (maska na wysokiej warstwie zacinała przewijanie na telefonie):
     morze zaczyna się 240px niżej, a nad nim leży zwykły gradient w kolorze góry morza. */
  .home-map-sea { top:240px; -webkit-mask-image:none; mask-image:none; }
  .home-map-band::before {
    content:""; position:absolute; top:0; left:0; right:0; height:240px; pointer-events:none;
    background:linear-gradient(180deg, rgba(var(--map-sea-top),0) 0, rgba(var(--map-sea-top),.3) 80px, rgba(var(--map-sea-top),.78) 165px, rgb(var(--map-sea-top)) 240px);
  }

  .home-map-band { height:auto; container-type:normal; padding-bottom:64px; }
  /* position:relative (nie static), żeby z-index działał: warstwa morza jest pozycjonowana
     i inaczej zamalowuje tytuł oraz białe tło panelu. */
  .home-map-title { position:relative; top:auto; left:auto; max-width:none; padding:130px 16px 14px; }
  .home-map-canvas { position:relative; top:auto; left:auto; width:100%; height:auto; transform:none; }
  .home-map-hint { display:none; }
  .home-map-zoom { top:auto; right:12px; flex-direction:row; margin-top:-50px; }
  .home-map-zoom button { width:36px; height:36px; }
  .home-map-zoom button + button { border-top:0; border-left:1px solid #ece3cf; }
  .home-map-legend {
    position:relative; left:auto; bottom:auto; max-width:none; margin:12px 16px 0;
    background:rgba(18,32,48,.92); -webkit-backdrop-filter:none; backdrop-filter:none;
  }
  .home-map-panel { position:relative; top:auto; right:auto; width:auto; max-height:none; margin:12px 16px 0; }
  /* Panel nie przewija się w środku, więc pokazuje 5 ofert; reszta jest pod przyciskiem "Zobacz N ofert". */
  .home-map-cards { overflow:visible; }
  .home-map-cards li:nth-child(n+6) { display:none; }
}

/* Telefon: przyciski +/- w prawym górnym rogu mapy (nad oceanem), żeby nie zasłaniały Punta Cany i Cap Cany.
   Wysokość mapy to 72,1% szerokości ekranu. Reguła musi stać po bloku max-width:899px, który ustawia margin-top. */
@media (max-width: 520px) {
  .home-map-zoom { margin-top:calc(-72.1vw + 30px); }
}

@media (prefers-reduced-motion: reduce) {
  .home-map-3d { transform:none !important; }
  .home-map-word, .home-map-eyebrow, .home-map-dot, .home-map-chip, .home-map-stem,
  .home-map-panel, .home-map-legend, .home-map-zoom {
    opacity:1 !important; translate:none !important; animation:none !important; transition:none !important;
  }
  .home-map[data-in="0"] .home-map-word { transform:none; }
  .home-map-line, .home-map-tag, .home-map-pulse, .home-map-view:not([hidden]), .home-map-shimmer { animation:none !important; }
  .home-map.is-reopening .home-map-group { animation:none; }
  .home-landing--map .home-hero-image,
  .home-landing--map .home-hero-inner { transform:none; }
}
