/* ==========================================================================
   PODSTRONA: UBEZPIECZENIA SIECHNICE (2026-10-07)
   Strona korzysta z plików strony głównej (main, hero, form, about, partners, obszar,
   reviews, blog, faq, footer). Tu są tylko elementy nowe: okruszki w hero,
   sekcje „Potrzeby” i „Przeprowadzka”,
   układ doradców z dwoma akapitami, mapa gminy (4 największe miejscowości, dopisek
   o mniejszych, zwijana pełna lista) i trzy wpisy z bloga z akapitem wstępu.
   Tekst: wyjustowany na komputerze, wyśrodkowany na telefonie (próg 768 px).
   Ruch: wyłącznie transform i opacity, z wersją dla „ogranicz ruch”.
   ========================================================================== */

/* --- HERO: okruszki (akapit i panele „Dla Ciebie / Dla Firmy” — style z hero.css) --- */
.ak-breadcrumbs {
  font-family: 'Inter', 'Inter Fallback', sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ak-text-gray);
  margin: 0 0 18px;
  text-align: left;
}

.ak-breadcrumbs .ak-breadcrumbs-sep {
  margin: 0 6px;
  opacity: 0.6;
}

.ak-breadcrumbs a[href]:focus-visible {
  outline: 2px solid var(--ak-teal-ink);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- WSPÓLNE DLA NOWYCH SEKCJI --- */
.ak-sx-container {
  width: 100%;
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.ak-sx-h2 {
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: clamp(25px, 1.4vw + 16px, 34px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--ak-navy-heading);
  margin: 0 0 18px;
  text-wrap: balance;
}

.ak-sx-lead {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.65;
  color: var(--ak-text-gray);
  margin: 0;
  max-width: 900px;
}

@media (min-width: 769px) {
  .ak-sx-lead,
  .ak-move-close,
  .ak-move-actions {
    margin-left: 20px;
  }
}

/* --- SEKCJA „POTRZEBY”: 6 kart równej wysokości --- */
.ak-needs-section {
  padding: 72px 0 80px;
  background-color: var(--ak-bg-white);
}

.ak-needs-grid {
  list-style: none;
  margin: 38px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr; /* wszystkie karty tej samej wysokości (także między rzędami) */
  gap: 24px;
  align-items: stretch;
}

.ak-need-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 26px 24px 24px;
  background: var(--ak-bg-white);
  border: 1px solid rgba(86, 168, 168, 0.22);
  border-radius: 18px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Cień po najechaniu jako osobna warstwa: animowane jest tylko jej krycie */
.ak-need-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid rgba(47, 116, 130, 0.45);
  box-shadow: 0 12px 28px rgba(31, 95, 104, 0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ak-need-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(86, 168, 168, 0.15);
  flex: 0 0 auto;
}

.ak-need-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--ak-teal-ink);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Ikona obok nagłówka (jak kafle hero na telefonie), nie w osobnym rzędzie nad nim */
.ak-need-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
}

.ak-need-card h3 {
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ak-navy-dark);
  margin: 0;
  text-wrap: balance;
}

.ak-need-card p {
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.62;
  color: var(--ak-text-gray);
  margin: 0 0 18px;
}

.ak-need-link {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', 'Inter Fallback', sans-serif;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ak-teal-ink);
  text-decoration: underline;
  text-decoration-color: rgba(47, 116, 130, 0.4);
  text-underline-offset: 5px;
}

/* Cała karta jest klikalna (link rozciągnięty na kartę), nazwą linku zostaje jego tekst */
.ak-need-link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  z-index: 1;
}

.ak-need-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ak-need-link:focus-visible {
  outline: none;
}

.ak-need-link:focus-visible::before {
  outline: 3px solid var(--ak-navy-dark);
  outline-offset: 3px;
}

/* Dwa linki w karcie: podstrona usługi (cała karta klikalna) + „Kup online” nad warstwą klikalną */
.ak-need-links {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
}

.ak-need-links .ak-need-link {
  margin-top: 0;
}

.ak-need-link--buy {
  position: relative;
  z-index: 2;
}

.ak-need-link--buy::before {
  content: none;
}

.ak-need-link--buy:focus-visible {
  outline: 3px solid var(--ak-navy-dark);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (hover: hover) {
  .ak-need-card:hover {
    transform: translateY(-3px);
  }

  .ak-need-card:hover::after {
    opacity: 1;
  }

  .ak-need-card:hover .ak-need-icon svg {
    transform: scale(1.1);
  }

  .ak-need-card:hover .ak-need-link {
    text-decoration-color: currentColor;
  }

  .ak-need-card:hover .ak-need-link svg {
    transform: translateX(4px);
  }
}

/* --- SEKCJA „PRZEPROWADZKA”: lista numerowana + przycisk --- */
.ak-move-section {
  padding: 72px 0 80px;
  background-color: var(--ak-bg-light); /* jak sekcja formularza kontaktowego (form.css), 2026-10-08 */
  border-top: 1px solid rgba(86, 168, 168, 0.15);
  border-bottom: 1px solid rgba(86, 168, 168, 0.15);
}

/* Kolejność w HTML: nagłówek z akapitem → lista → zdanie z przyciskiem (akapit kończy się dwukropkiem).
   Na komputerze lista stoi po prawej, a tekst i przycisk spotykają się na jej wysokości. */
.ak-move-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  grid-template-areas:
    "head list"
    "cta  list";
  column-gap: 56px;
  row-gap: 0;
}

.ak-move-head { grid-area: head; align-self: end; }
.ak-move-list { grid-area: list; align-self: center; }
.ak-move-cta { grid-area: cta; align-self: start; }

.ak-move-close {
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ak-navy-dark);
  margin-top: 26px; /* bez skrótu margin — wcięcie 20 px z reguły @media (min-width: 769px) */
}

.ak-move-actions {
  margin-top: 24px;
  display: flex;
}

.ak-move-actions .ak-btn-pill {
  min-height: 70px;
}

.ak-move-list {
  list-style: none;
  counter-reset: ak-move;
  margin: 0;
  padding: 30px 30px 28px;
  background: var(--ak-bg-white);
  border-radius: 24px;
  box-shadow: var(--ak-shadow-card);
  display: grid;
}

.ak-move-list li {
  counter-increment: ak-move;
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 18px;
  padding-bottom: 22px;
}

.ak-move-list li:last-child {
  padding-bottom: 0;
}

.ak-move-list li::before {
  content: counter(ak-move);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ak-teal-action-gradient);
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--ak-text-inverse);
  position: relative;
  z-index: 1;
}

/* Linia łącząca numery (jak kroki w sekcji obszaru działania) */
.ak-move-list li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 21px;
  top: 48px;
  bottom: 4px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(rgba(47, 116, 130, 0.3), rgba(47, 116, 130, 0.1));
}

.ak-move-text {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ak-text-gray);
  padding-top: 9px;
}

.ak-move-text strong {
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ak-navy-dark);
}

/* Akapity w kartach: wyjustowane na komputerze (zasada strony). Lista to nie akapit —
   wyrównana do lewej jak kroki w sekcji obszaru działania, żeby pogrubione nazwy polis się nie rozjeżdżały. */
.ak-move-text {
  text-align: left;
}

@media (min-width: 769px) {
  .ak-need-card p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
  }
}

/* --- DORADCY: dwa akapity, dwa zdjęcia obok siebie --- */
.ak-duo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.ak-duo-text .ak-about-h2 {
  text-wrap: balance;
}

.ak-duo-text .ak-about-text {
  margin: 0 0 30px;
}

.ak-duo-text .ak-about-text p + p {
  margin-top: 16px;
}

@media (min-width: 851px) {
  .ak-duo-text .ak-about-text {
    margin-left: 20px;
  }

  .ak-duo-text .ak-about-btn-wrap {
    justify-content: flex-start;
    margin-left: 20px;
  }
}

.ak-duo-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.ak-duo-photos .ak-about-img-wrap:last-child {
  margin-top: 44px;
}

.ak-duo-photos .ak-about-photo {
  max-width: 100%;
}

/* --- MAPA GMINY (struktura klas jak mapa Wrocławia; js/main.js bez zmian) --- */
/* Wrocław dla orientacji: chłodna szarość jaśniejsza od palety gminy, Krzyki o ton ciemniejsze */
.ak-area-map--gmina .ak-area-wro-bg {
  fill: #e9edf2;
  stroke: var(--ak-bg-white);
  stroke-width: 1.1;
}

.ak-area-map--gmina .ak-area-dz--krzyki-wro .ak-area-os {
  fill: #dce3eb;
}

/* 2026-10-08: wyróżnione tylko 4 największe miejscowości; pozostałe to jednolite, jasne tło gminy (bez podświetlania) */
.ak-area-dz--reszta .ak-area-os { fill: #d0e5e2; }
.ak-area-dz--duze .ak-area-os { fill: #9fcbcc; }
.ak-area-dz--siechnice .ak-area-os { fill: var(--ak-teal-ink); }
.ak-area-dz--siechnice.is-hot .ak-area-os { fill: var(--ak-teal-action-hover); }

.ak-area-gmina {
  fill: none;
  stroke: var(--ak-navy-dark);
  stroke-width: 1.8;
  stroke-opacity: 0.55;
  stroke-linejoin: round;
  pointer-events: none;
}

.ak-area-map--gmina .ak-area-gm-label {
  font-size: 17px;
  transition: fill 0.25s ease;
}

.ak-area-map--gmina .ak-area-gm-label.is-hot {
  fill: var(--ak-text-inverse);
  stroke: rgba(31, 95, 104, 0.6);
}

.ak-area-map--gmina .ak-area-gm-label--inv,
.ak-area-map--gmina .ak-area-gm-label--inv.is-hot {
  fill: var(--ak-text-inverse);
  stroke: rgba(19, 39, 51, 0.35);
}

.ak-area-pt--office .ak-area-dot {
  fill: var(--ak-navy-dark);
  stroke: var(--ak-bg-white);
  stroke-width: 3;
}

.ak-area-pt--office .ak-area-label {
  font-weight: 700;
  fill: var(--ak-navy-dark);
  pointer-events: none; /* podpis biura leży nad tłem gminy — najechanie trafia w kształt pod spodem */
}

.ak-area-map.is-armed .ak-area-border {
  opacity: 0;
}

.ak-area-map.is-armed.is-in .ak-area-border {
  opacity: 1;
  transition: opacity 0.8s ease 0.6s;
}

.ak-area-map--gmina .ak-area-attrib {
  paint-order: stroke;
  stroke: rgba(248, 250, 252, 0.9);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.ak-area-key--gmina {
  border-radius: 3px;
  background: linear-gradient(135deg, #9fcbcc 0 50%, #2f7482 50% 100%);
}

/* Dopisek o mniejszych miejscowościach: jasna ramka z pinezką */
.ak-area-more {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(86, 168, 168, 0.1);
  border: 1px solid rgba(86, 168, 168, 0.22);
}

.ak-area-more-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--ak-bg-white);
}

.ak-area-more-icon svg {
  width: 19px;
  height: 19px;
  fill: var(--ak-teal-ink);
}

.ak-area-more p {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ak-text-gray);
}

.ak-area-more strong {
  font-weight: 700;
  color: var(--ak-navy-dark);
}

/* Pełna lista miejscowości: zwinięta domyślnie */
.ak-area-all summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ak-teal-ink);
  text-decoration: underline;
  text-decoration-color: rgba(47, 116, 130, 0.4);
  text-underline-offset: 4px;
}

.ak-area-all summary::-webkit-details-marker {
  display: none;
}

.ak-area-all summary::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.25s ease;
}

.ak-area-all[open] summary::after {
  transform: translateY(1px) rotate(-135deg);
}

.ak-area-all summary:hover {
  text-decoration-color: currentColor;
}

.ak-area-all summary:focus-visible {
  outline: 3px solid var(--ak-navy-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

.ak-area-all p {
  margin: 10px 0 0;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ak-text-gray);
}

/* Komputer: akapity wyjustowane (obszar.css ustawia w tej sekcji wyrównanie do lewej) */
@media (min-width: 769px) {
  .ak-area-more p,
  .ak-area-all p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
  }
}

/* --- BLOG: trzy wpisy --- */
.ak-blog-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 30px 0 40px;
}

.ak-blog-grid--three .ak-blog-card-img-wrap {
  height: 210px;
}

.ak-blog-grid--three .ak-blog-card-content {
  padding: 22px 22px 24px;
}

.ak-blog-grid--three .ak-blog-card-content h3 {
  font-size: 19px;
  margin-bottom: 16px;
}

.ak-blog-grid--three .ak-blog-card-link:focus-visible,
.ak-blog-grid--three .ak-blog-card-content h3 a:focus-visible {
  outline: 3px solid var(--ak-navy-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- NAGŁÓWKI NA KOMPUTERZE (2026-10-08) ---
   Pliki wspólne ze stroną główną ustawiają text-wrap: balance (wiersze równej długości),
   przez co nagłówki i podtytuł pod H1 łamią się w połowie szerokości. Na komputerze
   wypełniają szerokość kontenera; „pretty” tylko nie zostawia jednego słowa w ostatnim wierszu.
   Telefon zostaje przy balance (tekst wyśrodkowany). */
@media (min-width: 769px) {
  .ak-hero-section .ak-hero-h2,
  .ak-form-card .ak-form-heading,
  .ak-sx-container .ak-sx-h2,
  .ak-duo-text .ak-about-h2,
  .ak-area-section .ak-area-h2 {
    text-wrap: pretty;
    -webkit-text-wrap: pretty;
  }
}

/* ==========================================================================
   RESPONSYWNOŚĆ
   ========================================================================== */
@media (max-width: 1024px) {
  .ak-needs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ak-move-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "list"
      "cta";
    row-gap: 30px;
  }

  .ak-move-close {
    margin-top: 0;
  }

  .ak-blog-grid--three .ak-blog-card-content h3 {
    font-size: 17.5px;
  }
}

@media (max-width: 850px) {
  .ak-duo {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .ak-duo-text {
    display: contents;
  }

  .ak-duo-text .ak-about-h2 { order: 1; }
  .ak-duo-photos { order: 2; margin: 0 auto 24px; max-width: 520px; width: 100%; }
  .ak-duo-text .ak-about-text { order: 3; margin: 0 auto 26px; max-width: 560px; }
  .ak-duo-text .ak-about-btn-wrap { order: 4; }

  .ak-duo-photos .ak-about-img-wrap:last-child {
    margin-top: 28px;
  }
}

@media (max-width: 768px) {
  .ak-breadcrumbs {
    text-align: center;
    margin-bottom: 14px;
  }

  .ak-needs-section,
  .ak-move-section {
    padding: 44px 0 52px;
  }

  .ak-sx-h2 {
    font-size: 24px;
    text-align: center;
  }

  .ak-sx-lead {
    font-size: 16px;
    text-align: center;
    max-width: none;
  }

  .ak-needs-grid {
    margin-top: 28px;
    gap: 16px;
  }

  .ak-need-card {
    align-items: center;
    text-align: center;
    padding: 24px 20px 22px;
  }

  .ak-need-head {
    justify-content: center;
    gap: 12px;
  }

  .ak-need-card h3 {
    font-size: 17.5px;
    text-align: left;
  }

  .ak-need-card p {
    font-size: 15.5px;
    text-align: center;
    hyphens: none; /* tekst wyśrodkowany nie potrzebuje dzielenia — miękkie dywizy działają tylko na komputerze */
    -webkit-hyphens: none;
  }

  .ak-need-link {
    align-self: center;
  }

  .ak-need-links {
    justify-content: center;
  }

  .ak-move-close {
    font-size: 17px;
    text-align: center;
  }

  .ak-move-actions {
    justify-content: center;
  }

  .ak-move-list {
    padding: 24px 18px 22px;
    border-radius: 20px;
  }

  /* Telefon: numer nad tekstem, wszystko wyśrodkowane */
  .ak-move-list li {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    row-gap: 10px;
    text-align: center;
    padding-bottom: 20px;
  }

  .ak-move-list li:not(:last-child)::after {
    display: none;
  }

  .ak-move-list li:not(:last-child) {
    border-bottom: 1px solid var(--ak-border-light);
    margin-bottom: 20px;
  }

  .ak-move-text {
    padding-top: 0;
    font-size: 15.5px;
    text-align: center;
  }

  .ak-move-text strong {
    font-size: 17.5px;
  }

  .ak-blog-grid--three {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    margin: 24px 0 32px;
  }

  .ak-blog-grid--three .ak-blog-card-content {
    align-items: center;
    text-align: center;
  }

  .ak-blog-grid--three .ak-blog-card-content h3 {
    text-align: center;
  }

  .ak-blog-grid--three .ak-blog-card-img-wrap {
    height: 190px;
  }

  /* Mapa na telefonie: duże etykiety zostają, znacznik biura z czytelnym podpisem */
  .ak-area-map--gmina .ak-area-gm-label {
    font-size: 24px;
  }

  .ak-area-map--gmina .ak-area-pt--office .ak-area-label {
    display: inline;
    font-size: 24px;
  }

  /* Dopisek i pełna lista pod mapą: wyśrodkowane, pinezka nad tekstem */
  .ak-area-more {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .ak-area-more p,
  .ak-area-all p {
    text-align: center;
  }

  .ak-area-all {
    text-align: center;
  }
}

@media (max-width: 600px) {
  .ak-needs-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
  }

  /* Jedna kolumna: ikona nad nagłówkiem, wszystko wyśrodkowane */
  .ak-need-head {
    flex-direction: column;
  }

  .ak-need-card h3 {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ak-need-card,
  .ak-need-card::after,
  .ak-need-icon svg,
  .ak-need-link svg,
  .ak-area-map--gmina .ak-area-gm-label,
  .ak-area-all summary::after {
    transition: none;
  }

  .ak-need-card:hover,
  .ak-need-card:hover .ak-need-icon svg,
  .ak-need-card:hover .ak-need-link svg {
    transform: none;
  }
}
