/* 
 * Główny plik stylów
 * Zoptymalizowany pod kątem PageSpeed Insights
 */

/* Zmienne CSS */
:root {
    /* Kolory główne */
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    
    /* Kolory tekstu */
    --text-color: #333;
    --text-light: #666;
    --text-muted: #999;
    --text-white: #fff;
    
    /* Kolory tła */
    --bg-color: #f9f9f9;
    --bg-light: #f5f5f5;
    --bg-white: #fff;
    --bg-dark: #2c3e50;
    
    /* Rozmiary i odstępy */
    --container-width: 1200px;
    --grid-gap: 2rem;
    --card-padding: 1.5rem;
    --section-spacing: 4rem;
    --border-radius: 8px;
    --border-radius-sm: 4px;
    
    /* Efekty */
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    
    /* Typografia */
    --font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 16px;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --line-height: 1.6;
}

/* Reset i podstawowe style */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: var(--line-height);
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

ul, ol {
    list-style-position: inside;
}

button {
    cursor: pointer;
    font-family: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Kontener */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Nagłówek strony */
.site-header {
    background-color: var(--bg-white);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo a {
    display: flex;
    align-items: center;
    color: var(--secondary-color);
    font-weight: bold;
}

.logo h1, .logo .site-title {
    font-size: 1.6rem;
    margin: 0;
    font-weight: bold;
    line-height: 1.2;
    color: var(--secondary-color);
}

/* Menu nawigacyjne */
.main-nav {
    flex: 1;
    margin: 0 2rem;
}

.menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.menu li {
    margin: 0 1rem;
}

.menu a {
    display: block;
    padding: 0.5rem;
    color: var(--secondary-color);
    font-weight: 500;
    position: relative;
}

.menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.menu a:hover::after,
.menu a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    position: relative;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--secondary-color);
    position: absolute;
    transition: var(--transition);
}

.menu-icon {
    top: 50%;
    transform: translateY(-50%);
}

.menu-icon::before,
.menu-icon::after {
    content: '';
}

.menu-icon::before {
    top: -8px;
}

.menu-icon::after {
    bottom: -8px;
}

.menu-toggle[aria-expanded="true"] .menu-icon {
    background-color: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-icon::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* Formularz wyszukiwania */
.search-form {
    position: relative;
}

.search-form input {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: var(--font-size-sm);
    width: 200px;
    transition: var(--transition);
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    width: 250px;
}

.search-form button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-form button:hover {
    color: var(--primary-color);
}


/* Breadcrumbs */
.breadcrumbs {
    background-color: var(--bg-light);
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.breadcrumbs-list {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    font-size: var(--font-size-sm);
}

.breadcrumbs-list li {
    display: flex;
    align-items: center;
}

.breadcrumbs-list li:not(:last-child)::after {
    content: '/';
    margin: 0 0.5rem;
    color: var(--text-muted);
}

.breadcrumbs-list a {
    color: var(--text-light);
}

.breadcrumbs-list a:hover {
    color: var(--primary-color);
}

.breadcrumbs-list li:last-child {
    color: var(--text-muted);
}

/* Główna zawartość */
.site-main {
    flex: 1;
    padding: 3rem 0;
}

/* Sekcje kategorii */
.category-section {
    margin-bottom: var(--section-spacing);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.section-title {
    font-size: var(--font-size-2xl);
    color: var(--secondary-color);
    margin: 0;
}

.view-all {
    font-weight: 500;
}

/* Siatka postów */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--grid-gap);
    margin-bottom: 2rem;
}

/* Karty postów */
.post-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.post-thumbnail {
    display: block;
    position: relative;
    overflow: hidden;
    padding-top: 56.25%; /* Proporcje 16:9 */
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-card .post-content {
    padding: var(--card-padding);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card .post-title {
    font-size: var(--font-size-lg);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-card .post-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: var(--font-size-sm);
}

.post-card .post-meta {
    display: flex;
    flex-wrap: wrap;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: auto;
}

.post-category {
    margin-right: 1rem;
}

.post-date {
    margin-right: 1rem;
    color: #333333; /* Ciemniejszy kolor dla lepszego kontrastu */
    font-weight: 500; /* Pogrubienie dla lepszej czytelności */
}

.post-author {
    margin-right: 1rem;
    color: #333333; /* Ciemniejszy kolor dla lepszego kontrastu */
    font-weight: 500; /* Pogrubienie dla lepszej czytelności */
}

/* Wyróżnione posty */
.featured-posts {
    margin-bottom: var(--section-spacing);
}

/* Lista postów */
.posts-list .post-item {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: var(--card-padding);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.posts-list .post-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}

.post-item-inner {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
}

.post-item .post-thumbnail {
    height: 100%;
    padding-top: 0;
}

.post-item .post-thumbnail img {
    position: static;
    height: 100%;
    object-fit: cover;
}

.post-item .post-content {
    display: flex;
    flex-direction: column;
}

.post-item .post-title {
    font-size: var(--font-size-xl);
    margin-bottom: 0.75rem;
}

.post-item .post-meta {
    margin-bottom: 1rem;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.post-item .read-more {
    margin-top: auto;
    align-self: flex-start;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: var(--text-white);
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: var(--font-size-sm);
}

.post-item .read-more:hover {
    background-color: var(--primary-dark);
}

/* Pojedynczy post */
.post-single {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.post-single .post-header {
    margin-bottom: 2rem;
}

.post-single .post-meta {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.post-single .post-title {
    font-size: var(--font-size-3xl);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-single .post-excerpt {
    font-size: var(--font-size-lg);
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.post-single .post-featured-image {
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.post-single .post-featured-image img {
    width: 100%;
}

.post-single .post-content {
    line-height: 1.8;
    font-size: var(--font-size-lg);
}

.post-single .post-content p {
    margin-bottom: 1.5rem;
}

.post-single .post-content h2 {
    font-size: var(--font-size-2xl);
    margin: 2.5rem 0 1rem;
    color: var(--secondary-color);
}

.post-single .post-content h3 {
    font-size: var(--font-size-xl);
    margin: 2rem 0 1rem;
    color: var(--secondary-color);
}

.post-single .post-content ul,
.post-single .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.post-single .post-content li {
    margin-bottom: 0.5rem;
}

.post-single .post-content img {
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
    max-width: 100%;
    height: auto;
}

.image-wrapper {
    overflow: hidden;
    border-radius: var(--border-radius);
    background-color: #f0f0f0;
    box-shadow: var(--box-shadow-sm);
    margin: 1.5rem 0;
}

.image-wrapper img {
    margin: 0;
    transition: transform 0.3s ease;
}

.image-wrapper:hover img {
    transform: scale(1.02);
}

/* Dodaj style dla figcaption */
.post-single .post-content figure {
    margin: 1.5rem 0;
    text-align: center;
}

.post-single .post-content figcaption {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    font-style: italic;
}

.post-single .post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    font-style: italic;
    margin: 1.5rem 0;
    color: var(--text-light);
}

.post-single .post-content a {
    text-decoration: underline;
}

.post-single .post-content a:hover {
    color: var(--primary-dark);
}

.post-single .post-content code {
    background-color: var(--bg-light);
    padding: 0.2rem 0.4rem;
    border-radius: var(--border-radius-sm);
    font-family: monospace;
    font-size: 0.9em;
}

.post-single .post-content pre {
    background-color: var(--bg-dark);
    color: var(--text-white);
    padding: 1rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-single .post-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

/* Style dla tabel w treści artykułów */
.post-content table,
.policy-page table,
.category-description table,
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid #ddd !important;
}

.post-content th,
.policy-page th,
.category-description th,
th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.post-content td,
.policy-page td,
.category-description td,
td {
    padding: 1rem;
    border-bottom: 1px solid #ddd !important;
    border-right: 1px solid #ddd !important;
}

.post-content th:last-child,
.policy-page th:last-child,
.category-description th:last-child,
.post-content td:last-child,
.policy-page td:last-child,
.category-description td:last-child,
th:last-child,
td:last-child {
    border-right: none !important;
}

.post-content tr:nth-child(even),
.policy-page tr:nth-child(even),
.category-description tr:nth-child(even),
tr:nth-child(even) {
    background-color: var(--bg-light);
}

.post-content tr:hover,
.policy-page tr:hover,
.category-description tr:hover,
tr:hover {
    background-color: #f1f1f1;
}

.post-content tr:last-child td,
.policy-page tr:last-child td,
.category-description tr:last-child td,
tr:last-child td {
    border-bottom: none !important;
}

/* Dodatkowe style dla tabel */
table {
    border: 1px solid #ddd !important;
}

table th {
    background-color: var(--primary-color) !important;
    color: white !important;
    font-weight: 600 !important;
    text-align: left !important;
    padding: 1rem !important;
    border-right: 1px solid rgba(255, 255, 255, 0.2) !important;
}

table td {
    padding: 1rem !important;
    border-bottom: 1px solid #ddd !important;
    border-right: 1px solid #ddd !important;
}

table tr:nth-child(even) {
    background-color: #f9f9f9 !important;
}

table tr:hover {
    background-color: #f1f1f1 !important;
}

.post-content tr:hover,
.policy-page tr:hover,
.category-description tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

/* Spis treści */
.table-of-contents-wrapper {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    overflow: hidden;
}

.table-of-contents-toggle {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.table-of-contents-toggle button {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: var(--font-size-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
}

.toggle-icon {
    width: 20px;
    height: 20px;
    position: relative;
}

.toggle-icon::before,
.toggle-icon::after {
    content: '';
    position: absolute;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.toggle-icon::before {
    width: 100%;
    height: 2px;
    top: 50%;
    transform: translateY(-50%);
}

.toggle-icon::after {
    width: 2px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}

[aria-expanded="true"] .toggle-icon::after {
    transform: translateX(-50%) rotate(90deg);
    opacity: 0;
}

.table-of-contents {
    padding: 0 1rem 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.table-of-contents[aria-hidden="false"] {
    max-height: 500px;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents a {
    color: var(--text-color);
    display: block;
    padding: 0.25rem 0;
}

.table-of-contents a:hover {
    color: var(--primary-color);
}

.table-of-contents .toc-h3 {
    padding-left: 1.5rem;
}

/* Źródła */
.post-sources {
    margin-top: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1.5rem;
}

.sources-toggle {
    background: none;
    border: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0;
}

.sources-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sources-content[aria-hidden="false"] {
    max-height: 500px;
}

.sources-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.sources-list li {
    margin-bottom: 0.25rem;
}

/* Widget autora */
.author-widget {
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 3rem 0;
}

.author-avatar {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1.5rem;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: var(--font-size-2xl);
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: var(--font-size-xl);
    margin-bottom: 0.5rem;
}

.author-bio {
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

/* Reakcje i udostępnianie */
.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.post-share {
    display: flex;
    align-items: center;
}

.share-label {
    margin-right: 1rem;
    font-weight: 500;
}

.share-buttons {
    display: flex;
}

.share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 0.5rem;
    color: var(--text-white);
    transition: var(--transition);
}

.share-button.facebook {
    background-color: #3b5998;
}

.share-button.twitter {
    background-color: #1da1f2;
}

.share-button.email {
    background-color: #ea4335;
}

.share-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

.post-reactions {
    display: flex;
    align-items: center;
}

.reactions-label {
    margin-right: 1rem;
    font-weight: 500;
}

.reaction-buttons {
    display: flex;
}

.reaction-button {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    margin-right: 0.5rem;
    background-color: var(--bg-light);
    color: var(--text-color);
    transition: var(--transition);
}

.reaction-button svg {
    margin-right: 0.5rem;
}

.reaction-button:hover {
    background-color: var(--primary-color);
    color: var(--text-white);
}

.like-button:hover {
    background-color: var(--success-color);
}

.dislike-button:hover {
    background-color: var(--danger-color);
}

/* Powiązane posty */
.related-posts {
    margin-top: 3rem;
}

.related-posts h2 {
    font-size: var(--font-size-2xl);
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

/* Sekcja FAQ */
.faq-section {
    margin-top: 3rem;
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
}

.faq-section h2 {
    font-size: var(--font-size-2xl);
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.faq-container {
    margin-top: 1.5rem;
}

.faq-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.faq-question {
    background: none;
    border: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: var(--font-size-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    padding: 1.5rem 0;
}

.faq-icon {
    position: relative;
    width: 20px;
    height: 20px;
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background-color: var(--text-color);
    transition: var(--transition);
}

.faq-icon::before {
    width: 100%;
    height: 2px;
    top: 50%;
    transform: translateY(-50%);
}

.faq-icon::after {
    width: 2px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.faq-question[aria-expanded="true"] .faq-icon::after {
    transform: translateX(-50%) rotate(90deg);
    opacity: 0;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1rem;
}

.faq-answer[aria-hidden="false"] {
    max-height: 1000px;
    padding-bottom: 1.5rem;
}

.no-faqs {
    color: var(--text-muted);
    font-style: italic;
}

/* Filmy YouTube */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    margin: 1.5rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: #f0f0f0;
    box-shadow: var(--box-shadow);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius);
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    color: #333;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.video-placeholder:hover {
    background-color: #e0e0e0;
}

.video-placeholder svg {
    width: 68px;
    height: 48px;
    margin-bottom: 10px;
}

.video-container iframe {
    border: 0;
}

/* Strona polityki */
.policy-page {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
}

.policy-title {
    font-size: var(--font-size-3xl);
    margin-bottom: 2rem;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.policy-content {
    line-height: 1.8;
    font-size: var(--font-size-lg);
}

.policy-content p {
    margin-bottom: 1.5rem;
}

.policy-content h2 {
    font-size: var(--font-size-2xl);
    margin: 2.5rem 0 1rem;
    color: var(--secondary-color);
}

.policy-content h3 {
    font-size: var(--font-size-xl);
    margin: 2rem 0 1rem;
    color: var(--secondary-color);
}

.policy-content ul,
.policy-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

/* Stopka */
.site-footer {
    background-color: var(--bg-dark);
    color: var(--text-white);
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget h3 {
    font-size: var(--font-size-lg);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-widget ul {
    list-style: none;
    padding: 0;
}

.footer-widget ul li {
    margin-bottom: 0.5rem;
}

.footer-widget a {
    color: var(--text-white);
    opacity: 0.8;
}

.footer-widget a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.footer-policies {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
}

.policies-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.policies-links a {
    color: var(--text-white);
    font-size: var(--font-size-sm);
    opacity: 0.8;
}

.policies-links a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: var(--font-size-sm);
    opacity: 0.8;
}

/* Responsywność */
@media (max-width: 992px) {
    .header-inner {
        flex-wrap: wrap;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        margin: 1rem 0 0;
    }
    
    .menu {
        justify-content: flex-start;
    }
    
    .search-form {
        order: 2;
    }
    
    .post-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .post-reactions {
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-3xl: 1.5rem;
        --font-size-2xl: 1.25rem;
        --section-spacing: 3rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-white);
        box-shadow: var(--box-shadow);
        padding: 1rem;
        z-index: 100;
    }
    
    .menu.active {
        display: flex;
    }
    
    .menu li {
        margin: 0.5rem 0;
    }
    
    .post-item-inner {
        grid-template-columns: 1fr;
    }
    
    .post-item .post-thumbnail {
        padding-top: 56.25%; /* 16:9 */
        margin-bottom: 1rem;
    }
    
    .post-item .post-thumbnail img {
        position: absolute;
    }
    
    .author-widget {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        margin: 0 auto 1rem;
    }
}

@media (max-width: 576px) {
    .site-main {
        padding: 2rem 0;
    }
    
    .post-single {
        padding: 1.5rem;
    }
    
    .post-single .post-title {
        font-size: var(--font-size-2xl);
    }
    
    .post-single .post-content {
        font-size: var(--font-size-base);
    }
    
    .post-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .post-share, .post-reactions {
        width: 100%;
        justify-content: space-between;
    }
    
    .post-reactions {
        margin-top: 1rem;
    }
    
    .share-label, .reactions-label {
        display: none;
    }
    
    .footer-policies .policies-links {
        flex-direction: column;
        align-items: center;
    }
}

/* Optymalizacje dla PageSpeed Insights */
/* Zapobieganie przesunięciom układu (CLS) */
.post-thumbnail {
    position: relative;
    height: 0;
    overflow: hidden;
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lazy loading dla obrazów */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img.loaded,
img:not([loading="lazy"]) {
    opacity: 1;
}

/* Dostępność */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Kontrast kolorów */
:root {
    --text-color: #333;
    --text-light: #555;
    --text-white: #fff;
    --primary-color: #0066cc;
    --primary-dark: #004c99;
}

/* Wielkość elementów dotykowych */
button,
.menu a,
.post-card .post-title a,
.share-button,
.reaction-button {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
}

/* Animacje */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 
 * Aktualizacja stylów - bardziej profesjonalny, nowoczesny wygląd
 * Zoptymalizowany pod kątem PageSpeed Insights
 */

/* Zmienne CSS - stonowana, profesjonalna kolorystyka */
:root {
    /* Kolory główne */
    --primary-color: #4a6fa5;
    --primary-dark: #3a5a8c;
    --secondary-color: #5d5d5d;
    --accent-color: #e67e22;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    
    /* Kolory tekstu */
    --text-color: #333;
    --text-light: #666;
    --text-muted: #999;
    --text-white: #fff;
    
    /* Kolory tła */
    --bg-color: #f8f9fa;
    --bg-light: #f1f3f5;
    --bg-white: #fff;
    --bg-dark: #343a40;
    
    /* Rozmiary i odstępy */
    --container-width: 1200px;
    --grid-gap: 2rem;
    --card-padding: 1.5rem;
    --section-spacing: 4rem;
    --border-radius: 12px;
    --border-radius-sm: 6px;
    
    /* Efekty */
    --box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --box-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s ease;
    
    /* Typografia */
    --font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 16px;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --line-height: 1.6;
}

/* Nagłówek strony - bardziej nowoczesny */
.site-header {
    background-color: var(--bg-white);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1.25rem 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo a {
    display: flex;
    align-items: center;
    color: var(--secondary-color);
    font-weight: bold;
    transition: var(--transition);
}

.logo a:hover {
    color: var(--primary-color);
}

.logo h1, .logo .site-title {
    font-size: 1.6rem;
    margin: 0;
    font-weight: bold;
    line-height: 1.2;
    color: var(--secondary-color);
}

.logo img {
    width: auto;
    height: 80px;
    margin-right: 1rem;
}

/* Menu nawigacyjne - bardziej płynne */
.main-nav {
    flex: 1;
    margin: 0 2rem;
}

.menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.menu li {
    margin: 0 1rem;
}

.menu a {
    display: block;
    padding: 0.5rem;
    color: var(--secondary-color);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.menu a:hover {
    color: var(--primary-color);
}

.menu a:hover::after,
.menu a.active::after {
    width: 100%;
}

/* Karty postów - bardziej eleganckie */
.post-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: none;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.post-thumbnail {
    display: block;
    position: relative;
    overflow: hidden;
    padding-top: 56.25%; /* Proporcje 16:9 */
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-card .post-content {
    padding: var(--card-padding);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card .post-title {
    font-size: var(--font-size-lg);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-card .post-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.post-card .post-title a:hover {
    color: var(--primary-color);
}

.post-card .post-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: var(--font-size-sm);
}

.post-card .post-meta {
    display: flex;
    flex-wrap: wrap;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: auto;
    justify-content: space-between;
    align-items: center;
}

/* Pojedynczy post - nowy układ */
.post-single {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
}

.post-single .post-header {
    margin-bottom: 2.5rem;
    position: relative;
}

.post-single .post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.post-date-time {
    display: flex;
    align-items: center;
}

.post-date {
    margin-right: 0.5rem;
}

.post-time::before {
    content: '•';
    margin-right: 0.5rem;
}

.post-single .post-title {
    font-size: var(--font-size-3xl);
    margin-bottom: 1.5rem;
    line-height: 1.3;
    color: var(--text-color);
}

.post-single .post-excerpt {
    font-size: var(--font-size-lg);
    color: var(--text-light);
    margin-bottom: 2rem;
    font-style: italic;
    border-left: 3px solid var(--primary-color);
    padding-left: 1.5rem;
}

.post-single .post-featured-image {
    margin-bottom: 2.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.post-single .post-featured-image img {
    width: 100%;
    display: block;
}

.post-single .post-content {
    line-height: 1.8;
    font-size: var(--font-size-lg);
    color: var(--text-color);
}

.post-single .post-content p {
    margin-bottom: 1.5rem;
}

.post-single .post-content h2 {
    font-size: var(--font-size-2xl);
    margin: 2.5rem 0 1.25rem;
    color: var(--text-color);
    position: relative;
    padding-bottom: 0.75rem;
}

.post-single .post-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.post-single .post-content h3 {
    font-size: var(--font-size-xl);
    margin: 2rem 0 1rem;
    color: var(--text-color);
}

/* Widget autora - bardziej elegancki */
.author-widget {
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 3rem 0;
    box-shadow: var(--box-shadow);
}

.author-avatar {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 2rem;
    border: 3px solid var(--bg-white);
    box-shadow: var(--box-shadow);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: var(--font-size-2xl);
    font-weight: bold;
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: var(--font-size-xl);
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.author-bio {
    color: var(--text-light);
    font-size: var(--font-size-base);
    line-height: 1.6;
}

/* Reakcje i udostępnianie - w jednej linii */
.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
}

.post-share {
    display: flex;
    align-items: center;
}

.share-label {
    margin-right: 1rem;
    font-weight: 500;
    color: var(--text-color);
}

.share-buttons {
    display: flex;
}

.share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 0.75rem;
    color: var(--text-white);
    transition: var(--transition);
}

.share-button.facebook {
    background-color: #3b5998;
}

.share-button.twitter {
    background-color: #1da1f2;
}

.share-button.email {
    background-color: #ea4335;
}

.share-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

.post-reactions {
    display: flex;
    align-items: center;
}

.reactions-label {
    margin-right: 1rem;
    font-weight: 500;
    color: var(--text-color);
}

.reaction-buttons {
    display: flex;
}

.reaction-button {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    margin-right: 0.75rem;
    background-color: var(--bg-white);
    color: var(--text-color);
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.reaction-button svg {
    margin-right: 0.5rem;
}

.reaction-button:hover {
    background-color: var(--primary-color);
    color: var(--text-white);
    transform: translateY(-2px);
}

.like-button:hover {
    background-color: var(--success-color);
}

.dislike-button:hover {
    background-color: var(--danger-color);
}

/* Stopka - bardziej elegancka */
.site-footer {
    background-color: var(--bg-dark);
    color: var(--text-white);
    padding: 4rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-widget h3 {
    font-size: var(--font-size-lg);
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
    color: var(--text-white);
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-widget ul {
    list-style: none;
    padding: 0;
}

.footer-widget ul li {
    margin-bottom: 0.75rem;
}

.footer-widget a {
    color: var(--text-white);
    opacity: 0.8;
    transition: var(--transition);
}

.footer-widget a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.footer-policies {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.policies-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.policies-links a {
    color: var(--text-white);
    font-size: var(--font-size-sm);
    opacity: 0.7;
    transition: var(--transition);
}

.policies-links a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: var(--font-size-sm);
    opacity: 0.7;
}

/* Responsywność */
@media (max-width: 992px) {
    .header-inner {
        flex-wrap: wrap;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        margin: 1rem 0 0;
    }
    
    .menu {
        justify-content: flex-start;
    }
    
    .search-form {
        order: 2;
    }
    
    .post-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .post-reactions {
        margin-top: 1.5rem;
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-3xl: 1.5rem;
        --font-size-2xl: 1.25rem;
        --section-spacing: 3rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-white);
        box-shadow: var(--box-shadow);
        padding: 1rem;
        z-index: 100;
    }
    
    .menu.active {
        display: flex;
    }
    
    .menu li {
        margin: 0.5rem 0;
    }
    
    .post-single {
        padding: 1.5rem;
    }
    
    .author-widget {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .author-avatar {
        margin: 0 auto 1.5rem;
    }
}

/* Style dla źródeł */
.post-sources {
    margin: 2rem 0;
    padding: 1rem;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
}

.sources-heading {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-weight: 600;
}

.sources-content {
    padding-left: 1rem;
    display: block !important; /* Upewnij się, że źródła są zawsze widoczne */
    visibility: visible !important;
    height: auto !important;
    opacity: 1 !important;
}

.sources-list {
    margin: 0;
    padding: 0;
}

.source-item {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.no-sources {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Style dla sekcji FAQ */
.faq-section {
    margin: 2rem 0;
    padding: 0;
}

.faq-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-weight: 600;
    text-align: left;
}

.faq-container {
    width: 100%;
}

.faq-item {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 1rem;
}

.faq-question {
    margin-bottom: 0.75rem;
    position: relative;
    display: flex;
    align-items: center;
}

.faq-question-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.faq-answer {
    padding-left: 0.5rem;
    color: var(--text-color);
    display: block !important; /* Upewnij się, że odpowiedzi są zawsze widoczne */
    visibility: visible !important;
    height: auto !important;
    opacity: 1 !important;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.no-faqs {
    text-align: left;
    font-style: italic;
    color: var(--text-muted);
}

/* Style dla nowego spisu treści */
.toc-section {
    margin: 2rem 0;
    padding: 0;
}

.toc-header {
    margin-bottom: 0.5rem;
}

.toc-title {
    font-size: 1.3rem;
    margin: 0;
    color: var(--text-color);
    font-weight: 600;
    text-align: left;
    display: flex;
    align-items: center;
}

.toc-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.toc-toggle-icon {
    font-size: 1.2rem;
    line-height: 1;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.toc-toggle[aria-expanded="true"] .toc-toggle-icon {
    transform: rotate(45deg);
}

.toc-container {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.toc-container[aria-hidden="false"] {
    max-height: 1000px;
}

.toc-items {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 0.5rem;
}

.toc-item {
    position: relative;
}

.toc-link {
    display: flex;
    align-items: baseline;
    text-decoration: none;
    color: var(--text-color);
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.toc-link:hover {
    color: var(--primary-color);
}

.toc-indent {
    display: flex;
    align-items: center;
    margin-right: 0.25rem;
}

.indent-marker {
    width: 0.75rem;
    height: 1rem;
    border-left: 1px solid rgba(0, 0, 0, 0.2);
    margin-right: 0.25rem;
}

.toc-bullet {
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 0.9em;
}

.toc-text {
    font-size: 0.95rem;
    line-height: 1.3;
}

/* Style dla różnych poziomów nagłówków */
.level-2 .toc-bullet {
    color: var(--primary-color);
    font-weight: 600;
}

.level-3 {
    padding-left: 1rem;
}

.level-3 .toc-bullet {
    color: var(--secondary-color);
}

.level-4 {
    padding-left: 2rem;
}

.level-4 .toc-bullet {
    color: var(--text-light);
    font-size: 0.8em;
}

.level-5 {
    padding-left: 3rem;
}

.level-5 .toc-bullet {
    color: var(--text-muted);
    font-size: 0.7em;
}

.toc-empty {
    text-align: center;
    font-style: italic;
    color: var(--text-muted);
}
