/* ANTALEX — moduł „Sprzedaż hurtowa”: animowana mapa kierunków (v5, 3D). Ładowany przez inc/sprzedaz-hurtowa.php. */

/* Strona główna: wiersz z mapą w kolumnie „hurt” (WPBakery, klasa „bg-gray mapa-europy ax-hurt”) — zamiast zdjęcia mapy
   (style.css .mapa-europy) animowana mapa rysowana przez js/ax-hurt.js. Teksty i przycisk bez zmian, leżą nad animacją. */
.mapa-europy.ax-hurt { background-image: none; }
/* WPBakery: .vc_row::after { display: table } (clearfix, ładowany po tym pliku) — warstwa ::after miała 0×0 px. */
.vc_row.ax-hurt::after { display: block; content: ""; }
.ax-hurt {
  --ax-orange: #ff7a1a;
  --ax-ease: cubic-bezier(.22, .61, .36, 1);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #2f353b;            /* kolor zanim wczyta się mapa */
  color: #fff;
}
/* warstwa animacji — zawsze POD treścią */
.ax-hurt__fx {
  position: absolute; inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: #3a4249;            /* kolor morza pod krawędziami przechylonej mapy */
}
.ax-hurt__fx .ax-hurt__map {
  position: absolute; max-width: none !important; max-height: none !important; margin: 0;
  transform-origin: 0 0; will-change: transform;
  backface-visibility: hidden;
}
.ax-hurt__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* miękkie światło za kursorem + przyciemnienie pod tekstem po lewej (nad mapą, pod treścią) */
.ax-hurt::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(420px circle at var(--mx, 60%) var(--my, 35%), rgba(255,255,255,.07), transparent 70%),
    linear-gradient(90deg, rgba(24,27,31,.55) 0%, rgba(24,27,31,0) 45%);
  transition: opacity .6s;
}

/* mapa: lekkie pojawienie się */
.ax-hurt__map { opacity: 0; transition: opacity 1.2s ease; }
.ax-hurt.is-on .ax-hurt__map { opacity: 1; }

/* łuki: wstęgi rysowane przez JS (cienko → grubo → cienko) + rozmyty cień */
.ax-hurt__shadow { fill: #07090c; fill-opacity: .75; }
.ax-hurt__head { opacity: 0; transition: opacity .35s ease; }
.ax-hurt__head.is-shown { opacity: 1; }

/* impulsy */
.ax-hurt__pulse {
  fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round;
  stroke-dasharray: .12 1; stroke-dashoffset: .12;
  opacity: .9;
}

/* punkt startowy */
.ax-hurt__dot { fill: var(--ax-orange); transform: scale(0); transform-box: fill-box; transform-origin: center; }
.ax-hurt__ring { fill: none; stroke: var(--ax-orange); stroke-width: 1.2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.ax-hurt.is-on .ax-hurt__dot  { animation: axHurtPop .6s cubic-bezier(.34,1.56,.64,1) .1s forwards; }
.ax-hurt.is-on .ax-hurt__ring { animation: axHurtRing 4s ease-out 2.5s infinite; }
@keyframes axHurtPop { to { transform: scale(1); } }
@keyframes axHurtRing { 0% { transform: scale(1); opacity: .5; } 70%,100% { transform: scale(3.2); opacity: 0; } }

/* brak animacji (prefers-reduced-motion) → od razu stan końcowy */
.ax-hurt.is-static .ax-hurt__map,
.ax-hurt.is-static .ax-hurt__head { opacity: 1; animation: none; transition: none; }
.ax-hurt.is-static .ax-hurt__dot { transform: none; animation: none; }
.ax-hurt.is-static .ax-hurt__ring { animation: none; }

/* Treść sekcji jest zawsze nad animacją (isolation + z-index:-1 na warstwie fx),
   więc nie trzeba zmieniać pozycjonowania istniejących elementów. */

/* Strona główna: tytuł jest u góry, przycisk i opis na dole (na telefonie wyśrodkowane, nad Polską) — przyciemnienie
   mapy pod tekstem zamiast lewej krawędzi z prototypu, żeby łuki nie zlewały się z literami. */
.mapa-europy.ax-hurt::after {
  background:
    radial-gradient(420px circle at var(--mx, 60%) var(--my, 35%), rgba(255,255,255,.07), transparent 70%),
    linear-gradient(180deg, rgba(24,27,31,.55) 0%, rgba(24,27,31,0) 32%, rgba(24,27,31,0) 52%, rgba(24,27,31,.7) 100%);
}
@media (max-width: 767px) {
  .mapa-europy.ax-hurt::after {
    background: linear-gradient(180deg, rgba(24,27,31,.65) 0%, rgba(24,27,31,.35) 45%, rgba(24,27,31,.75) 100%);
  }
}

/* Przycisk w jednej linii (w style.css .opis-hurt__button ma 40% szerokości kolumny — „Zostań naszym partnerem” łamało
   się na dwie linie), opis zajmuje resztę wiersza. Na telefonie (style.css) oba pod sobą, wyśrodkowane. */
.mapa-europy.ax-hurt .opis-hurt__button .net-button { white-space: nowrap; }
@media (min-width: 768px) {
  .mapa-europy.ax-hurt .opis-hurt > div { gap: 2rem; }
  .mapa-europy.ax-hurt .opis-hurt__button { width: auto; flex: 0 0 auto; }
  .mapa-europy.ax-hurt .opis-hurt__opis { width: auto; flex: 1 1 auto; max-width: 34ch; }
}
