/* Blog Styles */

/* Breadcrumb */
.blog-breadcrumb {
    padding: 0;
    margin: 0 0 1.5rem;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.blog-breadcrumb li {
    display: flex;
    align-items: center;
}

.blog-breadcrumb li + li::before {
    content: "/";
    margin-right: 0.25rem;
    color: #6c757d;
}

.blog-breadcrumb a {
    color: #274ABB;
    text-decoration: none;
}

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

.blog-breadcrumb [aria-current="page"] {
    color: #6c757d;
}

/* Post meta */
.post-meta {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.post-meta a {
    color: #274ABB;
    text-decoration: none;
}

.post-meta a:hover {
    text-decoration: underline;
}

/* Category badge */
.category-badge {
    display: inline-block;
    padding: 0.2em 0.65em;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 4px;
    text-decoration: none;
}

.category-badge-guides {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.category-badge-compliance {
    background-color: #fff3e0;
    color: #e65100;
}

.category-badge-tips {
    background-color: #e3f2fd;
    color: #1565c0;
}

.category-badge-comparisons {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

/* Blog post card */
.blog-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    background: #fff;
}

.blog-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.blog-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.blog-card h3 a {
    color: #1a1a2e;
    text-decoration: none;
}

.blog-card h3 a:hover {
    color: #274ABB;
}

.blog-card-excerpt {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6c757d;
}

/* Post content */
.post-content {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.7;
    color: #2d3748;
}

.post-content h2 {
    margin-top: 2em;
    margin-bottom: 0.75em;
    font-weight: 700;
    color: #1a1a2e;
}

.post-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: #1a1a2e;
}

.post-content p {
    margin-bottom: 1.25em;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5em 0;
}

.post-content ul,
.post-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.25em;
}

.post-content li {
    margin-bottom: 0.5em;
}

.post-content blockquote {
    border-left: 4px solid #274ABB;
    padding: 1em 1.5em;
    margin: 1.5em 0;
    background-color: #f8f9fa;
    border-radius: 0 4px 4px 0;
    font-style: italic;
    color: #4a5568;
}

.post-content a {
    color: #274ABB;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content a:hover {
    color: #1a347e;
}

/* Table of Contents */
.toc {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.toc-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: #1a1a2e;
}

.toc ol {
    padding-left: 1.25em;
    margin: 0;
    list-style: decimal;
}

.toc li {
    margin-bottom: 0.35em;
    font-size: 0.9rem;
}

.toc a {
    color: #274ABB;
    text-decoration: none;
}

.toc a:hover {
    text-decoration: underline;
}

@media (min-width: 992px) {
    .toc-sidebar {
        position: sticky;
        top: 2rem;
    }
}

@media (max-width: 991.98px) {
    .toc-collapsible {
        margin-bottom: 1.5rem;
    }

    .toc-collapsible .toc-body {
        display: none;
    }

    .toc-collapsible.open .toc-body {
        display: block;
    }

    .toc-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        width: 100%;
        background: none;
        border: none;
        padding: 0;
        font-weight: 700;
        font-size: 0.95rem;
        color: #1a1a2e;
    }

    .toc-toggle::after {
        content: "+";
        font-size: 1.2rem;
        color: #6c757d;
    }

    .toc-collapsible.open .toc-toggle::after {
        content: "\2212";
    }
}

@media (min-width: 992px) {
    .toc-toggle {
        cursor: default;
    }

    .toc-toggle::after {
        display: none;
    }

    .toc-collapsible .toc-body {
        display: block;
    }
}

/* Author box */
.author-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 3rem;
}

.author-box h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.author-box p {
    font-size: 0.95rem;
    color: #4a5568;
    margin-bottom: 0;
}

/* Related posts */
.related-posts {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.related-posts h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.related-posts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-posts li {
    margin-bottom: 0.75rem;
}

.related-posts a {
    color: #274ABB;
    text-decoration: none;
    font-weight: 500;
}

.related-posts a:hover {
    text-decoration: underline;
}
