:root {
    --ate-blue:    #00437A;
    --ate-blue-d:  #00305a;
    --ate-blue-l:  #1a6098;
    --gray-dark:   #2d2d2d;
    --gray-light:  #f8f9fa;
    --text-bg:     #2c2c2c;
    --topbar-height: 56px;
}

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

* { box-sizing: border-box; margin:0; padding:0; }
body {
    font-family: 'Roboto', sans-serif;
    background: var(--gray-light);
    color: var(--gray-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

header {
    background: linear-gradient(135deg, var(--ate-blue) 0%, var(--ate-blue-d) 100%);
    color: white;
    padding: 2.5rem 1rem 2rem;
    text-align: center;
}
header h1 { font-size: 2.4rem; margin-bottom: 0.4rem; font-weight: 500; }
header p { font-size: 1.15rem; opacity: 0.92; }


/* === NOWY BANNER === */
/* Górne menu */
.top-bar {
    background: var(--ate-blue-d);
    color: white;
    padding: 0.85rem 1rem;
    font-size: 0.97rem;
}
.top-bar-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.top-bar-logo {
    display: flex;
    align-items: center;
    line-height: 0;
    flex-shrink: 0;
}
.top-bar-logo img {
    height: 26px;
    width: auto;
    display: block;
}

.top-bar-by {
    display: inline-flex;
    align-items: center;
    align-self: flex-end;
    gap: 0.35rem;
    margin-left: 0.6rem;
    padding-left: 0.6rem;
    padding-bottom: 1px;
    border-left: 1px solid rgba(255,255,255,0.28);
    font-size: 0.72rem;
    font-style: italic;
    font-weight: 400;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.2px;
    line-height: 1;
}

.top-bar-logo img.top-bar-by-logo {
    height: 24px;
    opacity: 0.95;
}
.top-bar ul {
    display: flex;
    justify-content: flex-end;
    gap: 2.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.top-bar a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}
.top-bar a:hover { opacity: 0.9; }

/* === Hamburger (mobilne menu) === */

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.4rem 0.5rem;
    line-height: 1;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    background: var(--ate-blue-d);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 1.4rem 1.4rem 2rem;
    box-shadow: -10px 0 40px rgba(0,0,0,0.3);
}

.mobile-menu-panel.open {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.8rem;
}

.mobile-menu-logo {
    height: 20px;
    width: auto;
}

.mobile-menu-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.05rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.mobile-menu-close:hover {
    background: rgba(255,255,255,0.2);
}

.mobile-menu-list {
    list-style: none;
    margin: 0 0 1.4rem;
    padding: 0;
}

.mobile-menu-list li a {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: white;
    text-decoration: none;
    padding: 0.85rem 0.6rem;
    font-size: 1.02rem;
    font-weight: 500;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.mobile-menu-list li a:hover,
.mobile-menu-list li a.active {
    background: rgba(255,255,255,0.12);
}

.mobile-menu-list li a i {
    width: 20px;
    text-align: center;
    color: var(--ate-blue-l);
    flex-shrink: 0;
}

.mobile-menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.15);
    margin: 0 0 1.4rem;
}

.mobile-menu-list--secondary li a {
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255,255,255,0.75);
}

/* Baner */
/* KONTENER GŁÓWNY - pełna szerokość */
    .fullwidth-carousel {
        position: relative;
        width: 100vw;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        overflow: hidden;
        background: #000;
        min-height: calc(100vh - var(--topbar-height));
    }

    /* WRAPPER KARUZELI */
    .carousel-wrapper {
        position: relative;
        width: 100%;
        overflow: hidden;
    }

    /* KONTENER SLIDÓW */
    .carousel-slides {
        display: flex;
        transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        will-change: transform;
    }

    /* POJEDYNCZY SLIDE - pełna szerokość okna */
    .slide {
        flex: 0 0 100%;
        position: relative;
        min-height: calc(100vh - var(--topbar-height));
        height: auto;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        overflow: hidden;
    }

    /* CIEMNA "ZASŁONA" NA TREŚĆ - płynny gradient zanikający w stronę zdjęcia, bez ostrej krawędzi */
    .slide .skew-black-panel {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(100deg,
            rgba(0,0,0,0.88) 0%,
            rgba(0,0,0,0.78) 22%,
            rgba(0,0,0,0.5) 42%,
            rgba(0,0,0,0.2) 58%,
            rgba(0,0,0,0) 72%
        );
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 3rem 5rem 3rem 6.5rem;
        color: white;
        z-index: 2;
    }

    /* Treść wewnątrz zasłony */
    .slide-content {
        max-width: 38%;
        z-index: 3;
        text-shadow: 0 2px 12px rgba(0,0,0,0.5);
        animation: fadeUp 0.6s ease-out;
    }

    .slide-content h2 {
        font-size: clamp(1.8rem, 5vw, 3.4rem);
        font-weight: 800;
        margin-bottom: 1.2rem;
        letter-spacing: -0.02em;
        line-height: 1.2;
        color: #fff;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .slide-content .description {
        font-size: clamp(1rem, 2.5vw, 1.3rem);
        font-weight: 400;
        line-height: 1.5;
        margin-bottom: 2rem;
        opacity: 0.92;
        max-width: 90%;
    }

    .slide-content .btn {
        display: inline-flex;
        align-items: center;
        gap: 0.7rem;
        background: white;
        color: #000;
        padding: 0.9rem 2rem;
        border-radius: 50px;
        text-decoration: none;
        font-weight: 600;
        font-size: 1rem;
        letter-spacing: 0.3px;
        transition: all 0.25s ease;
        border: none;
        cursor: pointer;
        box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    }

    .slide-content .btn i {
        transition: transform 0.2s;
    }

    .slide-content .btn:hover {
        background: #f5f5f5;
        transform: translateY(-3px);
        box-shadow: 0 15px 30px -8px rgba(0,0,0,0.4);
    }

    .slide-content .btn:hover i {
        transform: translateX(6px);
    }

    /* Przyciski nawigacji (strzałki) */
    .carousel-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0,0,0,0.55);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255,255,255,0.2);
        width: 52px;
        height: 52px;
        border-radius: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 20;
        transition: all 0.2s;
        color: white;
        font-size: 1.6rem;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    }

    .carousel-btn:hover {
        background: rgba(0,0,0,0.85);
        transform: translateY(-50%) scale(1.05);
        border-color: rgba(255,255,255,0.5);
    }

    .btn-prev {
        left: 30px;
    }

    .btn-next {
        right: 30px;
    }

    /* kropki / paginacja */
    .carousel-dots {
        position: absolute;
        bottom: 28px;
        left: 0;
        right: 0;
        display: flex;
        justify-content: center;
        gap: 14px;
        z-index: 20;
    }

    /* strzałka sugerująca przewinięcie w dół */
    .scroll-down-hint {
        position: absolute;
        bottom: 72px;
        left: 50%;
        transform: translateX(-50%);
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: rgba(255,255,255,0.15);
        backdrop-filter: blur(6px);
        border: 1px solid rgba(255,255,255,0.35);
        color: white;
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 20;
        animation: scrollHintBounce 2s ease-in-out infinite;
        transition: background 0.2s ease, border-color 0.2s ease;
    }

    .scroll-down-hint:hover {
        background: rgba(255,255,255,0.28);
        border-color: rgba(255,255,255,0.6);
    }

    @keyframes scrollHintBounce {
        0%, 100% { transform: translateX(-50%) translateY(0); }
        50% { transform: translateX(-50%) translateY(8px); }
    }

    .dot {
        width: 10px;
        height: 10px;
        background: rgba(255,255,255,0.5);
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.25s ease;
        backdrop-filter: blur(4px);
    }

    .dot.active {
        background: white;
        width: 32px;
        border-radius: 12px;
        box-shadow: 0 0 8px rgba(255,255,255,0.6);
    }

    /* Dodatkowa delikatna warstwa cienia dla lepszego kontrastu */
    .slide::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 45%;
        background: linear-gradient(95deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0) 60%);
        z-index: 1;
        pointer-events: none;
    }

    .banner-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}
.banner-tag {
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(4px);
    padding: 0.3rem 0.9rem;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.banner-tag i {
    font-size: 0.7rem;
}
.banner-tag:hover {
    background: white;
    color: var(--ate-blue);
    border-color: white;
    transform: translateY(-2px);
}

/* === LINIA AUTORA (okrągłe zdjęcie + nazwisko) === */
.banner-authors {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.banner-author {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.3rem;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    padding: 0.5rem 1rem 0.5rem 0.7rem;
    border-radius: 60px;
    width: fit-content;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.2s;
}

a.banner-author {
    text-decoration: none;
}

.banner-author:hover {
    background: rgba(0,0,0,0.6);
    transform: translateX(3px);
}
.author-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.author-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}
.author-name {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: white;
}
.author-title {
    font-size: 0.7rem;
    opacity: 0.8;
    color: #ddd;
}

    /* Responsywność – łagodniejszy, szerszy zanik na mniejszych ekranach, żeby tekst miał więcej miejsca */
    @media (max-width: 1100px) and (min-width: 551px) {
        .slide .skew-black-panel {
            background: linear-gradient(100deg,
                rgba(0,0,0,0.88) 0%,
                rgba(0,0,0,0.8) 35%,
                rgba(0,0,0,0.55) 60%,
                rgba(0,0,0,0.25) 78%,
                rgba(0,0,0,0) 92%
            );
            padding: 2.5rem 3rem 2.5rem 5.5rem;
        }
        .slide-content {
            max-width: 90%;
        }
    }

    @media (max-width: 550px) {

        .fullwidth-carousel {
            max-height: none;
        }

        /* Reset układu slajdu – flex column */
        .slide {
            display: flex;
            flex-direction: column;
            min-height: calc(100vh - var(--topbar-height));
            background-image: none !important;   /* Usuwamy tło z .slide */
        }

        /* Dodajemy zdjęcie jako osobny element na górze (pseudo-element) */
        .slide::before {
            content: "";
            display: block;
            width: 100%;
            height: 45vh;           /* zdjęcie zajmuje 45% wysokości ekranu */
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            position: relative;
            z-index: 0;
            flex-shrink: 0;
        }

        /* Ukrywamy starą warstwę cienia z desktop */
        .slide::after {
            display: none;
        }

        /* Skośne czarne pole zamieniamy na zwykły dolny panel (bez skosu, ciemne tło) */
        .slide .skew-black-panel {
            position: relative;
            clip-path: none;            /* usuwa skos */
            background: #0a0a0a;        /* jednolite ciemne tło */
            padding: 2rem 1.5rem;
            width: 100%;
            height: auto;
            margin-top: auto;            /* przykleja do dołu */
            border-radius: 0;
            backdrop-filter: none;
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Treść wewnątrz panelu – pełna szerokość */
        .slide-content {
            max-width: 100%;
            text-align: left;
            padding: 0;
            animation: fadeUp 0.5s ease-out;
        }

        .slide-content h2 {
            font-size: 1.8rem;
            margin-bottom: 0.8rem;
        }

        .slide-content .description {
            font-size: 1rem;
            margin-bottom: 1.5rem;
            max-width: 100%;
        }

        .slide-content .btn {
            padding: 0.75rem 1.6rem;
            font-size: 0.9rem;
        }

        /* Przyciski nawigacji mniejsze */
        .carousel-btn {
            width: 40px;
            height: 40px;
            font-size: 1.2rem;
            top: 22.5vh; /* środek samego zdjęcia (górne 45vh slajdu), z dala od tekstu pod spodem */
        }

        .btn-prev {
            left: 12px;
        }

        .btn-next {
            right: 12px;
        }

        .carousel-dots {
            bottom: 18px;
        }

        .scroll-down-hint {
            bottom: 56px;
            width: 36px;
            height: 36px;
            font-size: 0.95rem;
        }

        .banner-tags { margin-bottom: 0.9rem; gap: 0.5rem; }
        .banner-tag { font-size: 0.65rem; padding: 0.2rem 0.7rem; }
        .banner-author { padding: 0.4rem 0.9rem 0.4rem 0.6rem; gap: 0.6rem; margin-bottom: 1rem; }
        .author-avatar { width: 32px; height: 32px; }
        .author-name { font-size: 0.8rem; }
        .author-title { font-size: 0.65rem; }
    }

    /* Animacja tekstu */
    @keyframes fadeUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Usunięcie ewentualnych marginesów body */
    html, body {
        width: 100%;
        overflow-x: hidden;
    }



.main-nav {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}
.main-nav ul {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}
.main-nav a {
    display: block;
    padding: 1.1rem 0.4rem;
    color: var(--ate-blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}
.main-nav a:hover, .main-nav a.active { border-bottom-color: var(--ate-blue); color: var(--ate-blue-d); }

main { max-width: 1200px; margin: 2.5rem auto; padding: 0 1.5rem; }

/* Sekcja na pełną szerokość ekranu, wyróżniona innym tłem - kilka wariantów kolorystycznych,
   żeby przełamać jednostajność kolejnych sekcji na stronie. */
.section-fullwidth {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 3.4rem 0;
}

.section-fullwidth-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Wariant: delikatny niebieski odcień */
.band-tint {
    background: linear-gradient(180deg, #eef3fb 0%, #e3ecfa 100%);
}

/* Wariant: czyste białe tło (kontrast wobec jasnoszarego tła strony) */
.band-white {
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(0,0,0,0.03);
}

/* Wariant: mocny, "brandowy" pas - do jednej, wyróżnionej sekcji (np. serii #WYHAMUJ) */
.band-brand {
    background: linear-gradient(135deg, var(--ate-blue) 0%, var(--ate-blue-d) 100%);
}

.band-brand .section-header-text h1,
.band-brand .section-header-text h2 { color: white; }
.band-brand .section-subtitle { color: rgba(255,255,255,0.8); }

.band-brand .section-icon {
    background: rgba(255,255,255,0.15);
    color: white;
    box-shadow: none;
    border: 1px solid rgba(255,255,255,0.3);
}

.controls {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
    padding: 2.4rem 2.4rem 2.2rem;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.6);
    margin-bottom: 3rem;
    scroll-margin-top: 76px;
}

.controls::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(90deg, var(--ate-blue) 0%, var(--ate-blue-l) 50%, var(--ate-blue) 100%);
}

/* Tytuł sekcji */
.controls-title {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ate-blue);
    margin-bottom: 1.8rem;
}

.controls-title i {
    font-size: 1.1rem;
    opacity: 0.85;
}

.search-box {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    position: relative;
}

.search-box-icon {
    position: absolute;
    top: 50%;
    left: 1.3rem;
    transform: translateY(-50%);
    color: #9fb2c9;
    font-size: 1rem;
    transition: color 0.25s ease;
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 1.15rem 3rem 1.15rem 3.3rem;
    font-size: 1.05rem;
    font-family: inherit;
    border-radius: 999px;
    border: 2px solid #e1e9f5;
    background: #fbfdff;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    -webkit-appearance: none;
    appearance: none;
}

.search-box input::-webkit-search-cancel-button {
    display: none;
}

.search-box input::placeholder {
    color: #a3b1c2;
}

.search-box input:hover {
    border-color: #c7d7ec;
}

.search-box input:focus {
    background: #fff;
    border-color: var(--ate-blue);
    box-shadow: 0 0 0 5px rgba(0,67,122,0.1), 0 6px 18px rgba(0,67,122,0.08);
}

.search-box:focus-within .search-box-icon {
    color: var(--ate-blue);
}

.search-clear {
    position: absolute;
    top: 50%;
    right: 0.9rem;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #eef2f7;
    color: #7a8697;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-clear:hover {
    background: var(--ate-blue);
    color: white;
}

.search-clear[hidden] {
    display: none;
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(11,40,72,0.16);
    border: 1px solid #eaf0f9;
    z-index: 50;
    overflow: hidden;
    display: none;
    padding: 0.4rem;
}

.search-suggestions .suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.8rem;
    border-radius: 9px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.15s ease;
}

.search-suggestions .suggestion-item:hover,
.search-suggestions .suggestion-item.is-active {
    background: #eef4ff;
}

.search-suggestions .suggestion-icon {
    color: white;
    background: var(--ate-blue-l);
    font-size: 0.7rem;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-suggestions .suggestion-item.is-tag .suggestion-icon {
    background: var(--ate-blue);
}

.search-suggestions .suggestion-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--gray-dark);
}

.search-suggestions .suggestion-type {
    font-size: 0.72rem;
    color: #a0adbd;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    flex-shrink: 0;
}

.search-suggestions .suggestion-item.is-tag .suggestion-type {
    color: var(--ate-blue);
}

/* Sekcje bez pasujących wyników są całkowicie chowane podczas wyszukiwania. */
section.search-hidden { display: none; }

.search-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ate-blue);
    margin: 0.9rem auto 0;
    min-height: 1.4rem;
}

.search-meta:not(:empty)::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ate-blue-l);
    display: inline-block;
}

/* === FILTRY === */

.filters-wrapper {
    margin-top: 1.4rem;
}

.filters-label {
    display: block;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: #5b6b7a;
    margin-bottom: 0.8rem;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
    margin-top: 1.6rem;
}
.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.3rem;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 999px;
    background: white;
    color: var(--ate-blue);
    border: 1px solid #d6e3f4;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-btn i {
    font-size: 0.78rem;
    opacity: 0.75;
}

.filter-btn:hover {
    background: #eef4ff;
    border-color: #c7d7ec;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(
    135deg,
    var(--ate-blue) 0%,
    var(--ate-blue-l) 100%
    );
    color: white;
    border-color: var(--ate-blue);
    box-shadow: 0 6px 16px rgba(0,67,122,0.32);
}

.filter-btn.active i { opacity: 1; }

/* === RESPONSYWNOŚĆ === */

@media (max-width: 768px) {
    :root {
    --topbar-height: 58px;
    }

    .top-bar-inner {
    justify-content: space-between;
    text-align: left;
    }

    .top-bar-logo img {
    height: 19px;
    }

    .top-bar ul {
    display: none;
    }

    .main-nav {
    display: none;
    }

    .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    }

    .top-bar-by {
    font-size: 0.62rem;
    margin-left: 0.45rem;
    padding-left: 0.45rem;
    }

    .top-bar-logo img.top-bar-by-logo {
    height: 17px;
    }

    .controls {
    padding: 1.8rem 1.4rem;
    }

    .controls-title {
    font-size: 1.1rem;
    text-align: center;
    justify-content: center;
    }

    .search-box input {
    font-size: 1rem;
    padding: 1rem 2.6rem 1rem 3rem;
    }

    .section-icon {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    border-radius: 12px;
    }

    .section-header-text h1,
    .section-header-text h2 {
    font-size: 1.4rem;
    }

    .section-subtitle {
    font-size: 0.92rem;
    }
}

section { margin-bottom: 4.5rem; }

.section-header {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.3rem;
    border-bottom: 1px solid #e3eaf4;
}

.section-icon {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--ate-blue) 0%, var(--ate-blue-l) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 8px 18px rgba(0,67,122,0.28);
}

.section-header-text { padding-top: 0.1rem; }

.section-header-text h1,
.section-header-text h2 {
    margin: 0 0 0.4rem;
    padding: 0;
    border: none;
    font-size: 1.75rem;
    color: var(--gray-dark);
    line-height: 1.25;
}

.section-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.55;
    max-width: 680px;
}

h2 {
    color: var(--ate-blue);
    font-size: 2.1rem;
    margin-bottom: 1.4rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid #e0e8f0;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.8rem 1.6rem;
}

.card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transition: transform 0.22s, box-shadow 0.22s;
    display: none;
}
.card.visible { display: block; }

.card.visible.pdf-item { display: flex; }

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.card-content { padding: 1.3rem; }
.card h3 { font-size: 1.22rem; margin-bottom: 0.6rem; line-height: 1.35; }
.tags {
    margin-top: 0.8rem;
    font-size: 0.88rem;
    color: #555;
}
.tag {
    background: #e8f0ff;
    color: var(--ate-blue);
    padding: 0.22rem 0.65rem;
    border-radius: 4px;
    margin-right: 0.4rem;
    display: inline-block;
}

.pdf-item {
    padding: 0;
    flex-direction: column;
}

.pdf-icon-header {
    position: relative;
    height: 104px;
    background: linear-gradient(135deg, #eaf1fc 0%, #dce8fb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-icon-header.has-preview {
    height: 168px;
    padding: 16px 0;
}

.pdf-preview-img {
    height: 100%;
    width: auto;
    max-width: 72%;
    object-fit: contain;
    border-radius: 3px;
    background: white;
    box-shadow: 0 10px 24px rgba(0,0,0,0.2), 0 2px 8px rgba(0,0,0,0.12);
}

.pdf-icon-large {
    font-size: 2.5rem;
    color: var(--ate-blue-l);
    opacity: 0.85;
}

.pdf-type-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(0,67,122,0.9);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    text-transform: uppercase;
}

.pdf-body {
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    flex-grow: 1;
}

.pdf-body h3 { margin: 0; }

.pdf-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: auto;
    padding: 0.85rem 1.1rem;
    border-radius: 8px;
    background: #eef4ff;
    color: var(--ate-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.pdf-download:hover {
    background: var(--ate-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,67,122,0.28);
}

.pdf-download i { font-size: 0.9rem; }

.file-desc {
    font-size: 0.9rem;
    color: #5b6b7a;
    line-height: 1.55;
    margin: 0;
}

.note-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: #7a8697;
}

.note-date {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.note-date i { font-size: 0.8rem; opacity: 0.8; }

/* === KARTY PORTALI (sekcja "Katalogi") === */

.portal-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    height: 100%;
}

.portal-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.14);
}

.portal-card-visual {
    height: 170px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--ate-blue) 0%, var(--ate-blue-l) 100%);
}

.portal-card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.portal-card:hover .portal-card-visual img {
    transform: scale(1.05);
}

.portal-card-visual i {
    font-size: 2.7rem;
    color: white;
    opacity: 0.95;
}

.portal-card-body {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    flex-grow: 1;
}

.portal-card-body h3 {
    font-size: 1.2rem;
    color: var(--gray-dark);
    margin: 0;
    line-height: 1.3;
}

.portal-card-body p {
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.55;
    margin: 0;
    flex-grow: 1;
}

.portal-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ate-blue);
    font-weight: 600;
    font-size: 0.92rem;
    margin-top: 0.2rem;
}

.portal-card-cta i {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.portal-card:hover .portal-card-cta i {
    transform: translateX(4px);
}

.site-footer {
    background: linear-gradient(135deg, var(--ate-blue-d) 0%, #001d38 100%);
    color: rgba(255,255,255,0.85);
    margin-top: 4rem;
    padding: 3.5rem 0 0;
}

.footer-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 2.8rem;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 2.5rem;
}

.footer-brand .footer-logo {
    display: inline-block;
    margin-bottom: 1.1rem;
    line-height: 0;
}

.footer-brand .footer-logo img {
    height: 28px;
    width: auto;
}

.footer-tagline {
    font-size: 0.92rem;
    line-height: 1.65;
    color: rgba(255,255,255,0.65);
    margin-bottom: 1.4rem;
    max-width: 320px;
}

.footer-social {
    display: flex;
    gap: 0.7rem;
}

.footer-social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.footer-social a:hover {
    background: var(--ate-blue-l);
    transform: translateY(-2px);
}

.footer-col h4 {
    color: white;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.2rem;
    font-weight: 700;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
}

.footer-col ul a {
    color: rgba(255,255,255,0.68);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.2s ease;
}

.footer-col ul a:hover {
    color: white;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.92rem;
    margin-bottom: 0.9rem;
    transition: color 0.2s ease;
}

.footer-contact-item:hover {
    color: white;
}

.footer-contact-item i {
    color: var(--ate-blue-l);
    width: 16px;
    flex-shrink: 0;
}

.footer-hours {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    margin-top: 0.3rem;
}

.footer-hours i {
    color: var(--ate-blue-l);
    width: 16px;
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.5);
    margin: 0;
}

.footer-bottom-links {
    margin-top: 0.5rem !important;
}

.footer-bottom-links a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: white;
}

@media (max-width: 900px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 2.2rem;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 550px) {
    .footer-main {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-tagline {
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }
    .footer-social {
        justify-content: center;
    }
    .footer-contact-item {
        justify-content: center;
    }
    .footer-hours {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    header h1 { font-size: 2rem; }
    .main-nav ul { gap: 1rem; }
    .main-nav a { font-size: 0.98rem; padding: 0.9rem 0.3rem; }
}

/* Responsywność */
@media (max-width: 992px) {
    .slide { flex-direction: column; }
    .slide-text, .slide-image { width: 100%; }
    .slide-text { height: 52%; padding: 8% 10%; }
    .slide-image { height: 48%; }
    .slide-image::after {
    left: 0;
    width: 100%;
    height: 90px;
    background: linear-gradient(to bottom, transparent, var(--text-bg));
    }
}

@media (max-width: 600px) {
    .hero-banner { height: 520px; }
    .slide-text h2 { font-size: 1.9rem; }
}

    .videoCard {
      background: white;
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
      transition: all 0.3s ease;
      width: 100%;
      max-width: 380px;
      height: 100%;
      display: none;
      flex-direction: column;
    }
    .videoCard.visible { display: flex; }

    .videoCard:hover {
      transform: translateY(-8px);
      box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    }

    /* Miniaturka 16:9 */
    .videoCard .video-wrapper {
      position: relative;
      width: 100%;
      aspect-ratio: 16 / 9;
      overflow: hidden;
      background: #ddd;
      flex-shrink: 0;
    }

    .videoCard .video-wrapper img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.4s ease;
    }

    .videoCard .play-overlay {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 68px;
      height: 68px;
      background: rgba(0, 67, 122, 0.88);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 2;
      border: 3px solid rgba(255,255,255,0.95);
      box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    }

    .videoCard .play-icon {
      color: white;
      font-size: 28px;
      margin-left: 4px;
    }

    .videoCard:hover .video-wrapper img { transform: scale(1.06); }
    .videoCard:hover .play-overlay { transform: translate(-50%, -50%) scale(1.1); }

    /* Treść */
    .videoCard .card-content {
      padding: 1.35rem 1.4rem;
      flex-grow: 1;
      display: flex;
      flex-direction: column;
    }

    .videoCard h3 {
      font-size: 1.22rem;
      line-height: 1.35;
      margin-bottom: 1rem;
      font-weight: 600;
      color: var(--gray-dark);
    }

    .videoCard:hover h3 {
      color: var(--ate-blue);
    }

    /* Autorzy */
    .videoCard .authors, .article-card .authors {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      margin-bottom: 1.2rem;
    }

    .videoCard .author, .article-card .author {
      display: flex;
      align-items: center;
      gap: 12px;
      text-decoration: none;
      color: inherit;
    }

    .videoCard .author img, .article-card .author img {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      object-fit: cover;
      border: 2px solid #f0f0f0;
    }

    .videoCard .author-info, .article-card .author-info {
      line-height: 1.35;
    }

    .videoCard .author-name, .article-card .author-name {
      font-weight: 600;
      font-size: 0.95rem;
      color: #222;
    }

    .videoCard .author-desc, .article-card .author-desc {
      font-size: 0.82rem;
      color: #666;
      margin-top: 1px;
    }

    /* Tagi */
    .article-card .tags {
      margin-top: auto;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem;
    }

    /* Na kartach wideo, artykułów, dokumentów i not serwisowych tagi są celowo ukryte
       (zostają w danych - wyszukiwarka po tagach nadal działa). */
    .videoCard .tags,
    .article-card .tags,
    .pdf-item[data-type="dokument"] .tags,
    .pdf-item[data-type="nota"] .tags {
      display: none;
    }

    .pdf-item .tags {
      margin-top: 0;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem;
    }

    .videoCard .tag01, .article-card .tag01, .pdf-item .tag01 {
      background: #e8f0ff;
      color: var(--ate-blue);
      font-size: 0.8rem;
      padding: 0.25rem 0.8rem;
      border-radius: 30px;
      text-decoration: none;
      font-weight: 500;
      transition: all 0.2s;
    }

    .videoCard .tag01:hover, .article-card .tag01:hover, .pdf-item .tag01:hover {
      background: var(--ate-blue);
      color: white;
    }

    /* Przycisk "+N" pokazujący liczbę ukrytych tagów oraz rozwinięta grupa dodatkowych tagów */
    .tag-more {
      background: #eef2f7;
      color: #5b6b7a;
      font-size: 0.8rem;
      font-weight: 600;
      padding: 0.25rem 0.75rem;
      border-radius: 30px;
      border: 1px dashed #c3cedb;
      cursor: pointer;
      transition: all 0.2s;
      font-family: inherit;
      line-height: 1.4;
    }

    .tag-more:hover {
      background: var(--ate-blue);
      color: white;
      border-color: var(--ate-blue);
    }

    .tag-extra {
      display: contents;
    }

    .tag-extra[hidden] {
      display: none;
    }

    .articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

        .article-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: none;
    flex-direction: column;
}
.article-card.visible { display: flex; }

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

.article-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-date {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.article-content {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 1.1rem;
    line-height: 1.35;
    margin-bottom: 10px;
    flex-grow: 0;
}

.article-title a {
    color: #222;
    text-decoration: none;
}

.article-title a:hover {
    color: #007bff;
}

.article-description {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-authors {
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 10px;
}

.article-tags {
    margin-top: auto;
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.article-tags .tag-badge {
    font-size: 0.8rem;
    padding: 3px 9px;
}

.article-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #002c5c;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.read-more-link:hover {
    color: #0056b3;
    transform: translateX(6px);
}

.read-more-link i {
    transition: transform 0.3s ease;
}

.read-more-link:hover i {
    transform: translateX(4px);
}

/* Oznaczenie typu treści */
.content-type-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 2;
}

.content-type-badge i {
    font-size: 0.9rem;
}

/* Opcjonalnie - inna kolorystyka dla video (dla porównania) */
.video-card .content-type-badge {
    background: rgba(255, 0, 0, 0.9);   /* czerwony dla YouTube/Video */
}
/* === STRONA video.php: infinite scroll, stany ładowania === */

.scroll-sentinel {
    height: 10px;
    width: 100%;
}

.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 2rem 0;
    color: var(--ate-blue);
    font-weight: 500;
    font-size: 0.98rem;
    grid-column: 1 / -1;
}

.loading-indicator[hidden] { display: none; }

.loading-indicator i {
    font-size: 1.2rem;
}

.no-more-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    text-align: center;
    color: #8a97a8;
    padding: 2.4rem 0 1.2rem;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    grid-column: 1 / -1;
}

.no-more-msg[hidden] { display: none; }

.no-more-msg::before,
.no-more-msg::after {
    content: "";
    flex: 1 1 auto;
    max-width: 90px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d8e0ec);
}

.no-more-msg::after {
    background: linear-gradient(90deg, #d8e0ec, transparent);
}

.no-more-msg i {
    color: var(--ate-blue-l);
    font-size: 1rem;
    text-transform: none;
}

.empty-section-msg {
    text-align: center;
    color: #7a8697;
    background: #f3f6fb;
    border: 1px dashed #cbdaf0;
    border-radius: 10px;
    padding: 2.2rem 1.4rem;
    font-size: 1rem;
    grid-column: 1 / -1;
}

/* === Link "Zobacz więcej filmów" pod siatką kart w sekcjach wideo === */

.section-more {
    text-align: center;
    margin-top: 2.2rem;
}

.section-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.9rem;
    border-radius: 999px;
    background: white;
    color: var(--ate-blue);
    border: 2px solid #d6e3f4;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.section-more-link:hover {
    background: var(--ate-blue);
    color: white;
    border-color: var(--ate-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,67,122,0.25);
}

.section-more-link i {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.section-more-link:hover i {
    transform: translateX(4px);
}

/* Wariant na ciemnym, "brandowym" tle (np. sekcja #WYHAMUJ) */
.band-brand .section-more-link {
    background: rgba(255,255,255,0.12);
    color: white;
    border-color: rgba(255,255,255,0.4);
}

.band-brand .section-more-link:hover {
    background: white;
    color: var(--ate-blue);
    border-color: white;
}

/* === Podstrona: Infolinia techniczna === */

.infoline-intro {
    max-width: 760px;
    margin: 0 auto 2.6rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #4a5568;
}

.infoline-intro p {
    margin-bottom: 1rem;
}

.infoline-intro p:last-child {
    margin-bottom: 0;
}

.infoline-contact-card {
    max-width: 640px;
    margin: 0 auto;
    background: white;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    padding: 2.4rem 2.6rem;
}

.infoline-contact-card > h3 {
    font-size: 1.25rem;
    color: var(--ate-blue);
    margin-bottom: 1.6rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid #e6edf7;
}

.infoline-contact-item {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin-bottom: 1.5rem;
}

.infoline-contact-item:last-of-type {
    margin-bottom: 1.8rem;
}

.infoline-contact-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--ate-blue) 0%, var(--ate-blue-l) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 6px 14px rgba(0,67,122,0.22);
}

.infoline-contact-label {
    font-size: 0.85rem;
    color: #8a97a8;
    margin-bottom: 0.2rem;
}

.infoline-contact-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.infoline-contact-value:hover {
    color: var(--ate-blue);
}

.infoline-hours {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin: 0;
    padding-top: 1.6rem;
    border-top: 1px solid #e6edf7;
    font-size: 0.94rem;
    color: #5b6b7a;
    line-height: 1.6;
}

.infoline-hours i {
    color: var(--ate-blue-l);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .infoline-contact-card {
        padding: 1.8rem 1.5rem;
    }

    .infoline-contact-value {
        font-size: 1.05rem;
    }
}

/* === Podstrona: Kontakt - siatka zespołu === */

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.6rem;
}

.team-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    padding: 2rem 1.6rem;
    text-align: center;
    transition: all 0.25s ease;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.12);
}

.team-avatar {
    width: 76px;
    height: 76px;
    margin: 0 auto 1.1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ate-blue) 0%, var(--ate-blue-l) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 16px rgba(0,67,122,0.25);
    overflow: hidden;
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.team-name {
    font-size: 1.08rem;
    color: var(--gray-dark);
    margin-bottom: 0.4rem;
}

.team-role {
    font-size: 0.86rem;
    color: #7a8697;
    line-height: 1.5;
    margin-bottom: 1.2rem;
    min-height: 2.6em;
}

.team-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.86rem;
    color: var(--ate-blue);
    text-decoration: none;
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    background: #eef4ff;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.team-email:hover {
    background: var(--ate-blue);
    color: white;
}

/* Linki social media */
.social-links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-link-card {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    background: white;
    color: var(--ate-blue);
    padding: 1rem 1.8rem;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
}

.social-link-card i {
    font-size: 1.2rem;
}

.social-link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(0,0,0,0.14);
    color: white;
    background: var(--ate-blue);
}

/* === Podstrona: Kontakt - sekcja "Opieka regionalna" === */

.region-map {
    max-width: 900px;
    margin: 0 auto 2.6rem;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.region-map img {
    display: block;
    width: 100%;
    height: auto;
}

.region-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 1.3rem;
}

.region-tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ate-blue);
    background: #eef4ff;
    padding: 0.28rem 0.7rem;
    border-radius: 20px;
    white-space: nowrap;
}

.team-contact-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.team-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.86rem;
    color: var(--ate-blue);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: 1.5px solid #d6e3f4;
    background: white;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.team-phone:hover {
    background: var(--ate-blue);
    color: white;
    border-color: var(--ate-blue);
}

/* === Strona: Wizytówka autora (autor.php) === */

.author-hero {
    display: flex;
    gap: 2.4rem;
    align-items: flex-start;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    padding: 2.6rem;
}

.author-hero-photo {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 24px rgba(0,67,122,0.2);
}

.author-hero-body h1 {
    font-size: 1.9rem;
    color: var(--gray-dark);
    margin-bottom: 0.4rem;
    line-height: 1.2;
}

.author-hero-title {
    font-size: 1.05rem;
    color: var(--ate-blue);
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.author-hero-desc {
    font-size: 1rem;
    line-height: 1.7;
    color: #4a5568;
    margin-top: 1.2rem;
}

.author-regional-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--ate-blue) 0%, var(--ate-blue-l) 100%);
    color: white;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 0.45rem 1rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: 0 4px 12px rgba(0,67,122,0.25);
}

.author-contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 0.4rem;
}

.author-hero-body .region-tags {
    justify-content: flex-start;
    margin-bottom: 1.1rem;
}

.author-pub-subheading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.15rem;
    color: var(--ate-blue);
    margin: 2.2rem 0 1.3rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid #e6edf7;
}

.author-pub-subheading:first-of-type {
    margin-top: 0;
}

.load-more-row {
    text-align: center;
    margin: 1.8rem 0 0.5rem;
}

@media (max-width: 650px) {
    .author-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 2rem 1.6rem;
    }

    .author-contact-row {
        justify-content: center;
    }

    .region-tags {
        justify-content: center !important;
    }
}

/* === Strona: Nasza misja (nasza-misja.php) === */

.misja-content {
    max-width: 760px;
    margin: 0 auto 2.2rem;
    font-size: 1.05rem;
    line-height: 1.75;
    color: #4a5568;
}

.misja-content p {
    margin-bottom: 1.2rem;
}

.misja-content p:last-child {
    margin-bottom: 0;
}

.misja-content strong {
    color: var(--ate-blue);
}

.misja-list-card {
    max-width: 640px;
    margin: 0 auto 2.4rem;
    background: white;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    padding: 2.2rem 2.6rem;
}

.misja-list-card h3 {
    font-size: 1.2rem;
    color: var(--ate-blue);
    margin-bottom: 1.3rem;
}

.misja-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 0;
    padding: 0;
}

.misja-list li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1rem;
    color: var(--gray-dark);
}

.misja-list li i {
    color: var(--ate-blue-l);
    font-size: 1.05rem;
    flex-shrink: 0;
}

.misja-closing {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding-top: 1.5rem;
}

.misja-closing p {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ate-blue);
    line-height: 1.45;
}

@media (max-width: 600px) {
    .misja-list-card {
        padding: 1.7rem 1.5rem;
    }

    .misja-closing p {
        font-size: 1.2rem;
    }
}

/* === Strona 404 === */

#error-404 {
    display: flex;
    justify-content: center;
    padding: 3rem 0 4rem;
}

.error-404-box {
    max-width: 620px;
    text-align: center;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    padding: 3.2rem 2.6rem;
}

.error-404-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 1.4rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ate-blue) 0%, var(--ate-blue-l) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 8px 20px rgba(0,67,122,0.25);
}

.error-404-code {
    font-size: 4.5rem;
    font-weight: 800;
    color: #e3eaf4;
    line-height: 1;
    margin-bottom: 0.6rem;
    letter-spacing: 2px;
}

.error-404-box h1 {
    font-size: 1.5rem;
    color: var(--gray-dark);
    margin-bottom: 1rem;
}

.error-404-box p {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.error-404-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
}

@media (max-width: 600px) {
    .error-404-box {
        padding: 2.2rem 1.6rem;
    }

    .error-404-code {
        font-size: 3.4rem;
    }
}

/* === Przycisk "Powrót na górę" === */

.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ate-blue);
    color: white;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 500;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--ate-blue-l);
    transform: translateY(-3px);
}

@media (max-width: 600px) {
    .back-to-top {
        bottom: 18px;
        right: 18px;
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
}

/* Odstęp między filmami a artykułami w sekcji "Może Cię zainteresować" na autor.php */
.related-articles-spacing {
    margin-top: 1.8rem;
}

/* Ukrywa element wizualnie, ale zostaje dostępny dla czytników ekranu i wyszukiwarek */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* === Przycisk ulubionych (fav-btn) === */

.fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    color: #94a3b8;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

.fav-btn:hover {
    color: #e0245e;
    transform: scale(1.08);
}

.fav-btn.active {
    color: #e0245e;
    background: white;
}

.fav-btn i {
    pointer-events: none;
}

.fav-btn .fa-heart::before {
    font-weight: 400;
}

.fav-btn.active .fa-heart::before {
    font-weight: 900;
}

/* === Strona "Ulubione" === */

.favorites-empty {
    text-align: center;
    padding: 3.5rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.favorites-empty i {
    font-size: 2.6rem;
    color: #d6e3f4;
    margin-bottom: 1.2rem;
}

.favorites-empty p {
    color: #64748b;
    font-size: 1.05rem;
    margin-bottom: 1.6rem;
}

.favorites-type-heading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.15rem;
    color: var(--ate-blue);
    margin: 2.2rem 0 1.3rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid #e6edf7;
}

.favorites-type-heading:first-of-type {
    margin-top: 0;
}

.fav-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    opacity: 0.65;
    font-size: 0.78rem;
    font-weight: 600;
    margin-left: 0.4rem;
    line-height: 1;
    transition: all 0.2s ease;
}

.fav-count-badge.has-items {
    background: #e0245e;
    color: white;
    opacity: 1;
    font-size: 0.68rem;
    font-weight: 700;
}

/* === Karty na stronie "Ulubione" (budowane w JS z localStorage) === */

.fav-simple-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.4rem;
}

.fav-simple-card {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.fav-simple-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(0,0,0,0.12);
}

.fav-simple-card-media {
    display: block;
    height: 150px;
    background: #eaf1fc;
    overflow: hidden;
}

.fav-simple-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fav-simple-card-media .pdf-icon-header {
    height: 100%;
    margin: 0;
}

.fav-simple-card-body {
    padding: 1.1rem 1.2rem 1.3rem;
}

.fav-simple-card-title {
    display: block;
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--gray-dark);
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 0.3rem;
}

.fav-simple-card-title:hover {
    color: var(--ate-blue);
}

.fav-simple-card-meta {
    font-size: 0.82rem;
    color: #8a97a8;
}

.nav-fav-link {
    display: flex !important;
    align-items: center;
    gap: 0.45rem;
}

/* === Globalna wyszukiwarka na index.php (wyniki z całej bazy) === */

.global-search-results {
    min-height: 200px;
}

.gs-type-group {
    margin-bottom: 3rem;
}

.gs-type-group:last-child {
    margin-bottom: 0;
}

.gs-type-heading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.2rem;
    color: var(--ate-blue);
    margin: 0 0 1.4rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #e6edf7;
}

/* === Strona: Polityka prywatności === */

.legal-content {
    max-width: 820px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    padding: 2.6rem 3rem 3rem;
}

.legal-updated {
    font-size: 0.88rem;
    color: #8a97a8;
    margin-bottom: 2rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid #e6edf7;
}

.legal-content h2 {
    font-size: 1.25rem;
    color: var(--ate-blue);
    margin: 2.4rem 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.legal-content h2:first-of-type {
    margin-top: 0;
}

.legal-content h2 .legal-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #eef4ff;
    color: var(--ate-blue);
    font-size: 0.95rem;
    font-weight: 700;
    flex-shrink: 0;
}

.legal-content h3 {
    font-size: 1.02rem;
    color: var(--gray-dark);
    margin: 1.4rem 0 0.6rem;
}

.legal-content p {
    font-size: 0.98rem;
    line-height: 1.75;
    color: #4a5568;
    margin-bottom: 1rem;
}

.legal-content ul, .legal-content ol {
    margin: 0 0 1.2rem;
    padding-left: 1.4rem;
    color: #4a5568;
    font-size: 0.98rem;
    line-height: 1.75;
}

.legal-content li {
    margin-bottom: 0.4rem;
}

.legal-content strong {
    color: var(--gray-dark);
}

.legal-content a {
    color: var(--ate-blue);
}

.legal-placeholder {
    background: #fff4e5;
    color: #92600a;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}

.legal-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.4rem;
    font-size: 0.92rem;
}

.legal-content table th,
.legal-content table td {
    text-align: left;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid #e6edf7;
    vertical-align: top;
}

.legal-content table th {
    color: var(--ate-blue);
    font-weight: 700;
    background: #f6f9ff;
}

@media (max-width: 650px) {
    .legal-content {
        padding: 1.8rem 1.5rem 2.2rem;
    }
}

/* === Baner zgody na cookies (Google Consent Mode) === */

.cookie-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: var(--ate-blue-d);
    box-shadow: 0 -8px 30px rgba(0,0,0,0.25);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-consent.visible {
    transform: translateY(0);
}

.cookie-consent-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.3rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.6rem;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1 1 320px;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
}

.cookie-consent-text a {
    color: white;
    text-decoration: underline;
}

.cookie-consent-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.cookie-consent-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-consent-btn--primary {
    background: white;
    color: var(--ate-blue-d);
}

.cookie-consent-btn--primary:hover {
    background: #eef4ff;
}

.cookie-consent-btn--secondary {
    background: transparent;
    color: white;
    border-color: rgba(255,255,255,0.4);
}

.cookie-consent-btn--secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

@media (max-width: 650px) {
    .cookie-consent-inner {
        padding: 1.2rem;
    }
    .cookie-consent-buttons {
        width: 100%;
    }
    .cookie-consent-btn {
        flex: 1;
        text-align: center;
    }
}

/* === Strona "Już wkrótce" (bramka przedpremierowa na index.php) === */

.coming-soon {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('/mater/redukujemy-chaos-glowna.webp') center center / cover no-repeat;
    padding: 2rem 1.5rem;
}

.coming-soon-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,48,90,0.88) 0%, rgba(0,67,122,0.82) 100%);
}

.coming-soon-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
    text-align: center;
    color: white;
}

.coming-soon-logo {
    height: 34px;
    width: auto;
    margin-bottom: 2.2rem;
}

.coming-soon-eyebrow {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.4rem 1.1rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 1.3rem;
}

.coming-soon-content h1 {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1.1rem;
}

.coming-soon-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
    margin-bottom: 2.6rem;
}

.coming-soon-countdown {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.countdown-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 16px;
    backdrop-filter: blur(6px);
}

.countdown-num {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.75);
    margin-top: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

@media (max-width: 550px) {
    .coming-soon-content h1 {
        font-size: 1.6rem;
    }
    .countdown-box {
        width: 62px;
        height: 62px;
        border-radius: 12px;
    }
    .countdown-num {
        font-size: 1.3rem;
    }
    .countdown-label {
        font-size: 0.62rem;
    }
    .coming-soon-countdown {
        gap: 0.6rem;
    }
}