:root {
  --tlo: #11131a;
  --tlo-karta: #1b1f2a;
  --tekst: #e8e9ee;
  --tekst-slaby: #a3a9bb;
  --akcent: #d8a657;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--tlo);
  color: var(--tekst);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

a { color: var(--akcent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.1rem 1.6rem;
  border-bottom: 1px solid #2a2f3d;
  background: #0d0f15;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .brand { font-size: 1.54rem; font-weight: 400; color: var(--akcent); }
.site-header nav a { margin-left: 1.2rem; font-size: 1.09rem; }

.site-main { max-width: 1240px; margin: 0 auto; padding: 1.6rem; }

.baner {
  width: 100%;
  overflow: hidden;
  background: #000;
  border-bottom: 1px solid #2a2f3d;
}

.baner img {
  display: block;
  width: 100%;
  height: clamp(179px, 40.8vw, 870px);
  object-fit: cover;
  object-position: center;
}

h1 { font-size: 1.8rem; margin-bottom: .3rem; color: var(--akcent); font-weight: 400;}
.lead { color: var(--tekst-slaby); max-width: 70ch; }
.licznik { color: var(--tekst-slaby); font-size: .9rem; }

.siatka {
  column-count: 3;
  column-gap: 1rem;
  margin-top: 1.4rem;
}

.kafel {
  margin: 0 0 1rem;
  break-inside: avoid;
  page-break-inside: avoid;
  background: var(--tlo-karta);
  border: 1px solid #2a2f3d;
  border-radius: 10px;
  overflow: hidden;
}

.kafel .otworz-podglad {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.kafel img {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
  -webkit-user-drag: none;
  user-select: none;
}

.kafel figcaption { padding: .55rem .7rem; font-size: .8rem; }
.kafel .nazwa { display: block; word-break: break-all; }
.kafel .meta { color: var(--tekst-slaby); font-size: .78rem; }

.karty {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
  margin-top: 1.4rem;
  padding: 0;
  list-style: none;
}

.karty li {
  display: flex;
  flex-direction: column;
  background: var(--tlo-karta);
  border: 1px solid #2a2f3d;
  border-radius: 10px;
  overflow: hidden;
  font-weight: 400;
}

.karty li h2 {
  font-size: 1.15rem;
  margin: 0;
  padding: .85rem 1rem .7rem;
  text-align: center;
}

.karty li h2 a { color: var(--akcent); }

.karty li p {
  margin: 0;
  padding: .6rem 1rem .85rem;
  color: var(--tekst-slaby);
  font-size: .85rem;
  text-align: center;
}

.karty li .podglad-link {
  display: block;
  width: 100%;
}

.podglad-kategorii {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  background: #000;
  border-radius: 0;
  margin: 0;
}

.kontakt {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.kontakt a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--tlo-karta);
  border: 1px solid #2a2f3d;
  color: var(--tekst);
  transition: background .15s ease, color .15s ease, transform .15s ease;
}

.kontakt a:hover {
  text-decoration: none;
  transform: translateY(-2px);
  color: #fff;
}

.kontakt a svg { width: 22px; height: 22px; fill: currentColor; }

.kontakt a.facebook:hover { background: #1877f2; border-color: #1877f2; }
.kontakt a.linkedin:hover { background: #0a66c2; border-color: #0a66c2; }
.kontakt a.flickr:hover { background: #0063dc; border-color: #0063dc; }
.kontakt a.email:hover { background: var(--akcent); border-color: var(--akcent); color: #11131a; }

.o-autorze {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 1.5rem;
}

.o-autorze img {
  display: block;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #2a2f3d;
}

.o-autorze p { font-size: 1.05rem; }
.o-autorze h2 { font-size: 1.15rem; color: var(--akcent); margin: 1.5rem 0 0; }

.podglad-zdjecia {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, .9);
  cursor: zoom-out;
}

.podglad-zdjecia[hidden] {
  display: none;
}

.podglad-zdjecia.aktywny {
  display: flex;
}

.podglad-zdjecia .pelny {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 4rem);
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0;
  border: 1px solid #2a2f3d;
  border-radius: 10px;
  -webkit-user-drag: none;
  user-select: none;
}

body.podglad-otwarty {
  overflow: hidden;
}

.site-footer {
  border-top: 1px solid #2a2f3d;
  padding: 1.4rem 1.6rem;
  color: var(--tekst-slaby);
  font-size: .85rem;
  text-align: center;
}

code { background: #0d0f15; padding: .1rem .35rem; border-radius: 4px; }

@media (max-width: 1000px) {
  .siatka { column-count: 2; }
}

@media (max-width: 700px) {
  .site-header { position: static; }
  .site-header nav { display: flex; flex-wrap: wrap; gap: .65rem 1rem; }
  .site-header nav a { margin-left: 0; }
  .o-autorze { grid-template-columns: 1fr; }
  .siatka { column-count: 1; }
  .podglad-zdjecia { padding: 1rem; }
  .podglad-zdjecia .pelny { max-height: calc(100vh - 2rem); }
}
