/* Polska wersja do druku — Ctrl+P / Zapisz jako PDF */

@page {
  size: A4;
  margin: 14mm 15mm 16mm;
}

* {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

html,
body {
  background: #fff !important;
  color: #111 !important;
  font-size: 10.5pt;
  line-height: 1.45;
}

.wrap {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Belka serwisu, język, skip-link, link do CSMLite — nie na PDF */
.top-bar,
.lang,
.skip-link,
.kicker-go,
.en {
  display: none !important;
}
.top-bar + .wrap {
  padding-top: 0;
}
.pl {
  display: revert !important;
}

a {
  color: inherit !important;
  text-decoration: none !important;
}

header {
  margin-bottom: 1.25rem;
  break-after: avoid;
  page-break-after: avoid;
}

.header-top {
  margin-bottom: 0.35rem;
}

h1 {
  font-size: 18pt;
  margin-bottom: 0.4rem;
}

.lede {
  color: #333 !important;
  max-width: none;
}

h2 {
  font-size: 13pt;
  margin: 0 0 0.5rem;
  break-after: avoid;
  page-break-after: avoid;
}

h3 {
  font-size: 11.5pt;
  break-after: avoid;
  page-break-after: avoid;
}

section {
  margin-top: 1.1rem;
}

/* Intro + problem na pierwszej stronie razem z loginem */
section:first-of-type {
  break-inside: avoid;
  page-break-inside: avoid;
}

/* Sekcja rozwiązań od nowej strony */
section:nth-of-type(3) {
  break-before: page;
  page-break-before: always;
}

/* Karty: nigdy nie tnij w środku. Chrome często ignoruje avoid przy „doklejaniu”
   do resztki strony — szerokie karty ze zrzutem zawsze od nowej strony. */
article.decision {
  break-before: auto;
  page-break-before: auto;
  break-inside: avoid !important;
  page-break-inside: avoid !important;
  overflow: hidden;
  margin-top: 0.65rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff !important;
  box-shadow: none;
}

section:nth-of-type(3) > h2.pl + article.decision,
section:nth-of-type(3) > h2.en + article.decision,
section:nth-of-type(3) > article.decision:first-of-type {
  margin-top: 0;
}

/* Pełnoszerokościowy zrzut (kreator, lista): nie zaczynaj w „ogonie” poprzedniej strony */
article.decision:not(.decision--split):has(.shots) {
  break-before: page;
  page-break-before: always;
}

article.decision:not(.decision--split) .shot img {
  max-height: 115mm;
}

/* Karty split: tekst | zrzut — mogą iść po kilka, byle w całości */
article.decision.decision--split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 0.55rem 0.85rem;
  align-items: start;
  padding: 0.55rem 0.7rem;
}

article.decision.decision--split .decision-copy h3 {
  font-size: 11pt;
  margin: 0 0 0.15rem;
}

article.decision.decision--split .decision-copy p {
  margin: 0.2rem 0 0;
  font-size: 9.5pt;
  line-height: 1.35;
}

article.decision.decision--split .label {
  margin-top: 0.35rem !important;
  font-size: 7.5pt;
}

article.decision.decision--split .shots {
  margin-top: 0;
  align-self: center;
}

article.decision.decision--split figure.shot {
  break-inside: avoid;
  page-break-inside: avoid;
}

article.decision.decision--split .shot img {
  max-height: 78mm;
}

article.decision.decision--split figure.shot.shot--two-thirds {
  max-width: 100%;
  margin-inline: 0;
}

article.decision.decision--split figure.shot.shot--phone {
  max-width: 42mm;
  margin-inline: 0;
}

article.decision.decision--split figcaption {
  padding: 0.3rem 0.45rem 0.4rem;
  font-size: 8pt;
}

.label {
  color: #1d4ed8 !important;
  margin-top: 0.55rem !important;
}

.shots {
  margin-top: 0.75rem;
  gap: 0.75rem;
}

figure.shot {
  break-inside: avoid;
  page-break-inside: avoid;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: visible;
  background: #fff !important;
}

.shot img {
  max-width: 100%;
  max-height: 95mm;
  width: auto;
  height: auto;
  margin-inline: auto;
  background: #fff !important;
  object-fit: contain;
}

figure.shot.shot--two-thirds {
  max-width: 70%;
  margin-inline: auto;
}

figure.shot.shot--phone {
  max-width: 48mm;
  margin-inline: auto;
}

.shot--empty .ph {
  min-height: 4rem;
  border: 1px dashed #bbb;
}

figcaption {
  padding: 0.45rem 0.6rem 0.65rem;
  font-size: 9pt;
  color: #333 !important;
}

/* Lista funkcji — nowa strona */
section.features {
  break-before: page;
  page-break-before: always;
}

section.features ul {
  break-inside: avoid;
  page-break-inside: avoid;
}

.site-footer {
  break-before: auto;
  page-break-before: auto;
  break-inside: avoid;
  page-break-inside: avoid;
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 9pt;
  color: #333 !important;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand,
.footer-company {
  max-width: none;
  text-align: left;
}

.footer-company {
  text-align: right;
}

.footer-copy {
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px solid #ccc;
  text-align: center;
}
