/* =========================================================
   NEWS / AKTUALNOŚCI
   Ten plik odpowiada za stronę /news (lista wpisów).
   Nie dotyka single posta.
   ========================================================= */


/* =========================================================
   1. SEKCJA GŁÓWNA + TŁO (full width)
   - tło i gradienty rozlane na całą szerokość
   - sekcja jest podciągnięta pod header (offset -120px)
   ========================================================= */

.news {
  position: relative;
  background: transparent;

  /* bazowe odstępy sekcji */
  padding: 64px 0 88px;

  /* myk: tło zaczyna się od top=0 (pod headerem) */
  margin-top: -120px;   /* wysokość headera */
  padding-top: 120px;
}

/* warstwa tła (gradienty) */
.news::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      900px 400px at 20% 20%,
      rgba(60,120,160,0.10),
      transparent 60%
    ),
    radial-gradient(
      900px 400px at 80% 50%,
      rgba(80,150,190,0.08),
      transparent 65%
    );
  pointer-events: none;
  z-index: 0;
}


/* =========================================================
   2. WARSTWY NAD TŁEM
   - wszystko co ma być "klikane" musi być nad ::before
   ========================================================= */

.news__wrap,
.news__head,
.news__grid,
.news__pagination {
  position: relative;
  z-index: 1;
}


/* =========================================================
   3. WRAPPER STRONY
   - szerokość contentu i boczne paddingi
   ========================================================= */

.news__wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}


/* =========================================================
   4. NAGŁÓWEK STRONY NEWS (tytuł + opis + linia)
   ========================================================= */

.news__head {
  position: relative;
  padding-bottom: 24px;
  margin-bottom: 28px;
}

.news__head::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(40,90,130,0.35),
    transparent
  );
}

.news__title {
  margin: 0;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #0f1f2e;
}

.news__lead {
  margin: 10px 0 0;
  max-width: 70ch;
  font-size: 16px;
  opacity: 0.7;
  color: rgba(15,31,46,0.7);
}


/* =========================================================
   5. GRID KART
   ========================================================= */

.news__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}


/* =========================================================
   6. KARTA NEWSA (link jako cały kafel)
   ========================================================= */

.news-card__link {
  display: block;
  height: 100%;
  padding: 20px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;

  background-color: rgba(245,250,255,0.86);
  border: 1px solid rgba(30,70,100,0.10);
  box-shadow: 0 10px 26px rgba(20,40,60,0.14);
  backdrop-filter: blur(6px);

  transform: translateY(0);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.news-card__link:hover {
  transform: translateY(-4px);
  background-color: rgba(245,250,255,0.92);
  box-shadow: 0 16px 34px rgba(20,40,60,0.20);
}


/* =========================================================
   7. ELEMENTY W KARCIE
   ========================================================= */

.news-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.news-card__badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(40,100,140,0.12);
  color: rgba(20,60,90,0.95);
  border: 1px solid rgba(40,100,140,0.18);
}

.news-card__media {
  border-radius: 5px;
  overflow: hidden;
}

.news-card__meta {
  margin-bottom: 10px;
}

.news-card__date {
  font-size: 12px;
  opacity: 0.65;
  white-space: nowrap;
}

.news-card__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #12283a;
}

.news-card__excerpt {
  margin: 10px 0 0;
  line-height: 1.55;
  opacity: 0.82;
  color: rgba(18,40,58,0.8);
}

.news-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 14px;
  opacity: 0.9;
}

.news-card__arrow {
  display: inline-block;
  transform: translateX(0);
  transition: transform 180ms ease;
}

.news-card__link:hover .news-card__arrow {
  transform: translateX(4px);
}


/* =========================================================
   8. PAGINACJA
   ========================================================= */

.news__pagination {
  margin-top: 28px;
}

.news__pagination .page-numbers {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.news__pagination .page-numbers a,
.news__pagination .page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border-radius: 12px;
  text-decoration: none;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  color: inherit;
}

.news__pagination .page-numbers .current {
  opacity: 0.7;
}


/* =========================================================
   9. RESPONSIVE
   ========================================================= */

@media (max-width: 960px) {
  .news__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .news__grid { grid-template-columns: 1fr; }
  .news__title { font-size: 32px; }
}


/* =========================================================
   10. FEATURED NEWS (ten duży wpis na górze)
   ========================================================= */

.news-featured {
  position: relative;
  padding-bottom: 28px;
  margin-bottom: 56px;
}

.news-featured::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 120px;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(20, 60, 90, 0.35),
    rgba(20, 60, 90, 0)
  );
}

.news-featured__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.news-featured__media {
  position: relative;
  height: 420px;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 18px 50px rgba(20,40,60,0.18);
}

.news-featured__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-featured__content {
  max-width: 720px;
}

.news-featured__top {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  opacity: 0.75;
  margin-bottom: 8px;
}

.news-featured__title {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  margin: 0 0 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.news-featured__excerpt {
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.85;
  margin: 0 0 14px;
}

.news-featured__cta {
  font-weight: 500;
}


/* =========================================================
   11. TRYBY WIDOKU (klasy na kontenerze .news)
   ========================================================= */

/* TRYB 1: featured (1 duży) + grid bez zdjęć */
.news--featured .news-featured { display: block; }
.news--featured .news-card__media { display: block; }

/* TRYB 2: grid-images (zdjęcie w każdej karcie) */
.news--grid-images .news-featured { display: none; }
.news--grid-images .news-card__media { display: block; }