/* Ensure navigation is always clickable */
.header,
.nav-menu,
.nav-link,
.nav-cta,
.theme-switcher,
.mobile-menu-toggle {
    pointer-events: auto !important;
    z-index: 1000;
}

/* Blog Post */
.blog-post {
    padding: 4rem 0;
    margin-top: 80px; /* Account for fixed header */
}

.blog-post .container {
    max-width: 900px;
}

/* Post Header */
.post-header {
    margin-bottom: 3rem;
}

.post-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.post-breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.post-breadcrumb a:hover {
    opacity: 0.8;
}

.post-category {
    display: inline-block;
    background: #3b82f6;
    color: white;
    padding: 0.35rem 0.9rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.post-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1f2937;
}

.post-excerpt {
    font-size: 1.25rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar-large,
.author-avatar-large-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.author-avatar-large-placeholder {
    background: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 1rem;
}

.post-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.25rem;
}

.post-date {
    color: #6b7280;
    font-size: 0.875rem;
}

.author-social {
    display: flex;
    gap: 0.5rem;
}

.author-social a {
    color: #6b7280;
    transition: color 0.3s ease;
}

.author-social a:hover {
    color: #3b82f6;
}

/* Share Buttons */
.post-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.share-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: white;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.linkedin {
    background: #0077b5;
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Featured Image */
.post-featured-image {
    margin: 3rem 0;
    border-radius: 12px;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Content */
.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #374151;
}

.post-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.post-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

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

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

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

.post-content code {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: #e83e8c;
    font-family: 'Courier New', monospace;
}

.post-content pre {
    background: #1f2937;
    color: #f3f4f6;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.post-content a {
    color: #3b82f6;
    text-decoration: underline;
}

.post-content a:hover {
    text-decoration: none;
}

.post-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #6b7280;
}

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

/* Tags */
.post-tags {
    margin: 3rem 0;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.post-tags i {
    color: #6b7280;
}

.post-tags .tag {
    background: #f3f4f6;
    color: #4b5563;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Author Bio */
.author-bio {
    background: #f9fafb;
    border-radius: 12px;
    padding: 2rem;
    margin: 3rem 0;
    display: flex;
    gap: 1.5rem;
}

.author-bio-avatar img,
.author-avatar-bio-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-avatar-bio-placeholder {
    background: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2rem;
}

.author-bio-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.author-bio-content p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.author-bio-social {
    display: flex;
    gap: 1rem;
}

.author-bio-social a {
    color: #3b82f6;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.author-bio-social a:hover {
    opacity: 0.8;
}

/* Related Posts */
.related-posts {
    margin: 4rem 0;
}

.related-posts h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #1f2937;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.related-post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.related-post-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
}

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

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

.related-post-content {
    padding: 1.25rem;
}

.related-post-content h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.related-post-content h3 a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-content h3 a:hover {
    color: #3b82f6;
}

.related-post-content p {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.related-post-date {
    color: #9ca3af;
    font-size: 0.8125rem;
}

/* Back to Blog */
.back-to-blog {
    text-align: center;
    margin-top: 4rem;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #2563eb;
    transform: translateX(-4px);
}

/* Dark Theme */
body[data-theme="dark"] .post-title {
    color: #f3f4f6;
}

body[data-theme="dark"] .author-name {
    color: #f3f4f6;
}

body[data-theme="dark"] .post-meta {
    border-top-color: #374151;
    border-bottom-color: #374151;
}

body[data-theme="dark"] .post-content {
    color: #d1d5db;
}

body[data-theme="dark"] .post-content h2,
body[data-theme="dark"] .post-content h3 {
    color: #f3f4f6;
}

body[data-theme="dark"] .post-content code {
    background: #374151;
    color: #f472b6;
}

body[data-theme="dark"] .post-tags .tag {
    background: #374151;
    color: #d1d5db;
}

body[data-theme="dark"] .author-bio {
    background: #1f2937;
}

body[data-theme="dark"] .author-bio-content h3 {
    color: #f3f4f6;
}

body[data-theme="dark"] .author-bio-content p {
    color: #9ca3af;
}

body[data-theme="dark"] .related-posts h2 {
    color: #f3f4f6;
}

body[data-theme="dark"] .related-post-card {
    background: #1f2937;
}

body[data-theme="dark"] .related-post-content h3 a {
    color: #f3f4f6;
}

body[data-theme="dark"] .related-post-content p {
    color: #9ca3af;
}

/* Responsive */
@media (max-width: 768px) {
    .post-title {
        font-size: 2rem;
    }

    .post-excerpt {
        font-size: 1.125rem;
    }

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .post-content {
        font-size: 1rem;
    }

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

    .author-bio {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .author-bio-social {
        justify-content: center;
    }

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