/* pp-galeria: galeria realizacji w normalnym przepływie (zamiast absolutnych elementów WebWave) */
:root{--pp-ft:4200px}
.pp-galeria{position:relative;z-index:3;box-sizing:border-box;width:calc(100vw - var(--vertical-scrollbar-width,0px));margin-left:calc(-50vw + 50% + var(--vertical-scrollbar-width,0px)/2);padding:89px 0 0;background:#fff}
@media(min-width:1200px){.pp-galeria{padding-top:105px}}
.pp-gal-head{box-sizing:border-box;max-width:1200px;margin:0 auto 24px;padding:0 16px}
.pp-gal-h1{margin:0 0 12px;font:700 28px/1.2 "Montserrat 700 normal",Montserrat,sans-serif;color:#252525;letter-spacing:0;text-transform:none}
@media(min-width:768px){.pp-gal-h1{font-size:34px}}
@media(min-width:1200px){.pp-gal-h1{font-size:40px}.pp-gal-head{margin-bottom:32px}}
.pp-gal-intro p{margin:0;font-family:"Montserrat 400 normal",Montserrat,sans-serif;font-size:16px;line-height:1.6;color:var(--neutral1,#252525)}
/* specyfikacja projektanta */
.pp-gal{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;padding:0 16px;max-width:1200px;margin:0 auto}
@media(min-width:768px){.pp-gal{grid-template-columns:repeat(3,1fr);gap:12px}}
@media(min-width:1200px){.pp-gal{grid-template-columns:repeat(4,1fr);gap:16px}}
.pp-gal figure{margin:0}
.pp-gal img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:6px;display:block}
.pp-gal figcaption{font-size:14px;line-height:1.4;color:#2b2b2b;margin-top:6px}
/* uzupełnienia */
.pp-gal{box-sizing:border-box}
.pp-gal figure{min-width:0}
.pp-gal img{height:auto;background:#eee}
.pp-gal figcaption{font-family:"Montserrat 400 normal",Montserrat,sans-serif;overflow-wrap:anywhere}
.pp-gal figcaption:empty,.pp-gal figcaption[hidden]{display:none}
.pp-gal__link{display:block;border-radius:6px;cursor:zoom-in}
.pp-gal__link:focus-visible{outline:3px solid #224759;outline-offset:2px}
.pp-gal-cta{margin:32px 0 0;padding:0 16px;display:flex;flex-wrap:wrap;justify-content:center;gap:12px}
@media(max-width:479px){.pp-gal-cta .pp-gal-btn{flex:1 1 100%}}
.pp-gal-btn{display:inline-flex;align-items:center;justify-content:center;min-height:48px;box-sizing:border-box;padding:0 28px;background:#FFC31D;color:#252525;
  font:15px/1 "Montserrat 700 normal",Montserrat,sans-serif;letter-spacing:.03em;text-transform:uppercase;text-decoration:none;transition:background .2s,color .2s}
.pp-gal-btn:hover{background:#252525;color:#fff}
.pp-gal-btn--alt{background:#252525;color:#fff}.pp-gal-btn--alt:hover{background:#FFC31D;color:#252525}
.pp-gal-btn:focus-visible{outline:3px solid #224759;outline-offset:2px}
/* lightbox (<dialog>) */
.pp-lb{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:rgba(10,10,10,.94);color:#fff;overflow:hidden}
.pp-lb::backdrop{background:rgba(10,10,10,.94)}
.pp-lb__fig{margin:0;position:absolute;inset:56px 8px 16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}
.pp-lb__img{max-width:100%;max-height:calc(100% - 34px);object-fit:contain;display:block;min-height:0}
.pp-lb__cap{font:15px/1.4 "Montserrat 400 normal",Montserrat,sans-serif;text-align:center;min-height:21px}
.pp-lb__btn{position:absolute;width:44px;height:44px;display:flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;font:32px/1 Arial,sans-serif;cursor:pointer}
.pp-lb__btn:hover{background:rgba(255,255,255,.28)}
.pp-lb__btn:focus-visible{outline:3px solid #FFC31D;outline-offset:2px}
.pp-lb__close{top:8px;right:8px}
.pp-lb__prev,.pp-lb__next{top:50%;transform:translateY(-50%)}
.pp-lb__prev{left:8px}.pp-lb__next{right:8px}
.pp-lb__count{position:absolute;top:20px;left:16px;font:14px/1 "Montserrat 400 normal",Montserrat,sans-serif;opacity:.8}
html.pp-lb-open{overflow:hidden}
/* stan pusty (brak zdjęć) */
.pp-gal[hidden],.pp-gal-empty[hidden]{display:none!important}
.pp-gal-empty{box-sizing:border-box;max-width:1200px;margin:8px auto 0;padding:24px 16px;text-align:center}
.pp-gal-empty p{margin:0;font-family:"Montserrat 400 normal",Montserrat,sans-serif;font-size:16px;line-height:1.6;color:var(--neutral1,#252525)}
/* UX: pierwszy kafel na 2 kolumny (pełne rzędy przy 2 i 4 kolumnach), obraz nadal 4:3 */
.pp-gal figure:first-child{grid-column:span 2}
/* stopka 768–1199: kolumna „Blog” (element_29, 603+170 px) wychodziła 4–5 px poza kontener 768 px */
@media (min-width:768px) and (max-width:1199px){#element_26{width:160px!important}#element_29{width:160px!important}#element_29 .feed_content,#element_29 .feed_item{width:160px!important;max-width:160px!important}}
/* od 768 px pierwszy kafel 2×2 (inaczej wysoki rząd z pustką obok); przy 4 kolumnach 13 zdjęć = 4 pełne rzędy */
@media(min-width:768px){.pp-gal figure:first-child{grid-row:span 2}}
/* ===== PP-GAL-PELNE-RZEDY 2026-10-20: ostatni rząd zawsze pełny (bez pustych komórek), kolejność bez zmian (bez dense) =====
   kafel 1: 2 kolumny (<768) / 2×2 (≥768); komórek = n+1 (<768) lub n+3 (≥768), n = liczba zdjęć
   <768, 2 kol.: n parzyste -> brakuje 1 -> ostatni na 2 kolumny
   768–1199, 3 kol.: n≡2 (mod 3) -> brakuje 1 -> ostatni na 2 kolumny (n=11: 14+1 = 15 = 5 rzędów)
   ≥1200, 4 kol.: n≡3 (mod 4) -> brakuje 2 -> dwa ostatnie po 2 kolumny (n=11: 14+2 = 16 = 4 rzędy)
   szeroki kafel: wysokość obrazu = wysokość zwykłego kafla (4:3 jednej kolumny), liczona z szerokości siatki (cqw) */
@media(max-width:767px){
 .pp-gal{container-type:inline-size}
 .pp-gal figure:first-child:nth-last-child(2n) ~ figure:last-child{grid-column:span 2}
 .pp-gal figure:first-child:nth-last-child(2n) ~ figure:last-child img{aspect-ratio:auto;height:calc((100cqw - 8px)/2*.75)}
}
@media(min-width:768px) and (max-width:1199px){
 .pp-gal{container-type:inline-size}
 .pp-gal figure:first-child:nth-last-child(3n+2) ~ figure:last-child{grid-column:span 2}
 .pp-gal figure:first-child:nth-last-child(3n+2) ~ figure:last-child img{aspect-ratio:auto;height:calc((100cqw - 24px)/3*.75)}
}
@media(min-width:1200px){
 .pp-gal{container-type:inline-size}
 .pp-gal figure:first-child:nth-last-child(4n+3) ~ figure:nth-last-child(-n+2){grid-column:span 2}
 .pp-gal figure:first-child:nth-last-child(4n+3) ~ figure:nth-last-child(-n+2) img{aspect-ratio:auto;height:calc((100cqw - 48px)/4*.75)}
}
@supports not (height:1cqw){
 .pp-gal figure:first-child:nth-last-child(3n+2) ~ figure:last-child img,
 .pp-gal figure:first-child:nth-last-child(4n+3) ~ figure:nth-last-child(-n+2) img,
 .pp-gal figure:first-child:nth-last-child(2n) ~ figure:last-child img{height:auto;aspect-ratio:8/3}
}
/* ===== KONIEC PP-GAL-PELNE-RZEDY ===== */
