/* ==========================================================================
   BCU Reszel - style wspólne (header, footer, typografia)
   ========================================================================== */

/* IBM Plex Sans - font zmienny, hostowany lokalnie (latin + latin-ext) */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body{margin:0;background:#ffffff;font-family:'IBM Plex Sans',system-ui,sans-serif;color:#1d1d2b;font-size:17px;line-height:1.6}
[hidden]{display:none !important}
a{color:#0b5cad}a:hover{color:#12115e}
*:focus-visible{outline:3px solid #0b5cad;outline-offset:3px}
.skip{position:absolute;left:-9999px;top:8px;background:#ffffff;color:#12115e;padding:10px 16px;font-weight:600;z-index:10}
.skip:focus{left:16px}
.wrap{max-width:1320px;margin:0 auto;padding:0 32px;box-sizing:border-box}

/* Pasek narzędzi */
.util a,.util button{color:#ffffff}
.util a:hover{color:#ffe2b0}
.ubtn{background:transparent;border:1px solid rgba(255,255,255,.55);color:#ffffff;font:inherit;font-size:14px;min-height:34px;min-width:34px;padding:0 10px;border-radius:4px;cursor:pointer}
.ubtn:hover{background:rgba(255,255,255,.12)}

/* Pasek logotypów */
.ph-logo{border:1px dashed #8a93a3;color:#4a4f5c;font-size:13px;padding:0 14px;height:52px;display:flex;align-items:center;border-radius:4px;background:#f6f8fa}

/* Menu główne */
.nav{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px}
.nav a{display:flex;align-items:center;min-height:44px;padding:0 12px;text-decoration:none;color:#1d1d2b;font-weight:600;font-size:15px;letter-spacing:.02em;text-transform:uppercase;border-bottom:3px solid transparent}
.nav a:hover{color:#0b5cad;border-bottom-color:#c9daf0}
.nav a[aria-current="page"]{color:#0b5cad;border-bottom-color:#0b5cad}

/* Stopka */
.ft a{color:#12115e}
.ft ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}

/* Ograniczenie ruchu (WCAG 2.3.3) - wyłącza animacje i przejścia, gdy użytkownik ustawił to w systemie */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}
}

/* Treść z edytora WP (wpisy, strony bez dedykowanego szablonu) */
.entry-content > :first-child{margin-top:0}
.entry-content > :last-child{margin-bottom:0}
.entry-content{max-width:820px}
.entry-content h2{font-size:28px;font-weight:600;color:#12115e;line-height:1.3;margin:40px 0 14px}
.entry-content h3{font-size:21px;font-weight:600;color:#12115e;line-height:1.3;margin:32px 0 10px}
.entry-content p{margin:0 0 14px}
.entry-content img{max-width:100%;height:auto;border-radius:12px}

/* Klasy wydzielone z atrybutów style="" w szablonach */
.hdr-box1{background:#12115e;color:#ffffff;font-size:14px}
.hdr-box2{display:flex;flex-wrap:wrap;gap:8px 24px;align-items:center;justify-content:space-between;padding-top:8px;padding-bottom:8px}
.hdr-txt1{margin:0}
.hdr-txt1 a{white-space:nowrap}
.hdr-box3{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.hdr-box7{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
/* Telefon: pasek wyśrodkowany - kontakt, deklaracja, a pod nimi rozmiar tekstu i kontrast w jednej linii */
@media (max-width:760px){
  .hdr-box2,.hdr-box3,.hdr-box7{justify-content:center;text-align:center}
  .hdr-box2{padding-left:16px;padding-right:16px}
  .hdr-box3{flex-direction:column;gap:10px}
  .hdr-box3 .hdr-span1{display:none}
  .hdr-box7{gap:4px}
  .hdr-box7 .ubtn{padding:0 6px}
}
.hdr-span1{opacity:.5}
.hdr-btn1,.hdr-btn1:hover{font-size:16px}
.hdr-btn2,.hdr-btn2:hover{font-size:18px}
.hdr-link1,.hdr-link1:hover{display:flex;align-items:center;justify-content:center;width:34px;height:34px}
.hdr-box4{border-bottom:1px solid #e3e8ee}
.hdr-box5{display:flex;flex-wrap:wrap;gap:16px;justify-content:center;padding-top:14px;padding-bottom:14px}
.hdr-box6{display:flex;flex-wrap:wrap;gap:16px 32px;align-items:center;justify-content:space-between;padding-top:18px;padding-bottom:18px}
.hdr-link2,.hdr-link2:hover{display:flex;align-items:center;gap:12px;text-decoration:none;color:#1d1d2b}
.hdr-brand{display:block;height:56px;width:auto;max-width:min(320px,60vw);object-fit:contain;object-position:left center}
.hdr-span2{display:flex;flex-direction:column;line-height:1.1}
.hdr-span3{font-weight:700;font-size:15px;letter-spacing:.02em}
.hdr-span4{font-size:15px;letter-spacing:.06em}
.hdr-nav1{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.hdr-btn3,.hdr-btn3:hover{width:44px;height:44px;border:1px solid #b8c6d6;border-radius:999px;background:#ffffff;color:#12115e;display:flex;align-items:center;justify-content:center;cursor:pointer}
.ftr-box1{display:grid;grid-template-columns:repeat(auto-fit, minmax(min(220px, 100%), 1fr));gap:32px;padding-top:48px;padding-bottom:32px}
.ftr-txt1{margin:0 0 8px;font-weight:700;color:#12115e}
.ftr-box2{border-top:1px solid #b8cfe0;padding-top:16px;padding-bottom:24px;font-size:14px;color:#3a3f4b}
.e404-box1{padding-top:48px;padding-bottom:72px}
.e404-link1,.e404-link1:hover{font-weight:600}
.hero-sec1{background:#e4f0f8;padding:40px 0 36px}
.hero-h1-1{margin:0 0 12px;font-size:44px;line-height:1.15;font-weight:600;color:#12115e}
@media (max-width:600px){.hero-sec1{padding:28px 0 24px}.hero-h1-1{font-size:clamp(28px, 8vw, 32px)}}
.ncard-box1{aspect-ratio:16 / 9;background:#eef3f8}
.ncard-box2{padding:20px;display:flex;flex-direction:column;gap:8px}
.ncard-txt1{margin:0;font-size:14px;color:#4a4f5c}
.ncard-h3-1{margin:0;font-size:19px;line-height:1.4}
.ncard-txt2{margin:0;font-size:16px;color:#3a3f4b}
.ftr{background:#e4f0f8;color:#1d1d2b;font-size:16px}
.ftr-border{border-top:1px solid #c9daf0}
.hero-lead{margin:0;max-width:760px;font-size:19px;color:#2b2f3a}
.hero-lead--mb16{margin-bottom:16px}
.hero-lead--mb24{margin-bottom:24px}
.hero-lead--w720{max-width:720px}
.bc{font-size:15px;margin-bottom:12px}
.bc-sep,.bc-current{color:#4a4f5c}
.thumb-img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
/* Miniatury wpisów: zdjęcie dowolnych proporcji (np. pionowe) przycięte do pola 16:9, pole nie rośnie. */
.ncard-box1,.akt-box2,.post-box2{position:relative;overflow:hidden}
.ncard-box1 .thumb-img,.akt-box2 .thumb-img,.post-box2 .thumb-img{position:absolute;inset:0}
.pag{margin-top:40px}
.pag-list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.pg{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:0 12px;border-radius:8px;border:1px solid #b8c6d6;background:#ffffff;text-decoration:none;color:#12115e;font:inherit;font-weight:600;box-sizing:border-box;cursor:pointer}
.pg:hover{border-color:#12115e;color:#12115e}
.pg[aria-current="page"]{background:#12115e;color:#ffffff;border-color:#12115e}
.pag-gap{display:inline-flex;align-items:center;min-height:44px;padding:0 2px;color:#4a4f5c}
.pag-gap-m{display:none}
/* Telefon: paginacja w jednej linii - strzałki bez napisu (napis zostaje dla czytników ekranu), tylko pierwsza, bieżąca i ostatnia strona */
@media (max-width:600px){
  .pag-list{gap:6px}
  .pg{min-width:40px;padding:0 8px}
  .pg:has(.pg-txt){min-width:44px;padding:0}
  .pag-near,.pag-gap-d{display:none}
  .pag-gap-m{display:inline-flex}
  .pg-txt{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  .pag-arrow-right,.pag-arrow-left{margin:0}
}
.pag-arrow-right{margin-right:6px}
.pag-arrow-left{margin-left:6px}

/* Bloki ACF: zdjęcia wypełniające ramkę placeholdera, osadzenia ładowane po kliknięciu */
.bcu-img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.bcu-embed{display:block;width:100%;height:100%;border:0;border-radius:inherit}
div.has-embed{padding:0}
.hdr-logo{display:block;height:70px;width:auto}
/* Telefon: logotypy KPO, RP i UE pod sobą, ale ciaśniej i niższe niż na desktopie - nadal dobrze widoczne */
@media (max-width:600px){
  .hdr-box5{flex-direction:column;align-items:center;gap:10px;padding-top:12px;padding-bottom:12px}
  .hdr-logo{height:52px}
}

/* Menu mobilne (panel z prawej na cały ekran) i panel wyszukiwania - bez JS menu zostaje rozwinięte, a formularz widoczny */
/* Nagłówek (logo + menu) przyklejony do góry ekranu po przewinięciu paska i logotypów; poniżej 600px pasek admina WP nie jest przyklejony */
header{position:sticky;top:0;z-index:50;background:#ffffff;box-shadow:0 1px 0 #e3e8ee}
.admin-bar header{top:32px}
@media (max-width:782px){.admin-bar header{top:46px}}
@media (max-width:600px){.admin-bar header{top:0}}
html{scroll-padding-top:120px}
.hdr-menu-btn,.hdr-search-btn{display:none}
.js .hdr-search-btn{display:flex}
.hdr-menu-btn{align-items:center;gap:8px;min-height:44px;padding:0 16px;border:1px solid #b8c6d6;border-radius:999px;background:#ffffff;color:#12115e;font:inherit;font-size:15px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;cursor:pointer}
.hdr-panel{display:contents}
.hdr-panel-top{display:none}
.hdr-search-btn[aria-expanded="true"]{background:#12115e;border-color:#12115e;color:#ffffff}
.hdr-search{background:#f6f8fa;border-top:1px solid #e3e8ee}
.js .hdr-search:not(.is-open){display:none}
.srch{padding-top:20px;padding-bottom:20px}
.srch-lbl{display:block;margin-bottom:8px;font-weight:600;color:#12115e}
.srch-row{display:flex;gap:8px}
.srch-in{flex:1;min-width:0;min-height:48px;padding:0 14px;border:1px solid #8a93a3;border-radius:8px;background:#ffffff;color:#1d1d2b;font:inherit}
/* Fokus pola: ramka zamiast obwódki z odstępem (nadal wyraźnie widoczny - WCAG 2.4.7) */
.srch-in:focus-visible{outline:none;border-color:#0b5cad;box-shadow:0 0 0 2px #0b5cad}
.srch-btn{min-height:48px;padding:0 24px;border:2px solid #12115e;border-radius:999px;background:#12115e;color:#ffffff;font:inherit;font-weight:600;cursor:pointer}
.srch-btn:hover{background:#0b5cad;border-color:#0b5cad}
@media (max-width:960px){
  .js .hdr-menu-btn{display:flex}
  .js .hdr-nav1{margin-left:auto}
  .js .hdr-panel{display:flex;flex-direction:column;position:fixed;inset:0;z-index:100;overflow-y:auto;background:#ffffff;transform:translateX(100%);visibility:hidden;transition:transform .3s ease,visibility 0s linear .3s}
  .js .hdr-panel.is-open{transform:none;visibility:visible;transition:transform .3s ease}
  .js .hdr-panel-top{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border-bottom:1px solid #e3e8ee}
  .hdr-panel-title{margin:0;font-size:15px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;color:#12115e}
  .hdr-panel-close{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 16px;border:1px solid #b8c6d6;border-radius:999px;background:#ffffff;color:#12115e;font:inherit;font-size:15px;font-weight:600;cursor:pointer}
  .js .hdr-panel .nav{flex-direction:column;gap:0;padding:8px 16px 32px}
  .js .hdr-panel .nav a{min-height:56px;padding:0 12px;font-size:18px;border-bottom:1px solid #e3e8ee;border-left:3px solid transparent}
  .js .hdr-panel .nav a[aria-current="page"]{border-bottom-color:#e3e8ee;border-left-color:#0b5cad}
  .bcu-lock body{overflow:hidden}
}

/* ==========================================================================
   Dostępność: rozmiar tekstu (A+ / A++) i wysoki kontrast (pasek u góry)
   ========================================================================== */
/* Projekt w px - powiększamy całą stronę (układ się przelewa, bez poziomego przewijania). */
html.fs-1 body{zoom:1.15}
html.fs-2 body{zoom:1.3}

html.hc body,
html.hc body :where(*:not(img, video, iframe, svg, svg *)){background-color:#000000 !important;color:#ffffff !important;border-color:#ffffff !important;box-shadow:none !important;text-shadow:none !important}
html.hc body :where(*){background-image:none !important}
html.hc a,html.hc a *{color:#ffff00 !important;text-decoration:underline !important}
html.hc .btn,html.hc .ubtn,html.hc .chip,html.hc button,html.hc input[type="submit"]{background-color:#000000 !important;color:#ffff00 !important;border:2px solid #ffff00 !important}
html.hc .btn:hover,html.hc .ubtn:hover,html.hc button:hover,html.hc [aria-pressed="true"],html.hc .nav [aria-current]{background-color:#ffff00 !important;color:#000000 !important}
html.hc .in,html.hc input,html.hc select,html.hc textarea{background-color:#000000 !important;color:#ffffff !important;border:2px solid #ffffff !important}
html.hc svg[stroke]:not([stroke="none"]),html.hc svg [stroke]:not([stroke="none"]){stroke:currentColor !important}
html.hc svg[fill]:not([fill="none"]),html.hc svg [fill]:not([fill="none"]){fill:currentColor !important}
/* Ciemne logo (Tożsamość witryny) na jasnej podkładce */
html.hc .hdr-brand{background:#ffffff;padding:4px 8px;border-radius:4px}
html.hc svg{color:#ffffff !important}
html.hc a svg,html.hc button svg{color:#ffff00 !important}
html.hc :focus-visible{outline:3px solid #ffff00 !important;outline-offset:2px !important}
html.hc .nav a:not([aria-current]){border-color:transparent !important}

/* Tekst tylko dla czytników ekranu */
.screen-reader-text{position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ==========================================================================
   Animacje (WCAG 2.1)
   - tylko przy prefers-reduced-motion: no-preference (2.3.3); przy „reduce” treść stoi w miejscu,
   - jednorazowe i krótsze niż 5 s, bez pętli (2.2.2), bez błysków (2.3.1),
   - bez JS treść jest widoczna; odsłanianie przy przewijaniu włącza main.js (klasa .rv na <html>),
     element z fokusem klawiatury odsłania się od razu (2.4.7).
   ========================================================================== */
/* Przejścia kolorów przy najechaniu / fokusie - bez ruchu, więc także przy „reduce” */
.nav a,.btn,.tile,.card,.news,.pcard,.meet,.chip,.pg,.pill,.sub a,.in,.opt,.tri-thumb{transition:color .2s,background-color .2s,border-color .2s,box-shadow .2s}

@media (prefers-reduced-motion: no-preference){
  @keyframes bcu-rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
  @keyframes bcu-drop{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}

  /* Nagłówek strony (podstrony: okruszki, H1, lead; główna: tekst baneru i zdjęcie) - kolejno przy wejściu */
  .hero-sec1 .wrap > *,.hp-sec1 .hp-box2 > *,.hp-sec1 .hp-box4{animation:bcu-rise .5s cubic-bezier(.2,.7,.3,1) both}
  .hero-sec1 .wrap > :nth-child(2),.hp-sec1 .hp-box2 > :nth-child(2){animation-delay:.06s}
  .hero-sec1 .wrap > :nth-child(3),.hp-sec1 .hp-box2 > :nth-child(3){animation-delay:.12s}
  .hero-sec1 .wrap > :nth-child(n+4),.hp-sec1 .hp-box2 > :nth-child(n+4),.hp-sec1 .hp-box4{animation-delay:.18s}

  /* Rozwijane karty szkoleń i odsłaniany odtwarzacz */
  .tri-box1:not([hidden]),.player:not([hidden]){animation:bcu-drop .25s ease-out both}

  /* Odsłanianie przy przewijaniu (sekcje i kafelki list) */
  .rv .rv-item{opacity:0;transform:translateY(16px)}
  .rv .rv-item.rv-in{opacity:1;transform:none;transition:opacity .5s ease-out,transform .5s cubic-bezier(.2,.7,.3,1);transition-delay:calc(var(--rv-i, 0) * 70ms)}
}

@media print{
  .rv .rv-item{opacity:1 !important;transform:none !important}
}
