/* Podstrony aktualności: archiwum i pojedynczy artykuł. Korzysta ze zmiennych i kart z style.css. */

.news-page { padding: clamp(28px, 5vw, 56px) 0 clamp(72px, 10vw, 120px); }

.crumbs { margin: 0 0 clamp(20px, 3vw, 32px); font-size: .92rem; }
.crumbs a { color: var(--gray); text-decoration: none; }
.crumbs a:hover, .crumbs a:focus-visible { color: var(--ink); }

/* ---------- Archiwum ---------- */

.archive__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; margin-bottom: clamp(24px, 4vw, 44px); }
.archive__title { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 700; letter-spacing: -.03em; }
.archive__lead { margin: 12px 0 0; color: var(--gray); }

.archive__tools { display: flex; flex-wrap: wrap; gap: 12px; }

.archive__tools label { position: relative; display: block; }

.archive__tools input,
.archive__tools select {
  min-height: 48px;
  padding: 10px 18px;
  border: 1.5px solid #d8d4cd;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: .95rem;
}

.archive__tools input { width: min(100%, 280px); }
.archive__tools input:focus,
.archive__tools select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(227, 0, 16, .12); }

.archive__count { margin: 0 0 20px; color: var(--gray); font-size: .92rem; }
.archive__empty { padding: 56px 24px; border: 2px dashed #d8d4cd; border-radius: var(--radius); text-align: center; color: var(--gray); }
.archive__more { display: flex; justify-content: center; margin-top: clamp(28px, 4vw, 48px); }

/* ---------- Artykuł ---------- */

.article-wrap { max-width: 860px; }

.article__date { display: block; margin-bottom: 14px; color: var(--red); font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.article__title { font-size: clamp(2rem, 5.4vw, 3.4rem); font-weight: 700; line-height: 1.08; letter-spacing: -.03em; }

.article__hero {
  margin: clamp(24px, 4vw, 40px) 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  display: block;
  width: 100%;
}

.article__hero img {
  display: block;
  max-width: 100%;
  max-height: 74vh;
  width: auto;
  height: auto;
  margin-inline: auto;
  border-radius: 22px;
  background: var(--tint);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .1);
}

.article__body { max-width: 42em; }
.article__body p { margin: 0 0 1.15em; color: #2b2b2b; font-size: 1.1rem; line-height: 1.78; }
.article__body ul { margin: 0 0 1.3em; padding-left: 1.3em; color: #2b2b2b; font-size: 1.1rem; line-height: 1.7; }
.article__body li { margin-bottom: .35em; }
.article__body a { color: var(--red); font-weight: 600; text-underline-offset: 3px; overflow-wrap: anywhere; }

/* Ramka z informacją o dofinansowaniu i logotypami (artykuły powiązane z projektami) */
.funding { max-width: 42em; margin-top: clamp(28px, 4vw, 44px); padding: clamp(20px, 3vw, 30px); border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.funding__label { margin: 0 0 6px; color: var(--red); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.funding__title { margin: 0; font-size: 1.1rem; font-weight: 700; line-height: 1.35; }
.funding__facts { margin: 6px 0 0; color: var(--gray); font-size: .92rem; }
.funding__logos { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.funding__logo { display: block; width: auto; max-width: 100%; }
.funding__logo--wide { width: min(100%, 560px); height: auto; }
.funding__logo--flat { height: min(44px, calc((100vw - 110px) / 8.8)); }
.funding__logo--block { height: 56px; }

.article__gallery-title { margin: clamp(36px, 6vw, 64px) 0 18px; font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: 14px;
}

.gallery__item {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--tint);
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
}

.gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
  transition: transform .6s var(--ease-out);
}

.gallery__item:hover img,
.gallery__item:focus-visible img { transform: scale(1.06); }

.article__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: clamp(40px, 6vw, 72px); padding-top: 28px; border-top: 1px solid var(--line); }

.article__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }

.article__nav a {
  display: grid;
  gap: 6px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .25s, transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}

.article__nav a:hover,
.article__nav a:focus-visible { border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, .07); }
.article__nav a:last-child { text-align: right; }
.article__nav small { color: var(--red); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.article__nav span { font-weight: 600; line-height: 1.3; }

.article__loading,
.article__missing { padding: 80px 0; color: var(--gray); font-size: 1.1rem; }

@media (max-width: 560px) {
  .article__nav { grid-template-columns: 1fr; }
  .article__nav a:last-child { text-align: left; }
}

/* ---------- Powiększenie zdjęcia ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(12px, 4vw, 48px);
  background: rgba(10, 10, 10, .92);
  animation: lightbox-in .25s var(--ease-out);
}

.lightbox__img { max-width: 100%; max-height: calc(100dvh - 120px); border-radius: 12px; object-fit: contain; }
.lightbox__count { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); color: #d9d5cf; font-size: .9rem; font-variant-numeric: tabular-nums; }

.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s, transform .2s var(--ease-out);
}

.lightbox__btn:hover,
.lightbox__btn:focus-visible { background: var(--red); transform: scale(1.08); }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__prev { left: clamp(8px, 2vw, 28px); top: 50%; margin-top: -26px; }
.lightbox__next { right: clamp(8px, 2vw, 28px); top: 50%; margin-top: -26px; }

@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
