/* ==========================================================================
   Articles Page Styles
   ========================================================================== */

/* Privacy page */
.privacy-content {
    padding: 2rem 0 4rem;
}

.privacy-content .article-prose {
    max-width: 800px;
    margin: 0 auto;
}

/* Articles Hero */
.articles-hero {
    padding: 2rem 0 1.5rem;
}

.articles-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.articles-description {
    font-size: 1.125rem;
    color: #6b7280;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.articles-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: #9ca3af;
}

.articles-breadcrumbs a {
    color: #6b7280;
    transition: color 0.2s ease;
}

.articles-breadcrumbs a:hover {
    color: #3b82f6;
}

/* Articles Content */
.articles-content {
    padding: 1.5rem 0 4rem;
}

/* Category Filter */
.articles-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.articles-cat {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all 0.2s ease;
}

.articles-cat:hover {
    background: #e2e8f0;
    color: #334155;
}

.articles-cat.active {
    background: #1e40af;
    color: #fff;
    border-color: #1e40af;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Article Card */
.article-card {
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
}

/* Article Image */
.article-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

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

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

/* Article Body */
.article-body {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Article Category Badge */
.article-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #3b82f6;
    margin-bottom: 0.5rem;
}

/* Article Title */
.article-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.4;
}

/* Article Excerpt */
.article-excerpt {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0.5rem 0 0;
}

/* Article Date */
.article-date {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin-top: auto;
    padding-top: 0.75rem;
}

/* Empty State */
.articles-empty {
    text-align: center;
    color: #64748b;
    font-size: 1.125rem;
    padding: 3rem 0;
}

/* Pagination */
.articles-pagination {
    display: flex;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 2.5rem;
}

.articles-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    text-decoration: none;
    transition: all 0.2s ease;
}

.articles-page:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.articles-page.active {
    background: #1e40af;
    color: #fff;
}

/* ==========================================================================
   Article Detail Page
   ========================================================================== */

.article-detail {
    padding: 2rem 0 4rem;
}

.article-detail__layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    align-items: start;
}

/* Article Prose — Markdown typography */
.article-prose {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #334155;
}

.article-prose h1,
.article-prose h2,
.article-prose h3,
.article-prose h4 {
    color: #1e293b;
    font-weight: 700;
    margin: 2rem 0 1rem;
    line-height: 1.3;
}

.article-prose h1 { font-size: 2rem; }
.article-prose h2 { font-size: 1.5rem; }
.article-prose h3 { font-size: 1.25rem; }
.article-prose h4 { font-size: 1.125rem; }

.article-prose p {
    margin: 0 0 1.25rem;
}

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

.article-prose a:hover {
    color: #1d4ed8;
}

.article-prose strong {
    font-weight: 600;
    color: #1e293b;
}

.article-prose ul,
.article-prose ol {
    margin: 0 0 1.25rem;
    padding-left: 1.5rem;
}

.article-prose li {
    margin-bottom: 0.375rem;
}

.article-prose blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid #3b82f6;
    background: #f0f9ff;
    border-radius: 0 8px 8px 0;
    color: #1e40af;
    font-style: italic;
}

.article-prose blockquote p {
    margin: 0;
}

.article-prose pre {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: #1e293b;
    border-radius: 8px;
    overflow-x: auto;
    color: #e2e8f0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.article-prose code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.875em;
}

.article-prose p code,
.article-prose li code {
    padding: 0.125rem 0.375rem;
    background: #f1f5f9;
    border-radius: 4px;
    color: #dc2626;
}

.article-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.article-prose hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 2rem 0;
}

.article-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
}

.article-prose th,
.article-prose td {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.article-prose th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e293b;
}

/* Sidebar */
.article-sidebar-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    position: sticky;
    top: 130px;
}

.article-sidebar-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
}

.article-sidebar-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.article-sidebar-value {
    font-size: 0.9375rem;
    color: #1e293b;
    font-weight: 500;
}

.article-sidebar-link {
    color: #2563eb;
    text-decoration: none;
}

.article-sidebar-link:hover {
    text-decoration: underline;
}

.article-sidebar-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
    margin-top: 0.5rem;
}

.article-sidebar-back:hover {
    color: #2563eb;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-detail__layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .page-article-single .about-breadcrumbs {
        display: none;
    }

    .articles-title {
        font-size: 2rem;
    }

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

    .article-image {
        height: 200px;
    }

    .article-title {
        min-height: auto;
    }

    .articles-categories {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .articles-cat {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .article-prose {
        font-size: 1rem;
    }

    .article-prose h1 { font-size: 1.5rem; }
    .article-prose h2 { font-size: 1.25rem; }
    .article-prose h3 { font-size: 1.125rem; }
}
