/* ============================================================
   Volton Install - Wspólne komponenty podstron (pages.css)
   Uzupełnienie design systemu z redesign.css.
   Hero podstrony, breadcrumbs, sekcje treści, karty,
   akordeon FAQ, proces (5 kroków), powiązane usługi.
   Wszystkie podstrony korzystają z tych samych klas.
   ============================================================ */

/* ---------- Hero podstrony ---------- */

.page-hero {
  position: relative;
  padding: calc(var(--header-h) + 44px) 0 84px;
  background:
    radial-gradient(ellipse 65% 85% at 88% -10%, rgba(37, 211, 254, 0.09), transparent 65%),
    var(--bg-2);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  isolation: isolate;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(37, 211, 254, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 211, 254, 0.045) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 0%, #000 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 0%, #000 25%, transparent 75%);
  pointer-events: none;
}

.page-hero-glow {
  position: absolute;
  z-index: -1;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 211, 254, 0.13) 0%, transparent 65%);
  top: -160px;
  right: -100px;
  filter: blur(10px);
  pointer-events: none;
}

.page-hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: center;
}

.page-hero h1 {
  font-size: clamp(2.15rem, 4.6vw, 3.35rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 22px;
}
.page-hero h1 .accent {
  background: linear-gradient(100deg, #8fe9ff, var(--cyan) 55%, var(--cyan-dk));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-lead { font-size: 1.08rem; max-width: 580px; margin-bottom: 32px; }
.page-lead a:not(.btn) { color: var(--cyan); font-weight: 600; border-bottom: 1px solid transparent; }
.page-lead a:not(.btn):hover { border-bottom-color: var(--cyan); }

.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(37, 211, 254, 0.07);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--cyan);
}
.hero-chip .stars { color: #ffc531; letter-spacing: 1px; }
.hero-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

/* Bug fix: limit hero media na desktopie, kompaktowy i wycentrowany w kolumnie */
.page-hero-media { position: relative; max-width: 480px; width: 100%; margin: 0 auto; }
.page-hero-media .media-frame { }

.media-frame {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.85), 0 0 50px -22px var(--cyan-glow);
}
/* Proporcja MUSI siedzieć na ramce, nie na <img>: obrazy mają atrybuty width/height, a przy
   globalnym `img { width: 100% }` bez `height` atrybut wygrywa i ustala wysokość na sztywno,
   przez co `aspect-ratio` na samym <img> jest ignorowane. Na stronie pomiarów martwy
   placeholder z `height="4032"` rozpychał ramkę do 4034 px. (2026-07-21) */
.media-frame { aspect-ratio: 4 / 3.6; }
.media-frame-portrait { aspect-ratio: 4 / 4.4; }
.media-frame img { height: 100%; aspect-ratio: auto; object-fit: cover; object-position: center; }

.media-chip {
  position: absolute;
  left: -22px;
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(19, 26, 40, 0.94);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 20px;
  backdrop-filter: blur(8px);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.8);
}
/* Wariant punktowy: etykieta w lewym GÓRNYM rogu. Używany tylko tam, gdzie istotna treść
   zdjęcia jest na dole kadru - na `/uslugi/pomiary-elektryczne` dolna etykieta zasłaniała
   ekran miernika z wynikiem pomiaru. Reszta podstron zostaje z etykietą na dole. */
.media-chip.media-chip-gora { top: 30px; bottom: auto; }

.media-chip .chip-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--cyan-soft);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  flex-shrink: 0;
}
.media-chip .chip-icon svg { width: 20px; height: 20px; }
.media-chip strong { display: block; font-size: 0.9rem; color: var(--text); font-weight: 700; line-height: 1.3; }
.media-chip span { font-size: 0.74rem; color: var(--muted); }

/* ---------- Breadcrumbs v2 (pigulka) ---------- */
.breadcrumbs {
  position: relative;
  margin-bottom: 36px;
}

/* Kontener pigułka + naprawa numeracji listy (ol) */
.breadcrumbs-list {
  list-style: none;
  margin: 0;
  padding: 6px 14px;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.breadcrumbs-list li {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  min-width: 0;
}

/* Linki: pastylki z hover w cyan */
.breadcrumbs-list a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--body);
  font-weight: 500;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.breadcrumbs-list a:hover {
  color: var(--cyan);
  background: var(--cyan-soft);
  box-shadow: 0 0 16px -6px var(--cyan-glow);
}

/* Ikona domu przy pierwszym poziomie (Strona glowna) */
.breadcrumbs-list li:first-child a::before {
  content: "";
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  background: currentColor;
  opacity: 0.75;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.breadcrumbs-list li:first-child a:hover::before {
  opacity: 1;
}

/* Separator: surowy slash ukryty, wstawiony chevron */
.breadcrumbs-list .sep {
  font-size: 0;
  width: 14px;
  height: 14px;
  margin: 0 1px;
  flex-shrink: 0;
}

.breadcrumbs-list .sep::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: var(--muted);
  opacity: 0.55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Element biezacy: cyan + delikatna poswiata */
.breadcrumbs-list [aria-current="page"] {
  padding: 5px 10px;
  color: var(--cyan);
  font-weight: 600;
  text-shadow: 0 0 18px var(--cyan-glow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 46ch;
}

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
  .breadcrumbs {
    margin-bottom: 28px;
  }

  .breadcrumbs-list {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 5px 10px;
    font-size: 0.8rem;
    -webkit-overflow-scrolling: touch;
  }

  .breadcrumbs-list::-webkit-scrollbar {
    display: none;
  }

  .breadcrumbs-list a,
  .breadcrumbs-list [aria-current="page"] {
    padding: 4px 8px;
    white-space: nowrap;
  }

  /* Na telefonie biezaca strona moze byc dluga: ucinamy elegancko */
  .breadcrumbs-list [aria-current="page"] {
    max-width: 40vw;
  }
}

/* ---------- Sekcje treści ---------- */

.section-alt {
  background: var(--bg-2);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 66px;
  align-items: center;
}
.split-grid-reverse > .split-copy { order: 2; }
.split-grid-reverse > .split-media { order: 1; }
.split-media { position: relative; }

.prose h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 16px 0 18px;
}
.prose h3 {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 30px 0 12px;
}
.prose p { font-size: 1.01rem; margin-bottom: 18px; }
.prose p:last-child { margin-bottom: 0; }
.prose a:not(.btn) { color: var(--cyan); font-weight: 600; border-bottom: 1px solid transparent; }
.prose a:not(.btn):hover { border-bottom-color: var(--cyan); }
.prose strong { color: var(--text); }
.prose .check-list { margin: 26px 0 0; }
.prose .check-list li { font-weight: 400; color: var(--body); }
.prose .check-list li strong { color: var(--text); font-weight: 600; }

/* ---------- Karty (zakres usługi) ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.info-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.3s ease, transform 0.3s var(--ease), box-shadow 0.3s ease;
}
.info-card:hover {
  border-color: var(--line);
  transform: translateY(-5px);
  box-shadow: 0 30px 60px -26px rgba(0, 0, 0, 0.85);
}
.info-card h3 { font-size: 1.12rem; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.info-card p { font-size: 0.92rem; line-height: 1.65; }
.info-card .bento-icon { margin-bottom: 6px; }

/* ---------- Proces: warianty 3 i 5 kroków ---------- */

.process-steps.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.process-steps.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Akordeon FAQ ---------- */

.faq-list { display: grid; gap: 12px; max-width: 880px; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.faq-item:hover { border-color: var(--line); }
.faq-item[open] { border-color: var(--line); background: var(--surface-3); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 20px 60px 20px 24px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  min-height: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 26px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(225deg); }

.faq-answer { padding: 0 24px 22px; }
.faq-answer p { font-size: 0.95rem; margin: 0; }
.faq-answer a:not(.btn) { color: var(--cyan); font-weight: 600; }

/* ---------- Powiązane usługi ---------- */

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.related-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.3s ease, transform 0.3s var(--ease), box-shadow 0.3s ease;
}
.related-card:hover {
  border-color: var(--line);
  transform: translateY(-5px);
  box-shadow: 0 30px 60px -26px rgba(0, 0, 0, 0.85);
}
.related-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.related-card p { font-size: 0.9rem; line-height: 1.62; }
.related-card .bento-link { margin-top: auto; }

/* ---------- Cennik (landing usługi) ---------- */

.price-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: border-color 0.3s ease, transform 0.3s var(--ease), box-shadow 0.3s ease;
}
.price-card:hover {
  border-color: var(--line);
  transform: translateY(-5px);
  box-shadow: 0 30px 60px -26px rgba(0, 0, 0, 0.85);
}
.price-card-featured {
  border-color: rgba(37, 211, 254, 0.55);
  box-shadow: 0 0 44px -18px var(--cyan-glow);
}
.price-badge {
  position: absolute;
  top: -13px;
  left: 22px;
  padding: 5px 14px;
  border-radius: 999px;
  background: linear-gradient(100deg, #8fe9ff, var(--cyan));
  color: #06121b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.price-capacity {
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.price-capacity span {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-top: 4px;
}
.price-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, #8fe9ff, var(--cyan) 60%, var(--cyan-dk));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.price-value small {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  -webkit-text-fill-color: var(--muted);
  margin-top: 4px;
}
.price-card p { font-size: 0.9rem; line-height: 1.62; margin-top: auto; }

/* Wariant 2-kolumnowy (porównanie dwóch wariantów cenowych) */
.price-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 860px; }
.price-card ul { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.price-card ul li { font-size: 0.9rem; line-height: 1.6; color: var(--body); }
.price-card ul li::marker { color: var(--cyan); }
.price-card ul li strong { color: var(--text); font-weight: 600; }

/* ---------- Dane liczbowe (statystyki z realizacji) ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stats-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px;
}
.stat-card strong {
  display: block;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(100deg, #8fe9ff, var(--cyan) 60%, var(--cyan-dk));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-card span {
  display: block;
  margin-top: 8px;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Lokalizacje: statyczne chipy obszarów ---------- */

.tag-list { display: flex; flex-wrap: wrap; gap: 9px; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--body);
  transition: border-color 0.25s ease, color 0.25s ease;
}
.tag:hover { border-color: var(--line); color: var(--cyan); }

/* ---------- Hub: siatka artykułów (3 kolumny na bazie projects-grid) ---------- */

.projects-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Zrzuty ekranu / dowody (screenshots) ---------- */

.shot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 760px;
}
/* Wariant "contain" pokazuje obraz w całości, więc ramka dopasowuje się do niego, a nie odwrotnie. */
.media-frame-contain { aspect-ratio: auto; }
.media-frame-contain img { height: auto; aspect-ratio: auto; object-fit: contain; background: #0e0e0e; }

/* ---------- Scenariusz z realizacji (highlight w treści artykułu) ---------- */

.scenario-box {
  margin: 30px 0;
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius-sm);
}
.scenario-box strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 10px;
}
.scenario-box p { margin: 0; }

/* ---------- Tabela kosztów (hub cennikowy) ---------- */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
}

.cost-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 680px; }
.cost-table th, .cost-table td {
  padding: 16px 22px;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
  color: var(--body);
}
.cost-table thead th {
  background: var(--surface-3);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.cost-table tbody tr + tr td { border-top: 1px solid var(--line-soft); }
.cost-table tbody tr:hover td { background: var(--cyan-soft); }
.cost-table td strong { display: block; color: var(--text); font-weight: 600; }
.cost-table .cost-range { color: var(--cyan); font-weight: 700; white-space: nowrap; }

/* ---------- Responsywność podstron ---------- */

@media (max-width: 1100px) {
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .projects-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-steps.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-steps.cols-5 .step:not(:last-child)::after { display: none; }
  .process-steps.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-steps.cols-3 .step:not(:last-child)::after { display: none; }
}

@media (max-width: 900px) {
  .page-hero-layout { grid-template-columns: 1fr; gap: 52px; }
  .page-hero-media { max-width: 520px; }
  .media-chip { left: 12px; }
  .split-grid { grid-template-columns: 1fr; gap: 48px; }
  .split-grid-reverse > .split-copy { order: 1; }
  .split-grid-reverse > .split-media { order: 2; }
  .split-media { max-width: 520px; }
}

@media (max-width: 640px) {
  .page-hero { padding: calc(var(--header-h) + 30px) 0 64px; }
  .breadcrumbs { margin-bottom: 28px; }
  .cards-grid, .related-grid, .price-grid { grid-template-columns: 1fr; }
  .price-grid.cols-2 { grid-template-columns: 1fr; }
  .projects-grid.cols-3 { grid-template-columns: 1fr; }
  .shot-grid { grid-template-columns: 1fr; max-width: 420px; }
  .process-steps.cols-5 { grid-template-columns: 1fr; }
  .process-steps.cols-3 { grid-template-columns: 1fr; }
  .faq-item summary { padding: 18px 52px 18px 20px; }
  .faq-item summary::after { right: 20px; top: 24px; }
  .faq-answer { padding: 0 20px 20px; }
  .media-chip { display: none; }
}

/* ---------- Artykuł poradnik (dla-inwestorow) ---------- */

.article-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  font-size: 0.84rem;
  color: var(--muted);
}
.article-tag {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--cyan-soft);
  border: 1px solid var(--line);
  color: var(--cyan);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.article-body { max-width: 860px; }
.article-body h2 { margin-top: 54px; scroll-margin-top: calc(var(--header-h) + 24px); }
.article-body h2:first-child { margin-top: 16px; }
.article-body h3 { scroll-margin-top: calc(var(--header-h) + 24px); }
.article-body ul:not(.check-list) {
  margin: 0 0 22px;
  padding-left: 22px;
  display: grid;
  gap: 10px;
}
.article-body ul:not(.check-list) li { color: var(--body); line-height: 1.7; }
.article-body ul:not(.check-list) li::marker { color: var(--cyan); }
.article-body ul:not(.check-list) li strong { color: var(--text); }
.article-body .check-list { margin: 24px 0; }
.article-body .media-frame { margin: 36px 0; }
.article-body .table-wrap { margin: 28px 0; }
.article-body .cta-panel { margin: 48px 0 8px; }

/* Spis treści artykułu */
.toc {
  margin: 30px 0;
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.toc strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
}
.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.toc li::marker { color: var(--cyan); }
.toc a { color: var(--body); }
.toc a:hover { color: var(--cyan); }

/* Ramki wyróżnione: wskazówka / ostrzeżenie */
.callout {
  margin: 30px 0;
  padding: 22px 26px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius-sm);
}
.callout p { margin: 0; font-size: 0.95rem; }
.callout strong { color: var(--text); }
.callout-tip { background: rgba(37, 211, 254, 0.05); border-left-color: var(--cyan); }
.callout-warn { background: rgba(234, 179, 8, 0.06); border-left-color: #eab308; }
.callout-warn strong { color: #f4cf4f; }

/* Oś czasu ze statusami (ok / warn / bad) */
.phase-list { display: grid; gap: 14px; margin: 28px 0; }
.phase-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  transition: border-color 0.25s ease;
}
.phase-item:hover { border-color: var(--line); }
.phase-tag {
  justify-self: start;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
  margin-top: 2px;
}
.phase-ok { color: #2ed573; background: rgba(46, 213, 115, 0.1); border: 1px solid rgba(46, 213, 115, 0.28); }
.phase-warn { color: #eab308; background: rgba(234, 179, 8, 0.1); border: 1px solid rgba(234, 179, 8, 0.28); }
.phase-bad { color: #ef4444; background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.28); }
.phase-item h3 { margin: 0 0 6px; font-size: 1.02rem; }
.phase-item p { margin: 0; font-size: 0.92rem; }

@media (max-width: 640px) {
  .article-body h2 { margin-top: 42px; }
  .phase-item { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- Lista błędów (artykuł poradnikowy) ---------- */

.mistake-list { display: grid; gap: 22px; margin: 30px 0; }

.mistake-item {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px 28px 26px 92px;
  transition: border-color 0.25s ease;
}
.mistake-item:hover { border-color: var(--line); }

.mistake-num {
  position: absolute;
  left: 26px;
  top: 26px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: var(--cyan-soft);
  border: 1px solid var(--line);
  color: var(--cyan);
  font-size: 1.15rem;
  font-weight: 800;
}

.mistake-item h3 { margin: 6px 0 12px; scroll-margin-top: calc(var(--header-h) + 24px); }
.mistake-item > p { margin-bottom: 14px; font-size: 0.98rem; }
.mistake-item .callout { margin: 12px 0 0; }

/* Wariant callout: skutek / ryzyko */
.callout-danger { background: rgba(239, 68, 68, 0.06); border-left-color: #ef4444; }
.callout-danger strong { color: #f87171; }

@media (max-width: 640px) {
  .mistake-item { padding: 22px 20px; }
  .mistake-num { position: static; margin-bottom: 14px; }
}

/* ---------- Callback (zamów rozmowę) - statusy i zgoda RODO ---------- */

.callback-rodo {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 14px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--body);
}
.callback-rodo input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--cyan); flex-shrink: 0; }
.callback-rodo a { color: var(--cyan); text-decoration: underline; }

.callback-form .cf-turnstile { margin-top: 14px; }
.contact-form .cf-turnstile { margin: -4px 0 0; }

.callback-status {
  display: none;
  margin: 14px 0 0;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.55;
}
.callback-status.ok { display: block; background: rgba(46, 213, 115, 0.1); border: 1px solid rgba(46, 213, 115, 0.4); color: #6fe3a0; }
.callback-status.err { display: block; background: rgba(255, 107, 107, 0.1); border: 1px solid rgba(255, 107, 107, 0.4); color: #ff9c9c; }

.callback-done {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #6fe3a0;
}
.callback-done svg { flex-shrink: 0; stroke: #2ed573; }

/* ---------- Kalkulator wyceny (wycena/) ---------- */

[hidden] { display: none !important; }

.calculator-layout { display: grid; gap: 22px; max-width: 1000px; margin: 0 auto; }
#service-details-container { display: grid; gap: 22px; }

.collapse-panel { overflow: hidden; transition: max-height 0.38s var(--ease); }

.calc-step, .service-detail {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px);
}

.calc-step-title, .service-detail-title {
  font-size: clamp(1.3rem, 2vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 8px;
}
.calc-step-desc { font-size: 0.96rem; margin-bottom: 24px; }

/* Wybór usług: kafelki z ikonami */
.service-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 12px;
}
.service-toggle-card { position: relative; }
.service-toggle-card label {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  padding: 20px 14px 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--body);
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.25s var(--ease);
  user-select: none;
}
.service-toggle-card label:hover { border-color: var(--line); color: var(--text); transform: translateY(-3px); }
.service-toggle-card label svg { width: 36px; height: 36px; color: var(--muted); flex-shrink: 0; transition: color 0.25s ease; }
.service-toggle-card.active label {
  border-color: var(--cyan);
  background: var(--cyan-soft);
  color: var(--text);
  box-shadow: 0 0 26px -10px var(--cyan-glow);
}
.service-toggle-card.active label svg { color: var(--cyan); }
.service-toggle-card .check-mark {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--cyan);
  color: #052531;
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s var(--ease);
}
.service-toggle-card.active .check-mark { opacity: 1; transform: scale(1); }

/* Grupy pytań w panelu usługi */
.question-group { margin-top: 30px; display: grid; gap: 12px; }
.question-group:first-of-type { margin-top: 24px; }
.question-group h3 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

/* Suwaki z wartością liczbową */
.question-slider > label { display: block; font-size: 0.94rem; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.slider-wrap { display: grid; grid-template-columns: 1fr 92px auto; gap: 14px; align-items: center; }
.slider-wrap input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}
.slider-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--cyan);
  border: 3px solid #0d1117;
  box-shadow: 0 0 0 1px var(--cyan), 0 0 14px var(--cyan-glow);
  cursor: grab;
}
.slider-wrap input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cyan);
  border: 3px solid #0d1117;
  box-shadow: 0 0 0 1px var(--cyan), 0 0 14px var(--cyan-glow);
  cursor: grab;
}
.slider-wrap input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
.slider-wrap input[type="number"] {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.slider-wrap input[type="number"]::-webkit-outer-spin-button,
.slider-wrap input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.slider-wrap input[type="number"]:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(37, 211, 254, 0.18); }
.slider-wrap .unit { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }

/* Opcje checkbox */
.question-check .checkbox-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.93rem;
  color: var(--body);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  user-select: none;
}
.question-check .checkbox-item:hover { border-color: var(--line); color: var(--text); }
.question-check .checkbox-item input { width: 18px; height: 18px; margin: 0; accent-color: var(--cyan); flex-shrink: 0; }
.question-check .checkbox-item:has(input:checked) { border-color: var(--cyan); background: var(--cyan-soft); color: var(--text); }

/* Pola zagnieżdżone, odkrywane po zaznaczeniu opcji */
.reveals {
  margin: 4px 0 2px 10px;
  padding: 6px 0 6px 22px;
  border-left: 2px solid var(--line);
  display: grid;
  gap: 12px;
}

/* Opcje radio jako pigułki */
.question-radio > label { display: block; font-size: 0.94rem; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.radio-options { display: flex; flex-wrap: wrap; gap: 9px; }
.radio-option-label { position: relative; }
.radio-option-label input { position: absolute; opacity: 0; pointer-events: none; }
.radio-option-label span {
  display: inline-flex;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--body);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.radio-option-label span:hover { border-color: var(--line); color: var(--text); }
.radio-option-label input:checked + span {
  background: var(--cyan-soft);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 16px -4px var(--cyan-glow);
}
.radio-option-label input:focus-visible + span { outline: 3px solid var(--cyan-glow); outline-offset: 2px; }

/* Podsumowanie konfiguracji */
.calc-summary {
  display: grid;
  gap: 20px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 22px 24px;
  margin-bottom: 24px;
}
.calc-summary:empty { display: none; }
.calc-summary:not(:empty)::before {
  content: "Twoja konfiguracja";
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
}
.calc-summary-service > strong { display: block; color: var(--text); font-size: 1rem; margin-bottom: 10px; }
.calc-summary-group + .calc-summary-group { margin-top: 10px; }
.calc-summary-group-title {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 5px;
}
.calc-summary-line { font-size: 0.89rem; line-height: 1.65; color: var(--body); }
.calc-summary-line.is-nested { padding-left: 18px; color: var(--muted); }

/* Formularz kontaktowy kalkulatora */
.calc-form .btn-submit { justify-self: start; }
.calc-form .btn-submit[disabled] { opacity: 0.65; cursor: progress; transform: none; box-shadow: none; }

#calc-form-message { display: none; padding: 14px 18px; border-radius: 12px; font-size: 0.92rem; line-height: 1.55; }
#calc-form-message.error { display: block; background: rgba(255, 107, 107, 0.1); border: 1px solid rgba(255, 107, 107, 0.4); color: #ff9c9c; }
#calc-form-message.ok { display: block; background: rgba(46, 213, 115, 0.1); border: 1px solid rgba(46, 213, 115, 0.4); color: #6fe3a0; }

@media (max-width: 640px) {
  .service-selector-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .slider-wrap { grid-template-columns: 1fr 84px auto; gap: 10px; }
  .reveals { margin-left: 4px; padding-left: 16px; }
}

/* ---------- Wynik kalkulatora (wycena/wynik.html) ---------- */

.wynik-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 40px;
  align-items: start;
}

.wynik-services {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.wynik-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line-soft);
}

.wynik-row:last-child { border-bottom: none; }
.wynik-service-name { font-weight: 500; color: var(--text); }
.wynik-service-price { font-weight: 600; color: var(--cyan); white-space: nowrap; }

.wynik-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding: 20px 24px;
  background: rgba(37, 211, 254, 0.07);
  border: 1px solid rgba(37, 211, 254, 0.25);
  border-radius: var(--radius-sm);
}

.wynik-total span { color: var(--body); font-size: 0.95rem; }
.wynik-total strong { color: var(--cyan); font-size: 1.3rem; font-weight: 700; white-space: nowrap; }

.wynik-note { font-size: 0.78rem; color: var(--muted); margin-top: 12px; line-height: 1.5; }

.wynik-cta-card {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.wynik-cta-card h3 { color: var(--text); font-size: 1.25rem; letter-spacing: -0.01em; }
.wynik-cta-card p { color: var(--body); font-size: 0.92rem; line-height: 1.65; }
.wynik-cta-card .btn { width: 100%; justify-content: center; }

.wynik-disclaimer { padding-top: 16px; border-top: 1px solid var(--line-soft); }
.wynik-disclaimer p { font-size: 0.75rem; color: var(--muted); line-height: 1.5; }

.wynik-fallback { text-align: center; padding: 48px 0 24px; }
.wynik-fallback h2 { color: var(--text); margin-bottom: 14px; }
.wynik-fallback p { max-width: 520px; margin: 0 auto 26px; }

@media (max-width: 900px) {
  .wynik-layout { grid-template-columns: 1fr; gap: 32px; }
  .wynik-cta-card { position: static; }
}

@media (max-width: 640px) {
  .wynik-row { padding: 16px 18px; flex-wrap: wrap; }
  .wynik-total { flex-wrap: wrap; }
  .wynik-cta-card { padding: 26px 22px; }
}

/* ---------- Strona błędu 404 ---------- */

.nf-layout {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  justify-items: center;
  text-align: center;
}

.nf-code {
  font-size: clamp(5rem, 15vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 14px;
  background: linear-gradient(100deg, #8fe9ff, var(--cyan) 55%, var(--cyan-dk));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nf-layout h1 { margin-bottom: 20px; }
.nf-layout .page-lead { margin-left: auto; margin-right: auto; }
.nf-layout .hero-actions { justify-content: center; }
.nf-layout .hero-note { margin-bottom: 0; }
