/* Simple Hashnode-Style Single Post CSS with Dark Mode */
/* Save as single.css in your theme directory */

/* Base Styles */
.single-post-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: #374151;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Article Header */
.article-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0 4rem;
    position: relative;
}

.header-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.breadcrumbs a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

.breadcrumbs a:hover {
    opacity: 0.8;
}

.breadcrumbs .separator {
    margin: 0 0.5rem;
    opacity: 0.7;
}

.breadcrumbs .current {
    opacity: 0.7;
}
.wp-block-separator {border-top: unset !important}
/* Article Title */
.article-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2rem;
    max-width: 100%;
}

/* Article Meta */
.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.author-details .author-name a {
    color: white;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.1rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.post-meta .separator {
    opacity: 0.6;
}

/* Article Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Featured Image */
.featured-image-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0 2rem 2rem;
    margin-top: -2rem;
}

.featured-image {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.featured-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Content */
.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Post Content Styling */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    color: #1f2937;
    font-weight: 700;
    margin: 2.5rem 0 1rem 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.post-content h2 {
    font-size: 2rem;
    padding-bottom: 0.5rem;
}

.post-content h3 {
    font-size: 1.5rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.post-content a:hover {
    border-bottom-color: #667eea;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.post-content blockquote {
    border-left: 4px solid #667eea;
    background: #f8fafc;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    transition: background-color 0.3s ease;
}

.post-content pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    font-size: 0.9rem;
}

.post-content code {
    background: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #e11d48;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

/* Article Footer */
.article-footer {
    border-top: 1px solid #e5e7eb;
    padding-top: 3rem;
    margin-top: 3rem;
    transition: border-color 0.3s ease;
}

/* Author Bio */
.author-bio {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    transition: background-color 0.3s ease;
}

.author-avatar-large img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #667eea;
}

.author-bio-content {
    flex: 1;
}

.author-bio-name {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
}

.author-bio-name a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s;
}

.author-bio-name a:hover {
    color: #667eea;
}

.author-bio-description {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.6;
    transition: color 0.3s ease;
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.nav-previous,
.nav-next {
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s;
    background: #ffffff;
}

.nav-next {
    text-align: right;
}

.nav-previous:hover,
.nav-next:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.1);
}

.nav-label {
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.nav-link {
    text-decoration: none;
    color: #1f2937;
    transition: color 0.3s ease;
}

.nav-link h4 {
    margin: 0.5rem 0 0 0;
    font-size: 1.1rem;
    line-height: 1.4;
    transition: color 0.2s;
}

.nav-link:hover h4 {
    color: #667eea;
}

/* Related Posts */
.related-posts {
    background: #f8fafc;
    padding: 4rem 0;
    margin-top: 4rem;
    transition: background-color 0.3s ease;
}

.related-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.related-posts h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 3rem;
    transition: color 0.3s ease;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.related-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.related-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-image {
    height: 200px;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-card:hover .related-image img {
    transform: scale(1.05);
}

.related-content {
    padding: 1.5rem;
}

.related-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.related-excerpt {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.related-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #9ca3af;
    transition: color 0.3s ease;
}

/* Comments Section */
.comments-section {
    max-width: 800px;
    margin: 4rem auto 0;
    padding: 0 2rem;
}

/* ========================================= */
/* DARK MODE STYLES */
/* ========================================= */

/* Data Attribute Dark Mode (Your Implementation) */
[data-theme="dark"] .single-post-container {
    background: #0f172a;
    color: #e2e8f0;
}

[data-theme="dark"] .post-content h1,
[data-theme="dark"] .post-content h2,
[data-theme="dark"] .post-content h3,
[data-theme="dark"] .post-content h4,
[data-theme="dark"] .post-content h5,
[data-theme="dark"] .post-content h6 {
    color: #f1f5f9;
}

[data-theme="dark"] .post-content blockquote {
    background: #1e293b;
    border-left-color: #667eea;
    color: #e2e8f0;
}

[data-theme="dark"] .post-content code {
    background: #1e293b;
    color: #f472b6;
}

[data-theme="dark"] .post-content a {
    color: #60a5fa;
}

[data-theme="dark"] .post-content a:hover {
    border-bottom-color: #60a5fa;
}

[data-theme="dark"] .article-footer {
    border-top-color: #334155;
}

[data-theme="dark"] .author-bio {
    background: #1e293b;
}

[data-theme="dark"] .author-bio-name a {
    color: #f1f5f9;
}

[data-theme="dark"] .author-bio-name a:hover {
    color: #60a5fa;
}

[data-theme="dark"] .author-bio-description {
    color: #94a3b8;
}

[data-theme="dark"] .nav-previous,
[data-theme="dark"] .nav-next {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .nav-previous:hover,
[data-theme="dark"] .nav-next:hover {
    border-color: #60a5fa;
    box-shadow: 0 4px 20px rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .nav-label {
    color: #94a3b8;
}

[data-theme="dark"] .nav-link {
    color: #f1f5f9;
}

[data-theme="dark"] .nav-link:hover h4 {
    color: #60a5fa;
}

[data-theme="dark"] .related-posts {
    background: #1e293b;
}

[data-theme="dark"] .related-posts h2 {
    color: #f1f5f9;
}

[data-theme="dark"] .related-card {
    background: #0f172a;
    border: 1px solid #334155;
}

[data-theme="dark"] .related-card:hover {
    border-color: #475569;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

[data-theme="dark"] .related-title {
    color: #f1f5f9;
}

[data-theme="dark"] .related-excerpt {
    color: #94a3b8;
}

[data-theme="dark"] .related-meta {
    color: #64748b;
}

/* Comments section dark mode */
[data-theme="dark"] .comments-section {
    color: #e2e8f0;
}

/* WordPress comment form dark mode */
[data-theme="dark"] .comment-form input,
[data-theme="dark"] .comment-form textarea {
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .comment-form input:focus,
[data-theme="dark"] .comment-form textarea:focus {
    border-color: #60a5fa;
    outline: none;
}

[data-theme="dark"] .comment-form label {
    color: #94a3b8;
}

/* WordPress comments dark mode */
[data-theme="dark"] .comment-body {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

[data-theme="dark"] .comment-author .fn a {
    color: #f1f5f9;
}

[data-theme="dark"] .comment-meta {
    color: #94a3b8;
}

[data-theme="dark"] .comment-content {
    color: #e2e8f0;
}

/* Fallback for system dark mode preference */
@media (prefers-color-scheme: dark) {
    /* Only apply if no data-theme is set */
    body:not([data-theme]) .single-post-container {
        background: #0f172a;
        color: #e2e8f0;
    }

    body:not([data-theme]) .post-content h1,
    body:not([data-theme]) .post-content h2,
    body:not([data-theme]) .post-content h3,
    body:not([data-theme]) .post-content h4,
    body:not([data-theme]) .post-content h5,
    body:not([data-theme]) .post-content h6 {
        color: #f1f5f9;
    }

    body:not([data-theme]) .post-content blockquote {
        background: #1e293b;
        border-left-color: #667eea;
        color: #e2e8f0;
    }

    body:not([data-theme]) .post-content code {
        background: #1e293b;
        color: #f472b6;
    }

    body:not([data-theme]) .author-bio {
        background: #1e293b;
    }

    body:not([data-theme]) .related-posts {
        background: #1e293b;
    }

    body:not([data-theme]) .related-card {
        background: #0f172a;
        border: 1px solid #334155;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
	html {
    margin-top: 0px !important;
	}
    .article-title {
        font-size: 2rem;
    }

    .header-container,
    .article-content {
        padding: 0 1rem;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .featured-image-container {
        padding: 0 1rem 2rem;
    }

    .author-bio {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .post-navigation {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .nav-next {
        text-align: left;
    }

    .related-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.5rem;
    }

    .article-header {
        padding: 1.5rem 0 3rem;
    }

    .post-content {
        font-size: 1rem;
    }

    .related-posts h2 {
        font-size: 2rem;
    }
}