/**
 * ArtSI - STYLE ARTYKUŁU
 * Ładowane wyłącznie na stronie artykułu (artykul.php)
 */

/* ============================================
   PEŁNY ARTYKUŁ
   ============================================ */

.article-full {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-header h1 {
    font-size: 36px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.article-intro {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    border-radius: 4px;
}

/* Sekcja z obrazem i wstępem obok siebie */
.article-header-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    margin: 30px 0;
    align-items: start;
}

.article-featured-image {
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    text-align: center;
    margin: 0;
}

.article-featured-image img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    display: inline-block;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.article-intro-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (max-width: 968px) {
    .article-header-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .article-featured-image {
        order: -1;
        max-width: 100%;
    }

    .article-featured-image img {
        max-width: 100%;
        width: 100%;
        max-height: none;
        height: auto;
    }
}

/* ============================================
   TREŚĆ ARTYKUŁU
   ============================================ */

.article-body {
    font-size: 17px;
    line-height: 1.8;
    color: #444;
    clear: both;
}

.article-body::after {
    content: '';
    display: table;
    clear: both;
}

.article-body h2 {
    font-size: 28px;
    margin: 40px 0 20px;
    padding-top: 10px;
    border-top: 2px solid #e9ecef;
    color: #333;
}

.article-body h3 {
    font-size: 22px;
    margin: 30px 0 15px;
    color: #333;
}

.article-body p {
    margin-bottom: 18px;
}

.article-body ul, .article-body ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-body li {
    margin: 10px 0;
    line-height: 1.7;
}

.article-body strong {
    font-weight: 600;
    color: #333;
}

.article-body hr {
    margin: 40px 0;
    border: none;
    border-top: 2px solid #e9ecef;
}

/* ============================================
   TABELE W TREŚCI ARTYKUŁU
   ============================================ */

.opakowanie-tabeli {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 24px 0;
}

.tabela-artykulu {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 15px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    min-width: 480px;
}

.tabela-artykulu thead tr {
    background: #667eea;
    color: #fff;
    text-align: left;
}

.tabela-artykulu th {
    padding: 12px 16px;
    font-weight: 600;
    white-space: nowrap;
}

.tabela-artykulu td {
    padding: 11px 16px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.tabela-artykulu tbody tr:last-child td {
    border-bottom: none;
}

.tabela-artykulu tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.tabela-artykulu tbody tr:hover {
    background: #eef0fd;
}

@media (max-width: 640px) {
    .opakowanie-tabeli {
        overflow-x: visible;
    }

    .tabela-artykulu {
        min-width: 0;
        width: 100%;
        box-shadow: none;
        background: transparent;
    }

    .tabela-artykulu thead {
        display: none;
    }

    .tabela-artykulu tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid #e0e4f0;
        border-radius: 10px;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    }

    .tabela-artykulu tbody tr:nth-child(even) {
        background: #fff;
    }

    .tabela-artykulu tbody tr:hover {
        background: #f8f9ff;
    }

    .tabela-artykulu td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        padding: 10px 14px;
        border-bottom: 1px solid #f0f2f8;
        border-right: none;
        text-align: right;
        font-size: 14px;
    }

    .tabela-artykulu tbody tr:last-child td,
    .tabela-artykulu td:last-child {
        border-bottom: none;
    }

    .tabela-artykulu td::before {
        content: attr(data-naglowek);
        font-weight: 600;
        color: #667eea;
        text-align: left;
        flex-shrink: 0;
        max-width: 50%;
        white-space: normal;
    }
}

/* ============================================
   OBRAZY W TREŚCI ARTYKUŁU
   ============================================ */

.article-body img {
    max-width: 100%;
    max-height: 400px;
    height: auto;
    width: auto;
    object-fit: contain;
    margin: 25px auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.article-inline-img {
    margin: 0 0 20px 0;
    display: block;
    max-width: 420px;
}

.article-inline-img img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    display: block;
}

.article-inline-img figcaption {
    font-size: 13px;
    color: #888;
    margin-top: 6px;
    text-align: center;
}

.article-img-right {
    float: right;
    margin: 5px 0 20px 28px;
}

.article-img-left {
    float: left;
    margin: 5px 28px 20px 0;
}

/* ============================================
   FAQ W ARTYKULE
   ============================================ */

.article-body .faq {
    margin: 40px 0;
    padding: 0;
}

.article-body .faq > h2 {
    margin-bottom: 20px;
}

.article-body .faq-item {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 12px;
    background: #f8f9fa;
}

.article-body .faq-item h3 {
    font-size: 17px;
    margin: 0 0 10px 0;
    color: #333;
}

.article-body .faq-item p {
    margin: 0;
    color: #555;
    font-size: 15px;
}

/* ============================================
   TAGI ARTYKUŁU
   ============================================ */

.article-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* ============================================
   SPIS TREŚCI (TOC) - WIDGET SIDEBAR
   ============================================ */

.widget-toc {}

.widget-toc .toc-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-toc .toc-nav li {
    margin: 8px 0;
}

.widget-toc .toc-nav li a {
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    display: block;
    transition: color 0.2s;
    padding: 5px 0;
}

.widget-toc .toc-nav li a:hover {
    color: #667eea;
}

.widget-toc .toc-nav li.toc-level-3 {
    padding-left: 15px;
    font-size: 0.9rem;
}

.widget-toc .toc-nav li.toc-level-3 a {
    color: #999;
}

/* ============================================
   BOX AUTORA
   ============================================ */

.author-box {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-top: 40px;
    padding: 24px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #dee2e6;
}

.author-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    flex-shrink: 0;
}

.author-info {
    flex: 1;
    min-width: 0;
}

.author-name {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #212529;
}

.author-name a {
    color: #212529;
    text-decoration: none;
}

.author-name a:hover {
    color: #667eea;
}

.author-bio {
    font-size: 0.92rem;
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   RESPONSYWNOŚĆ ARTYKUŁU
   ============================================ */

@media (max-width: 768px) {
    .article-full {
        padding: 16px;
    }

    .article-header h1 {
        font-size: 24px;
    }

    .article-body {
        font-size: 16px;
    }

    .article-body iframe,
    .article-body embed,
    .article-body video,
    .article-body object {
        max-width: 100%;
        height: auto;
    }

    .article-body pre {
        overflow-x: auto;
        white-space: pre-wrap;
        word-break: break-word;
    }

    .article-body img {
        max-width: 100%;
        height: auto;
        max-height: none;
    }

    .article-inline-img,
    .article-img-right,
    .article-img-left {
        float: none;
        max-width: 100%;
        margin: 20px 0;
    }
}
