* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

ul { list-style: none; }
a { text-decoration: none;}


:root {
    --bg-color: #fff;
    --text-color: #000;
    --link-color: #0066cc;
    --font-size: 1em;
    
    --main-primary: #208091;
    --main-light: #2ea39f;
    --main-dark: #1a5a6e;
    --text-color: #2c3e50;
    --border-color: #e0e0e0;
    --white: #ffffff;
    --yellow: #ffcc00;
    --success: #27ae60;
    --warning: #e67e22;
    --error: #e74c3c;
}

@media (prefers-contrast: high) {
    :root { --bg-color: #000; --text-color: #fff; --link-color: #fff; }
}

@media (prefers-reduced-motion: no-preference) {
    * { transition: background-color 0.3s, color 0.3s; }
}

body {
    background: var(--bg-color);
    font-family: 'Open Sans', 'Lato', sans-serif;
    color: var(--text-color);
    font-size: var(--font-size);
    line-height: 1.6;
    margin: 0;
}

.high-contrast {
    --bg-color: #000 !important;
    --text-color: #fff !important;
    --link-color: #ffcc00 !important; /* Kontrast 21:1 */
}

.font-small { --font-size: 0.875em; }
.font-large { --font-size: 1.25em; }
.font-xlarge { --font-size: 1.5em; }

#accessibility-controls {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 0.5rem;
    z-index: 1001;
}

#accessibility-controls button {
    padding: 0.5rem;
    background: var(--bg-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    cursor: pointer;
}

#accessibility-controls button:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 2px;
}


.skip-link {
    position: absolute;
    top: -60px;
    left: 6px;
    background: #000;
    color: var(--white);
    padding: 8px 16px;
    font-weight: bold;
    text-decoration: none;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* HEADER */
header {
    position: sticky;
    top: 0;
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0 10px 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
}
.logo a {
    display:block;
    font-size: 1.6em;
    font-weight: 700;
    color: var(--text-color);
}

nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.btn-primary {
    background-color: var(--main-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: var(--main-dark);
    box-shadow: 0 4px 12px rgba(32, 128, 145, 0.3);
    transform: translateY(-2px);
}

/* HERO SECTION */
.hero {
    background: linear-gradient(rgba(32, 128, 145, 0.7), rgba(32, 128, 145, 0.7)), 
                url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 500"><rect fill="%23208091" width="1200" height="500"/><path fill="%232ea39f" d="M0,250 Q300,200 600,250 T1200,250 L1200,500 L0,500 Z" opacity="0.3"/></svg>');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 20px 0;
    text-align: center;
}



/* slider */
.slider-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    height: 420px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; transition: opacity 0.5s ease-in-out;
}

.slide.active { opacity: 1; }

.slide-link {
    display: block; width: 100%; height: 100%; text-decoration: none;
    background-size: cover; background-position: center; position: relative;
}

.slide img {
    width: 100%; height: 100%; object-fit: cover;
}

.slide-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: white; padding: 40px 20px 24px; text-align: center;
}

.slide-overlay h2 { font-size: 1.6rem; margin-bottom: 6px;color:white; }
.slide-overlay p { font-size: 1rem; }

.nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #333;
    font-size: 2rem; padding: 10px 15px; cursor: pointer;
    border-radius: 50%; transition: all 0.3s;
    z-index: 10;
}

.nav-btn:hover { background: rgba(255,255,255,0.8);; transform: translateY(-50%) scale(1.1); }

.prev { left: 10px; }
.next { right: 10px; }

.dots {
    position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 10px;
}

.dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: rgba(255,255,255,0.5); cursor: pointer;
    transition: background 0.3s;
}

.dot.active { background: white; }
/* slider */


/* Minimalistyczne i eleganckie breadcrumbs */
.breadcrumbs {
    padding: 12px 0;
    margin: 0 0 20px 0;
    font-size: 14px;
    font-weight: 400;
    color: var(--main-primary);
    border-bottom: 1px solid #eee;
}

.breadcrumbs .container {
    padding:0 20px;
}

.breadcrumbs a {
    color: var(--main-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.breadcrumbs a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.breadcrumbs .current {
    color: var(--main-dark);
    font-weight: 500;
}

.breadcrumbs .separator {
    margin: 0 8px;
    color: #999;
}
/* Minimalistyczne i eleganckie breadcrumbs */


/* SECTIONS */
section {
   
}


section h2 {
    font-size: 2em;
    margin-bottom: 50px;
    text-align: center;
    color: var(--main-primary);
}

/* CARDS GRID */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    text-decoration: none;
    color: var(--text-color);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(32, 128, 145, 0.15);
    border-color: var(--main-light);
}

.card h3 {
    color: var(--main-primary);
    margin: .7em 0;
    font-size: 1.2em;
}

.card-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.card p {
    font-size: .9em;
    color: var(--text-color);
    margin-bottom: 15px;
}

.card-link {
    font-size: .9em;
    color: var(--main-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
}

.card-link:hover {
    text-decoration: underline;
}

#form_newsletter input[type="text"], #form_newsletter input[type="email"] {
padding: 12px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
#form_newsletter input[type="submit"] { 
padding: 12px; background: var(--main-primary); color: white;  border: 1px solid var(--main-primary); border-radius: 4px; cursor: pointer; }


#form_newsletter p.flex {
  display: flex;
  flex-wrap: wrap;
  gap: 2%;
  justify-content: space-between;
  align-items: end; /* Wyrównuje pola do dołu */
  margin: 0;
}

#form_newsletter #imie {
  flex: 0 0 30%; /* Nie rośnie, nie kurczy, baza 30% */
  max-width: 30%;
}

#form_newsletter #email {
  flex: 0 0 44%;
  max-width: 44%;
}

#form_newsletter input[type="submit"] {
  flex: 0 0 20%;
  max-width: 20%;
}


.menu {
    color: var(--main-primary);
    font-size: 1.2em;
    font-weights: bold;
    position: relative;
}

.menu a {
    display: block;
    text-decoration: none;
    color: var(--text-color);
}

.menu__list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu__item {
    position: relative;
    margin: 0;
}

.menu__link,
.menu__item--parent > a {
    padding: 10px 15px;
    color: var(--text-color);
    display: block;
}

.menu__item--parent {
    cursor: pointer;
}

.menu__sublist {
    display: none;
    position: absolute;
    background-color: var(--bg-color);
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1002;
    list-style: none;
    margin: 0;
    padding: 0;
    top: 100%;
    left: 0;
}

.menu__sublist > .menu__item:not(:last-child) {
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.menu__sublist--bottom {
    top: 100%;
    left: 0;
}

.menu__sublist--right {
    left: 100%;
    top: 0;
}

.menu__sublist--left {
    left: -100%;
    top: 0;
}

/* ===========================
   DESKTOP (>= 769px)
   =========================== */
@media (min-width: 769px) {
    /* Pokazanie submenu na hover i focus-within (Tab) */
    .menu__item--parent:hover > .menu__sublist,
    .menu__item:hover > .menu__sublist,
    .menu__item--parent:focus-within > .menu__sublist,
    .menu__item:focus-within > .menu__sublist {
        display: block;
    }

    /* TŁO TYLKO POD LINKIEM, NIE CAŁYM LI */
    .menu__item:hover > .menu__link,
    .menu__item--parent:hover > .menu__link,
    .menu__item:focus-within > .menu__link,
    .menu__item--parent:focus-within > .menu__link {
        background-color: var(--main-light);
    }
}

/* ===========================
   MOBILE (<= 768px)
   =========================== */
@media (max-width: 768px) {
    .menu {
    font-size: .9em;
    }
    .menu__list {
        flex-direction: column;
    }
    
    .menu__link,
    .menu__item--parent > a {
        padding: 8px 5px;
    }

    .menu__sublist {
        position: static;
        box-shadow: none;
        border-top: 1px solid rgba(0,0,0,0.1);
    }

    /* Linie rozdzielające */
    .menu__list > .menu__item:not(:last-child),
    .menu__sublist > .menu__item:not(:last-child) {
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }


    /* Rozwijanie akordeonu po kliknięciu */
    .menu__item--parent.active > .menu__sublist {
        display: block;
    }

    /* Tło tylko pod linkiem – NIE na całym bloku */
    .menu__item:hover > .menu__link,
    .menu__item--parent:hover > .menu__link,
    .menu__item--parent.active > .menu__link,
    .menu__item:focus-within > .menu__link,
    .menu__item--parent:focus-within > .menu__link {
        background-color: var(--main-light);
    }
}

/* ===========================
   WSPÓLNE / RESET
   =========================== */

/* Brak tła na kontenerach li – tło tylko na .menu__link */
.menu__item,
.menu__item--parent,
.menu__item:focus-within,
.menu__item--parent:focus-within {
    background-color: transparent;
}

/* Dla klasy focus-open z JS (Tab / klawiatura) */
.menu__item.focus-open > .menu__sublist,
.menu__item--parent.focus-open > .menu__sublist {
    display: block !important;
}





/* ARTICLES */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.article-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.article-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

.article-image {
    background: linear-gradient(135deg, var(--main-primary), var(--main-light));
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    overflow: hidden;
}

.article-content {
    padding: 20px;
}

.article-date {
    font-size: .75em;
    color: #999;
    margin-bottom: 10px;
}

.article-content h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: var(--main-primary);
}

.article-content p {
    font-size: .9em;
    color: var(--text-color);
    margin-bottom: 15px;
}


/* Elegancka lista załączników do pobrania */
.download {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 0;
    margin: 20px 0 0 0;
}

.download li {
    margin-bottom: 12px;
    padding: 0;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.download li:hover {
    border-color: var(--main-dark);
    background: #fff;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.15);
    transform: translateY(-1px);
}

.download li a {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
}

.download li a:hover {
    color: var(--main-dark);
}

.download li a:active {
    transform: scale(0.98);
}

/* Ikony */
.download li img {
    width: 32px;
    height: 32px;
    margin-right: 12px;
    flex-shrink: 0;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Tekst załącznika */
.download li a br {
    display: none; /* Zamieniamy <br> na flex gap */
}

.download li a > *:last-child {
    margin-left: auto;
}

/* Nagłówek "Do pobrania:" */
.download + p::before {
    content: "?? Do pobrania:";
    display: block;
    font-weight: 600;
    color: var(--main-dark);
    margin: 8px 0 16px 0;
    font-size: 16px;
}


/* Elegancka lista stron podrzędnych */
.listpages {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 0;
    margin: 20px 0 0 0;
}

.listpages li {
    margin-bottom: 12px;
    padding: 0;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.listpages li:hover {
    border-color: var(--main-dark);
    background: #fff;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.15);
    transform: translateY(-1px);
}

.listpages li a {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
}

.listpages li a:hover {
    color: var(--main-dark);
}

.listpages li a:active {
    transform: scale(0.98);
}

/* Ikony */
.listpages li img {
    width: 32px;
    height: 32px;
    margin-right: 12px;
    flex-shrink: 0;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Tekst załącznika */
.listpages li a br {
    display: none; /* Zamieniamy <br> na flex gap */
}

.listpages li a > *:last-child {
    margin-left: auto;
}



/* Responsywność */
@media (max-width: 768px) {
    .download li a {
        padding: 14px;
        font-size: 16px; /* Touch friendly */
    }
    
    .download li img {
        width: 28px;
        height: 28px;
    }
}




/* FOOTER */
footer {
    background-color: var(--main-primary);
    color: white;
    padding: 20px 0 40px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 1em;
    text-align: center;
    font-size: .8em;
    color: rgba(255,255,255,0.8);
}

.footer-bottom a{
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}


.panel {
  padding: .5em .25em;
  display: flex;
  flex-wrap: wrap;
  gap: 1em .25em;
  justify-content: center;
}

.panel p {
  flex: 0 1 8.5em;  /* min. 10em, rośnie elastycznie */
  text-align: center;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;  /* Dodane: pionowe centrowanie */
  align-items: center;
  box-sizing: border-box;
}

.panel p img {
  max-width: 8em;
  width: 100%;
  height: auto;
}



.ticker-wrap {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2em;
    background-color: rgba(255, 255, 255, 0.8);
    overflow: hidden;
    padding-left: 100%;
    box-sizing: content-box;
    z-index: 1003;
    border-top: 1 solid var(--border-color);
}

.ticker {
    display: inline-block;
    height: 2em;
    line-height: 2em;
    white-space: nowrap;
    padding-right: 100%;
    box-sizing: content-box;
    animation: ticker 30s linear infinite;
}

.ticker__item {
    display: inline-block;
    padding: 0 2em;
    font-size: 1.2em;
    color: red;
    font-weight: normal;
}

@keyframes ticker {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Pauza animacji na hover (opcjonalne) */
.ticker-wrap:hover .ticker {
    animation-play-state: paused;
}


.cookies-eu-banner {
  background: var(--main-dark); /* Kolor marki użytkownika */
  color: #fff;
  padding: 15px;
  font-size: .9em;
  text-align: center;
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 9999;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.cookies-eu-banner a{
  color: #fff;
}

.cookies-eu-banner button {
  background: var(--bg-color);
  color: #2F0595;
  border: none;
  padding: 8px 16px;
  margin-left: 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}
.cookies-eu-banner button:hover {
  background: #f0f0f0;
}
.cookies-eu-banner.hidden {
  display: none;
}


/* Modal backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1004;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

/* Modal container */
.modal {
    background: var(--bg-color);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    width: auto;
    min-width: 25vw;
    max-width: 80vw;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modal header */
.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 1.25em;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

/* Modal content */
.modal-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    color: #4b5563;
    line-height: 1.6;
    font-size: .95em;
}

/* Scrollbar styling */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Modal footer with button */
.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
    background: #f9fafb;
}

/* Close button */
.btn-close {
    background: var(--main-primary);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: .9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close:hover {
    background: var(--main-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-close:active {
    transform: translateY(0);
}

.btn-close:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.75em;
    }

    .hero-buttons {
        flex-direction: column;
    }
    .menu__list {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background-color: var(--bg-color);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        flex-direction: column;
        transition: left 0.3s;
    }

    .menu__list.active {
        left: 0;
    }
    
    .menu__list > .menu__item:not(:last-child) {
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }

    .menu__sublist {
        position: static;
        display: none;
        box-shadow: none;
        width: 100%;
        background-color: var(--bg-color);
    }

    .menu__sublist--bottom,
    .menu__sublist--right {
        left: auto;
        top: auto;
        position: static;
    }

    .menu__item--parent.active > .menu__sublist {
        display: block;
    }
    
    /* Wcięcie dla submenu (poziom 2) */
    .menu__item--parent.active > .menu__sublist .menu__link,
    .menu__sublist .menu__link {
        padding-left: 30px !important;  /* Delikatne wcięcie 30px */
    }

    /* Opcjonalnie: głębsze wcięcie dla poziomów 3+ (jak 4/5 pod 3) */
    .menu__sublist .menu__item--parent.active > .menu__sublist .menu__link,
    .menu__sublist .menu__sublist .menu__link {
        padding-left: 45px !important;
    }

    .menu-toggle {
        display: block;
        padding: 15px 20px;
        cursor: pointer;
        font-size: 1.25em;
    }
    
    .slider-container { height: 300px; width: 95%; }
    .slide-overlay h2 { font-size: 1.5rem; }
    .slide-overlay p { font-size: 1rem; }
    .nav-btn { font-size: 1.5rem; padding: 8px 12px; }

    section {
        padding: 20px 0;
    }
    
    #form_newsletter p.flex {
      flex-direction: column;
      gap: 1em;
    }
    #form_newsletter #imie, #form_newsletter #email, #form_newsletter input[type="submit"] {
      flex: none;
      width: 100%;
      max-width:100%;
    }
    
    .panel {
      padding: .5em 0;
    }
    .panel p img {
      max-width: 6em;
    }
    
    .cookies-eu-banner { font-size: .8em; padding: 10px; }
    
    .ticker__item {
      font-size: 1em;
  }
}


@media (min-width: 769px) {
    .menu-toggle { display: none; }
}

