@import url('inter.css');

/* Nowoczesny Flat Design strony FAQ z naciskiem na WCAG 2.2 AA/AAA */
:root {
    --primary-color: #002d69;
    --primary-hover: #001f4d;
    --primary-rgb: 0, 45, 105;
    --bg-color: #f8fafc;
    --bg-gradient: none;
    --card-bg: #ffffff;
    --text-color: #0f172a;
    --text-muted: #334155;
    --border-color: #cbd5e1;
    --control-border-color: #475569;
    --white: #ffffff;
    --focus-ring: 3px solid #002d69;
    --focus-ring-alt: 3px solid #ffbf47;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
    --hover-bg: #f1f5f9;
    --public-container-max: min(100%, 1200px);
    --public-container-pad: clamp(0.75rem, 3vw, 2rem);
    --modal-bg: #ffffff;
}

@media (min-width: 1024px) {
    :root {
        --public-container-max: min(1200px, 85%);
    }
}

/* Dark Mode - Pełna obsługa WCAG 2.2 z zachowaniem brandu UAM */
[data-theme="dark"] {
    --bg-color: #0f172a;
    --bg-gradient: none;
    --card-bg: #1e293b;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --control-border-color: #475569;
    --primary-color: #38bdf8;
    --primary-hover: #0ea5e9;
    --primary-rgb: 56, 189, 248;
    --white: #1e293b;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --hover-bg: #334155;
    --modal-bg: #0f172a;
}

/* High Contrast Mode - Dostępność WCAG AAA + UAM Gold */
[data-theme="high-contrast"] {
    --bg-color: #000000;
    --bg-gradient: none;
    --card-bg: #000000;
    --text-color: #ffff00;
    --text-muted: #ffff00;
    --border-color: #ffffff;
    --control-border-color: #ffffff;
    --primary-color: #ffff00;
    --primary-hover: #00ff00;
    --white: #000000;
    --focus-ring: 4px solid #ffff00;
    --shadow: none;
    --shadow-md: none;
    --hover-bg: #1a1a1a;
    --modal-bg: #000000;
}

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

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    font-size: 16px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

html, body {
    overflow-x: clip;
}

@supports not (overflow: clip) {
    html, body {
        overflow-x: hidden;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* WCAG 2.4.11 Focus Not Obscured - Scroll Margin */
:target,
.category-block,
.subcategory-block,
.question-item,
.accordion-trigger,
.search-section,
.bento-categories-section,
.inquiry-section {
    scroll-margin-top: 100px;
}

.field-error {
    color: #b31d28;
    font-weight: 700;
}

/* WCAG Skip Link */
.skip-link {
    position: absolute;
    top: -5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    z-index: 3000;
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-weight: bold;
    border-radius: 0 0 8px 8px;
    border: 2px solid white;
}
.skip-link:focus {
    top: 0;
    outline: var(--focus-ring);
}

[data-theme="dark"] .skip-link {
    color: #000000;
}

/* Font Size Utilities */
html.font-sm { font-size: 14px; }
html.font-md { font-size: 16px; }
html.font-lg { font-size: 20px; }

html.readability-mode body {
    line-height: 1.85;
    letter-spacing: 0.01em;
    word-spacing: 0.08em;
}
html.readability-mode .answer-body,
html.readability-mode .live-search-snippet {
    line-height: 1.85;
}
html.readability-mode .accordion-title {
    font-weight: 800;
}

/* Enhanced Focus States for WCAG 2.2 */
:focus-visible {
    outline: 3px solid #ffbf47 !important;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--card-bg), 0 0 0 5px #ffbf47;
}

button:focus, a:focus, input:focus, textarea:focus {
    outline: none;
}
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 3px solid #ffbf47 !important;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--card-bg), 0 0 0 5px #ffbf47;
}

mark {
    background: rgba(255, 191, 71, 0.55);
    color: inherit;
    padding: 0 0.12em;
    border-radius: 4px;
}
[data-theme="high-contrast"] mark {
    background: #ffffff;
    color: #000000;
    outline: 2px solid var(--primary-color);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.public-page .container {
    width: 100%;
    max-width: var(--public-container-max);
    padding-left: var(--public-container-pad);
    padding-right: var(--public-container-pad);
    box-sizing: border-box;
    transition: max-width 240ms ease, padding 240ms ease;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    z-index: 1100;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    width: min(960px, calc(100% - 1.5rem));
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
    padding: 1rem;
}
[data-theme="high-contrast"] .cookie-banner {
    background: #000000;
    border: 2px solid #ffffff;
}

.cookie-banner__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

/* Site Footer Links */
.site-footer-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin: 0.5rem 0 0;
    padding: 0;
    justify-content: center;
}

.site-footer-links a {
    color: inherit;
    font-weight: 700;
}

@media (max-width: 760px) {
    .cookie-banner {
        left: 0.75rem;
        right: 0.75rem;
        transform: none;
        width: auto;
        bottom: 0.75rem;
    }
}

/* Sidebar layout */
.content-layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 2rem;
    align-items: start;
}
.qa-main { min-width: 0; }
.qa-filterbar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow);
}
.qa-filter { min-width: 220px; flex: 1; }
.qa-filter label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}
.qa-filter-status {
    flex: 2;
    min-width: 180px;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding-bottom: 0.25rem;
}
.sidebar {
    position: sticky;
    top: 5.5rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}
.sidebar-inner {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow);
}
.sidebar-title {
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-list { list-style: none; }
.sidebar-cat-item { margin-bottom: 0.35rem; }
.sidebar-cat-link {
    display: flex;
    align-items: center;
    min-height: 38px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.sidebar-cat-link:hover,
.sidebar-cat-link.is-active {
    background: var(--primary-color);
    color: #ffffff;
}
.sidebar-sub-list {
    list-style: none;
    padding-left: 0.75rem;
    border-left: 2px solid var(--border-color);
    margin: 0.25rem 0 0.4rem 0.5rem;
}
.sidebar-sub-link {
    display: flex;
    align-items: center;
    min-height: 34px;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.sidebar-sub-link:hover,
.sidebar-sub-link.is-active {
    color: var(--primary-color);
    background: var(--hover-bg);
    font-weight: 600;
}
[data-theme="dark"] .sidebar-sub-link:hover,
[data-theme="dark"] .sidebar-sub-link.is-active {
    background: var(--hover-bg);
    color: var(--primary-color);
}
[data-theme="high-contrast"] .sidebar-cat-link.is-active,
[data-theme="high-contrast"] .sidebar-sub-link.is-active {
    outline: 2px solid var(--primary-color);
    color: var(--primary-color);
}
@media (max-width: 900px) {
    .content-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .qa-filter { min-width: 100%; }
    .qa-filter-status { min-width: 100%; }
}
@media print {
    .content-layout { display: block; }
    .sidebar { display: none; }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Header - Modern Flat Design */
.site-header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0.45rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
[data-theme="dark"] .site-header {
    background-color: var(--card-bg);
    border-bottom-color: var(--border-color);
}
[data-theme="high-contrast"] .site-header {
    background-color: #000000;
    border-bottom: 2px solid #ffffff;
}
.site-header .container,
.public-page .site-header .container {
    max-width: 1400px;
    width: 100%;
    padding: 0 1.25rem;
}
.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.75rem 1rem;
}
.logo a {
    text-decoration: none;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}
.logo a:hover {
    transform: scale(1.02);
}
.logo a:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 4px;
}
.site-logo {
    height: 38px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 45, 105, 0.08));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.logo a:hover .site-logo {
    transform: rotate(5deg) scale(1.05);
}
.logo-text {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.15;
    text-align: left;
}
.logo-title {
    font-size: 1.16rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: opacity 0.2s ease;
}
.logo-subtitle {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    text-transform: uppercase;
    transition: color 0.2s ease;
}
[data-theme="dark"] .logo-title {
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
[data-theme="dark"] .logo-subtitle {
    color: #94a3b8;
}
[data-theme="high-contrast"] .logo-title {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--text-color);
    color: #ffff00;
}
[data-theme="high-contrast"] .logo-subtitle {
    color: #ffffff;
}

.header-actions {
    display: none;
}

.header-nav-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 auto;
    justify-content: flex-end;
}

.main-nav {
    display: flex;
    gap: 0.15rem;
    align-items: center;
    flex-wrap: nowrap;
}

.admin-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.84rem;
    white-space: nowrap;
    position: relative;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.admin-link::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 0.65rem;
    width: calc(100% - 1.3rem);
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.admin-link:hover {
    color: var(--primary-color);
    background-color: rgba(0, 45, 105, 0.06);
    text-decoration: none;
}
.admin-link.active {
    color: var(--primary-color);
    font-weight: 700;
    background-color: rgba(0, 45, 105, 0.08);
}
.admin-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}
[data-theme="dark"] .admin-link:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: #38bdf8;
}
[data-theme="dark"] .admin-link.active {
    color: #38bdf8;
    background-color: rgba(56, 189, 248, 0.12);
}
[data-theme="dark"] .admin-link.active::after {
    background-color: #38bdf8;
}
.admin-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}
[data-theme="high-contrast"] .admin-link::after {
    background-color: #ffff00;
}
[data-theme="high-contrast"] .admin-link:hover {
    background-color: #ffff00;
    color: #000000;
}
[data-theme="high-contrast"] .admin-link.active {
    background-color: #ffff00;
    color: #000000;
    font-weight: 900;
    outline: 2px solid #ffff00;
}
.admin-link:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 2px;
}

.print-btn {
    background: none !important;
    border: none !important;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0;
}

/* Theme Switcher */
.theme-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: nowrap;
    background: rgba(0, 45, 105, 0.04);
    padding: 3px 5px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
[data-theme="dark"] .theme-controls {
    background: rgba(255, 255, 255, 0.04);
}
[data-theme="high-contrast"] .theme-controls {
    background: transparent;
    border: 1.5px solid #ffffff;
}

.font-size-controls, .theme-mode-controls {
    display: flex;
    gap: 3px;
}

.font-size-controls {
    border-right: 1px solid var(--border-color);
    padding-right: 6px;
}
[data-theme="high-contrast"] .font-size-controls {
    border-right-color: #ffffff;
}

.theme-btn {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 700;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    width: 28px;
    height: 28px;
    padding: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.theme-btn svg {
    width: 14px;
    height: 14px;
}
.theme-btn:hover {
    border-color: var(--primary-color);
    background: var(--hover-bg);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 45, 105, 0.08);
}
.theme-btn:active {
    transform: translateY(0);
}
.theme-btn:focus,
.theme-btn:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 2px;
}
[data-theme="high-contrast"] .theme-btn {
    border-color: #ffffff;
    background: #000000;
    color: #ffff00;
    box-shadow: none;
}
[data-theme="high-contrast"] .theme-btn:hover {
    background: #ffff00;
    color: #000000;
    border-color: #ffff00;
}

.lang-controls {
    display: flex;
    gap: 3px;
    border-right: 1px solid var(--border-color);
    padding-right: 5px;
    align-items: center;
}
[data-theme="high-contrast"] .lang-controls {
    border-right-color: #ffffff;
}
.lang-controls .lang-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0 0.3rem;
    font-weight: 700;
    border-radius: 4px;
    background: transparent;
    color: var(--text-color);
    font-size: 0.76rem;
    border: 1px solid transparent;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.lang-controls .lang-btn:hover {
    background-color: var(--hover-bg);
    border-color: var(--border-color);
}
.lang-controls .lang-btn.active {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}
[data-theme="dark"] .lang-controls .lang-btn.active {
    color: #0f172a;
    background: #38bdf8;
    border-color: #38bdf8;
}
[data-theme="high-contrast"] .lang-controls .lang-btn {
    border-color: transparent;
}
[data-theme="high-contrast"] .lang-controls .lang-btn:hover {
    background: #00ff00;
    color: #000000;
    border-color: #00ff00;
}
[data-theme="high-contrast"] .lang-controls .lang-btn.active {
    background: #ffff00;
    color: #000000;
    border-color: #ffff00;
}

.required-marker {
    color: #b31d28;
    font-weight: 700;
}

/* Hamburger Menu Toggle */
.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    cursor: pointer;
    padding: 8px 10px;
    z-index: 1100;
    border-radius: 8px;
    min-width: 44px;
    min-height: 44px;
    transition: all 0.2s ease;
    position: relative;
    align-items: center;
    justify-content: center;
}
.menu-toggle:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
}
.menu-toggle:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 2px;
    background: var(--hover-bg);
}
.menu-toggle:active {
    transform: scale(0.97);
}
@media (prefers-reduced-motion: reduce) {
    .menu-toggle {
        transition: none;
    }
}
[data-theme="high-contrast"] .menu-toggle {
    border: 2px solid #ffffff;
    background: #000000;
}
[data-theme="high-contrast"] .menu-toggle:hover,
[data-theme="high-contrast"] .menu-toggle:focus-visible {
    background: #ffff00;
    border-color: #ffff00;
}
[data-theme="high-contrast"] .menu-toggle:hover .hamburger-inner,
[data-theme="high-contrast"] .menu-toggle:hover .hamburger-inner::before,
[data-theme="high-contrast"] .menu-toggle:hover .hamburger-inner::after,
[data-theme="high-contrast"] .menu-toggle:focus-visible .hamburger-inner,
[data-theme="high-contrast"] .menu-toggle:focus-visible .hamburger-inner::before,
[data-theme="high-contrast"] .menu-toggle:focus-visible .hamburger-inner::after {
    background-color: #000000;
}

.hamburger-box {
    width: 24px;
    height: 18px;
    display: inline-block;
    position: relative;
}

.hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    position: absolute;
    transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
}

@media (prefers-reduced-motion: reduce) {
    .hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
        transition: none;
    }
}

.hamburger-inner {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.hamburger-inner::before {
    content: "";
    top: -8px;
    left: 0;
}

.hamburger-inner::after {
    content: "";
    bottom: -8px;
    left: 0;
}

/* Stan aktywny hamburgera */
.menu-toggle[aria-expanded="true"] .hamburger-inner {
    background-color: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger-inner::before {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger-inner::after {
    transform: translateY(-8px) rotate(-45deg);
}

/* Responsywny nagłówek dla mniejszych ekranów (< 1024px) */
@media (max-width: 1023.98px) {
    .site-header {
        padding: 0.35rem 0;
        min-height: 52px;
    }
    .header-flex {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 0.5rem;
    }
    .site-logo {
        height: 32px;
    }
    .logo-title {
        font-size: 1.02rem;
    }
    .logo-subtitle {
        font-size: 0.62rem;
    }
    .header-actions {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        flex-shrink: 0;
    }
    .lang-controls-compact {
        display: flex;
        align-items: center;
        gap: 2px;
        background: rgba(0, 45, 105, 0.04);
        padding: 2px;
        border-radius: 6px;
        border: 1px solid var(--border-color);
    }
    .lang-controls-compact .lang-btn {
        padding: 0.2rem 0.45rem;
        font-size: 0.75rem;
        min-width: 28px;
        min-height: 28px;
    }
    .menu-toggle {
        display: inline-flex;
    }
    
    /* Mobilny wysuwany panel nawigacji (Drawer) */
    .header-nav-container {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(320px, 85vw);
        background: var(--card-bg);
        z-index: 100000;
        padding: 1.5rem 1.25rem;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 1.5rem;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.25);
        transform: translateX(100%);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        border-left: 1px solid var(--border-color);
    }
    .header-nav-container.active {
        transform: translateX(0);
    }
    @media (prefers-reduced-motion: reduce) {
        .header-nav-container {
            transition: none;
        }
    }
    [data-theme="dark"] .header-nav-container {
        background: #1e293b;
        border-left-color: #334155;
    }
    [data-theme="high-contrast"] .header-nav-container {
        background: #000000;
        border-left: 3px solid #ffff00;
    }

    .header-nav-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(4px);
        z-index: 99999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }
    .header-nav-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }
    [data-theme="high-contrast"] .header-nav-backdrop {
        background: rgba(0, 0, 0, 0.85);
    }

    .header-nav-container .main-nav {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
        align-items: stretch;
        width: 100%;
    }
    .header-nav-container .admin-link {
        padding: 0.65rem 0.85rem;
        font-size: 0.95rem;
        border-radius: 8px;
        border: 1px solid var(--border-color);
        width: 100%;
        display: block;
        white-space: normal;
    }
    .header-nav-container .admin-link.active {
        border-color: var(--primary-color);
        background: rgba(0, 45, 105, 0.08);
    }
    [data-theme="dark"] .header-nav-container .admin-link.active {
        border-color: #38bdf8;
        background: rgba(56, 189, 248, 0.12);
    }
    [data-theme="high-contrast"] .header-nav-container .admin-link.active {
        border: 2px solid #ffff00;
        background: #ffff00;
        color: #000000;
    }

    .header-nav-container .theme-controls {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.85rem;
        width: 100%;
        border-radius: 10px;
    }
    .header-nav-container .theme-controls .lang-controls {
        display: none;
    }
    .header-nav-container .font-size-controls,
    .header-nav-container .theme-mode-controls {
        display: flex;
        justify-content: space-between;
        width: 100%;
        border: none;
        padding: 0;
    }
    .header-nav-container .theme-btn {
        flex: 1;
        padding: 0.45rem;
        min-height: 40px;
    }
}

/* ============================================================
   HERO SECTION — gradient + wyszukiwarka
   ============================================================ */
.search-section {
    padding: 0;
    text-align: center;
    position: relative;
    overflow: visible;
    z-index: 150;
}

.hero-wrapper {
    background: linear-gradient(135deg, #001b44 0%, #002d69 50%, #004b99 100%);
    padding: 3.5rem var(--public-container-pad) 4.5rem;
    position: relative;
    overflow: visible;
    width: 100%;
    z-index: 150;
}

.hero-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 10% 20%, rgba(255,255,255,0.06) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 90% 80%, rgba(56,189,248,0.18) 0%, transparent 60%);
    pointer-events: none;
    overflow: hidden;
}

.hero-wrapper::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--bg-color);
    clip-path: ellipse(55% 100% at 50% 100%);
    pointer-events: none;
    z-index: 1;
}

[data-theme="dark"] .hero-wrapper {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #0c4a6e 100%);
}

[data-theme="high-contrast"] .hero-wrapper {
    background: #000000;
    border-bottom: 3px solid #ffff00;
}
[data-theme="high-contrast"] .hero-wrapper::after {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 150;
    max-width: 680px;
    margin: 0 auto;
}

.hero-heading {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
    margin-bottom: 0.65rem;
    line-height: 1.15;
    text-shadow: 0 2px 16px rgba(0,0,0,0.18);
}

[data-theme="high-contrast"] .hero-heading {
    color: #ffff00;
    text-shadow: none;
}

.hero-sub {
    font-size: 1.05rem;
    color: #f1f5f9;
    margin-bottom: 2rem;
    font-weight: 400;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

[data-theme="high-contrast"] .hero-sub {
    color: #ffffff;
    text-shadow: none;
}

.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 20, 50, 0.45);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 999px;
    padding: 0.35rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 2rem;
    backdrop-filter: blur(8px);
}

[data-theme="high-contrast"] .hero-stats {
    background: transparent;
    border: 2px solid #ffff00;
    color: #ffff00;
}

.hero-stats-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    animation: heroPulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes heroPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.75); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-stats-dot { animation: none; }
}

.search-form {
    position: relative;
    z-index: 150;
}

.search-wrapper {
    position: relative;
    z-index: 150;
    max-width: 620px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
}

#search-input {
    flex: 1;
    padding: 1rem 3rem 1rem 1.35rem;
    font-size: 1.1rem;
    background-color: #ffffff;
    color: #0f172a;
    border: 2px solid transparent;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

[data-theme="dark"] #search-input {
    background-color: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}
[data-theme="high-contrast"] #search-input {
    background-color: #000000;
    color: #ffff00;
    border: 2px solid #ffffff;
}

#search-input::placeholder {
    color: #64748b;
}

[data-theme="dark"] #search-input::placeholder {
    color: #94a3b8;
}

[data-theme="high-contrast"] #search-input::placeholder {
    color: #cccc00;
}

#search-input:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56,189,248,0.3), 0 4px 16px rgba(0,0,0,0.12);
}

[data-theme="high-contrast"] #search-input:focus {
    border-color: #ffff00;
    box-shadow: 0 0 0 4px #ffff00;
}

.hero-quick-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    position: relative;
    z-index: 1;
}

.hero-quick-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1rem;
    background: rgba(0, 20, 50, 0.5);
    border: 1.5px solid rgba(255,255,255,0.35);
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.hero-quick-tag:hover {
    background: #ffffff;
    color: #002d69;
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

.hero-quick-tag:focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 2px;
    background: #ffffff;
    color: #002d69;
}

[data-theme="high-contrast"] .hero-quick-tag {
    border: 2px solid #ffff00;
    color: #ffff00;
}

[data-theme="high-contrast"] .hero-quick-tag:hover {
    background: #ffff00;
    color: #000000;
}

.search-hotkey-badge {
    position: absolute;
    right: calc(140px + 0.5rem);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 6px;
    padding: 0.15rem 0.45rem;
    font-size: 0.78rem;
    font-family: inherit;
    font-weight: 700;
    pointer-events: none;
    user-select: none;
}

[data-theme="dark"] .search-hotkey-badge {
    background: rgba(255,255,255,0.08);
    color: #94a3b8;
    border-color: #334155;
}

[data-theme="high-contrast"] .search-hotkey-badge {
    background: transparent;
    color: #ffff00;
    border-color: #ffff00;
}

@media (max-width: 768px) {
    .search-hotkey-badge {
        display: none;
    }
    .hero-wrapper {
        padding: 2.5rem 1rem 4rem;
    }
    .hero-heading {
        font-size: 1.6rem;
    }
}

/* Skeleton loader dla wyszukiwarki */
.search-skeleton {
    display: none;
    gap: 0.5rem;
    flex-direction: column;
    padding: 0.5rem 0;
}
.search-skeleton.is-loading {
    display: flex;
}
.skeleton-item {
    height: 60px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--border-color) 25%, var(--hover-bg) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
}
.skeleton-item:nth-child(2) { animation-delay: 0.1s; }
.skeleton-item:nth-child(3) { animation-delay: 0.2s; }

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton-item { animation: none; background: var(--border-color); }
}

/* ==========================================================================
   Bento Grid - Główne działy pomocy (Kategorie FAQ)
   ========================================================================== */
.bento-categories-section {
    margin: 2rem 0 3rem 0;
}
.bento-header {
    margin-bottom: 1.5rem;
    text-align: left;
}
.bento-title {
    font-size: clamp(1.3rem, 3vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-color);
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.section-title-icon {
    vertical-align: -0.15em;
    flex-shrink: 0;
}
.bento-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
}
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

/* Kolory akcentów kategorii bento — kalibrowane pod WCAG 2.2 AA (min. 4.5:1 dla tekstu/ikon) */
.bento-card[data-cat-color="1"] { --cat-accent: #1d4ed8; --cat-accent-light: #dbeafe; }
.bento-card[data-cat-color="2"] { --cat-accent: #6d28d9; --cat-accent-light: #ede9fe; }
.bento-card[data-cat-color="3"] { --cat-accent: #047857; --cat-accent-light: #d1fae5; }
.bento-card[data-cat-color="4"] { --cat-accent: #b45309; --cat-accent-light: #fef3c7; }
.bento-card[data-cat-color="5"] { --cat-accent: #b91c1c; --cat-accent-light: #fee2e2; }
.bento-card[data-cat-color="6"] { --cat-accent: #0e7490; --cat-accent-light: #cffafe; }
.bento-card[data-cat-color="7"] { --cat-accent: #a21caf; --cat-accent-light: #fae8ff; }
.bento-card[data-cat-color="8"] { --cat-accent: #15803d; --cat-accent-light: #dcfce7; }

[data-theme="dark"] .bento-card[data-cat-color="1"] { --cat-accent: #60a5fa; --cat-accent-light: rgba(96,165,250,0.12); }
[data-theme="dark"] .bento-card[data-cat-color="2"] { --cat-accent: #a78bfa; --cat-accent-light: rgba(167,139,250,0.12); }
[data-theme="dark"] .bento-card[data-cat-color="3"] { --cat-accent: #34d399; --cat-accent-light: rgba(52,211,153,0.12); }
[data-theme="dark"] .bento-card[data-cat-color="4"] { --cat-accent: #fbbf24; --cat-accent-light: rgba(251,191,36,0.12); }
[data-theme="dark"] .bento-card[data-cat-color="5"] { --cat-accent: #f87171; --cat-accent-light: rgba(248,113,113,0.12); }
[data-theme="dark"] .bento-card[data-cat-color="6"] { --cat-accent: #22d3ee; --cat-accent-light: rgba(34,211,238,0.12); }
[data-theme="dark"] .bento-card[data-cat-color="7"] { --cat-accent: #f472b6; --cat-accent-light: rgba(244,114,182,0.12); }
[data-theme="dark"] .bento-card[data-cat-color="8"] { --cat-accent: #4ade80; --cat-accent-light: rgba(74,222,128,0.12); }
.bento-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.35rem;
    text-decoration: none !important;
    color: var(--text-color);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}
.bento-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--cat-accent, var(--primary-color));
    opacity: 0;
    transition: opacity 0.2s ease;
}
.bento-card:hover {
    transform: translateY(-4px);
    border-color: var(--cat-accent, var(--primary-color));
    box-shadow: 0 12px 28px rgba(0,0,0,0.09);
    text-decoration: none !important;
}
[data-theme="dark"] .bento-card:hover {
    box-shadow: 0 12px 28px rgba(0,0,0,0.4);
}
.bento-card:hover::before {
    opacity: 1;
}
.bento-card:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 3px;
}
.bento-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}
.bento-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--cat-accent-light, var(--hover-bg));
    color: var(--cat-accent, var(--primary-color));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.bento-card:hover .bento-card-icon {
    background: var(--cat-accent, var(--primary-color));
    color: #ffffff;
    transform: scale(1.1) rotate(-5deg);
}
[data-theme="high-contrast"] .bento-card-icon {
    background: #000000;
    border: 2px solid #ffff00;
    color: #ffff00;
}
[data-theme="high-contrast"] .bento-card:hover .bento-card-icon {
    background: #ffff00;
    color: #000000;
}
.bento-badge {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    text-decoration: none !important;
}
.bento-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    text-decoration: none !important;
    transition: color 0.2s ease;
}
.bento-card:hover .bento-card-title {
    color: var(--primary-color);
}
[data-theme="dark"] .bento-card:hover .bento-card-title {
    color: var(--primary-color);
}
[data-theme="high-contrast"] .bento-card-title {
    color: #ffff00;
}
[data-theme="high-contrast"] .bento-card:hover .bento-card-title {
    color: #ffff00;
}
.bento-card-arrow {
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}
.bento-card:hover .bento-card-arrow {
    transform: translateX(4px);
    color: var(--primary-color);
}
[data-theme="dark"] .bento-card:hover .bento-card-arrow {
    color: var(--primary-color);
}
[data-theme="high-contrast"] .bento-card-arrow {
    color: #ffff00;
}
[data-theme="high-contrast"] .bento-card:hover .bento-card-arrow {
    color: #ffff00;
}
.bento-sub-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.35rem;
}
.bento-tag {
    font-size: 0.76rem;
    color: var(--text-muted);
    background: var(--bg-color);
    padding: 0.22rem 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    line-height: 1.35;
    text-decoration: none !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.bento-card:hover .bento-tag {
    border-color: rgba(var(--primary-rgb), 0.3);
}
.bento-tag-more {
    font-weight: 700;
    color: var(--primary-color);
}
[data-theme="dark"] .bento-card:hover {
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
}
[data-theme="high-contrast"] .bento-card {
    border: 2px solid #ffffff;
}
[data-theme="high-contrast"] .bento-card:hover {
    border-color: #ffff00;
    outline: 2px solid #ffff00;
}
[data-theme="high-contrast"] .bento-badge,
[data-theme="high-contrast"] .bento-tag {
    background: #000000;
    border-color: #ffffff;
    color: #ffff00;
}

.btn {
    padding: 0.8rem 1.6rem;
    font-size: 1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 45, 105, 0.15);
}
.btn:active {
    transform: translateY(0);
}
.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}
[data-theme="high-contrast"] .btn-primary { color: #000000; }

.btn-primary:hover, .btn-primary:focus-visible {
    background-color: var(--primary-hover);
}

/* Wyniki wyszukiwania - dropdown */
.search-results-container {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    margin-top: 0;
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
    z-index: 999999 !important;
    max-height: 420px;
    overflow-y: auto;
    text-align: left;
}

[data-theme="dark"] .search-results-container {
    background: #1e293b !important;
    background-color: #1e293b !important;
    border-color: #334155;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7);
}

[data-theme="high-contrast"] .search-results-container {
    background: #000000 !important;
    background-color: #000000 !important;
    border: 2px solid #ffffff;
    box-shadow: none;
}

.search-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: transparent;
}
.search-results-list li {
    border-bottom: 1px solid var(--border-color);
    background: transparent;
}
.search-results-list li:last-child {
    border-bottom: none;
}
.search-results-list a {
    display: block;
    padding: 0.9rem 1.25rem;
    text-decoration: none;
    color: var(--text-color);
    background: transparent;
    transition: background-color 0.15s;
}
.search-results-list a:hover, .search-results-list a:focus {
    background-color: var(--hover-bg, #f1f5f9) !important;
    outline: none;
    box-shadow: inset 4px 0 0 var(--primary-color);
}
[data-theme="high-contrast"] .search-results-list a:hover,
[data-theme="high-contrast"] .search-results-list a:focus {
    background-color: #ffff00 !important;
    color: #000000 !important;
}

/* Wyniki wyszukiwania - sekcja pod polem */
.live-search-section {
    margin: 1rem 0 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1rem;
}
.live-search-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.live-search-title {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-color);
}
.live-search-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.live-search-status {
    color: var(--text-muted);
    font-size: 0.95rem;
    min-height: 1.2em;
    margin-bottom: 0.5rem;
}
.live-search-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}
.live-search-item {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-color);
    overflow: hidden;
}
.live-search-link {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    padding: 0.85rem 1rem;
}
.live-search-link:hover, .live-search-link:focus {
    outline: none;
    box-shadow: inset 4px 0 0 var(--primary-color);
}
.live-search-link strong {
    display: block;
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}
.live-search-snippet {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.35;
}
.live-search-actions {
    margin-top: 0.75rem;
    display: flex;
    justify-content: center;
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: var(--primary-color);
    color: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
    display: grid;
    place-items: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    z-index: 200;
}
[data-theme="high-contrast"] .back-to-top { color: #000000; }
.back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.back-to-top:hover, .back-to-top:focus-visible {
    background: var(--primary-hover);
    outline: none;
    box-shadow: 0 14px 34px rgba(0,0,0,0.22);
}
.back-to-top:active {
    transform: translateY(1px);
}
.back-to-top-icon {
    width: 26px;
    height: 26px;
}

@media (max-width: 480px) {
    .back-to-top {
        right: 18px;
        bottom: 18px;
        width: 44px;
        height: 44px;
    }
    .back-to-top-icon {
        width: 24px;
        height: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        transition: none;
    }
}

/* Akordeon i Treść FAQ */
.section-title {
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--text-color);
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.category-block {
    margin-bottom: 3rem;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}
.category-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}
.subcategory-block {
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 3px solid var(--border-color);
}
.subcategory-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    opacity: 0.9;
}

.question-item {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-bg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
}
.question-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 45, 105, 0.08);
}
[data-theme="dark"] .question-item:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.question-header {
    display: flex;
    align-items: stretch;
}

.accordion-trigger {
    flex: 1;
    text-align: left;
    background-color: var(--card-bg);
    border: none;
    padding: 1.1rem 1.5rem;
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    min-height: 52px;
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
}

.accordion-chevron {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
    margin-left: 0.5rem;
}
.accordion-trigger[aria-expanded="true"] .accordion-chevron {
    transform: rotate(180deg);
    color: var(--primary-color);
}
[data-theme="dark"] .accordion-trigger[aria-expanded="true"] .accordion-chevron {
    color: #60a5fa;
}
[data-theme="high-contrast"] .accordion-trigger[aria-expanded="true"] .accordion-chevron {
    color: #ffff00;
}

.btn-copy-link,
.btn-favorite {
    background: var(--card-bg);
    border: none;
    border-left: 1px solid var(--border-color);
    padding: 0;
    width: 48px;
    min-width: 48px;
    min-height: 48px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-copy-link:hover, .btn-copy-link:focus-visible,
.btn-favorite:hover, .btn-favorite:focus-visible {
    background: var(--bg-color);
    color: var(--primary-color);
}
.btn-copy-link.copied {
    background: #10b981;
    color: #ffffff;
}
.answer-actions {
    display: none;
    justify-content: flex-end;
    gap: 0.5rem;
    margin: 1rem 0 0;
}
.answer-actions .btn-copy-link,
.answer-actions .btn-favorite {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.qr-dialog {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0;
    margin: auto;
    color: var(--text-color);
    background: var(--card-bg);
    max-width: min(92vw, 360px);
}
.qr-dialog::backdrop { background: rgb(0 0 0 / 0.65); }
.qr-dialog-inner { display: grid; gap: 1rem; justify-items: center; padding: 1.25rem; }
.qr-dialog h2 { margin: 0; font-size: 1.1rem; text-align: center; }
.qr-dialog img { display: block; width: 240px; height: 240px; background: #fff; }
.qr-link { max-width: 100%; margin: 0; overflow-wrap: anywhere; font-size: .75rem; color: var(--text-muted); text-align: center; }
.btn-favorite[aria-pressed="true"] .star-icon,
.btn-favorite.favorited .star-icon {
    fill: #f59e0b;
    stroke: #d97706;
}
[data-theme="high-contrast"] .btn-favorite[aria-pressed="true"] .star-icon,
[data-theme="high-contrast"] .btn-favorite.favorited .star-icon {
    fill: #ffff00;
    stroke: #ffff00;
}
[data-theme="dark"] .btn-favorite[aria-pressed="true"] .star-icon,
[data-theme="dark"] .btn-favorite.favorited .star-icon {
    fill: #fbbf24;
    stroke: #f59e0b;
}

.accordion-trigger:hover, .accordion-trigger:focus-visible {
    background-color: var(--bg-color);
}
.accordion-trigger[aria-expanded="true"] {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.accordion-content {
    background-color: var(--card-bg);
    padding: 1.25rem 1.75rem 2rem 2.5rem;
    font-size: 1rem;
    color: var(--text-color);
    animation: accordionFade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.accordion-content[hidden] { display: none; }

@keyframes accordionFade {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .accordion-content {
        animation: none;
    }
    .accordion-chevron {
        transition: none;
    }
}

/* ==========================================================================
   Dostępny System Toastów (WCAG 2.2 Status Messages)
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    max-width: min(420px, calc(100vw - 2rem));
}
.toast {
    pointer-events: auto;
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 10px;
    padding: 0.85rem 1.25rem;
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast--success {
    border-left-color: #10b981;
}
.toast--info {
    border-left-color: var(--primary-color);
}
.toast.is-hiding {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
}
@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
[data-theme="dark"] .toast {
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
}
[data-theme="high-contrast"] .toast {
    background: #000000;
    border: 2px solid #ffffff;
    border-left: 6px solid #ffff00;
    color: #ffff00;
}
@media (max-width: 600px) {
    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
    }
}

.answer-confidence {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.5rem 0 0.75rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.answer-confidence span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0.12rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
}

.answer-body {
    border-left: 3px solid var(--border-color); /* Subtelna linia boczna */
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

/* Formatowanie list wewnątrz odpowiedzi */
.answer-body ul, .answer-body ol {
    margin-left: 1.2rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}
.answer-body li {
    margin-bottom: 0.5rem;
}

/* Tabele - WCAG i Responsywność */
.answer-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    display: block; /* Umożliwia przewijanie na mobile */
    overflow-x: auto;
}
.answer-body th, .answer-body td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
}
.answer-body th {
    background-color: var(--bg-color);
    font-weight: 700;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}
.answer-body tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}
[data-theme="dark"] .answer-body tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}
[data-theme="high-contrast"] .answer-body th {
    border-bottom: 2px solid var(--text-color);
}

/* Feedback Loop */
.feedback-container {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.feedback-label { font-size: 0.9rem; color: var(--text-muted); }
.feedback-btns {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.feedback-actions {
    margin-left: auto;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.btn-feedback {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.6rem 1.2rem;
    border-radius: 24px;
    cursor: pointer;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-feedback--accent {
    position: relative;
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(89, 133, 255, 0.06));
    box-shadow: inset 0 0 0 1px rgba(89, 133, 255, 0.1);
}
.btn-feedback--accent::before {
    content: "";
    position: absolute;
    left: 0.5rem;
    top: 50%;
    width: 0.35rem;
    height: 0.35rem;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 0 3px rgba(89, 133, 255, 0.12);
}
.btn-feedback:hover {
    border-color: var(--primary-color);
    background: var(--hover-bg);
    transform: scale(1.03);
}
.btn-feedback:active {
    transform: scale(0.97);
}

@media (max-width: 640px) {
    .feedback-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
        align-items: stretch;
    }
    .feedback-label {
        font-size: 0.95rem;
    }
    .feedback-btns,
    .feedback-actions {
        width: 100%;
        margin-left: 0;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
    .btn-feedback {
        width: 100%;
        padding: 0.8rem 0.75rem;
        border-radius: 18px;
        font-size: 0.96rem;
    }
}

/* Breadcrumb */
.breadcrumb-nav { margin-bottom: 0.75rem; }

/* Tryb czytania – oznaczone pytania */
.question-item.is-read {
    border-left: 3px solid #28a745;
    background: rgba(40, 167, 69, 0.04);
    border-radius: 0 8px 8px 0;
}
[data-theme="dark"] .question-item.is-read {
    border-left-color: #51cf66;
    background: rgba(81, 207, 102, 0.07);
}
[data-theme="high-contrast"] .question-item.is-read {
    border-left: 3px solid var(--primary-color);
    background: transparent;
}
.read-badge {
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #28a745;
    background: rgba(40, 167, 69, 0.12);
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin-left: 0.4rem;
    margin-right: 0.1rem;
}
[data-theme="dark"] .read-badge { color: #51cf66; background: rgba(81, 207, 102, 0.15); }
[data-theme="high-contrast"] .read-badge { color: var(--primary-color); background: transparent; border: 1px solid var(--primary-color); }
.is-read .read-badge { display: inline-flex; }
@media print { .read-badge { display: none !important; } }

.breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.35rem 0.75rem;
    background: var(--bg-color);
    border-radius: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.breadcrumb-item + .breadcrumb-item::before {
    content: '›';
    margin: 0 0.45rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.breadcrumb-current {
    color: var(--primary-color);
    font-weight: 600;
}
@media print {
    .breadcrumb-nav { display: none; }
}

/* Powiązane pytania */
.related-questions {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}
.related-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}
.related-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.related-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.15s;
}
.related-link::before { content: '→'; font-size: 0.8rem; }
.related-link:hover { text-decoration: underline; color: var(--primary-hover); }
.related-link:focus { outline: var(--focus-ring); border-radius: 3px; }

/* Top 5 popularnych pytań */
.top5-section {
    margin-bottom: 1.75rem;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(var(--primary-rgb), 0.04) 100%);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 14px;
    padding: 1.35rem 1.5rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.top5-section::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.08) 0%, transparent 70%);
    pointer-events: none;
}
[data-theme="dark"] .top5-section {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(56,189,248,0.05) 100%);
    border-color: var(--border-color);
    border-left-color: var(--primary-color);
}
[data-theme="high-contrast"] .top5-section {
    background: #000000;
    border: 2px solid #ffff00;
    border-left: 4px solid #ffff00;
}
.top5-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 1rem;
}
.top5-title .section-title-icon {
    color: #ff6a00;
}
.top5-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    counter-reset: top5;
}
.top5-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    counter-increment: top5;
    padding: .5rem .6rem;
    border-radius: 8px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.top5-item:hover { background: var(--hover-bg); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.03); }
.top5-item::before {
    content: counter(top5);
    min-width: 1.6rem;
    height: 1.6rem;
    line-height: 1.6rem;
    text-align: center;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    flex-shrink: 0;
}
.top5-link {
    flex: 1;
    text-decoration: none;
    color: var(--text-color);
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 44px;
}
.top5-link:hover .top5-question { text-decoration: underline; color: var(--primary-color); }
.top5-question {
    display: block;
    font-weight: 600;
    font-size: .92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.top5-meta {
    display: block;
    font-size: .76rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.top5-badge {
    font-size: .78rem;
    font-weight: 700;
    color: var(--primary-color);
    background: #e9f0fb;
    border-radius: 20px;
    padding: .15rem .65rem;
    white-space: nowrap;
    flex-shrink: 0;
}
@media (max-width: 600px) {
    .top5-question { white-space: normal; }
    .top5-meta { white-space: normal; }
}
@media print { .top5-section { display: none; } }

/* Historia przeglądania */
.recently-viewed-section {
    margin-bottom: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
}
.recently-viewed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.7rem;
}
.recently-viewed-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}
.recently-viewed-clear {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    min-height: 44px;
}
.recently-viewed-clear:hover { border-color: var(--primary-color); color: var(--primary-color); }
.recently-viewed-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    margin: 0;
    padding: 0;
}
.history-link {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-color);
    transition: background 0.15s, border-color 0.15s;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}
.history-link:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.history-link:focus { outline: var(--focus-ring); border-radius: 20px; }
@media print { .recently-viewed-section { display: none; } }

/* Inquiry Form Section */
.inquiry-section {
    margin-top: 5rem;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(var(--primary-rgb), 0.03) 100%);
    padding: 3rem 3rem 3.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.inquiry-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #0ea5e9, var(--primary-color));
    background-size: 200% 100%;
    animation: inquiryGradient 4s ease-in-out infinite;
}
@keyframes inquiryGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
    .inquiry-section::before { animation: none; background: var(--primary-color); }
}
[data-theme="dark"] .inquiry-section {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(14,165,233,0.06) 100%);
}
[data-theme="high-contrast"] .inquiry-section {
    background: #000000;
    border: 2px solid #ffff00;
}
[data-theme="high-contrast"] .inquiry-section::before {
    background: #ffff00;
}
.inquiry-section h2 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
[data-theme="high-contrast"] .inquiry-section h2 { color: #ffff00; }
.inquiry-section > p {
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 2rem;
}
.inquiry-form {
    max-width: 560px;
    margin: 0 auto;
    text-align: left;
}
.inquiry-form-field {
    margin-bottom: 1.25rem;
}
.inquiry-form-field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.45rem;
}
.inquiry-form-field .form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.inquiry-form-field .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
    outline: none;
}
[data-theme="high-contrast"] .inquiry-form-field .form-control:focus {
    box-shadow: 0 0 0 3px #ffff00;
}
.form-control {
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    min-height: 44px;
}
.form-control::placeholder { color: var(--text-muted); }

/* ============================================================
   FOOTER — rozbudowany design
   ============================================================ */
.site-footer {
    margin-top: 5rem;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}
[data-theme="high-contrast"] .site-footer {
    background: #000000;
    border-top: 2px solid #ffffff;
}

.site-footer__inner {
    padding: 3rem 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem 3rem;
    align-items: start;
}

@media (max-width: 640px) {
    .site-footer__inner {
        grid-template-columns: 1fr;
        padding: 2rem 0 1rem;
    }
}

.site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.site-footer__logo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--primary-color);
}

.site-footer__logo {
    height: 36px;
    max-height: 36px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    opacity: 0.9;
}

[data-theme="dark"] .site-footer__logo {
    filter: brightness(1.2);
}

.site-footer__brand-name {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.site-footer__tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 280px;
    line-height: 1.5;
}

[data-theme="high-contrast"] .site-footer__logo-link { color: #ffff00; }
[data-theme="high-contrast"] .site-footer__tagline { color: #ffffff; }

.site-footer__links-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.site-footer__links-heading {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

[data-theme="high-contrast"] .site-footer__links-heading { color: #ffff00; }

.site-footer__links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
}

.site-footer__links-list a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.15s;
}

.site-footer__links-list a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

[data-theme="high-contrast"] .site-footer__links-list a {
    color: #ffffff;
}

[data-theme="high-contrast"] .site-footer__links-list a:hover {
    color: #ffff00;
}

.site-footer__bottom {
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
}

[data-theme="high-contrast"] .site-footer__bottom { border-top-color: #ffffff; }

.site-footer__bottom-copy { color: var(--text-muted); }

/* Legacy support — old footer links class */
.site-footer-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin: 0.5rem 0 0;
    padding: 0;
    justify-content: center;
}
.site-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
}

/* Mobile responsive adjustments */

@media (max-width: 1150px) and (min-width: 1024px) {
    .header-flex {
        gap: 1rem;
    }
    .header-nav-container {
        gap: 1rem;
    }
    .main-nav {
        gap: 1rem;
    }
    .admin-link {
        padding: 0.5rem 0.6rem;
        font-size: 0.9rem;
    }
    .admin-link::after {
        left: 0.6rem;
        width: calc(100% - 1.2rem);
    }
}

@media (max-width: 768px) {
    .search-wrapper { flex-direction: column; }
    .btn { width: 100%; min-height: 44px; }
    .logo-title { font-size: 1.05rem; }
    .site-footer a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 0.5rem 0.25rem;
    }
    .accordion-content {
        padding-left: 1.5rem;
    }
    .question-header .btn-copy-link,
    .question-header .btn-favorite {
        display: none;
    }
    .answer-actions {
        display: flex;
    }
}

@media (max-width: 480px) {
    .logo-text { display: inline-flex; }
    .logo-title {
        display: block;
        font-size: 1.02rem;
        font-weight: 800;
        line-height: 1;
    }
    .logo-subtitle { display: none; }
    .accordion-content {
        padding-left: 1rem;
    }
}

/* Style Druku - WCAG i profesjonalny wygląd */
@media print {
    .site-header, .search-section, .inquiry-section, .site-footer, .feedback-container, .theme-controls, .skip-link, .btn-copy-link, .admin-link {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
    }
    .container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
    }
    .accordion-content {
        display: block !important;
        padding: 0 !important;
        border: none !important;
    }
    .question-item {
        border: none !important;
        border-bottom: 1pt solid #ccc !important;
        margin-bottom: 20pt !important;
        page-break-inside: avoid;
    }
    .accordion-trigger {
        font-weight: bold !important;
        font-size: 14pt !important;
        padding-left: 0 !important;
    }
    .accordion-icon { display: none !important; }
    .category-title {
        page-break-before: always;
        border-bottom: 2pt solid black !important;
    }
    .answer-body {
        border-left: none !important;
        padding-left: 0 !important;
    }
}
