/* Poprawki pozycjonowaniestronchorzow.pl — plik tworzony automatycznie przez update.php */

/* Nagłówek z logo i menu przyklejony u góry na wszystkich urządzeniach.
   Na komputerze ciemny pasek z telefonem chowa się przy przewijaniu, a logo i menu zostają. */
html{overflow-x:hidden}
body{overflow-x:visible!important}
@supports (overflow:clip){html,body{overflow-x:clip!important}}
header.hd-d,header.hd-m{position:-webkit-sticky!important;position:sticky!important;z-index:80!important;box-shadow:0 2px 12px rgba(38,38,38,.06)}
header.hd-d{top:-42px!important}
header.hd-m{top:0!important}
html{scroll-padding-top:150px}
@media (max-width:1239px){html{scroll-padding-top:100px}}

/* Menu na komputerze (od 1240 px): wszystkie podstrony widoczne —
   logo i przyciski w górnym rzędzie, pełne menu w drugim rzędzie */
@media (min-width:1240px){
  header.hd-d>div:nth-of-type(2){flex-wrap:wrap!important;min-height:0!important;padding-top:10px!important;gap:0 20px!important}
  header.hd-d>div:nth-of-type(2)>a:first-child{order:1}
  header.hd-d>div:nth-of-type(2)>nav+div{order:2;margin-left:auto}
  header.hd-d nav[aria-label="Menu główne"]{order:3;flex:1 1 100%;justify-content:space-between;flex-wrap:wrap;margin-top:10px;border-top:1px solid #ECECEC;gap:0!important}
  header.hd-d nav[aria-label="Menu główne"]>a{padding:12px 6px 11px!important;border-radius:0!important;background:transparent!important;border-bottom:3px solid transparent;font-size:15px!important}
  header.hd-d nav[aria-label="Menu główne"]>a:hover{background:transparent!important;color:#0047BB!important;border-bottom-color:#DADADA}
  header.hd-d nav[aria-label="Menu główne"]>a[aria-current="page"]{color:#00358C!important;border-bottom-color:#0047BB}
}

/* Menu na telefonie i tablecie: pełna lista, przewijana, nie zasłania jej dolny pasek */
#menu-mobilne{max-height:calc(100vh - 85px)!important;max-height:calc(100dvh - 85px)!important;overscroll-behavior:contain}
#menu-mobilne>a[aria-current="page"]{background:#F5F5F5;border-radius:6px;padding-left:10px;padding-right:10px}
body:has(#menu-mobilne:not([hidden])) .mbar{display:none!important}
@media (max-width:360px){header.hd-m a[aria-label] span span:first-child{font-size:13px!important}header.hd-m a[aria-label] span span:last-child{font-size:18px!important}header.hd-m a[aria-label] img{width:52px!important;height:52px!important}}

/* Formularz */
.pc-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden;opacity:0}
.lf-ok[hidden],[data-kind][hidden]{display:none!important}
.pc-err{margin:0;padding:12px 14px;border:1px solid #F1C6C3;background:#FDF3F2;border-radius:10px;font-size:15px;line-height:1.5;color:#B3261E}
.pc-err a{color:#B3261E;font-weight:600}

/* Adres e-mail: zawsze w całości i w jednej linii — czcionka dopasowuje się do szerokości boksu */
main p:has(a[href^="mailto:"]),main td:has(a[href^="mailto:"]),footer address{container-type:inline-size}
main a[href^="mailto:"],footer a[href^="mailto:"]{display:inline-block;white-space:nowrap!important;max-width:100%;vertical-align:bottom;font-size:min(1em,calc(100cqi / 19))}
@media (max-width:600px){
  main table td[style*="width: 42%"]{display:block;width:auto!important;padding-bottom:0!important}
  main table td[style*="width: 42%"]+td{display:block;padding:2px 22px 12px!important}
}

/* Długie słowa nigdy nie wychodzą poza boksy */
main,footer,aside{overflow-wrap:break-word}
main [style*="display: grid"]>*,main [style*="display: flex"]>*,footer [style*="display: grid"]>*{min-width:0}
footer address>span:first-child{flex-wrap:nowrap;align-items:center}
footer address>span:first-child>span:last-child{min-width:0;line-height:1.2}

/* Zdjęcia: pełne, bez przycinania, z zachowaniem proporcji */
main img:not([width="96"]):not([width="160"]):not([style*="position: absolute"]):not([style*="width: auto"]){height:auto!important;max-width:100%;object-fit:contain!important}
main img[loading="lazy"]:not([width="96"]):not([style*="width: auto"]){background:#F5F5F5}

/* Tabele na telefonie: bez przewijania w bok i bez uciętych kolumn */
@media (max-width:640px){main table.pc-fit{min-width:0!important}}
@media (max-width:800px){
  main table.pc-stack{min-width:0!important}
  main table.pc-stack thead{display:none}
  main table.pc-stack,main table.pc-stack tbody,main table.pc-stack tr,main table.pc-stack th,main table.pc-stack td{display:block;width:100%!important}
  main table.pc-stack tr{padding:12px 16px;border-bottom:1px solid #ECECEC}
  main table.pc-stack tr:last-child{border-bottom:0}
  main table.pc-stack td,main table.pc-stack th{display:flex;justify-content:space-between;gap:14px;padding:4px 0!important;text-align:right!important;background:transparent!important;border:0!important}
  main table.pc-stack td::before,main table.pc-stack th::before{content:attr(data-label);text-align:left;color:#6E6E6E;font-weight:500;flex:0 1 45%}
  main table.pc-stack tr>:first-child{display:block;text-align:left!important;font-weight:600;font-size:18px;padding-bottom:6px!important}
  main table.pc-stack tr>:first-child::before{display:none}
  main table.pc-stack td{overflow-wrap:break-word;hyphens:auto}
}
@media (max-width:480px){
  main table.pc-stack td,main table.pc-stack th{gap:10px;font-size:16px!important}
  main table.pc-stack td::before,main table.pc-stack th::before{font-size:14.5px;flex:0 0 40%}
}

/* Płynne przejścia między podstronami */
@view-transition{navigation:auto}
header.hd-d{view-transition-name:pc-hd-d}
header.hd-m{view-transition-name:pc-hd-m}
::view-transition-old(root){animation:pc-out .2s ease both}
::view-transition-new(root){animation:pc-in .3s cubic-bezier(.2,.7,.2,1) both}
@keyframes pc-out{to{opacity:0;transform:translateY(-6px)}}
@keyframes pc-in{from{opacity:0;transform:translateY(8px)}}
.no-vt main,.no-vt footer,.no-vt aside{animation:pc-in .32s cubic-bezier(.2,.7,.2,1) both}
.no-vt.is-leaving main,.no-vt.is-leaving footer,.no-vt.is-leaving aside{opacity:0;transform:translateY(-6px);transition:opacity .18s ease,transform .18s ease}
html{scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
  ::view-transition-old(root),::view-transition-new(root){animation:none}
}
