/* ============================================================
   DataPublisher Blog Styles
   Brand: #0078d4 (primary), Segoe UI font family
   Scope: blog/index.html and blog/*.html pages
   ============================================================ */

/* ── Shared Blog Header ──────────────────────────────────────── */
.blog-header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.blog-nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* ── Blog Index Page ─────────────────────────────────────────── */
.blog-index-hero {
    background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
    color: #fff;
    padding: 4rem 0 3rem;
    text-align: center;
}

.blog-index-hero h1 {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    color: #fff;
    -webkit-text-fill-color: #fff;
    background: none;
}

.blog-index-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 560px;
    margin: 0 auto;
    color: #fff;
}

.blog-index-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    padding: 3rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
    align-items: start;
}

/* ── Post Cards (index listing) ──────────────────────────────── */
.blog-post-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

.post-card:hover {
    box-shadow: 0 6px 20px rgba(0, 120, 212, 0.12);
    transform: translateY(-2px);
}

.post-card-body {
    padding: 1.75rem;
}

.post-card-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.6rem;
}

.post-card-title {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.post-card-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.post-card-title a:hover {
    color: #0078d4;
}

.post-card-excerpt {
    color: #444;
    font-size: 0.975rem;
    line-height: 1.65;
    margin-bottom: 1rem;
}

.post-card-readmore {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0078d4;
    text-decoration: none;
    transition: gap 0.15s ease;
}

.post-card-readmore:hover {
    gap: 0.7rem;
    text-decoration: none;
    color: #005a9e;
}

/* ── Blog Post Page ──────────────────────────────────────────── */
.blog-post-page {
    background: #fafafa;
    min-height: calc(100vh - 80px);
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.blog-container {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    align-items: start;
}

.blog-article {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 2.5rem 3rem;
}

/* Breadcrumb */
.blog-breadcrumb {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1.25rem;
}

.blog-breadcrumb a {
    color: #0078d4;
    text-decoration: none;
}

.blog-breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-sep {
    margin: 0 0.4rem;
    color: #aaa;
}

/* Post header */
.blog-post-header {
    border-bottom: 1px solid #ebebeb;
    margin-bottom: 2.25rem;
    padding-bottom: 1.5rem;
}

.blog-post-title {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}

.blog-post-meta {
    font-size: 0.9rem;
    color: #666;
}

.meta-sep {
    margin: 0 0.5rem;
    color: #ccc;
}

/* Post content typography */
.blog-post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #2c2c2c;
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 300;
}

.blog-post-content h2 {
    font-size: 1.55rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 0.85rem;
    color: #111;
}

.blog-post-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.7rem;
    color: #222;
}

.blog-post-content p {
    margin-bottom: 1.4rem;
}

.blog-post-content a {
    color: #0078d4;
    text-decoration: underline;
}

.blog-post-content a:hover {
    color: #005a9e;
}

.blog-post-content blockquote {
    border-left: 4px solid #0078d4;
    margin: 1.5rem 0;
    padding: 0.75rem 1.25rem;
    background: #f0f7ff;
    color: #333;
    font-style: italic;
}

.blog-post-content blockquote p:last-child {
    margin-bottom: 0;
}

.blog-post-content code {
    background: #f4f4f4;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    font-size: 0.88em;
    padding: 0.1em 0.4em;
    font-family: 'Cascadia Code', Consolas, 'Courier New', monospace;
}

.blog-post-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.blog-post-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    color: inherit;
}

.blog-post-content ul,
.blog-post-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.4rem;
}

.blog-post-content li {
    margin-bottom: 0.4rem;
}

.blog-post-content hr {
    border: none;
    border-top: 2px solid #ebebeb;
    margin: 2.5rem 0;
}

.blog-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.blog-post-content th,
.blog-post-content td {
    border: 1px solid #ddd;
    padding: 0.6rem 0.9rem;
    text-align: left;
}

.blog-post-content th {
    background: #f4f4f4;
    font-weight: 700;
}

/* Post footer */
.blog-post-footer {
    border-top: 1px solid #ebebeb;
    margin-top: 3rem;
    padding-top: 1.5rem;
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #0078d4;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'Open Sans', sans-serif;
}

.back-to-blog:hover {
    color: #005a9e;
    text-decoration: none;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.blog-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sidebar-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 1.25rem 1.4rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.sidebar-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: #111;
}

.sidebar-card p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.55;
    margin-bottom: 0.85rem;
}

.sidebar-cta {
    display: block;
    text-align: center;
    background: #0078d4;
    color: #fff;
    border-radius: 6px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.sidebar-cta:hover {
    background: #005a9e;
    color: #fff;
}

.sidebar-link {
    display: inline-block;
    color: #0078d4;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.sidebar-link:hover {
    text-decoration: underline;
    color: #005a9e;
}

/* ── Footer ──────────────────────────────────────────────────── */
.blog-site-footer {
    background: #1a1a1a;
    color: #aaa;
    padding: 2rem;
    text-align: center;
    font-size: 0.875rem;
    margin-top: auto;
}

.blog-site-footer .footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.blog-site-footer .footer-links a {
    color: #bbb;
    text-decoration: none;
}

.blog-site-footer .footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
    .blog-index-content,
    .blog-container {
        grid-template-columns: 1fr;
        padding: 1.5rem 1rem;
    }

    .blog-index-sidebar,
    .blog-sidebar {
        position: static;
    }

    .blog-article {
        padding: 1.5rem;
    }

    .blog-post-title {
        font-size: 1.7rem;
    }

    .blog-index-hero h1 {
        font-size: 2rem;
    }

    .blog-nav-links {
        display: none;
    }
}

@media (max-width: 480px) {
    .blog-article {
        padding: 1.25rem;
        border-radius: 0;
        box-shadow: none;
    }

    .blog-post-content {
        font-size: 1rem;
    }
}
