/* ps_promobanners – responsywne banery (bez zależności) */
.psb { --psb-gap: 16px; --psb-radius: 8px; --psb-cols: var(--psb-xs, 1); --psb-k: min(var(--psb-cols), var(--psb-cap, 99)); margin: 0 0 1.5rem; }
@media (min-width: 768px) { .psb { --psb-cols: var(--psb-md, 2); } }
@media (min-width: 1200px) { .psb { --psb-cols: var(--psb-xl, 3); } }

.psb__grid { display: grid; gap: var(--psb-gap); grid-template-columns: repeat(var(--psb-cols), minmax(0, 1fr)); }
@supports (grid-template-columns: repeat(min(2, 3), 1fr)) { .psb__grid { grid-template-columns: repeat(var(--psb-k), minmax(0, 1fr)); } }
.psb--single .psb__grid { grid-template-columns: 1fr; }

/* mozaika: duży baner + mniejsze obok (od tabletu) */
@media (min-width: 768px) {
  .psb--mosaic .psb__grid { grid-template-columns: 2fr 1fr; grid-auto-rows: 1fr; }
  .psb--mosaic .psb__item:first-child { grid-row: span 2; }
  .psb--mosaic .psb__item:first-child:last-child { grid-row: auto; grid-column: 1 / -1; }
  .psb--mosaic .psb__item:not(:first-child) .psb__media { height: 100%; }
  .psb--mosaic .psb__item .psb__img { height: 100%; object-fit: cover; }
}

/* rząd na telefonie: przewijany pas zamiast słupka */
@media (max-width: 767px) {
  .psb--mobile-scroll.psb--row .psb__grid,
  .psb--mobile-scroll.psb--mosaic .psb__grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
  .psb--mobile-scroll .psb__grid::-webkit-scrollbar { display: none; }
  .psb--mobile-scroll .psb__item { scroll-snap-align: start; }
}

.psb__item { position: relative; min-width: 0; container-type: inline-size; }
.psb__link { position: relative; display: block; height: 100%; color: inherit; text-decoration: none !important; border-radius: var(--psb-radius); overflow: hidden; isolation: isolate; }
.psb__media { display: block; height: 100%; background: rgba(0, 0, 0, .04); }
.psb__img { display: block; width: 100%; height: auto; max-width: 100%; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.psb--ratio .psb__media { aspect-ratio: var(--psb-ratio); }
.psb--ratio .psb__img { height: 100%; object-fit: var(--pcfit-fit, cover); object-position: var(--pcfit-x, 50%) var(--pcfit-y, 50%); }
.psb--hover-zoom a.psb__link:hover .psb__img, .psb--hover-zoom a.psb__link:focus-visible .psb__img { transform: scale(1.04); }
.psb--hover-lift a.psb__link { transition: transform .25s, box-shadow .25s; }
.psb--hover-lift a.psb__link:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .45); }
.psb__link:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }

/* tekst na banerze */
.psb__text { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: .35em; padding: clamp(12px, 4%, 40px); z-index: 1; color: #fff; }
.psb__item--dark .psb__text { color: #111; }
.psb__item--text-left .psb__text { align-items: flex-start; text-align: left; background: linear-gradient(90deg, rgba(0, 0, 0, .55), transparent 70%); }
.psb__item--text-right .psb__text { align-items: flex-end; text-align: right; background: linear-gradient(270deg, rgba(0, 0, 0, .55), transparent 70%); }
.psb__item--text-center .psb__text { align-items: center; text-align: center; background: rgba(0, 0, 0, .35); }
.psb__item--text-bottom .psb__text { justify-content: flex-end; background: linear-gradient(0deg, rgba(0, 0, 0, .65), transparent 65%); }
.psb__item--dark.psb__item--text-left .psb__text { background: linear-gradient(90deg, rgba(255, 255, 255, .75), transparent 70%); }
.psb__item--dark.psb__item--text-right .psb__text { background: linear-gradient(270deg, rgba(255, 255, 255, .75), transparent 70%); }
.psb__item--dark.psb__item--text-center .psb__text { background: rgba(255, 255, 255, .55); }
.psb__item--dark.psb__item--text-bottom .psb__text { background: linear-gradient(0deg, rgba(255, 255, 255, .8), transparent 65%); }
.psb__title { font-weight: 800; font-size: clamp(1rem, 2.6vw, 2.1rem); font-size: clamp(1rem, 6.5cqi, 2.4rem); line-height: 1.1; text-wrap: balance; }
.psb__subtitle { font-size: clamp(.82rem, 1.4vw, 1.1rem); font-size: clamp(.8rem, 3.2cqi, 1.15rem); line-height: 1.35; max-width: 32em; }
.psb__cta { margin-top: .4em; display: inline-block; padding: .55em 1.2em; border-radius: 999px; background: #fff; color: #111; font-weight: 700; font-size: clamp(.78rem, 1.1vw, .95rem); font-size: clamp(.75rem, 2.6cqi, 1rem); }
.psb__item--dark .psb__cta { background: #111; color: #fff; }
.psb__item--text-bottom .psb__cta { align-self: flex-start; }
@container (max-width: 260px) { .psb__subtitle { display: none; } }

/* slider */
.psb__viewport { position: relative; }
.psb__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: var(--psb-radius); }
.psb__track::-webkit-scrollbar { display: none; }
.psb__slide { flex: 0 0 100%; scroll-snap-align: start; min-width: 0; }
.psb__arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: #111; font-size: 28px; line-height: 1; display: grid; place-items: center; padding: 0 0 4px; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); opacity: 0; transition: opacity .2s; }
.psb__arrow--prev { left: 12px; }
.psb__arrow--next { right: 12px; }
.psb__viewport:hover .psb__arrow, .psb__arrow:focus-visible { opacity: 1; }
@media (hover: none) { .psb__arrow { display: none; } }
.psb__dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.psb__dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: rgba(0, 0, 0, .22); cursor: pointer; transition: width .25s, background .25s; }
.psb__dot.is-active { width: 26px; background: rgba(0, 0, 0, .7); }
@media (prefers-reduced-motion: reduce) { .psb__track { scroll-behavior: auto; } .psb__img { transition: none; } }

/* tryb motywu: obraz zawsze mieści się w kontenerze */
.psb__img--compat { max-width: 100%; height: auto; }

/* w kolumnie sekcji Kompozytora (kontener „pccol”): kolumny banerów według ekranu, ale najwyżej tyle,
 * ile zmieści kolumna (~220 px na baner); mozaika w wąskiej kolumnie – jeden pod drugim */
@container pccol (max-width: 1163px) { .psb { --psb-cap: 4; } }
@container pccol (max-width: 927px) { .psb { --psb-cap: 3; } }
@container pccol (max-width: 691px) { .psb { --psb-cap: 2; } }
@container pccol (max-width: 455px) { .psb { --psb-cap: 1; } }
@container pccol (max-width: 559px) {
  .psb.psb--mosaic .psb__grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .psb.psb--mosaic .psb__item:first-child { grid-row: auto; }
  .psb.psb--mosaic .psb__item .psb__img { height: auto; }
}

/* ---- Dopasowanie wysokości w rzędzie sekcji Kompozytora ----
 * Na naturalnej wysokości baner bez zmian. W wyższej kolumnie / w kolumnie dopasowanej do wzorca obraz wypełnia
 * miejsce (kadrowanie od środka – ważne elementy banera trzymaj z dala od krawędzi). */
.pc-sec--stretch > .pc-sec-col .psb { height: 100%; margin-bottom: 0; display: flex; flex-direction: column; box-sizing: border-box; }
.pc-sec--stretch > .pc-sec-col .psb__grid { flex: 1 1 auto; grid-auto-rows: minmax(0, 1fr); min-height: 0; }
.pc-sec--stretch > .pc-sec-col .psb__item { min-height: 0; }
.pc-sec--stretch > .pc-sec-col .psb--slider .psb__viewport { flex: 1 1 auto; min-height: 0; }
.pc-sec--stretch > .pc-sec-col .psb__item,
.pc-sec--stretch > .pc-sec-col .psb__link { height: 100%; }
.pc-sec--stretch > .pc-sec-col .psb__link { display: block; }
.pc-sec--stretch > .pc-sec-col .psb__img { height: 100% !important; object-fit: var(--pco-fit, var(--pcfit-fit, cover)); object-position: var(--pco-x, var(--pcfit-x, 50%)) var(--pco-y, var(--pcfit-y, 50%)); }
/* tryb „jak w motywie” (<p><a><img>) – pojedynczy baner wypełnia blok */
.pc-sec--stretch > .pc-sec-col p:only-child > a:only-child { display: block; height: 100%; }
.pc-sec--stretch > .pc-sec-col p:only-child { margin: 0; }
/* motyw: .czbanners > .container > p > a > img – każde ogniwo musi mieć wysokość kolumny, inaczej obraz bierze naturalną (kadr nic nie zmienia) */
.pc-sec--stretch > .pc-sec-col .czbanners { height: 100%; overflow: hidden; }
.pc-sec--stretch > .pc-sec-col .czbanners > .czbanner_container,
.pc-sec--stretch > .pc-sec-col .czbanners > .czbanner_container > p:only-child { height: 100%; margin: 0; padding: 0; }
.pc-sec--stretch > .pc-sec-col p:only-child > a:only-child > img.psb__img--compat,
.pc-sec--stretch > .pc-sec-col p:only-child > img.psb__img--compat:only-child { display: block; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: var(--pco-fit, var(--pcfit-fit, cover)); object-position: var(--pco-x, var(--pcfit-x, 50%)) var(--pco-y, var(--pcfit-y, 50%)); }
/* motyw ma reguły z identyfikatorem (#czbannercmsblock img { height: auto }) – w wypełnieniu muszą ustąpić */
