/* ========================================
   KODEKSY - UNIFIED STYLES
   Style dla wszystkich stron kodeksów
   ======================================== */

/* ========================================
   1. WSPÓLNE KOMPONENTY
   ======================================== */

/* Breadcrumbs - używane we wszystkich szablonach */
.kodeks-breadcrumbs {
    background: #f8fafc;
    padding: 15px 0;
    border-radius: 10px 10px 0 0;
    margin: -40px -40px 30px -40px;
    padding-left: 40px;
    padding-right: 40px;
    border-bottom: 1px solid #e2e8f0;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-item a {
    color: #2980b9;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-item a:hover {
    color: #1565c0;
}

.breadcrumb-separator {
    color: #7f8c8d;
    font-size: 0.8rem;
}

.breadcrumb-current {
    color: #1a252f;
    font-weight: 500;
}


/* ========================================
   2. SZABLON ROZDZIAŁU KODEKSU
   Klasa główna: .kodeks-container
   ======================================== */

/* Layout dwukolumnowy */
.kodeks-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 50px;
    margin-top: 30px;
}

/* Główna treść kodeksu - szersza */
.kodeks-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(41, 128, 185, 0.1);
    min-height: 600px;
}

/* Nagłówek sekcji */
.sekcja-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 3px solid #2980b9;
}

.sekcja-tytul {
    font-size: 1.6rem;
    color: #1a252f;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
}
.sekcja-tytul-akt {
    font-size: 2.4rem;
    color: #1a252f;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
}
.sekcja-opis {
    font-size: 1.2rem;
    color: #7f8c8d;
    font-style: italic;
}

.artykul-actions {
            display: flex;
            gap: 8px;
            margin-top: 12px;
        }
        
        .action-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 16px;
            font-size: 14px;
            color: #6b7280;
            background: #f9fafb;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
            text-decoration: none;
            font-weight: 500;
        }
        
        .action-btn:hover {
            color: #374151;
            background: #f3f4f6;
            border-color: #d1d5db;
        }
        
        .action-btn svg {
            width: 16px;
            height: 16px;
        }
        
        .share-menu {
            position: relative;
            display: inline-block;
        }
        
        .share-dropdown {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            margin-top: 4px;
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            min-width: 200px;
            z-index: 1000;
        }
        
        .share-dropdown.active {
            display: block;
        }
        
        .share-option {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            color: #374151;
            text-decoration: none;
            transition: background 0.2s;
            cursor: pointer;
            font-size: 14px;
        }
        
        .share-option:first-child {
            border-radius: 8px 8px 0 0;
        }
        
        .share-option:last-child {
            border-radius: 0 0 8px 8px;
        }
        
        .share-option:hover {
            background: #f3f4f6;
        }
        
        .share-option svg {
            width: 18px;
            height: 18px;
            flex-shrink: 0;
        }
        
        .copy-feedback {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: #10b981;
            color: white;
            padding: 12px 20px;
            border-radius: 8px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            display: none;
            align-items: center;
            gap: 8px;
            z-index: 10000;
            animation: slideIn 0.3s ease-out;
        }
        
        .copy-feedback.show {
            display: flex;
        }
        
        @keyframes slideIn {
            from {
                transform: translateY(100%);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }
/* Spis treści artykułów na górze */
.artykuly-toc {
    background: linear-gradient(135deg, #f0f8ff 0%, #e8f4f8 100%);
    border: 2px solid #2980b9;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 40px;
}

.artykuly-toc h2 {
    font-size: 1.4rem;
    color: #2980b9;
    margin-bottom: 15px;
    font-weight: 600;
}

.artykuly-toc-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.artykuly-toc-list li a {
    display: block;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    color: #2980b9;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
}

.artykuly-toc-list li a:hover {
    background: #2980b9;
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(41, 128, 185, 0.3);
}

/* Artykuły kodeksu */
.artykul {
    margin-bottom: 35px;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fafbfc;
    transition: all 0.3s;
    position: relative;
    scroll-margin-top: 100px;
}

.artykul:hover {
    box-shadow: 0 8px 25px rgba(41, 128, 185, 0.1);
    border-color: rgba(41, 128, 185, 0.3);
}

.artykul-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.artykul-numer {
    background: linear-gradient(135deg, #2980b9, #1565c0);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(41, 128, 185, 0.3);
    cursor: pointer;
}

.artykul-title {
    font-size: 1.3rem;
    color: #1a252f;
    font-weight: 600;
    margin: 0;
    flex: 1;
    padding-left: 20px;
}

.artykul-tresc {
    margin-top: 15px;
    font-size: 1.15rem;
    line-height: 1.7;
    color: #2c3e50;
}

.paragraf {
    margin-bottom: 20px;
    position: relative;
}

.paragraf-header {
    font-weight: 700;
    color: #2980b9;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.paragraf-numer {
    font-weight: 700;
    color: #2980b9;
    margin-right: 8px;
}

.paragraf-tresc {
    display: inline;
}

/* Artykuł pusty (usunięty) */
.artykul-pusty {
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.artykul-pusty .artykul-header {
    justify-content: center;
}

.artykul-pusty .artykul-title {
    padding-left: 15px;
    flex: none;
}

/* Komentarz prawny */
.komentarz {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border-left: 4px solid #28a745;
    border-radius: 10px;
    padding: 20px 25px;
    margin-top: 20px;
    font-size: 1.05rem;
    line-height: 1.6;
    display: none;
}
        .komentarz.expanded {
            display: block;
        }

.komentarz-tytul {
    font-weight: 600;
    color: #155724;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.komentarz-tytul::before {
    content: "💡";
    font-size: 1.2rem;
}
.komentarz-toggle {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: #2980b9;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            margin-top: 15px;
            transition: all 0.3s ease;
        }
        
        .komentarz-toggle:hover {
            background: #1f6391;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(41, 128, 185, 0.3);
        }
        
        .komentarz-toggle svg {
            width: 16px;
            height: 16px;
            transition: transform 0.3s ease;
        }
        
        .komentarz-toggle.active svg {
            transform: rotate(180deg);
        }
        
     .porady-box {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 12px;
            padding: 30px;
            margin: 40px 0;
            color: white;
            box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
        }
        
        .porady-box h3 {
            font-size: 22px;
            font-weight: 600;
            margin-bottom: 12px;
            color: white;
        }
        
        .porady-box p {
            font-size: 15px;
            line-height: 1.6;
            margin-bottom: 20px;
            opacity: 0.95;
        }
        
        .porady-box-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: white;
            color: #667eea;
            padding: 12px 24px;
            border-radius: 8px;
            text-decoration: none;
            font-weight: 600;
            font-size: 15px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }
        
        .porady-box-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
        }
        
        .porady-box-btn svg {
            width: 20px;
            height: 20px;
        }        

/* Prawy sidebar - spis treści kodeksu */
.kodeks-sidebar {
    background: white;
    border-radius: 15px;
    padding: 25px;
padding-top: 0;    
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(41, 128, 185, 0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1a252f;
    
    margin-bottom: 25px;
padding-top: 25px;    
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #2980b9;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

/* Główne księgi kodeksu w sidebarze */
.ksiega {
    margin-bottom: 20px;
}

.ksiega-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: linear-gradient(135deg, #2980b9, #1565c0);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.ksiega-header:hover {
    background: linear-gradient(135deg, #1565c0, #0d4377);
    transform: translateX(3px);
}

.ksiega-nazwa {
    font-size: 1rem;
}

.ksiega-toggle {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.ksiega.expanded .ksiega-toggle {
    transform: rotate(180deg);
}

/* Zawartość księgi */
.ksiega-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: #f8fafc;
    border-radius: 0 0 10px 10px;
}

.ksiega.expanded .ksiega-content {
    max-height: 2000px;
}

/* Tytuły w księgach */
.tytul {
    margin: 15px 0 10px 0;
}

.tytul-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(41, 128, 185, 0.1);
    color: #2980b9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.95rem;
}
.tytul-header:a{
    text-decoration: none;
}
.tytul-header:hover {
    background: rgba(41, 128, 185, 0.2);
    transform: translateX(2px);
}

.tytul-toggle {
    font-size: 1rem;
    transition: transform 0.3s;
}

.tytul.expanded .tytul-toggle {
    transform: rotate(180deg);
}

.tytul-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 15px;
    background: #f8fafc;
}

.tytul.expanded .tytul-content {
    max-height: 800px;
    padding: 10px 15px;
}

/* Rozdziały */
.rozdzial {
    margin: 8px 0;
}

.rozdzial-link {
    display: block;
    padding: 8px 12px;
    color: #1a252f;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 0.9rem;
    line-height: 1.4;
    border-left: 3px solid transparent;
}

.rozdzial-link:hover {
    background: rgba(41, 128, 185, 0.1);
    color: #2980b9;
    border-left-color: #2980b9;
    transform: translateX(5px);
}

.rozdzial-link.active, .tytul a.active,.activedzial {
    background: linear-gradient(135deg, rgba(41, 128, 185, 0.15), rgba(21, 101, 192, 0.15));
    color: #2980b9;
    border-left-color: #2980b9;
    font-weight: 600;
}

/* Nawigacja poprzedni/następny */
.artykul-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    gap: 20px;
}

.nav-btn {
    flex: 1;
    max-width: 300px;
    padding: 20px 25px;
    background: linear-gradient(135deg, #2980b9, #1565c0);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(41, 128, 185, 0.3);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(41, 128, 185, 0.4);
}

.nav-btn-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-btn-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.nav-btn.prev {
    text-align: left;
}

.nav-btn.next {
    text-align: right;
}

/* Search w sidebarze */
.sidebar-search {
    margin-bottom: 25px;
    position: sticky;
    top: 70px;
    background: white;
    z-index: 9;
    padding-bottom: 15px;
}

.sidebar-search input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.sidebar-search input:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.1);
}

.sidebar-search::after {
    content: "🔍";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    pointer-events: none;
}

/* Custom scrollbar dla sidebar */
.kodeks-sidebar::-webkit-scrollbar {
    width: 6px;
}

.kodeks-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.kodeks-sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.kodeks-sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}


/* ========================================
   3. STRONA GŁÓWNA KODEKSU
   Klasa główna: .kodeks-home-container
   ======================================== */

/* Layout dla strony głównej kodeksu */
.kodeks-home-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 50px;
    margin-top: 30px;
}

/* Główna treść */
.kodeks-home-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(41, 128, 185, 0.1);
}

/* Header kodeksu */
.kodeks-hero {
    text-align: center;
    padding: 40px 0;
    border-bottom: 3px solid #2980b9;
    margin-bottom: 40px;
}

.kodeks-hero-title {
    font-size: 3rem;
    color: #1a252f;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.kodeks-hero-subtitle {
    font-size: 1.3rem;
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 10px;
}

.kodeks-hero-meta {
    font-size: 1rem;
    color: #95a5a6;
}

/* Info box */
.kodeks-info-box {
    background: linear-gradient(135deg, #e8f4f8 0%, #f0f8ff 100%);
    border-left: 4px solid #2980b9;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 40px;
}

.kodeks-info-box h2 {
    font-size: 1.4rem;
    color: #2980b9;
    margin-bottom: 15px;
    font-weight: 600;
}

.kodeks-info-box p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #2c3e50;
    margin-bottom: 10px;
}

.kodeks-info-box p:last-child {
    margin-bottom: 0;
}

/* Stats */
.kodeks-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: #2980b9;
    box-shadow: 0 8px 25px rgba(41, 128, 185, 0.15);
    transform: translateY(-3px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2980b9;
    line-height: 1;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1rem;
    color: #7f8c8d;
    font-weight: 500;
}

/* Spis treści główny */
.kodeks-toc-main {
    margin-bottom: 30px;
}

.kodeks-toc-main h2 {
    font-size: 2rem;
    color: #1a252f;
    margin-bottom: 30px;
    font-weight: 600;
    text-align: center;
}

/* Księga w spisie treści */
.toc-ksiega {
    background: #fafbfc;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    margin-bottom: 25px;
    overflow: hidden;
    transition: all 0.3s;
}

.toc-ksiega:hover {
    border-color: #2980b9;
    box-shadow: 0 8px 25px rgba(41, 128, 185, 0.1);
}

.toc-ksiega-header {
    background: linear-gradient(135deg, #2980b9, #1565c0);
    color: white;
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s;
}

.toc-ksiega-header:hover {
    background: linear-gradient(135deg, #1565c0, #0d4377);
}

.toc-ksiega-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.toc-ksiega-toggle {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.toc-ksiega.expanded .toc-ksiega-toggle {
    transform: rotate(180deg);
}

.toc-ksiega-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: white;
}

.toc-ksiega.expanded .toc-ksiega-content {
    max-height: 3000px;
}

/* Tytuły w księdze */
.toc-tytul {
    padding: 20px 25px;
    border-bottom: 1px solid #e2e8f0;
}

.toc-tytul:last-child {
    border-bottom: none;
}

.toc-tytul-header {
    font-size: 1.2rem;
    color: #2980b9;
    font-weight: 600;
    margin-bottom: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: rgba(41, 128, 185, 0.05);
    border-radius: 8px;
    transition: all 0.3s;
}

.toc-tytul-header:hover {
    background: rgba(41, 128, 185, 0.1);
}

.toc-tytul-toggle {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.toc-tytul.expanded .toc-tytul-toggle {
    transform: rotate(180deg);
}

.toc-rozdzialy {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 15px;
}

.toc-tytul.expanded .toc-rozdzialy {
    max-height: 1000px;
    padding: 15px;
}

/* Rozdziały */
.toc-rozdzial {
    margin: 8px 0;
}

.toc-rozdzial-link {
    display: block;
    padding: 12px 15px;
    color: #1a252f;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 1rem;
    line-height: 1.5;
    border-left: 3px solid transparent;
    background: #f8fafc;
}

.toc-rozdzial-link:hover {
    background: rgba(41, 128, 185, 0.1);
    color: #2980b9;
    border-left-color: #2980b9;
    transform: translateX(5px);
}

/* Sidebar z innymi kodeksami */
.other-kodeksy-sidebar {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(41, 128, 185, 0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a252f;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #2980b9;
}

.kodeks-link-card {
    display: block;
    padding: 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 12px;
    text-decoration: none;
    transition: all 0.3s;
}

.kodeks-link-card:hover {
    background: white;
    border-color: #2980b9;
    box-shadow: 0 4px 15px rgba(41, 128, 185, 0.15);
    transform: translateX(3px);
}

.kodeks-link-card.active {
    background: linear-gradient(135deg, rgba(41, 128, 185, 0.1), rgba(21, 101, 192, 0.1));
    border-color: #2980b9;
    font-weight: 600;
}

.kodeks-link-title {
    font-size: 1.05rem;
    color: #2980b9;
    font-weight: 600;
    margin-bottom: 5px;
}

.kodeks-link-card.active .kodeks-link-title {
    color: #1565c0;
}

.kodeks-link-desc {
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.4;
}

/* Quick links */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.quick-link {
    display: block;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: #2980b9;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.quick-link:hover {
    background: #2980b9;
    color: white;
    border-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.3);
}


/* ========================================
   4. STRONA GŁÓWNA "KODEKSY"
   Klasa główna: .kodeksy-page-container
   ======================================== */

/* Layout dla strony kodeksów */
.kodeksy-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.kodeksy-page-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(41, 128, 185, 0.1);
    margin-top: 30px;
}

/* Hero section */
.kodeksy-hero {
    text-align: center;
    padding: 40px 0 50px 0;
    border-bottom: 3px solid #2980b9;
    margin-bottom: 50px;
}

.kodeksy-hero-title {
    font-size: 3.2rem;
    color: #1a252f;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.kodeksy-hero-subtitle {
    font-size: 1.4rem;
    color: #7f8c8d;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
}

/* Search bar */
.kodeksy-search {
    max-width: 600px;
    margin: 0 auto 50px auto;
    position: relative;
}

.kodeksy-search input {
    width: 100%;
    padding: 18px 60px 18px 25px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.kodeksy-search input:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 4px 25px rgba(41, 128, 185, 0.15);
}

.kodeksy-search::after {
    content: "🔍";
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    pointer-events: none;
}

/* Sekcje kodeksów */
.kodeksy-section {
    margin-bottom: 50px;
}

.kodeksy-section:last-child {
    margin-bottom: 0;
}

.kodeksy-section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2980b9;
}

.kodeksy-section-icon {
    font-size: 2rem;
}

.kodeksy-section-title {
    font-size: 2rem;
    color: #1a252f;
    font-weight: 600;
    margin: 0;
}

/* Grid kodeksów */
.kodeksy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* Karta kodeksu */
.kodeks-card {
    background: #fafbfc;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 30px;
    text-decoration: none;
    display: block;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.kodeks-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #2980b9, #1565c0);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}

.kodeks-card:hover {
    border-color: #2980b9;
    box-shadow: 0 12px 35px rgba(41, 128, 185, 0.15);
    transform: translateY(-5px);
}

.kodeks-card:hover::before {
    transform: scaleX(1);
}

.kodeks-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 15px;
}

.kodeks-card-title {
    font-size: 1.5rem;
    color: #2980b9;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.kodeks-card-badge {
    background: linear-gradient(135deg, #2980b9, #1565c0);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.kodeks-card-subtitle {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 15px;
    font-weight: 500;
}

.kodeks-card-description {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.kodeks-card-meta {
    display: flex;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.kodeks-card-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.kodeks-card-meta-item strong {
    color: #2980b9;
    font-weight: 600;
}

/* Info banner */
.info-banner {
    background: linear-gradient(135deg, #e8f4f8 0%, #f0f8ff 100%);
    border-left: 4px solid #2980b9;
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 40px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.info-banner-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.info-banner-content h3 {
    font-size: 1.3rem;
    color: #2980b9;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.info-banner-content p {
    font-size: 1.05rem;
    color: #2c3e50;
    line-height: 1.6;
    margin: 0;
}

/* Stats banner */
.stats-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

/*.stat-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
}

.stat-item:hover {
    border-color: #2980b9;
    box-shadow: 0 8px 25px rgba(41, 128, 185, 0.15);
}

.stat-item-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2980b9;
    line-height: 1;
    margin-bottom: 10px;
}

.stat-item-label {
    font-size: 1rem;
    color: #7f8c8d;
    font-weight: 500;
}*/


/* ========================================
   5. RESPONSYWNOŚĆ
   ======================================== */

/* Tablet i mniejsze */
@media (max-width: 1200px) {
    .kodeks-container {
        grid-template-columns: 1fr 320px;
        gap: 30px;
    }
    
    .kodeks-content {
        padding: 30px;
    }
    
    .kodeks-home-container {
        grid-template-columns: 1fr 320px;
        gap: 30px;
    }
}

@media (max-width: 1024px) {
    .kodeks-container,
    .kodeks-home-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .kodeks-sidebar,
    .other-kodeksy-sidebar {
        order: -1;
        position: static;
        max-height: 400px;
        margin-bottom: 20px;
    }
    
    .sidebar-title {
        position: static;
    }
    
    .sidebar-search {
        position: static;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .kodeks-container,
    .kodeks-home-container,
    .kodeksy-page-container {
        padding: 0 15px;
        gap: 20px;
    }
    
    .kodeks-content,
    .kodeks-home-content,
    .kodeksy-page-content {
        padding: 25px 20px;
    }
    
    .kodeks-breadcrumbs {
        margin: -25px -20px 20px -20px;
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .sekcja-tytul,
    .kodeks-hero-title {
        font-size: 2rem;
    }
    
    .kodeksy-hero-title {
        font-size: 2.2rem;
    }
    
    .kodeksy-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .artykul {
        padding: 20px;
    }
    
    .artykul-numer {
        font-size: 0.9rem;
        padding: 6px 15px;
    }
    
    .artykul-title {
        font-size: 1.1rem;
        padding-left: 10px;
    }
    
    .artykuly-toc-list {
        grid-template-columns: 1fr;
    }
    
    .artykul-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-btn {
        max-width: none;
        text-align: center;
    }
    
    .kodeks-sidebar,
    .other-kodeksy-sidebar {
        order: 2;
        margin-top: 30px;
        padding: 20px;
        max-height: 600px;
    }
    
    .ksiega-header,
    .tytul-header {
        font-size: 0.9rem;
    }
    
    .kodeks-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-banner {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .kodeksy-grid {
        grid-template-columns: 1fr;
    }
    
    .kodeksy-section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .kodeks-container,
    .kodeks-home-container,
    .kodeksy-page-container {
        padding: 0 10px;
    }
    
    .kodeks-content,
    .kodeks-home-content,
    .kodeksy-page-content {
        padding: 20px 15px;
    }
    
    .sekcja-tytul {
        font-size: 1.7rem;
    }
    
    .kodeks-hero-title {
        font-size: 2.2rem;
    }
    
    .kodeksy-hero-title {
        font-size: 1.8rem;
    }
    
    .artykul-tresc {
        font-size: 1.1rem;
    }
    
    .sidebar-title {
        font-size: 1.2rem;
    }
    
    .artykul-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .artykul-title {
        padding-left: 0;
    }
    
    .kodeks-stats,
    .stats-banner {
        grid-template-columns: 1fr;
    }
    
    .stat-number,
    .stat-item-number {
        font-size: 2rem;
    }
    
    .info-banner {
        flex-direction: column;
    }
}


/* ========================================
   6. PRINT STYLES
   ======================================== */

@media print {
    .kodeks-sidebar,
    .other-kodeksy-sidebar,
    .artykul-nav,
    .artykuly-toc {
        display: none;
    }
    
    .kodeks-container,
    .kodeks-home-container {
        grid-template-columns: 1fr;
        max-width: none;
    }
    
    .kodeks-content,
    .kodeks-home-content {
        box-shadow: none;
        border: none;
    }
    
    .artykul {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}


/* ========================================
   7. ANIMACJE
   ======================================== */

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}


/* ========================================
   8. UTILITIES & HELPERS
   ======================================== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles dla dostępności */
*:focus-visible {
    outline: 2px solid #2980b9;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: rgba(41, 128, 185, 0.2);
    color: #1a252f;
}

::-moz-selection {
    background: rgba(41, 128, 185, 0.2);
    color: #1a252f;
}