

@media print {
  .mtp-1{
    margin-top:300px !important;
  }
  .mtp-2{
    margin-top:560px !important;
  }
  .mtp-3{
    margin-top:750px !important;
  }
  h1, h2, h3, h4, h5, h6,
  .heading-2, .heading-3, .heading-4 {
      page-break-after: avoid !important;
      break-after: avoid !important;
      page-break-inside: avoid !important;
      break-inside: avoid !important;
      margin-bottom: 20px !important; /* Zmniejszamy odstęp w druku, żeby łatwiej skleiło */
  }
  
  /* 2. Zabronienie łamania PRZED elementem, który jest zaraz po nagłówku */
  h1 + *, h2 + *, h3 + *, h4 + *,
  .heading-2 + *, .heading-3 + *, .heading-4 + * {
      page-break-before: avoid !important;
      break-before: avoid !important;
      margin-top: 0 !important; /* Usuwamy górny margines treści, żeby dociągnąć do nagłówka */
  }

  #obraz-9{
    width: 100px !important;
  }
  #ik2{
    width: 100px !important;
  }
  .newswall .col {
    margin-top:55px !important;
}


.newswall .col:nth-child(5) {
  page-break-before: always !important;
  break-before: page !important;
  margin-top: 490px !important; 
}

.newswall .col:nth-child(6) {
margin-top: 490px !important; 
page-break-before: always !important;
break-before: page !important;
}


.newswall .col:nth-child(7) {
  page-break-before: always !important;
  break-before: page !important;
  margin-top: 100px !important; 
}

.newswall .col:nth-child(8) {
margin-top: 100px !important; 
page-break-before: always !important;
break-before: page !important;
}

.callendar-photo {
  break-inside: avoid !important;
  page-break-inside: avoid !important;
  break-before: avoid !important;
  break-after: avoid !important;
}

.list-unstyled .btn-outline-primary,
.listy-unstyled .btn {
    display: flex !important; /* lub block */
    width: 100%;

}



    /* Ukrywanie niepotrzebnych elementów */
    header, footer, nav, .navbar, #download-pdf,
    .btn-outline-primary, .btn, .pagination, 
    .next-prev-buttons {
      display: none !important;
    }
    
    .row.gy-4.align-items-center {
      display: none !important;
    }

    .bf-table{
        width: 80% !important;
       
    }
    
  
    @page {
      size: A4;
      margin: 1cm;
    }
    .big-table {
        width: 95% !important;      
        max-width: 95% !important;
        table-layout: auto !important;
        margin-bottom: 0px !important; 
        font-size: 8pt !important;   
        border-collapse: collapse !important;
        transform: scale(0.9) !important;
    }
    

    .big-table th {
        background-color: #005f4b !important; 
        color: white !important;     
        font-weight: bold !important;
        text-align: center !important;
        vertical-align: middle !important;
        font-size: 80%;
        padding: 4px 2px !important; 
        white-space: normal !important; 
   
    }
    
    /* Stylizacja komórek z danymi */
    .big-table td {
        font-size: 90% !important;
        text-align: right !important; 
        white-space: nowrap !important; 
    }
    
  
    .big-table {
        zoom: 1 !important;           
    }
    
    html {
      zoom: 0.70;
      -moz-transform: scale(0.65);
      -moz-transform-origin: 0 0;
    }
  
    body {
        padding: 0;
      width: 100%;
      margin: 0;
      background: white !important;
      font-size: 11pt;
    }
  
    .container {
      max-width: 100% !important;
      padding: 0 10px;
    }
  
    * {
      -webkit-print-color-adjust: exact !important;
      print-color-adjust: exact !important;
    }
  

    table {
      width: 100% !important;
      max-width: 100% !important;
      border-collapse: collapse !important;
      word-wrap: break-word !important;
      overflow-wrap: break-word !important;
      
    }
  

    table.wide-table {
      transform: scale(0.75);
      transform-origin: top left;
      width: 133.33% !important; 
      margin-bottom: 20px;
    }
  
    table.very-wide-table {
      transform: scale(0.6);
      transform-origin: top left;
      width: 166.67% !important; 
      margin-bottom: 30px;
    }
  
    /* Komórki tabeli */
    table th, table td {
      word-wrap: break-word !important;
      overflow-wrap: break-word !important;
      hyphens: auto !important;
      
 
    }
  

  
    /* Ograniczenie wysokości wierszy z dużą ilością tekstu */
    table.compact-table td {
      max-height: 60px;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  
    /* Obrazy i wykresy */
    img, canvas, figure, .chart {
      max-width: 100% !important;
      width: auto !important;
      height: auto !important;
    }
  
    /* Zapobieganie łamaniu elementów */
    img, canvas, figure, table, .card, .panel, .chart {
      break-inside: avoid !important;
      page-break-inside: avoid !important;
      page-break-after: auto;
    }
  
    /* Nagłówki */
    h1, h2, h3, h4 {
      page-break-after: avoid;
      break-after: avoid;
      margin-top: 12px;
      margin-bottom: 8px;
    }
  
    h1 { font-size: 18pt !important; }
    h2 { font-size: 15pt !important; }
    h3 { font-size: 13pt !important; }
    h4 { font-size: 12pt !important; }
  
    /* Bootstrap fix */
    .row, .col-*, .col {
      display: block !important;
      width: 100% !important;
    }
  
    .figure-caption {
      font-size: 10px;
      margin-bottom: 6px;
    }
  
    /* Dodatkowe klasy pomocnicze */
    .force-break {
      page-break-after: always !important;
    }
  
    .keep-together {
      page-break-inside: avoid !important;
    }

    .spec-table {
        font-size: 90% !important;    
        table-layout: fixed;
    
    }
    .spec-table th:first-child, 
.spec-table td:first-child {
  width: 40px !important; 
}
    
  }


  @media print and (max-width: 1399px) {

    .newswall .col:nth-child(5) {
      page-break-before: always !important;
      break-before: page !important;
      margin-top: 340px !important;
    }
  
    .newswall .col:nth-child(6) {
      margin-top: 340px !important;
      page-break-before: always !important;
      break-before: page !important;
    }
  
  }

  @media print and (max-width: 1200px) {

    .newswall .col:nth-child(5) {
      page-break-before: always !important;
      break-before: page !important;
      margin-top: 340px !important;
    }
  
    .newswall .col:nth-child(6) {
      margin-top: 340px !important;
      page-break-before: always !important;
      break-before: page !important;
    }
    .newswall .col img {
     width: 94% !important;
     padding: -20px !important;
    }
    .newswall .col:nth-child(9) {
      margin-top: 340px !important;
      page-break-before: always !important;
      break-before: page !important;
    }
    .newswall .col:nth-child(10) {
      margin-top: 340px !important;
      page-break-before: always !important;
      break-before: page !important;
    }
  
  
  }
  


.heading-2 {
    position: relative !important;
}

article p,
article li {
  page-break-inside: avoid;
}

/* Główne punkty listy – WSZYSTKIE oprócz tych w header 
+ ignorujemy listy z klasą .list-unstyled */
article ul li:not(header ul li):not(.list-unstyled li) {
    list-style: none; /* usuwamy domyślne bullet */
    position: relative;
    margin-bottom: 0.5rem;
    padding-left: 24px; /* zwiększone miejsce na kwadrat */
}

article ul li:not(header ul li):not(.list-unstyled li)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 5px;
    height: 6px;
    background-color: #147136;
    border-radius: 2px;
}

/* Podpunkty – klasyczne kropki */
article ul li ul {
    margin-top: 0.25rem;
}

article ul li ul li {
    list-style-type: disc;
    color: inherit;
    padding-left: 1.2em;
    margin-bottom: 0.25rem;
}

/* Wyłączenie styli dla list-unstyled */
article ul.list-unstyled li {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
    position: static;
}

article ul.list-unstyled li::before {
    content: none !important;
}.page-break { display: block; page-break-after: always; break-after: page; }

/* placeholder style (jeśli chcesz globalnie) */
.canvas-placeholder {
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f2f2f2;
  color:#333;
  font-size:12px;
}


.pdf-export table {
    width: 100%;
   
  }
  
  .pdf-export body {
    zoom: 0.85;
  }
  
  .pdf-export canvas {
    max-width: 100%;
    display: block;
    margin: 0 auto;
  }
  