/* 14 – Aktualności: układ z focus.html (hero + wyróżniony kafel + karuzela kafelków).
   Wszystkie klasy mają prefiks nf-, żeby nie kolidowały z resztą strony. */
.nf {
  --nf-bg: #F5F8F2;
  --nf-ink: #061E34;
  --nf-text: #4a4a55;
  --nf-purple: #0b1f4b;
  --nf-wave: #e6ece0;
  --nf-navy: #0b1f4b;
  --nf-shadow: rgba(0,0,0,.25);
  position: relative;
  box-sizing: border-box;
  background: var(--nf-bg);
  color: var(--nf-text);
  font-family: 'Poppins', Arial, sans-serif;
  overflow-x: clip;
}
.nf *,
.nf *::before,
.nf *::after {
  box-sizing: border-box;
}
/* HERO */
.nf-hero {
  position: relative;
  min-height: 780px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1500px;
  margin: 0 auto;
  padding: 40px 80px 40px 150px;
  gap: 60px;
}
.nf-waves {
  position: absolute;
  left: -60px;
  top: 0;
  width: 760px;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.nf-text {
  position: relative;
  z-index: 1;
  max-width: 480px;
}
.nf-falcon {
  font-family: 'Marcellus', Optima, serif;
  font-weight: 300;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: 1px;
  color: var(--nf-purple);
  margin: 0;
  opacity: .95;
  text-transform: uppercase;
}
.nf-focus {
  font-family: 'Marcellus', Optima, serif;
  font-weight: 900;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: 2px;
  color: var(--nf-purple);
  margin: 0 0 6px;
  -webkit-text-stroke: .7px var(--nf-purple);
  text-transform: uppercase;
}
.nf-text p {
  font-size: 20px;
  line-height: 1.9;
  margin: 0 0 28px;
  color: var(--nf-text);
}
.nf-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--btn-bg);
  border: 1px solid rgba(6,30,52,.22);
  color: var(--nf-ink);
  font-weight: 800;
  font-size: 18px;
  padding: 17px 36px;
  border-radius: 6px;
  text-decoration: none;
  transition: transform .25s, box-shadow .25s, background .25s;
}
.nf-btn svg {
  fill: var(--nf-ink);
  width: 12px;
  height: 14px;
  transition: transform .25s;
}
.nf-btn:hover,
.nf-btn:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px var(--nf-shadow);
  background: var(--btn-bg-hover);
}
.nf-btn:hover svg,
.nf-btn:focus-visible svg {
  transform: translateX(5px);
}
.nf-btn:focus-visible {
  outline: 3px solid var(--nf-navy);
  outline-offset: 3px;
}
/* WYRÓŻNIONY KAFEL 760 x 680 */
.nf-featured {
  position: relative;
  z-index: 1;
  flex: 0 0 760px;
  width: 760px;
  height: 680px;
  border-radius: 24px;
  overflow: hidden;
  background: #061E34;
  cursor: pointer;
  box-shadow: 0 10px 20px var(--nf-shadow);
  transition: transform .5s ease-in-out, box-shadow .5s ease-in-out;
}
.nf-featured:hover,
.nf-featured:has(:focus-visible) {
  transform: scale(1.025);
  box-shadow: 0 10px 20px var(--nf-shadow);
}
.nf-featured:hover::before,
.nf-featured:has(:focus-visible)::before {
  opacity: 1;
}
.nf-featured:has(:focus-visible) {
  outline: 3px solid var(--nf-navy);
  outline-offset: 4px;
}
.nf-featured::before,
.nf-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6,30,52,.92) 0%, rgba(6,30,52,.85) 35%, rgba(6,30,52,.65) 55%, rgba(6,30,52,.3) 72%, transparent 88%);
  opacity: 0;
  transition: opacity .5s ease-in-out;
  z-index: 1;
}
.nf-featured::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #000 0%, rgba(0,0,0,.85) 12%, transparent 38%);
  transition: background .9s ease;
}
.nf-featured .nf-img,
.nf-card .nf-img {
  position: absolute;
  inset: 0;
  transition: transform .9s ease-in-out;
}
.nf-featured:hover .nf-img,
.nf-featured:has(:focus-visible) .nf-img {
  transform: scale(1.08);
}
.nf-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.nf-featured .nf-info {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 28px;
  z-index: 2;
  transition: bottom .8s ease-in-out;
}
.nf-featured:hover .nf-info,
.nf-featured:has(:focus-visible) .nf-info {
  bottom: 20px;
}
.nf-featured h3 {
  transition: color .8s ease-in-out, margin .8s ease-in-out;
  margin: 0;
  font-weight: 800;
  font-size: 38px;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1.2;
}
.nf-featured:hover h3,
.nf-featured:has(:focus-visible) h3 {
  color: #E2DED1;
  margin-bottom: 14px;
}
.nf-featured .nf-desc {
  font-size: 18px;
  line-height: 1.55;
  color: #E2DED1;
  margin: 0;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(14px);
  transition: all .9s ease-in-out .08s;
}
.nf-featured:hover .nf-desc,
.nf-featured:has(:focus-visible) .nf-desc {
  opacity: 1;
  max-height: 140px;
  transform: none;
}
/* odnośnik w tytule (kafel jest klikalny w całości, patrz JS) */
.nf-card h3 a,
.nf-featured h3 a {
  color: inherit;
  text-decoration: none;
}
.nf-card a:focus-visible,
.nf-featured a:focus-visible {
  outline: none;
}
/* przycisk „czytaj” na zdjęciach = ten sam styl co przycisk w hero */
.nf-tag {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--nf-bg);
  border: 1px solid rgba(6,30,52,.22);
  color: var(--nf-ink);
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0;
  text-transform: none;
  border-radius: 6px;
  padding: 17px 36px;
  width: max-content;
  margin-bottom: 22px;
}
.nf-tag::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 12px solid var(--nf-ink);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}
/* KARUZELA */
.nf-news {
  max-width: 1462px;
  margin: 0 auto;
  padding: 10px 20px 30px;
}
.nf-viewport {
  overflow: hidden;
  padding: 30px 20px 50px;
  margin: -30px -20px -50px;
}
.nf-track {
  display: flex;
  gap: 37px;
  transition: transform .6s cubic-bezier(.65,0,.35,1);
}
.nf-card {
  position: relative;
  flex: 0 0 calc((100% - 74px)/3);
  height: 546px;
  border-radius: 22px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  box-shadow: 0 10px 20px var(--nf-shadow);
  transition: transform .5s ease-in-out, box-shadow .5s ease-in-out;
}
.nf-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #000 0%, rgba(0,0,0,.85) 18%, transparent 48%);
  transition: background .9s ease;
}
.nf-card .nf-info {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 34px;
  z-index: 2;
  transition: bottom .8s ease-in-out;
}
.nf-card h3 {
  margin: 0;
  font-weight: 800;
  font-size: 31px;
  letter-spacing: -.8px;
  color: #fff;
  line-height: 1.2;
  transition: color .8s ease-in-out, margin .8s ease-in-out;
}
.nf-card .nf-tag {
  display: flex;
  font-weight: 800;
  padding: 0 36px;
  border-width: 0;
  margin: 0;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(14px);
  transition: all .8s ease-in-out;
}
.nf-card .nf-desc {
  font-size: 18px;
  line-height: 1.55;
  color: #E2DED1;
  margin: 0;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(14px);
  transition: all .9s ease-in-out .08s;
}
.nf-card:hover,
.nf-card:has(:focus-visible) {
  transform: scale(1.025);
  box-shadow: 0 10px 20px var(--nf-shadow);
}
.nf-card:hover .nf-img,
.nf-card:has(:focus-visible) .nf-img {
  transform: scale(1.08);
}
.nf-card:hover::before,
.nf-card:has(:focus-visible)::before {
  opacity: 1;
}
.nf-card:hover .nf-info,
.nf-card:has(:focus-visible) .nf-info {
  bottom: 20px;
}
.nf-card:hover h3,
.nf-card:has(:focus-visible) h3 {
  color: #E2DED1;
  margin-bottom: 14px;
}
.nf-card:hover .nf-tag,
.nf-card:has(:focus-visible) .nf-tag {
  opacity: 1;
  max-height: 80px;
  transform: none;
  margin-bottom: 18px;
  padding: 17px 36px;
  border-width: 1px;
}
.nf-card:hover .nf-desc,
.nf-card:has(:focus-visible) .nf-desc {
  opacity: 1;
  max-height: 140px;
  transform: none;
}
.nf-card:has(:focus-visible) {
  outline: 3px solid var(--nf-navy);
  outline-offset: 4px;
}
.nf-arrows {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}
.nf-arrow {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 0;
  background: var(--nf-bg);
  box-shadow: inset 0 0 0 1px rgba(6,30,52,.22);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--nf-navy);
  padding: 0;
  transition: transform .25s, box-shadow .25s, background .25s;
}
.nf-arrow svg {
  width: 26px;
  height: 26px;
  stroke: #061E34;
  stroke-width: 2.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .25s;
}
.nf-arrow:hover {
  box-shadow: 0 10px 20px var(--nf-shadow);
  background: #e9eee4;
}
.nf-arrow:disabled {
  opacity: .45;
  cursor: default;
  transform: none;
  box-shadow: none;
}
.nf-arrow.prev:hover svg {
  transform: translateX(-3px);
}
.nf-arrow.next:hover svg {
  transform: translateX(3px);
}
.nf-arrow:disabled:hover svg {
  transform: none;
}
.nf-arrow:focus-visible {
  outline: 3px solid var(--nf-navy);
  outline-offset: 3px;
}
/* EFEKTY WJAZDU (tekst z lewej, zdjęcie z prawej, kafelki od dołu) – uruchamiane po przewinięciu do sekcji */
@keyframes nfInLeft {
  from { opacity: 0; transform: translateX(-90px); } to { opacity: 1; transform: none; }
}
@keyframes nfInRightFar {
  from { opacity: 0; transform: translateX(340px); } to { opacity: 1; transform: none; }
}
@keyframes nfInUp {
  from { opacity: 0; transform: translateY(70px); } to { opacity: 1; transform: none; }
}
@keyframes nfZoomOut {
  from { transform: scale(1.18); } to { transform: scale(1); }
}
.nf-hero:not(.in) .nf-falcon,
.nf-hero:not(.in) .nf-focus,
.nf-hero:not(.in) .nf-text p,
.nf-hero:not(.in) .nf-btn,
.nf-hero:not(.in) .nf-featured,
.nf-hero:not(.in) .nf-waves {
  opacity: 0;
}
.nf-hero.in .nf-falcon {
  animation: nfInLeft .8s cubic-bezier(.22,.8,.3,1) backwards;
}
.nf-hero.in .nf-focus {
  animation: nfInLeft .8s cubic-bezier(.22,.8,.3,1) .12s backwards;
}
.nf-hero.in .nf-text p {
  animation: nfInLeft .8s cubic-bezier(.22,.8,.3,1) .24s backwards;
}
.nf-hero.in .nf-btn {
  animation: nfInLeft .8s cubic-bezier(.22,.8,.3,1) .36s backwards;
}
.nf-hero.in .nf-featured {
  animation: nfInRightFar 1s cubic-bezier(.22,.8,.3,1) .1s backwards;
}
.nf-hero.in .nf-featured .nf-img {
  animation: nfZoomOut 1.4s ease-out .1s backwards;
}
.nf-hero.in .nf-waves {
  animation: nfInLeft 1.2s ease-out backwards;
}
.nf-news:not(.in) .nf-card,
.nf-news:not(.in) .nf-arrows {
  opacity: 0;
}
/* kafelki: środkowy z dołu, prawy z prawej, lewy z lewej (tylko przy przewijaniu w dół) */
@keyframes nfInFromLeft {
  from { opacity: 0; transform: translateX(-220%); } to { opacity: 1; transform: none; }
}
@keyframes nfInFromRight {
  from { opacity: 0; transform: translateX(220%); } to { opacity: 1; transform: none; }
}
.nf-news.in .nf-card:nth-child(2) {
  animation: nfInUp 1.2s cubic-bezier(.22,.8,.3,1) backwards;
}
.nf-news.in .nf-card:nth-child(3) {
  animation: nfInFromRight 1.1s cubic-bezier(.22,.8,.3,1) .15s backwards;
}
.nf-news.in .nf-card:nth-child(1) {
  animation: nfInFromLeft 1.1s cubic-bezier(.22,.8,.3,1) .3s backwards;
}
.nf-news.in .nf-card:nth-child(n+4) {
  animation: none;
}
.nf-hero.nofx *,
.nf-news.nofx *,
.nf-wv.nofx *,
.nf-hero.nofx,
.nf-news.nofx,
.nf-wv.nofx {
  animation: none !important;
}
.nf-news.in .nf-card .nf-img {
  animation: nfZoomOut 1.2s ease-out backwards;
}
.nf-news.in .nf-arrows {
  animation: nfInUp .8s ease-out .8s backwards;
}
/* RESPONSYWNOŚĆ */
@media (max-width: 1200px) {
  .nf-hero {
    flex-direction: column;
    padding: 40px 24px 20px;
    min-height: 0;
  }
  .nf-featured {
    flex: none;
    width: 100%;
    max-width: 760px;
    height: auto;
    aspect-ratio: 760/680;
  }
}
@media (max-width: 900px) {
  .nf-card {
    flex-basis: calc((100% - 37px)/2);
  }
}
@media (max-width: 600px) {
  .nf-card {
    flex-basis: 100%;
    height: 480px;
  }
}
/* dostępność: reduced motion i „Zatrzymaj animacje” z menu dostępności */
@media (prefers-reduced-motion: reduce) {
  .nf *,
  .nf *::before,
  .nf *::after {
    transition: none !important;
    animation: none !important;
  }
}
html.a-noanim .nf *,
html.a-noanim .nf *::before,
html.a-noanim .nf *::after {
  transition: none !important;
  animation: none !important;
}
html.a-noanim .nf-hero .nf-falcon,
html.a-noanim .nf-hero .nf-focus,
html.a-noanim .nf-hero .nf-text p,
html.a-noanim .nf-hero .nf-btn,
html.a-noanim .nf-hero .nf-featured,
html.a-noanim .nf-hero .nf-waves,
html.a-noanim .nf-news .nf-card,
html.a-noanim .nf-news .nf-arrows {
  opacity: 1 !important;
}
html.a-noimg .nf-img img {
  display: none;
}
/* czcionki i marginesy – nadpisują globalne style nagłówków strony */
.nf h2,
.nf h3,
.nf h3,
.nf p,
.nf a,
.nf button,
.nf span,
.nf div {
  font-family: 'Poppins', Arial, sans-serif;
}
.nf h2.nf-falcon,
.nf div.nf-focus {
  font-family: 'Marcellus', Optima, serif;
}
.nf h2.nf-falcon {
  margin: 0;
  font-size: 38px;
  font-weight: 300;
  color: var(--nf-purple);
}
.nf div.nf-focus {
  margin: 0 0 6px;
  font-size: 38px;
}
@media (max-width: 600px) {
  .nf h2.nf-falcon,
  .nf div.nf-focus {
    font-size: 30px;
  }
}
.nf .nf-featured h3 {
  font-size: 38px;
  font-weight: 800;
  margin: 0;
}
.nf .nf-featured:hover h3,
.nf .nf-featured:has(:focus-visible) h3 {
  margin-bottom: 14px;
}
.nf .nf-card h3 {
  font-size: 31px;
  font-weight: 800;
}
.nf .nf-card:hover h3,
.nf .nf-card:has(:focus-visible) h3 {
  margin-bottom: 14px;
}
.nf .nf-text p {
  font-size: 20px;
  line-height: 1.9;
  margin: 0 0 28px;
}
.nf .nf-desc {
  font-size: 18px;
  line-height: 1.55;
  margin: 0;
}
@media (max-width: 600px) {
  .nf .nf-featured h3 {
    font-size: 28px;
  }
  .nf .nf-card h3 {
    font-size: 26px;
  }
}
/* OGŁOSZENIA: te same kafelki i karuzela co w Aktualnościach (plakaty) */
.nf-og .nf-news {
  padding-top: 0;
}
.nf-ogh {
  max-width: 1462px;
  margin: 0 auto;
  padding: 24px 20px 30px;
}
.nf .nf-ogh h2 {
  margin: 0 0 12px;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--nf-ink);
}
.nf .nf-ogh p {
  margin: 0;
  max-width: 820px;
  font-size: 20px;
  line-height: 1.7;
  color: var(--nf-text);
}
.nf-poster .nf-img img {
  object-fit: cover;
  object-position: center top;
}
.nf .nf-poster h3,
.nf .nf-succ h3 {
  font-size: 26px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nf-lnk {
  all: unset;
  cursor: pointer;
  display: block;
}
.nf-lnk:focus-visible {
  outline: none;
}
.nf-card h3 a,
.nf-card h3 .nf-lnk {
  color: inherit;
  text-decoration: none;
  font: inherit;
}
@media (max-width: 600px) {
  .nf .nf-ogh h2 {
    font-size: 30px;
  }
  .nf .nf-ogh p {
    font-size: 17px;
  }
  .nf-ogh {
    padding-top: 20px;
  }
}
.nf .nf-ogh h2,
.nf .nf-ogh p {
  font-family: 'Poppins', Arial, sans-serif;
}
/* przyciski „czytaj” / „powiększ” na kafelkach = styl przycisku „Zobacz aktualności” (też efekt najechania) */
.nf .nf-tag {
  font-family: 'Poppins', Arial, sans-serif;
  font-weight: 800;
  font-size: 18px;
  border: 1px solid rgba(6,30,52,.22);
  border-radius: 6px;
  color: var(--nf-ink);
}
.nf .nf-tag::after {
  transition: transform .25s;
}
.nf .nf-featured .nf-tag {
  transition: transform .25s, box-shadow .25s, background .25s;
}
/* czcionka tytułów kafelków = czcionka nagłówka „Z życia szkoły” (Marcellus), rozmiar bez zmian; opisy i przyciski = Poppins jak akapit */
.nf .nf-featured h3,
.nf .nf-card h3,
.nf .nf-featured h3 a,
.nf .nf-card h3 a,
.nf .nf-card h3 .nf-lnk,
.nf .nf-card h3 span {
  font-family: 'Marcellus', Optima, serif;
  font-weight: 400;
  letter-spacing: 0;
  -webkit-text-stroke: .7px currentColor;
}
.nf .nf-desc {
  font-family: 'Poppins', Arial, sans-serif;
  font-weight: 400;
}

/* Ogłoszenia: kliknięcie zdjęcia = powiększenie, „czytaj” = tekst ogłoszenia */
.nf-poster { cursor: zoom-in; }
.nf-poster .nf-tag, .nf-poster h3 a { cursor: pointer; }
.nf-zoom { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Ogłoszenia: po najechaniu (lub fokusie z klawiatury) – tytuł, krótki tekst i przycisk „Czytaj dalej”.
   Ten sam mechanizm co w pozostałych kafelkach (.nf-desc / .nf-tag): kafelek ma stałą wysokość,
   a treść rośnie w górę wewnątrz .nf-info, więc nic się nie przesuwa. Kolejność: tytuł → tekst → przycisk. */
.nf-poster .nf-info {
  display: flex;
  flex-direction: column;
}
.nf-poster .nf-tag {
  order: 2;
}
.nf .nf-poster .nf-desc {
  order: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.nf .nf-poster:hover .nf-tag,
.nf .nf-poster:has(:focus-visible) .nf-tag {
  margin-top: 16px;
  margin-bottom: 0;
}
/* urządzenia dotykowe (brak najeżdżania): tekst i przycisk widoczne cały czas */
@media (hover: none) {
  .nf .nf-poster .nf-tag {
    opacity: 1;
    max-height: 80px;
    transform: none;
    margin-top: 16px;
    margin-bottom: 0;
    padding: 17px 36px;
    border-width: 1px;
  }
  .nf .nf-poster .nf-desc {
    opacity: 1;
    max-height: 140px;
    transform: none;
  }
  .nf .nf-poster .nf-info {
    bottom: 20px;
  }
  .nf .nf-poster h3 {
    margin-bottom: 14px;
  }
  .nf .nf-poster::after {
    background: linear-gradient(to top, #000 0%, rgba(0,0,0,.9) 45%, transparent 78%);
  }
}

/* przyciski przejścia do sekcji pod przyciskiem „Zobacz aktualności” */
.nf-btns {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.nf-hero.in .nf-btns .nf-btn:nth-child(2) { animation-delay: .46s; }
.nf-hero.in .nf-btns .nf-btn:nth-child(3) { animation-delay: .56s; }
.nf-hero.in .nf-btns .nf-btn:nth-child(4) { animation-delay: .66s; }
.nf-hero.in .nf-btns .nf-btn:nth-child(5) { animation-delay: .76s; }
