/* Importowanie czcionek */
@import url('https://fonts.googleapis.com/css2?family=Trebuchet+MS&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Arial+Black&display=swap');

/* Style dla wyśrodkowanej zawartości */
.article-content [style*="text-align: center"] {
    text-align: center !important;
    margin: 0.5em auto !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.article-content [style*="text-align: center"] img {
    display: inline !important;
    margin: 0 0.25em !important;
    max-width: 100% !important;
    height: auto !important;
    vertical-align: middle;
}

/* Resetowanie domyślnych stylów dla obrazków w artykule */
.article-content img {
    max-width: 100% !important;
    height: auto !important;
    margin: 0 0.25em !important;
    display: inline !important;
    vertical-align: middle;
}

/* Style dla zawartości artykułu */
.article-content {
    font-family: 'Trebuchet MS', Arial, sans-serif;
    font-size: 14pt !important;
    line-height: 1.6;
    color: #333333; /* Ciemniejszy kolor tekstu dla lepszej czytelności */
    background-color: rgba(255, 255, 255, 0.95); /* Białe tło z lekką przezroczystością */
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
    margin: 2rem auto;
    max-width: 1200px;
    white-space: normal; /* Zmienione z pre-wrap na normal */
    word-wrap: break-word;
    border: 1px solid #e0e0e0;
}

/* Style dla motywu ciemnego */
[data-theme="dark"] .article-content,
[data-theme="dark-transparent"] .article-content,
[data-theme="dark"] .article-header,
[data-theme="dark-transparent"] .article-header {
    color: #f0f0f0 !important;
    background-color: rgba(45, 45, 50, 0.98) !important;
    border-color: #444;
}

/* Style dla motywu jasnego */
[data-theme="light"] .article-content,
[data-theme="light"] .article-header {
    color: #333333 !important;
    background-color: rgba(255, 255, 255, 0.98) !important;
    border-color: #e0e0e0;
}

/* Style dla elementów liniowych - poprawka */
.article-content strong,
.article-content b,
.article-content i,
.article-content em,
.article-content u,
.article-content s,
.article-content span,
.article-content [style*="color:"] {
    display: inline !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    line-height: inherit !important;
    font-size: inherit !important;
    font-family: inherit !important;
    color: inherit !important;
    vertical-align: baseline !important;
    background: transparent !important;
    border: 0 !important;
    white-space: normal !important; /* Zmienione z nowrap na normal */
}

/* Resetowanie stylów dla zawartości artykułu */
.article-content {
    font-family: 'Trebuchet MS', Arial, sans-serif;
    line-height: 1.4;
    color: #333;
}

/* Style dla akapitów */
.article-content p {
    margin: 0.5em 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    color: inherit !important;
    white-space: normal !important;
    display: block !important;
}

/* Style dla obrazków */
.article-content img {
    max-width: 100%;
    height: auto;
    margin: 5px 0;
    vertical-align: middle;
}

/* Style dla tekstu wycentrowanego */
.article-content .bb-center,
.article-content center,
.article-content div[style*="text-align: center"] {
    text-align: center;
    margin: 0.5em 0;
    display: block;
}

/* Style dla tekstu */
.article-content strong,
.article-content b {
    font-weight: bold;
}

.article-content em,
.article-content i {
    font-style: italic;
}

.article-content u {
    text-decoration: underline;
}

.article-content s {
    text-decoration: line-through;
}

/* Style dla kolorów i czcionek */
.article-content .bb-color,
.article-content .bb-size,
.article-content .bb-font {
    display: inline;
}

/* Usuwanie dodatkowych odstępów */
.article-content br {
    display: none;
}

.article-content p + p {
    margin-top: 0.5em !important;
}

/* Dodatkowe style dla lepszego formatowania */
.article-content [style*="text-align: center"] {
    margin: 0.5em 0 !important;
    display: block;
}

.article-content [style*="font-size"] {
    display: inline;
}

.article-content [style*="font-family"] {
    display: inline;
}

/* Style dla nowych linii - minimalne marginesy */
.article-content br {
    display: inline-block;
    content: " ";
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.1 !important;
    height: 0;
    width: 100%;
}

/* Usuwamy podwójne nowe linie */
.article-content br + br {
    display: none !important;
}

.article-content br + br + br {
    display: none;
}

/* Resetowanie dodatkowych odstępów */
.article-content p:empty,
.article-content div:empty {
    display: none;
}

/* Usunięcie podwójnych odstępów */
.article-content br + br {
    display: none;
}

/* Style dla tekstu wycentrowanego - minimalne marginesy */
.text-center {
    text-align: center;
    margin: 0.25em 0 !important;
    line-height: 1.4 !important;
}

/* Style dla obrazków */
.article-content img {
    max-width: 100%;
    height: auto;
    margin: 1em auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Style dla pogrubionego tekstu */
.article-content strong {
    font-weight: bold;
}

/* Style dla kolorowego tekstu */
.article-content [style*="color:"] {
    display: inline !important;
    font-size: inherit !important;
    font-family: inherit !important;
}

/* Resetowanie niepotrzebnych stylów */
.article-content [style*="display: inline-block"] {
    display: inline !important;
    font-size: inherit !important;
}

/* Poprawa wyglądu listy przedmiotów */
.article-content > div {
    margin: 0.5em 0;
}

/* Style dla nagłówków */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    font-family: 'Arial Black', Arial, sans-serif;
    margin: 1.5em 0 0.8em;
    line-height: 1.3;
    text-align: center;
}

/* Poprawa wyglądu pytań i odpowiedzi */
.article-content > div > strong {
    display: block;
    margin: 1em 0 0.5em;
}

.article-content > div > div {
    margin-bottom: 1.5em;
}

/* Resetowanie niepotrzebnych stylów dla spacji */
.article-content br + br {
    display: none;
}

/* Style dla nagłówków */
.article-content h1, 
.article-content h2, 
.article-content h3, 
.article-content h4, 
.article-content h5, 
.article-content h6 {
    margin-top: 1.5rem !important;
    margin-bottom: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: inherit !important;
}

.article-content h1 { 
    font-size: 2.5rem !important; 
    margin-top: 0 !important;
}
.article-content h2 { 
    font-size: 2rem !important; 
    padding-bottom: 0.3em !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}
.article-content h3 { 
    font-size: 1.75rem !important; 
}
.article-content h4 { 
    font-size: 1.5rem !important; 
}
.article-content h5 { 
    font-size: 1.25rem !important; 
}
.article-content h6 { 
    font-size: 1rem !important; 
}

/* Style dla akapitów */
.article-content p { 
    margin-bottom: 1rem !important; 
    line-height: 1.6 !important;
    color: inherit !important;
    white-space: pre-line; /* Ensure line breaks are preserved in paragraphs */
}

/* Style dla list */
.article-content ul, 
.article-content ol { 
    margin-bottom: 1.5rem !important; 
    padding-left: 0 !important; 
    color: inherit !important;
    list-style-type: none !important;
}

.article-content li { 
    margin-bottom: 0.75rem !important; 
    line-height: 1.6 !important;
    color: inherit !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

/* Style dla obrazków w liście */
.article-content li img {
    margin: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    max-height: 24px !important;
    width: auto !important;
}

/* Style dla pogrubionego tekstu w liście */
.article-content li b {
    margin-left: 0.25rem !important;
}

/* Style dla linków */
.article-content a { 
    color: #0d6efd !important; 
    text-decoration: none !important; 
    background-color: transparent !important;
}

.article-content a:hover { 
    text-decoration: underline !important; 
    color: #0a58ca !important;
}

/* Style dla tabel */
.article-content table {
    width: 100% !important;
    margin-bottom: 1.5rem !important;
    border-collapse: collapse !important;
    color: inherit !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.25rem !important;
    overflow: hidden !important;
}

.article-content th,
.article-content td {
    padding: 0.75rem !important;
    border: 1px solid #dee2e6 !important;
    vertical-align: top !important;
}

.article-content th {
    background-color: rgba(0, 0, 0, 0.05) !important;
    font-weight: 600 !important;
    text-align: left !important;
}

.article-content tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

/* Style dla kodu */
.article-content pre, 
.article-content code {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    background-color: rgba(0, 0, 0, 0.05) !important;
    border-radius: 0.25rem !important;
    font-size: 0.875em !important;
    color: #e83e8c !important;
}

.article-content pre {
    padding: 1rem !important;
    margin-bottom: 1.5rem !important;
    overflow-x: auto !important;
    border-radius: 0.25rem !important;
    background-color: #f8f9fa !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.article-content pre code {
    padding: 0 !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    color: inherit !important;
    font-size: inherit !important;
    white-space: pre !important;
}

/* Style dla cytatów */
.article-content blockquote {
    margin: 0 0 1.5rem !important;
    padding: 1rem 1.5rem !important;
    border-left: 4px solid #dee2e6 !important;
    color: #6c757d !important;
    font-style: italic !important;
    background-color: rgba(0, 0, 0, 0.02) !important;
    border-radius: 0 0.25rem 0.25rem 0 !important;
}

/* Style dla obrazków */
.article-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 1.5rem auto !important;
    border-radius: 0.25rem !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Wyjątek dla obrazków w liście */
.article-content li img {
    margin: 0 0.5rem 0 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    max-height: 24px !important;
    width: auto !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Style dla linii poziomej */
.article-content hr {
    margin: 2rem 0 !important;
    border: 0 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
    height: 1px !important;
    background: none !important;
}

/* Style dla tekstu wyrównanego */
.article-content .text-center { 
    text-align: center !important; 
    margin: 1.5rem 0 !important;
}

/* Dodatkowe style dla lepszego formatowania tekstu */
.article-content br + br {
    content: "";
    display: block;
    margin-bottom: 1rem;
    height: 0;
}

/* Style dla listy przedmiotów */
.article-content .item-list {
    margin: 1.5rem 0 !important;
    padding: 0 !important;
}

.article-content .item-list .item {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0.75rem !important;
    padding: 0.5rem !important;
    background-color: rgba(0, 0, 0, 0.03) !important;
    border-radius: 0.25rem !important;
}

.article-content .item-list .item img {
    margin: 0 0.75rem 0 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    max-height: 32px !important;
    width: auto !important;
    flex-shrink: 0 !important;
}

.article-content .item-list .item b {
    margin-left: 0.5rem !important;
    color: inherit !important;
}
.article-content .text-right { 
    text-align: right !important; 
}
.article-content .text-justify { 
    text-align: justify !important; 
}

/* Style dla tekstu formatowanego */
.article-content strong, 
.article-content b { 
    font-weight: 600 !important; 
    color: inherit !important;
}

.article-content em, 
.article-content i { 
    font-style: italic !important; 
    color: inherit !important;
}

.article-content u { 
    text-decoration: underline !important; 
}

.article-content s { 
    text-decoration: line-through !important; 
}

.article-content sub, 
.article-content sup {
    font-size: 75% !important;
    line-height: 0 !important;
    position: relative !important;
    vertical-align: baseline !important;
}

.article-content sub { 
    bottom: -0.25em !important; 
}

.article-content sup { 
    top: -0.5em !important; 
}

/* Dodatkowe style dla elementów specyficznych dla BBCode */
.article-content .bbcode-quote {
    border-left: 4px solid #6c757d !important;
    padding-left: 1rem !important;
    margin-bottom: 1rem !important;
    color: #6c757d !important;
}

.article-content .bbcode-code {
    display: block !important;
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.25rem !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
    overflow-x: auto !important;
}

/* Style dla responsywności */
@media (max-width: 768px) {
    .article-content h1 { font-size: 2rem !important; }
    .article-content h2 { font-size: 1.75rem !important; }
    .article-content h3 { font-size: 1.5rem !important; }
    .article-content h4 { font-size: 1.25rem !important; }
    .article-content h5 { font-size: 1.1rem !important; }
    .article-content h6 { font-size: 1rem !important; }
    
    .article-content {
        padding: 1rem !important;
    }
}

/* Style dla motywu ciemnego */
[data-theme="dark"] .article-content,
[data-theme="dark-transparent"] .article-content {
    color: #f8f9fa;
}

/* Style dla nagłówków */
.article-content h1 { font-size: 2.5rem; margin: 1.5rem 0 1rem; }
.article-content h2 { font-size: 2rem; margin: 1.3rem 0 0.9rem; }
.article-content h3 { font-size: 1.75rem; margin: 1.1rem 0 0.8rem; }
.article-content h4 { font-size: 1.5rem; margin: 1rem 0 0.7rem; }
.article-content h5 { font-size: 1.25rem; margin: 0.9rem 0 0.6rem; }
.article-content h6 { font-size: 1rem; margin: 0.8rem 0 0.5rem; }

/* Style dla akapitów i list */
.article-content p { margin-bottom: 1rem; }
.article-content ul, .article-content ol { margin-bottom: 1rem; padding-left: 2rem; }
.article-content li { margin-bottom: 0.5rem; }

/* Style dla tabel */
.article-content table {
    margin: 1rem auto !important;
    border-collapse: collapse !important;
    border: 1px solid #444 !important;
    font-size: 0.9rem !important;
    background-color: #34404d !important;
    width: auto !important;
    min-width: 300px;
    table-layout: auto;
}

.article-content table,
.article-content table * {
    box-sizing: border-box !important;
}

.article-content table td,
.article-content table th {
    padding: 10px 20px !important;
    border: 1px solid #444 !important;
    text-align: center !important;
    vertical-align: middle !important;
    color: #fff !important;
    white-space: nowrap;
}

/* Wymuszenie odpowiedniej szerokości kolumn */
.article-content table td:first-child,
.article-content table th:first-child {
    width: 1%;
    white-space: nowrap;
}

.article-content table td:last-child,
.article-content table th:last-child {
    width: 1%;
    white-space: nowrap;
}

/* Dopasowanie szerokości komórek nagłówkowych do komórek z danymi */
.article-content table tr:first-child td[style*="text-align: center"] {
    width: 1% !important;
    white-space: nowrap;
    text-align: center !important;
    padding: 10px 20px !important;
    box-sizing: border-box;
}

/* Nagłówek tabeli */
.article-content table thead th,
.article-content table tr[bgcolor="#222f3d"] th,
.article-content table tr[bgcolor="#222f3d"] td,
.article-content table tr:first-child td[style*="text-align: center"] {
    background-color: #222f3d !important;
    color: #fff !important;
    font-weight: bold !important;
    text-align: center !important;
    padding: 10px 30px 10px 40px !important;
    border: 1px solid #444 !important;
}

/* Style dla wierszy tabeli */
.article-content table tbody tr,
.article-content table tr[bgcolor="#34404d"] {
    background-color: #34404d !important;
}

.article-content table tbody tr:hover,
.article-content table tr[bgcolor="#34404d"]:hover {
    background-color: #3d4b5a !important;
}

/* Usunięcie niepotrzebnych styli dla center */
.article-content table td center,
.article-content table th center {
    display: inline;
}

/* Responsywność tabeli */
.article-content .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
}

.article-content thead tr {
    background-color: #222f3d;
    color: #ffffff;
    text-align: left;
    font-weight: bold;
}

.article-content thead th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.article-content th,
.article-content td {
    padding: 4px 8px;
    border: 1px solid #dddddd;
    text-align: center;
    line-height: 1.2;
}

/* Style dla motywu ciemnego */
[data-theme="dark"] .article-content table thead tr,
[data-theme="dark-transparent"] .article-content table thead tr {
    background-color: #2c3e50;
}

[data-theme="dark"] .article-content table,
[data-theme="dark-transparent"] .article-content table {
    background-color: #2d2d2d;
    color: #f8f9fa;
}

[data-theme="dark"] .article-content table tr:nth-child(even),
[data-theme="dark-transparent"] .article-content table tr:nth-child(even) {
    background-color: #3a3a3a;
}

/* Poprawa wyglądu elementów center */
.article-content table td center {
    display: block;
    text-align: center;
    width: 100%;
}

.article-content thead tr {
    background-color: #222f3d;
    color: #ffffff;
    text-align: left;
    font-weight: bold;
}

.article-content thead th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.article-content th,
.article-content td {
    padding: 4px 8px;
    border: 1px solid #dddddd;
    text-align: center;
    line-height: 1.2;
}

.article-content thead th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.article-content th,
.article-content td {
    padding: 4px 8px;
    border: 1px solid #dddddd;
    text-align: center;
    line-height: 1.2;
}

.article-content tbody tr {
    border-bottom: 1px solid #dddddd;
    background-color: #f8f9fa;
}

.article-content tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

.article-content tbody tr:last-of-type {
    border-bottom: 2px solid #222f3d;
}

.article-content tbody tr:hover {
    background-color: #e9ecef;
}

/* Style dla ciemnego motywu */
[data-theme="dark"] .article-content table,
[data-theme="dark-transparent"] .article-content table {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .article-content thead tr,
[data-theme="dark-transparent"] .article-content thead tr {
    background-color: #2c3e50;
}

[data-theme="dark"] .article-content tbody tr,
[data-theme="dark-transparent"] .article-content tbody tr {
    background-color: #34495e;
    color: #ecf0f1;
}

[data-theme="dark"] .article-content tbody tr:nth-of-type(even),
[data-theme="dark-transparent"] .article-content tbody tr:nth-of-type(even) {
    background-color: #2c3e50;
}

[data-theme="dark"] .article-content tbody tr:hover,
[data-theme="dark-transparent"] .article-content tbody tr:hover {
    background-color: #3d566e;
}

[data-theme="dark"] .article-content th,
[data-theme="dark"] .article-content td,
[data-theme="dark-transparent"] .article-content th,
[data-theme="dark-transparent"] .article-content td {
    border-color: #4a5d71;
}

/* Responsywność tabel */
@media (max-width: 768px) {
    .article-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        font-size: 0.7em;
    }
    
    .article-content th,
    .article-content td {
        padding: 3px 5px;
    }
}

/* Style dla komórek z wyrównaniem tekstu */
.article-content td[style*="text-align: center"],
.article-content th[style*="text-align: center"] {
    text-align: center !important;
    white-space: nowrap;
    padding: 4px 8px !important;
}

/* Wymuszenie wyświetlania komórek w jednej linii */
.article-content tr {
    display: table-row !important;
}

.article-content td, 
.article-content th {
    display: table-cell !important;
    float: none !important;
}

.article-content td[style*="text-align: right"],
.article-content th[style*="text-align: right"] {
    text-align: right !important;
}

.article-content td[style*="text-align: left"],
.article-content th[style*="text-align: left"] {
    text-align: left !important;
}

/* Style dla komórek z białym tekstem */
.article-content td.white,
.article-content th.white {
    color: #ffffff !important;
}

/* Style dla wierszy z szarym tłem */
.article-content tr[bgcolor="#34404d"] {
    background-color: #34404d !important;
    color: #ffffff;
}

[data-theme="dark"] .article-content tr[bgcolor="#34404d"],
[data-theme="dark-transparent"] .article-content tr[bgcolor="#34404d"] {
    background-color: #2c3e50 !important;
    color: #ecf0f1;
}

/* Style dla linków */
.article-content a { color: #0d6efd; text-decoration: none; }
.article-content a:hover { text-decoration: underline; }

/* Style dla tabel */
.article-content table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}
.article-content th,
.article-content td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}
.article-content th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Style dla kodu */
.article-content pre, 
.article-content code {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    padding: 0.2rem 0.4rem;
    font-size: 0.875em;
}
.article-content pre {
    padding: 1rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}
.article-content pre code {
    padding: 0;
    background-color: transparent;
    border-radius: 0;
}

/* Style dla cytatów */
.article-content blockquote {
    margin: 0 0 1rem;
    padding: 0.5rem 1rem;
    border-left: 4px solid #dee2e6;
    color: #6c757d;
    font-style: italic;
}

/* Style dla obrazków */
.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 0.25rem;
}

/* Style dla linii poziomej */
.article-content hr {
    margin: 1.5rem 0;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Style dla tekstu wyrównanego */
.article-content .text-center { text-align: center; }
.article-content .text-right { text-align: right; }
.article-content .text-justify { text-align: justify; }

/* Style dla tekstu formatowanego */
.article-content strong, .article-content b { font-weight: 600; }
.article-content em, .article-content i { font-style: italic; }
.article-content u { text-decoration: underline; }
.article-content s { text-decoration: line-through; }
.article-content sub, .article-content sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}
.article-content sub { bottom: -0.25em; }
.article-content sup { top: -0.5em; }

/* Style dla menu rozwijanego - naprawa */
.navbar .dropdown-menu {
    z-index: 1050 !important;
}

.navbar .dropdown:hover .dropdown-menu {
    display: block;
}

/* Style dla nagłówka artykułu */
article > header {
    background-color: rgba(52, 58, 64, 0.9); /* Ciemnoszare półprzezroczyste tło */
    padding: 1.5rem; /* Odstępy wewnętrzne */
    border-radius: 0.375rem; /* Zaokrąglone rogi */
    margin-bottom: 1.5rem; /* Odstęp od reszty zawartości */
    text-align: center; /* Wyśrodkowanie tekstu */
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1); /* Delikatny cień */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Delikatna jaśniejsza obwódka */
    color: #f8f9fa; /* Jasny kolor tekstu dla lepszej czytelności */
}

/* Style dla tytułu artykułu */
article > header h1 {
    color: #ffffff !important; /* Biały kolor tekstu dla lepszej widoczności */
    margin: 0 0 1rem 0; /* Marginesy */
    padding: 0 1rem; /* Odstępy po bokach */
    font-size: 2.5rem; /* Większa czcionka */
    font-weight: 700; /* Mocniejsze pogrubienie */
    line-height: 1.2; /* Interlinia */
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.7),  /* Główny cień */
        0 0 15px rgba(0, 0, 0, 0.9);     /* Rozmycie wokół tekstu */
    letter-spacing: 0.5px; /* Lekkie rozstrzelenie liter */
    position: relative;  /* Dla lepszego pozycjonowania cienia */
    z-index: 1;          /* Upewnia się, że tekst jest nad cieniem */
}

/* Style dla daty i autora */
article > header .text-muted {
    color: #6c757d !important; /* Kolor tekstu drugoplanowego */
    font-size: 0.9rem; /* Mniejsza czcionka */
}

/* Style dla przycisków w nagłówku */
article > header .btn-group {
    margin-top: 1rem; /* Odstęp od góry */
}

/* Style dla kategorii */
article > header .badge {
    font-size: 0.9rem; /* Nieco większa czcionka */
    padding: 0.5em 1em; /* Większe wypełnienie */
    background-color: #0d6efd; /* Kolor niebieski */
    color: white; /* Biały kolor tekstu */
    border-radius: 0.25rem; /* Zaokrąglone rogi */
    font-weight: 500; /* Pogrubienie tekstu */
    text-transform: uppercase; /* Wersaliki */
    letter-spacing: 0.5px; /* Odstęp między literami */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Delikatny cień */
    display: inline-block; /* Aby można było zastosować marginesy */
    margin: 0.5rem 0; /* Odstępy góra-dół */
    text-align: center; /* Wyśrodkowanie tekstu */
    min-width: 120px; /* Minimalna szerokość */
}

/* Kontener na badge - wyśrodkowanie */
article > header .d-flex.flex-wrap {
    justify-content: center; /* Wyśrodkowanie w poziomie */
    width: 100%; /* Pełna szerokość */
}

/* Style dla treści artykułu */
.article-content {
    line-height: 1.7;
    color: #212529 !important; /* Ciemnoszary kolor tekstu - !important aby nadpisać inne style */
    font-size: 1.1rem;
    word-wrap: break-word;
    background-color: #fff !important; /* Białe tło dla lepszej czytelności */
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
    box-shadow: none; /* Usunięcie cienia */
    white-space: normal; /* Zapewnia poprawne zawijanie tekstu */
    word-wrap: break-word; /* Zawijanie długich słów */
    overflow-wrap: break-word; /* Alternatywa dla word-wrap */
}

/* Resetowanie stylów dla elementów wewnątrz .article-content */
.article-content * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Style dla akapitów */
.article-content p {
    margin-bottom: 0.5rem; /* Zmniejszony margines dolny z 1rem na 0.5rem */
    line-height: 1.5; /* Zmniejszona wartość z 1.7 na 1.5 */
}

/* Style dla nagłówków */
.article-content h1, 
.article-content h2, 
.article-content h3, 
.article-content h4, 
.article-content h5, 
.article-content h6 {
    margin: 1.5rem 0 1rem 0;
    line-height: 1.3;
    font-weight: 600;
}

.article-content h1 { font-size: 2rem; }
.article-content h2 { font-size: 1.75rem; }
.article-content h3 { font-size: 1.5rem; }
.article-content h4 { font-size: 1.25rem; }
.article-content h5 { font-size: 1.1rem; }
.article-content h6 { font-size: 1rem; }

/* Style dla ciemnego motywu - nadal białe tło */
[data-theme="dark"] .article-content {
    background-color: #ffffff; /* Białe tło */
    color: #212529; /* Ciemny tekst */
    border: 1px solid #dee2e6;
}

/* Style dla przezroczystego motywu - teraz białe tło */
[data-theme="dark-transparent"] .article-content {
    background-color: #ffffff; /* Białe tło */
    color: #212529; /* Ciemny tekst */
    border: 1px solid #dee2e6;
    backdrop-filter: none; /* Usuwamy efekt rozmycia */
    -webkit-backdrop-filter: none;
}

/* Style dla kodu w artykule */
.article-content pre {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.article-content code {
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--bg-color);
    padding: 0.2rem 0.4rem;
    border-radius: 0.2rem;
    font-size: 0.9em;
}

/* Style dla cytatów */
.article-content blockquote {
    border-left: 3px solid var(--border-color);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-color);
    opacity: 0.8;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    font-weight: 600;
    line-height: 1.3;
}

.article-content h1 { font-size: 1.8rem; }
.article-content h2 { font-size: 1.6rem; }
.article-content h3 { font-size: 1.4rem; }
.article-content h4 { font-size: 1.2rem; }
.article-content h5 { font-size: 1.1rem; }
.article-content h6 { font-size: 1rem; }

.article-content p {
    margin-bottom: 1.2em;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.25rem;
    margin: 0.5rem 0;
    display: inline-block;
}

/* Style dla kontenerów wyrównania BBCode */
.bbcode-align-left,
.bbcode-align-center,
.bbcode-align-right {
    display: block;
    width: 100%;
    overflow: hidden;
    margin: 1rem 0;
}

.bbcode-align-left {
    text-align: left;
}

.bbcode-align-center {
    text-align: center;
}

.bbcode-align-right {
    text-align: right;
}

/* Style dla obrazków wewnątrz tagów wyrównania */
.bbcode-img-left {
    float: left !important;
    margin: 0 1rem 0.5rem 0 !important;
    display: inline !important;
    max-width: 100% !important;
    height: auto !important;
}

.bbcode-img-right {
    float: right !important;
    margin: 0 0 0.5rem 1rem !important;
    display: inline !important;
    max-width: 100% !important;
    height: auto !important;
}

.bbcode-img-center {
    display: block !important;
    margin: 0.5rem auto !important;
    max-width: 100% !important;
    height: auto !important;
    float: none !important;
}

/* Reset domyślnych stylów dla obrazków */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.25rem;
    margin: 0.5rem 0;
    display: inline-block;
}

/* Reset dla klas Bootstrapa, które mogą przeszkadzać */
.text-start img,
.text-center img,
.text-end img {
    float: none !important;
    margin: 0 !important;
    display: inline !important;
}

.article-content a {
    color: #0d6efd;
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: underline;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.2em;
    padding-left: 1.8em;
}

.article-content li {
    margin-bottom: 0.5em;
}

.article-content blockquote {
    border-left: 4px solid #dee2e6;
    padding: 0.5em 1em;
    margin: 1.5em 0;
    color: #6c757d;
    font-style: italic;
}

.article-content pre {
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    padding: 1em;
    overflow-x: auto;
    margin: 1.5em 0;
}

.article-content code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #f8f9fa;
    padding: 0.2em 0.4em;
    border-radius: 0.2em;
    font-size: 0.9em;
}

.article-content pre code {
    padding: 0;
    background-color: transparent;
    border-radius: 0;
}

.article-content table {
    width: 100%;
    margin: 1.5em 0;
    border-collapse: collapse;
}

.article-content th,
.article-content td {
    padding: 0.75em;
    border: 1px solid #dee2e6;
    text-align: left;
}

.article-content th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.article-content tbody tr:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Style dla obrazków w artykułach */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem auto; /* Większy margines górny i dolny, wyśrodkowanie */
    display: block; /* Wymusza nową linię */
    clear: both; /* Zapobiega zawijaniu tekstu wokół obrazka */
}

/* Style dla obrazków wewnątrz kontenerów z wyrównaniem */
.article-content [style*="text-align: center"] img,
.article-content [align="center"] img {
    margin-left: auto;
    margin-right: auto;
}

.article-content [style*="text-align: left"] img,
.article-content [align="left"] img {
    margin-right: 1rem;
    margin-left: 0;
}

.article-content [style*="text-align: right"] img,
.article-content [align="right"] img {
    margin-left: 1rem;
    margin-right: 0;
}

/* Usunięcie podwójnych marginesów */
.article-content p + img,
.article-content img + p,
.article-content div + img,
.article-content img + div {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Style dla akapitów i obrazków */
.article-content p {
    margin: 0.5rem 0;
}

.article-content img {
    margin: 0.5rem 0;
}

.article-content p + img,
.article-content img + p,
.article-content div + img,
.article-content img + div {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Style dla wyrównania obrazków - wyłączone domyślne style */
.article-content .img-left,
.article-content .img-right,
.article-content .img-center {
    float: none;
    margin: 0.5rem 0;
    max-width: 100%;
    display: block;
}

/* Style dla kontenerów wyrównania - wyłączone */
.article-content [align=left],
.article-content [align=center],
.article-content [align=right] {
    float: none;
    text-align: left;
    margin: 0.5rem 0;
    display: block;
}

/* Wyłączanie zawijania tekstu wokół obrazków */
.article-content p {
    clear: both;
    overflow: hidden;
}

/* Czyszczenie floatów */
.article-content .clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Style dla podpisów pod obrazkami */
.article-content .img-caption {
    text-align: center;
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 0.25rem;
    margin-bottom: 1rem;
    display: block;
}

/* Czyszczenie floatów */
.article-content .clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Style dla osadzonych filmów */
.article-content iframe {
    max-width: 100%;
    margin: 1.5em 0;
    border: none;
    border-radius: 0.25rem;
}

/* Style dla kodów źródłowych */
.article-content .codehilite {
    margin: 1.5em 0;
    border-radius: 0.25rem;
    overflow: hidden;
}

.article-content .codehilite pre {
    margin: 0;
    border-radius: 0;
}

/* Style dla tabel */
.article-content table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border: 1px solid #dee2e6;
    border-collapse: collapse;
}

.article-content table th,
.article-content table td {
    padding: 0.75rem;
    vertical-align: top;
    border: 1px solid #dee2e6;
}

.article-content table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
}

.article-content table tbody + tbody {
    border-top: 2px solid #dee2e6;
}

/* Style dla cytatów */
.article-content blockquote {
    padding: 0.5rem 1rem;
    margin: 0 0 1rem;
    font-size: 1.25rem;
    border-left: 0.25rem solid #e9ecef;
}

/* Style dla list definicji */
.article-content dl {
    margin-bottom: 1rem;
}

.article-content dt {
    font-weight: 700;
}

.article-content dd {
    margin-bottom: 0.5rem;
    margin-left: 1.5rem;
}

/* Style dla podświetlania składni */
.article-content .highlight {
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    padding: 1rem;
    margin-bottom: 1rem;
    overflow: auto;
}

.article-content .highlight pre {
    margin-bottom: 0;
    overflow: visible;
}
