/* programs.css — poprawka warstw na telefonach z 2026-09-24: nagłówek i menu (z-50) zawsze nad wyborem tematu. */
/* programs.css — style wydzielone z HTML w ramach porządkowania CSP — 2026-09-24. */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
    .custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
    .custom-scrollbar::-webkit-scrollbar-thumb { background-color: #e2e8f0; border-radius: 20px; }
    .dark .custom-scrollbar::-webkit-scrollbar-thumb { background-color: #374151; }
    .custom-scrollbar:hover::-webkit-scrollbar-thumb { background-color: #cbd5e1; }
    .dark .custom-scrollbar:hover::-webkit-scrollbar-thumb { background-color: #4b5563; }

    .program-content {
        line-height: 1.5;
        color: #374151;
    }
    .dark .program-content {
        color: #d1d5db;
    }

    .program-content p,
    .program-content li {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    .program-content [data-program-size="small"] { font-size: .85em !important; }
    .program-content [data-program-size="normal"] { font-size: 1em !important; }
    .program-content [data-program-size="large"] { font-size: 1.18em !important; }

    .program-content blockquote {
        margin: .9rem 0;
        padding: .8rem 1rem;
        border-left: 3px solid #10b981;
        border-radius: .55rem;
        background: rgba(16,185,129,.055);
        color: inherit;
    }
    .dark .program-content blockquote { background: rgba(16,185,129,.075); }
    .program-content hr { border: 0; border-top: 1px solid #e2e8f0; margin: 1.15rem 0; }
    .dark .program-content hr { border-top-color: #334155; }
    .program-content a { color: #047857; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
    .dark .program-content a { color: #34d399; }
    .program-content sub, .program-content sup { font-size: .72em !important; line-height: 0; }

    .program-content p:last-child,
    .program-content div:last-child,
    .program-content li:last-child {
        margin-bottom: 0;
    }

    .program-content ul:not(.list-none) { 
        list-style-type: disc; 
        padding-left: 1rem; 
        margin-bottom: 0.75rem; 
    }
    .program-content ol:not(.list-none) { 
        list-style-type: decimal; 
        padding-left: 1rem; 
        margin-bottom: 0.75rem; 
    }
    .program-content li {
        margin-bottom: 0.2rem;
    }

    .program-content h2 { 
        font-size: 1rem !important; 
        font-weight: 700; 
        margin-top: 1.25rem; 
        margin-bottom: 0.5rem; 
        color: #111827; 
        line-height: 1.3;
    }
    .program-content h3 { 
        font-size: 0.9rem !important; 
        font-weight: 600; 
        margin-top: 1rem; 
        margin-bottom: 0.5rem; 
        color: #374151; 
        line-height: 1.35;
    }
    .program-content h4 {
        font-size: 0.85rem !important;
        font-weight: 600;
        margin-top: .9rem;
        margin-bottom: .45rem;
        color: #4b5563;
        line-height: 1.35;
    }
    
    .dark .program-content h2 { color: #f3f4f6; }
    .dark .program-content h3 { color: #d1d5db; }
    .dark .program-content h4 { color: #cbd5e1; }

    @media (min-width: 768px) {
        
        .program-content p,
        .program-content li {
            margin-bottom: 0.75rem;
        }

        .program-content p:last-child,
        .program-content div:last-child {
            margin-bottom: 0;
        }

        .program-content h2 { 
            font-size: 1.25rem !important; 
        }
        .program-content h3 { 
            font-size: 1.1rem !important; 
        }
        .program-content h4 {
            font-size: 1rem !important;
        }
        .program-content ul:not(.list-none),
        .program-content ol:not(.list-none) { 
            padding-left: 1.5rem; 
        }
    }
    .program-sticky-cta {
        padding: .65rem .85rem max(.7rem, env(safe-area-inset-bottom));
        background: rgba(255,255,255,.98);
        border-top: 1px solid rgba(148,163,184,.28);
        border-radius: 1.1rem 1.1rem 0 0;
        box-shadow: 0 -10px 30px rgba(15,23,42,.10);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
    }
    .dark .program-sticky-cta {
        background: rgba(9,14,24,.98);
        border-top-color: rgba(71,85,105,.65);
        box-shadow: 0 -10px 30px rgba(0,0,0,.30);
    }
    .program-sticky-cta-inner { min-width: 0; min-height: 3rem; }
    .program-sticky-price-label { letter-spacing: .04em; }
    .program-sticky-cta-register {
        flex: 0 0 auto;
        min-width: 6.75rem;
        min-height: 2.75rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        border: 1px solid rgba(255,255,255,.22);
        transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
    }
    .program-sticky-cta-register:active { transform: scale(.97); }
    @media (max-width: 767.98px) {
        /* Na stronie Programów FAB telefonu stoi NAD belką zapisu, zamiast
           zabierać miejsce przyciskowi „Zapisz się”. */
        .site-phone-fab {
            bottom: calc(5rem + env(safe-area-inset-bottom)) !important;
            right: 1.25rem !important;
        }
        .site-access-fab {
            bottom: calc(9.35rem + env(safe-area-inset-bottom)) !important;
            right: 1.25rem !important;
        }
    }
    /* Mobilna lista tematów działa jak modal: tło strony jest rozmyte,
       a przewijanie odbywa się wyłącznie wewnątrz listy. */
    .program-mobile-topics-backdrop {
        /* Hierarchia mobilna:
           header/menu główne = 50,
           panel tematów = 45/46,
           sticky CTA = 20 (gdy lista jest otwarta),
           backdrop = 35,
           zwykła treść = poniżej.
           Backdrop nie może przykrywać panelu listy. */
        z-index: 35 !important;
        background: rgba(248,250,252,.30);
        -webkit-backdrop-filter: blur(16px) saturate(.88);
        backdrop-filter: blur(16px) saturate(.88);
    }
    .dark .program-mobile-topics-backdrop {
        background: rgba(2,6,23,.44);
    }
    .program-topics-scroll {
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    @media (max-width: 1023.98px) {
        .program-page-intro {
            position: relative;
            z-index: 30;
            margin-bottom: 1rem !important;
        }
        /*
         * Na telefonach sam przycisk wyboru tematu pozostaje przyklejony pod
         * nagłówkiem, natomiast OTWARTA lista jest niezależnym, pływającym
         * panelem przypiętym do viewportu. Dzięki temu można ją otworzyć i
         * obsłużyć także po przewinięciu programu na sam dół strony.
         */
        .program-topics-mobile-layer {
            position: sticky !important;
            z-index: 30;
        }
        /* 1.0.18 — po otwarciu CAŁY wybierak staje się jedną pływającą
           warstwą przypiętą do viewportu. Dzięki temu przycisk „Ukryj listę
           tematów” jest zawsze dostępny, niezależnie od miejsca przewinięcia,
           a panel listy zaczyna się bezpośrednio pod przyciskiem. */
        .program-page-main.program-topics-open .program-topics-mobile-layer {
            position: fixed !important;
            /* 1.0.23 — warstwa rozmycia dochodzi do fizycznych krawędzi
               viewportu. Odstęp 12 px przenosimy do paddingu, dzięki czemu
               sam przycisk i karta zachowują margines, ale blur nie kończy się
               wcześniej i nie zostawia ostrych pasów po bokach ekranu. */
            left: 0 !important;
            right: 0 !important;
            top: calc(5rem + env(safe-area-inset-top)) !important;
            bottom: 0 !important;
            width: 100% !important;
            min-height: 0 !important;
            padding-left: max(.75rem, env(safe-area-inset-left)) !important;
            padding-right: max(.75rem, env(safe-area-inset-right)) !important;
            padding-bottom: max(.75rem, env(safe-area-inset-bottom)) !important;
            box-sizing: border-box !important;
            gap: .45rem !important;
            /* Nad dolnym sticky CTA (z-40), ale nadal pod głównym headerem/menu (z-50). */
            z-index: 45 !important;
            isolation: isolate;
            border-radius: 0 !important;
            background: rgba(248,250,252,.08) !important;
            -webkit-backdrop-filter: blur(18px) saturate(.86) !important;
            backdrop-filter: blur(18px) saturate(.86) !important;
        }
        .dark .program-page-main.program-topics-open .program-topics-mobile-layer {
            background: rgba(2,6,23,.16) !important;
        }
        .program-page-main.program-topics-open .program-topics-mobile-layer::before {
            display: none !important;
        }
        .program-page-main.program-topics-open .program-topics-mobile-layer > button {
            flex: 0 0 auto !important;
        }
        .program-topics-floating-panel {
            position: fixed !important;
            left: max(.75rem, env(safe-area-inset-left));
            right: max(.75rem, env(safe-area-inset-right));
            top: calc(9rem + env(safe-area-inset-top));
            bottom: max(.75rem, env(safe-area-inset-bottom));
            z-index: 39 !important;
            min-height: 0 !important;
            max-height: none !important;
            overflow: hidden !important;
        }
        .program-page-main.program-topics-open .program-topics-floating-panel {
            position: relative !important;
            inset: auto !important;
            width: 100% !important;
            margin: 0 !important;
            padding: 0 !important;
            box-sizing: border-box !important;
            flex: 1 1 auto !important;
            min-height: 0 !important;
            max-height: none !important;
            overflow: visible !important;
            z-index: 46 !important;
            isolation: isolate;
            border-radius: 0 !important;
            /* Rozmycie całego tła wykonuje teraz pełnoekranowy rodzic.
               Panel nie tworzy już własnej, węższej granicy efektu. */
            background: transparent !important;
            -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
        }
        .dark .program-page-main.program-topics-open .program-topics-floating-panel {
            background: transparent !important;
        }
        .program-page-main.program-topics-open .program-topics-floating-panel::before {
            display: none !important;
        }
        .program-topics-panel-inner {
            position: relative;
            z-index: 1;
            height: 100%;
            min-height: 0;
            overflow: hidden;
            padding: .75rem;
            border: 1px solid rgba(226,232,240,.96);
            border-radius: 1.35rem;
            background: rgba(255,255,255,.985);
            box-shadow: 0 24px 64px rgba(15,23,42,.22), 0 8px 24px rgba(15,23,42,.10);
            -webkit-backdrop-filter: blur(18px);
            backdrop-filter: blur(18px);
        }
        .dark .program-topics-panel-inner {
            border-color: rgba(71,85,105,.74);
            background: rgba(15,23,42,.985);
            box-shadow: 0 26px 70px rgba(0,0,0,.52), 0 8px 24px rgba(0,0,0,.26);
        }
        .program-topics-list-card {
            flex: 1 1 auto !important;
            height: auto !important;
            min-height: 0 !important;
        }
        .program-page-main.program-topics-open .program-detail-column,
        .program-page-main.program-topics-open .program-sticky-cta {
            -webkit-filter: blur(8px) saturate(.82);
            filter: blur(8px) saturate(.82);
            pointer-events: none !important;
            user-select: none;
        }
        .program-page-main.program-topics-open .program-sticky-cta {
            /* Dolna belka nie może przykrywać rozwiniętej listy tematów. */
            z-index: 20 !important;
        }
        .program-detail-column,
        .program-sticky-cta {
            transition: filter .18s ease, -webkit-filter .18s ease;
        }
    }
    @media (max-width: 767.98px) {
        /* Mniejszy oddech pod mobilnym nagłówkiem strony. */
        .program-page-main {
            padding-top: 5.25rem !important;
        }
        /* Wybierak zatrzymuje się tuż pod mobilnym nagłówkiem. */
        .program-topics-mobile-layer {
            top: calc(5rem + env(safe-area-inset-top)) !important;
        }
    }
    @media (prefers-reduced-motion: reduce) {
        .program-mobile-topics-backdrop { transition: none !important; }
    }
    @media (min-width: 768px) { .program-sticky-cta { display: none !important; } }

.program-bullet-dot{font-size:7px;line-height:1}

/* Dynamiczny akcent jest przekazywany przez właściwość niestandardową CSS ustawianą przez CSSStyleDeclaration. */
.program-topic-accent { background-color: var(--program-topic-accent, #10b981); }
