/* ==========================================================================
   LLM SEO OPTIMIZED ELEMENTS
   ========================================================================== */

/* Article Page Layout */
.kb-article-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    min-height: 100vh;
}

/* Breadcrumbs */
.kb-breadcrumbs {
    margin: 2rem 0;
    font-size: 0.9rem;
    color: #666;
}

.kb-breadcrumbs a {
    color: var(--warmth-primary);
    text-decoration: none;
}

.kb-breadcrumbs a:hover {
    text-decoration: underline;
}

/* Article Header */
.kb-article-header {
    margin-bottom: 3rem;
    text-align: center;
    border-bottom: 2px solid var(--warmth-cream);
    padding-bottom: 2rem;
}

.kb-article-title {
    font-size: 2.5rem;
    color: var(--warmth-charcoal);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.kb-article-subtitle {
    max-width: 640px;
    margin: 0.75rem auto 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: rgba(44, 38, 37, 0.75);
}

.kb-article-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.9rem;
    color: #666;
    flex-wrap: wrap;
}

/* Table of Contents */
.kb-toc {
    background: var(--warmth-cream);
    border: 2px solid var(--warmth-secondary);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
}

.kb-toc h2 {
    color: var(--warmth-charcoal);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.kb-toc ol {
    list-style: none;
    padding: 0;
    counter-reset: toc-counter;
}

.kb-toc li {
    counter-increment: toc-counter;
    margin-bottom: 0.75rem;
}

.kb-toc li a {
    color: var(--warmth-charcoal);
    text-decoration: none;
    padding: 0.5rem 0;
    display: block;
    border-radius: 8px;
    padding-left: 2.5rem;
    position: relative;
}

.kb-toc li a:hover {
    background: rgba(201, 74, 42, 0.1);
    color: var(--warmth-primary);
}

.kb-toc li a::before {
    content: counter(toc-counter);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--warmth-primary);
    color: white;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Key Takeaways */
.kb-takeaways {
    background: linear-gradient(135deg, var(--warmth-accent) 0%, rgba(42, 92, 78, 0.1) 100%);
    border: 2px solid var(--warmth-accent);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
}

.kb-takeaways h2 {
    color: white;
    background: var(--warmth-accent);
    margin: -2rem -2rem 1.5rem -2rem;
    padding: 1rem 2rem;
    border-radius: 14px 14px 0 0;
    font-size: 1.3rem;
}

.kb-takeaways ul {
    list-style: none;
    padding: 0;
}

.kb-takeaways li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--warmth-charcoal);
    font-weight: 500;
}

.kb-takeaways li::before {
    content: "💡";
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

/* Article Content */
.kb-article-content {
    line-height: 1.8;
    color: var(--warmth-charcoal);
    font-size: 1.1rem;
}

.kb-article-content h2 {
    color: var(--warmth-primary);
    margin: 3rem 0 1.5rem 0;
    font-size: 1.8rem;
    border-bottom: 2px solid var(--warmth-cream);
    padding-bottom: 0.5rem;
}

.kb-article-content h3 {
    color: var(--warmth-charcoal);
    margin: 2rem 0 1rem 0;
    font-size: 1.4rem;
}

.kb-article-content p {
    margin-bottom: 1.5rem;
}

.kb-article-content section {
    margin-bottom: 3rem;
}

/* Article Footer */
.kb-article-footer {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 3px solid var(--warmth-cream);
}

/* Related Articles */
.kb-related h3 {
    color: var(--warmth-charcoal);
    margin-bottom: 1.5rem;
}

.kb-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.kb-related-item {
    background: white;
    border: 1px solid var(--warmth-cream);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    transition: all 0.3s var(--ease-organic);
}

.kb-related-item:hover {
    border-color: var(--warmth-primary);
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

.kb-related-item h4 {
    color: var(--warmth-charcoal);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.kb-related-item p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

/* CTA Section */
.kb-article-cta {
    background: linear-gradient(135deg, var(--warmth-primary) 0%, var(--warmth-secondary) 100%);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.kb-article-cta h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.kb-article-cta p {
    color: white;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.kb-cta-button {
    background: white;
    color: var(--warmth-primary);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s var(--ease-organic);
}

.kb-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Author Bio */
.kb-author-bio {
    display: flex;
    gap: 1.6rem;
    align-items: center;
    background: var(--warmth-cream);
    border-radius: 16px;
    padding: 2rem;
    margin: 3rem 0;
    border: 1px solid rgba(44, 38, 37, 0.08);
    box-shadow: 0 18px 28px rgba(44, 38, 37, 0.12);
    position: relative;
}

.kb-author-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.kb-author-info h4 {
    color: var(--warmth-charcoal);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.kb-author-info p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.kb-author-bio::before {
    content: "";
    position: absolute;
    top: -1.3rem;
    left: 2.2rem;
    width: 64px;
    height: 4px;
    border-radius: 999px;
    background: var(--warmth-primary);
}

.kb-breadcrumbs .kb-breadcrumb-label {
    color: var(--kb-text-secondary);
    font-weight: 600;
}

.kb-breadcrumbs [aria-current="page"] {
    color: var(--kb-text-dark, #2c2625);
    font-weight: 700;
}

@media (max-width: 720px) {
    .kb-author-bio {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .kb-author-info h4,
    .kb-author-info p {
        text-align: center;
    }

    .kb-author-bio::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

.kb-author-links {
    display: flex;
    gap: 1rem;
}

.kb-author-links a {
    color: var(--warmth-primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.kb-author-links a:hover {
    text-decoration: underline;
}

/* LLM Summary Box - Kluczowy element dla AI */
.llm-summary {
    background: linear-gradient(135deg, var(--warmth-cream) 0%, #fff 100%);
    border: 2px solid var(--warmth-primary);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    box-shadow: var(--shadow-medium);
}

.llm-summary h2 {
    color: var(--warmth-primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.llm-tldr {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--warmth-accent);
}

.llm-tldr strong {
    color: var(--warmth-accent);
    font-size: 1.1rem;
}

.llm-key-facts {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.llm-key-facts h3 {
    color: var(--warmth-charcoal);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.llm-key-facts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.llm-key-facts li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--warmth-cream);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.llm-key-facts li:last-child {
    border-bottom: none;
}

.llm-key-facts li strong {
    color: var(--warmth-accent);
}

.llm-citation {
    background: var(--warmth-cream);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--warmth-charcoal);
    font-family: 'JetBrains Mono', monospace;
}

/* Stats Box for LLM */
.stats-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border: 2px solid var(--warmth-gold);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.stats-box h3 {
    color: var(--warmth-gold);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.stats-box ul {
    list-style: none;
    padding: 0;
}

.stats-box li {
    padding: 0.75rem;
    background: white;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
}

.stats-box cite {
    font-size: 0.85rem;
    color: #666;
    font-style: normal;
}

.stats-citation {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--warmth-cream);
    font-size: 0.9rem;
    color: #666;
    text-align: right;
}

/* Comparison Table for LLM */
.comparison-table {
    margin: 2rem 0;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
}

.comparison-table h3 {
    color: var(--warmth-charcoal);
    margin-bottom: 1.5rem;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    background: var(--warmth-cream);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--warmth-charcoal);
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--warmth-cream);
}

.comparison-table tbody tr:hover {
    background: rgba(201, 74, 42, 0.03);
}

.comparison-table td:last-child {
    font-weight: 600;
    color: var(--warmth-accent);
}

/* Code Example Box */
.code-example {
    margin: 2rem 0;
    background: var(--warmth-charcoal);
    border-radius: 12px;
    overflow: hidden;
}

.code-example h3 {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 1.1rem;
}

.code-example pre {
    margin: 0;
    padding: 1.5rem;
    background: transparent;
    color: var(--warmth-cream);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
}

.code-example code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* Step Guide */
.step-guide {
    margin: 2rem 0;
    background: linear-gradient(135deg, var(--warmth-cream) 0%, white 100%);
    border-radius: 16px;
    padding: 2rem;
}

.step-guide h3 {
    color: var(--warmth-primary);
    margin-bottom: 1.5rem;
}

.step-guide ol {
    counter-reset: step-counter;
    list-style: none;
    padding: 0;
}

.step-guide li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 3.5rem;
    margin-bottom: 1.5rem;
}

.step-guide li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--warmth-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.step-guide li strong {
    display: block;
    color: var(--warmth-charcoal);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* FAQ Items Enhanced */
.faq-item {
    background: white;
    border: 1px solid var(--warmth-cream);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s var(--ease-organic);
}

.faq-item:hover {
    border-color: var(--warmth-primary);
    box-shadow: var(--shadow-soft);
}

.faq-item h3 {
    color: var(--warmth-charcoal);
    font-size: 1.15rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
}

.faq-item h3::before {
    content: "❓";
    margin-right: 0.75rem;
    font-size: 1.3rem;
}

.faq-item p {
    color: #555;
    line-height: 1.7;
    margin: 0;
}

/* Summary Box */
.summary-box {
    background: linear-gradient(135deg, var(--warmth-gold) 0%, rgba(212, 146, 90, 0.1) 100%);
    border: 2px solid var(--warmth-gold);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 3rem;
}

.summary-box h3 {
    color: var(--warmth-charcoal);
    margin: 1.5rem 0 1rem 0;
}

.summary-box ul {
    list-style: none;
    padding: 0;
}

.summary-box li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
}

.summary-box li::before {
    content: "✅";
    position: absolute;
    left: 0;
}

/* Lead Paragraph */
.lead {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--warmth-charcoal);
    font-weight: 500;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--warmth-cream);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .llm-summary {
        padding: 1.5rem;
    }

    .llm-summary h2 {
        font-size: 1.3rem;
    }

    .stats-box,
    .comparison-table,
    .step-guide {
        padding: 1rem;
    }

    .comparison-table {
        overflow-x: auto;
    }

    .comparison-table table {
        min-width: 500px;
    }

    .step-guide li {
        padding-left: 3rem;
    }

    .step-guide li::before {
        width: 2rem;
        height: 2rem;
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .llm-summary,
    .stats-box,
    .comparison-table,
    .faq-item {
        break-inside: avoid;
    }

    .kb-header,
    .kb-back-to-top,
    .kb-article-cta {
        display: none;
    }
}

/* Accessibility */
.llm-summary:focus-within,
.stats-box:focus-within,
.faq-item:focus-within {
    outline: 3px solid var(--warmth-primary);
    outline-offset: 2px;
}

/* Dark Mode Support (jeśli będzie potrzebny) */
@media (prefers-color-scheme: dark) {
    /* Możemy dodać dark mode w przyszłości */
}
