/* Blog specific styles - Modern & Readable */

.nav-link--active,
.nav-link.active {
    color: var(--color-primary) !important;
}

.nav-link--active::after,
.nav-link.active::after {
    width: 100% !important;
}

/* Blog Hero - Clean UI */
.blog-hero {
    padding: 48px 0 40px;
    background: #f8fafc;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.blog-hero .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-hero h1 {
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

.blog-hero p {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 24px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    font-family: 'Inter', sans-serif;
}

.blog-categories {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
    font-family: 'Inter', sans-serif;
}

.category-btn:hover {
    border-color: #2563eb;
    background: #f8fafc;
    color: #2563eb;
}

.category-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Featured Article - Enhanced */
.featured-article {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 24px;
    overflow: hidden;
    border: none;
    padding: 40px;
    margin-bottom: 48px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.featured-article-image {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    border-radius: 16px;
}

.featured-article-content {
    padding: 16px 0;
}

.featured-article-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 14px;
    line-height: 1.3;
    font-family: 'Inter', sans-serif;
}

.featured-article-content h2 a {
    transition: color 0.2s ease;
    color: inherit;
    text-decoration: none;
}

.featured-article-content h2 a:hover {
    color: #2563eb;
}

.featured-article-content p {
    font-size: 1.125rem;
    color: #475569;
    margin-bottom: 24px;
    line-height: 1.8;
}

/* Article Category Badge - Enhanced */
.article-category {
    display: inline-block;
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

/* Article Meta - Enhanced */
.article-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9375rem;
    color: #64748b;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-reading-time::before {
    content: '•';
    margin-right: 16px;
}

/* Section Title */
.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 32px;
    font-family: 'Nunito', 'Inter', sans-serif;
}

/* Articles Grid - Enhanced */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
}

.article-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.article-card-image {
    height: 180px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

.article-card-image svg {
    width: 64px;
    height: 64px;
    opacity: 0.5;
    color: #3b82f6;
}

.article-card-content,
.article-card-body {
    padding: 24px;
}

.article-card-content h3,
.article-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 10px;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
}

.article-card-content h3 a,
.article-card-title a {
    color: inherit;
    text-decoration: none;
}

.article-card-content h3 a:hover,
.article-card:hover .article-card-title {
    color: #2563eb;
}

.article-card-content p,
.article-card-excerpt {
    font-size: 0.9375rem;
    color: #64748b;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.article-card .article-meta,
.article-card-meta {
    margin-bottom: 0;
    font-size: 0.875rem;
    color: #94a3b8;
}

.article-card-category {
    font-size: 0.75rem;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Pagination - Enhanced */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 40px 0;
}

.pagination-info {
    font-size: 0.9375rem;
    color: #64748b;
}

/* Load More Button */
.load-more-section {
    text-align: center;
    padding: 48px 0;
}

/* Newsletter - Enhanced */
.newsletter-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    padding: 60px 0;
}

.newsletter-box {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
    color: white;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    padding: 48px;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.3);
}

.newsletter-box h2,
.newsletter-box h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: white;
    font-family: 'Inter', sans-serif;
}

.newsletter-box > p {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 28px;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form input {
    flex: 1;
    padding: 16px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 14px;
    outline: none;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.newsletter-form input:focus {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.newsletter-form .btn,
.newsletter-form button {
    background: white;
    color: #2563eb;
    white-space: nowrap;
    padding: 16px 28px;
    border-radius: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.newsletter-form .btn:hover,
.newsletter-form button:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.newsletter-disclaimer {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 16px;
}

/* Article Page Styles - Enhanced for Readability */

/* Article Hero (from template) */
.article-hero {
    background: #f8fafc;
    color: #0f172a;
    padding: 40px 0 32px;
    border-bottom: 1px solid #e2e8f0;
}

.article-hero .container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

.article-hero .article-category {
    display: inline-block;
    background: #2563eb;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: white;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.article-hero h1 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    line-height: 1.3;
    margin-bottom: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.article-hero .article-meta {
    display: flex;
    gap: 16px;
    font-size: 0.875rem;
    color: #64748b;
    flex-wrap: wrap;
    font-family: 'Inter', sans-serif;
}

.article-hero .article-meta span {
    display: flex;
    align-items: center;
}

.article-hero .article-meta svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    color: #94a3b8;
}

/* Article Featured Image */
.article-featured-image {
    max-width: 720px;
    margin: 32px auto 40px;
    padding: 0 20px;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
    .article-featured-image {
        margin: 24px auto 32px;
        padding: 0 16px;
    }

    .article-featured-image img {
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }
}

/* Breadcrumb */
.breadcrumb {
    padding: 20px 0;
    font-size: 0.9375rem;
    color: #64748b;
}

.breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #2563eb;
}

.breadcrumb span {
    color: #94a3b8;
    margin: 0 10px;
}

/* Article Header */
.article-header {
    padding: 48px 0 32px;
    background: #f8fafc;
}

.article-header .container {
    max-width: 800px;
}

.article-breadcrumb {
    font-size: 0.9375rem;
    color: #64748b;
    margin-bottom: 24px;
}

.article-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.article-breadcrumb a:hover {
    text-decoration: underline;
}

.article-header h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 20px;
    font-family: 'Nunito', 'Inter', sans-serif;
}

.article-header .article-meta {
    margin-bottom: 0;
    font-size: 1rem;
    color: #64748b;
}

/* Article Content - Optimized for Readability */
.article-content {
    padding: 60px 0;
    max-width: 760px;
    margin: 0 auto;
}

.article-content .container {
    max-width: 760px;
}

.article-body,
.article-content p {
    font-size: 1.125rem;
    line-height: 1.9;
    color: #334155;
}

.article-body h2,
.article-content h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 56px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
    font-family: 'Nunito', 'Inter', sans-serif;
}

.article-body h3,
.article-content h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 40px;
    margin-bottom: 16px;
    font-family: 'Nunito', 'Inter', sans-serif;
}

.article-body p,
.article-content > p {
    margin-bottom: 24px;
}

.article-body ul,
.article-body ol,
.article-content ul,
.article-content ol {
    margin: 24px 0 24px 28px;
}

.article-body li,
.article-content li {
    margin-bottom: 12px;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #334155;
    list-style: disc;
}

.article-body ol li,
.article-content ol li {
    list-style: decimal;
}

.article-body a,
.article-content a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-body a:hover,
.article-content a:hover {
    color: #1d4ed8;
}

.article-body strong,
.article-content strong {
    color: #0f172a;
    font-weight: 600;
}

.article-body blockquote,
.article-content blockquote {
    margin: 40px 0;
    padding: 28px 32px;
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    border-radius: 0 16px 16px 0;
    font-style: italic;
    font-size: 1.125rem;
    color: #1e40af;
}

.article-body blockquote p:last-child,
.article-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Lead paragraph */
.lead {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #475569;
    font-weight: 400;
    margin-bottom: 32px;
}

/* Info Box */
.info-box {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    padding: 28px;
    border-radius: 0 16px 16px 0;
    margin: 32px 0;
}

.info-box.warning,
.warning-box {
    background: #fef3c7;
    border-color: #f59e0b;
}

.info-box.success {
    background: #ecfdf5;
    border-color: #10b981;
}

.info-box h4,
.warning-box h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.info-box p,
.warning-box p {
    margin: 0;
    font-size: 1rem;
}

.info-box ul,
.warning-box ul {
    margin: 12px 0 0 20px;
}

.info-box li,
.warning-box li {
    font-size: 1rem;
    margin-bottom: 8px;
}

/* CTA Box in Article */
.article-cta,
.cta-box {
    margin: 48px 0;
    padding: 40px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.article-cta h3,
.cta-box h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    font-family: 'Nunito', 'Inter', sans-serif;
}

.article-cta p,
.cta-box p {
    margin-bottom: 24px;
    color: #64748b;
    font-size: 1.0625rem;
}

.article-cta .btn,
.cta-box .btn {
    display: inline-flex;
    padding: 18px 40px;
    font-size: 1.0625rem;
    font-weight: 700;
    background: #2563eb;
    color: white;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    transition: all 0.2s ease;
}

.article-cta .btn:hover,
.cta-box .btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.45);
}

/* Article Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
}

.tag {
    display: inline-block;
    padding: 8px 16px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.tag:hover {
    background: #e2e8f0;
    color: #475569;
}

/* Article Footer */
.article-footer {
    margin-top: 48px;
}

/* Related Articles - Enhanced */
.related-articles,
.article-related {
    padding: 72px 0;
    background: #f8fafc;
}

.related-articles h2,
.article-related h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 40px;
    text-align: center;
    font-family: 'Nunito', 'Inter', sans-serif;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    max-width: 1000px;
    margin: 0 auto;
}

.related-card {
    background: white;
    border-radius: 16px;
    padding: 28px;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    display: block;
}

.related-card:hover {
    border-color: #2563eb;
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.12);
    transform: translateY(-4px);
}

.related-card-category {
    font-size: 0.75rem;
    color: #2563eb;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.related-card h4 {
    font-size: 1.125rem;
    color: #0f172a;
    margin: 10px 0;
    line-height: 1.4;
    font-weight: 700;
    font-family: 'Nunito', 'Inter', sans-serif;
}

.related-card p {
    font-size: 0.9375rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* Blog Article Wrapper */
.blog-article {
    background: white;
}

.blog-article .container {
    max-width: 800px;
}

/* Blog Content Section */
.blog-content {
    padding: 60px 0 80px;
}

/* Blog Stats */
.blog-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 20px;
}

.blog-stat {
    text-align: center;
}

.blog-stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    display: block;
    font-family: 'Inter', sans-serif;
    color: #2563eb;
}

.blog-stat-label {
    font-size: 0.8125rem;
    color: #64748b;
    font-family: 'Inter', sans-serif;
    margin-top: 2px;
}

/* Categories Bar */
.categories-bar {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 0;
    position: sticky;
    top: 70px;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.categories-list {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive - Enhanced */
@media (max-width: 1024px) {
    .featured-article {
        grid-template-columns: 1fr;
        padding: 32px;
    }

    .featured-article-content {
        padding: 0;
    }

    .featured-article-image {
        display: none;
    }

    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Blog Visual Upgrade (Task #23)
   ============================================ */

/* Gradient placeholder w kartach artykułów */
.article-card-image--gradient {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
}

.article-card-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
    user-select: none;
}

/* Badge kategoria per kolor */
.article-cat--kredyty   { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.article-cat--chwilowki { background: linear-gradient(135deg, #c2410c, #fb923c); }
.article-cat--pozyczki  { background: linear-gradient(135deg, #166534, #4ade80); color: #052e16; }
.article-cat--konta     { background: linear-gradient(135deg, #6d28d9, #c084fc); }
.article-cat--porady    { background: linear-gradient(135deg, #0f766e, #2dd4bf); color: #042f2e; }

/* Footer karty artykułu (data + czas czytania) */
.article-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
}

.article-card-date {
    font-size: 0.8125rem;
    color: #64748b;
}

.article-card-readtime {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
}

/* Lepszy tekst artykułów */
.article-body {
    line-height: 1.8;
    font-size: 1.0625rem;
    color: #374151;
}

.article-body p {
    line-height: 1.8;
    margin-bottom: 1.5em;
}

.article-body h2, .article-body h3 {
    margin-top: 2em;
    margin-bottom: 0.75em;
}

.article-body-content,
.article-content .article-body {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

/* Pasek postępu czytania */
.reading-progress {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0,0,0,0.08);
    z-index: 99;
    pointer-events: none;
}

.reading-progress-bar {
    height: 100%;
    background: var(--color-primary, #10b981);
    width: 0%;
    transition: width 100ms linear;
    will-change: width;
}

/* Badge czas czytania przy tytule artykułu */
.reading-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--color-primary-50, #f0fdf8);
    color: var(--color-primary-dark, #059669);
    border: 1px solid var(--color-primary-100, #d1fae5);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
}

/* Dark mode */
:root[data-theme="dark"] .reading-progress { background: rgba(255,255,255,0.08); }
:root[data-theme="dark"] .article-body, :root[data-theme="dark"] .article-body p { color: #c9d1d9; }
:root[data-theme="dark"] .article-card-date, :root[data-theme="dark"] .article-card-readtime { color: #8b949e; }
:root[data-theme="dark"] .reading-time-badge { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.2); color: #34d399; }
:root[data-theme="dark"] .blog-hero { background: #0d1117; border-color: #30363d; }

@media (prefers-reduced-motion: reduce) {
    .reading-progress-bar { transition: none; }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 60px 0 48px;
    }

    .blog-hero h1 {
        font-size: 2rem;
    }

    .blog-stats {
        gap: 24px;
    }

    .blog-stat-number {
        font-size: 1.75rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-box {
        padding: 32px 24px;
    }

    .article-content {
        padding: 40px 20px;
    }

    .article-header h1 {
        font-size: 1.75rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 8px;
    }

    .featured-article {
        padding: 24px;
    }

    .featured-article-content h2 {
        font-size: 1.5rem;
    }
}
