/* galerie zdjęć (galeria/ i galeria/<album>/) — generowane przez _zrodla/galeria.py */
.podstrona-galeria .tresc { max-width: 1400px; }
.podtytul { text-align: center; font-style: italic; color: var(--przygaszony); margin: -18px 0 10px !important; }
.album-linki { text-align: center; margin: 0 0 26px; font-size: 14px; }
.album-linki a { color: rgba(255,255,255,.85); }
.album-linki a::before { content: "▶"; font-size: 10px; margin-right: 8px; vertical-align: 2px; }

/* okładki albumów */
.albumy { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px; max-width: 1100px; margin: 0 auto 30px; }
.albumy-duze { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.album-k { position: relative; display: block; aspect-ratio: 16 / 9; border: 0 !important; border-radius: 4px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12); transition: box-shadow .25s; background: #111; }
.album-k img { width: 100%; height: 100%; object-fit: cover; border-radius: 0 !important; transition: transform .6s ease, filter .3s; filter: brightness(.62) saturate(.9); }
.album-k:hover { box-shadow: 0 0 0 1px #fff, 0 0 10px 1px rgba(255,255,255,.35), 0 0 30px 4px rgba(255,255,255,.12); }
.album-k:hover img { transform: scale(1.04); filter: brightness(.8); }
.album-k .napis { position: absolute; left: 18px; bottom: 14px; right: 18px; display: flex; align-items: baseline; gap: 12px; }
.album-k .nazwa { font-size: clamp(22px, 2.4vw, 30px); font-style: italic; text-shadow: 0 0 14px rgba(0,0,0,.8); }
.album-k .ile { margin-left: auto; font-size: 12px; letter-spacing: .08em; color: rgba(255,255,255,.75); }
.inne { text-align: center; font-weight: 400; font-style: italic; font-size: clamp(20px, 2vw, 26px); margin: 70px 0 20px; color: rgba(255,255,255,.85); }

/* siatka wyrównana do wierszy */
.siatka { position: relative; }
.siatka a { position: absolute; display: block; border: 0 !important; overflow: hidden; border-radius: 2px; background: #161616; cursor: zoom-in; }
.siatka img { width: 100%; height: 100%; object-fit: cover; border-radius: 0 !important; opacity: 0; transition: opacity .5s, transform .5s, filter .3s; }
.siatka img.ok { opacity: 1; }
.siatka a:hover img { transform: scale(1.035); filter: brightness(1.08); }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 50; background: rgba(5,5,5,.96); display: none; align-items: center; justify-content: center; touch-action: pan-y; }
.lb.otw { display: flex; }
.lb img { max-width: 94vw; max-height: 88vh; object-fit: contain; border-radius: 2px; box-shadow: 0 0 40px rgba(0,0,0,.8); user-select: none; -webkit-user-drag: none; transition: opacity .2s; }
.lb img.laduje { opacity: .35; }
.lb button { position: absolute; background: none; border: 0; color: rgba(255,255,255,.7); font: inherit; cursor: pointer; padding: 18px; line-height: 1; }
.lb button:hover { color: #fff; text-shadow: 0 0 8px rgba(255,255,255,.6); }
.lb .zam { top: max(6px, env(safe-area-inset-top)); right: 8px; font-size: 30px; }
.lb .pop, .lb .nast { top: 50%; transform: translateY(-50%); font-size: 40px; }
.lb .pop { left: 4px; } .lb .nast { right: 4px; }
.lb .licz { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; font-size: 12px; letter-spacing: .1em; color: rgba(255,255,255,.55); }
@media (max-width: 700px) { .lb .pop, .lb .nast { display: none; } .lb img { max-width: 100vw; max-height: 80vh; } }
body.zablokuj { overflow: hidden; }
