/* =============================================
   SINGLE POST STYLES
   Loaded only on single post pages
   ============================================= */

/* ----- Post Container ----- */
.site-header {
    max-width: 100%;
    background: #ffffff;
    padding: 2rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
	margin-bottom:20px;
}

/* ----- Post Header ----- */
.post-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 1.5rem;
}
.post-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1e293b;
}
.post-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 0.9rem;
}
.post-meta i {
    margin-right: 0.3rem;
}
.post-meta a {
    color: #3b82f6;
}

/* ----- Featured Image ----- */
.post-featured-image {
    margin: 2rem 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.post-featured-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

/* ----- Post Content (Typography) ----- */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #1e293b;
}
.post-content p {
    margin-bottom: 1.5rem;
}
.post-content h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
}
.post-content h3 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}
.post-content ul, .post-content ol {
    margin: 1rem 0 1rem 2rem;
}
.post-content li {
    margin-bottom: 0.5rem;
}
.post-content blockquote {
    background: #f8fafc;
    border-left: 4px solid #3b82f6;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    border-radius: 12px;
}
.post-content pre {
    background: #1e293b;
    color: #f1f5f9;
    padding: 1rem;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 0.9rem;
}
.post-content code {
    background: #e2e8f0;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    font-size: 0.9rem;
}
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1rem 0;
}

/* ----- Author Box ----- */
.author-box {
    background: #f8fafc;
    border-radius: 20px;
    padding: 1.5rem;
    margin: 2rem 0;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}
.author-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}
.author-info p {
    margin-bottom: 0;
    color: #64748b;
}

/* ----- Related Posts ----- */
.related-posts {
    margin: 3rem 0;
}
.related-posts h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border-left: 5px solid #3b82f6;
    padding-left: 1rem;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}
.related-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}
.related-card:hover {
    transform: translateY(-5px);
}
.related-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}
.related-card .card-content {
    padding: 1rem;
}
.related-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.related-card h4 a {
    color: black;
}
.related-card .date {
    font-size: 0.75rem;
    color: #64748b;
}

/* ----- Comments Section ----- */
.comments-area {
    margin-top: 3rem;
    background: #ffffff;
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid #e2e8f0;
}
.comments-title {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}
.comment-list {
    list-style: none;
    margin-bottom: 2rem;
}
.comment {
    background: #f8fafc;
    border-radius: 20px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}
.comment-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.comment-author .avatar {
    border-radius: 50%;
    width: 45px;
    height: 45px;
}
.comment-author .fn {
    font-weight: 600;
    font-size: 1.1rem;
}
.comment-metadata a {
    font-size: 0.8rem;
    color: #64748b;
}
.comment-content {
    margin-top: 0.5rem;
    line-height: 1.6;
}
.comment-reply-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    background: #3b82f6;
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
}
.comment-form {
    margin-top: 2rem;
}
.comment-form input, .comment-form textarea {
    width: 100%;
    padding: 0.8rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-family: inherit;
}
.comment-form .submit {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
}

/* ----- Dark Mode Overrides ----- */
body.dark-mode .single-post,
body.dark-mode .related-card,
body.dark-mode .comments-area {
    background: #1e293b !important;
    border-color: #334155 !important;
}
body.dark-mode .post-header h1,
body.dark-mode .post-title a,
body.dark-mode .post-content,
body.dark-mode .comment-author .fn,
body.dark-mode .author-info h3 {
    color: #f1f5f9 !important;
}
body.dark-mode .post-meta,
body.dark-mode .comment-metadata a,
body.dark-mode .related-card .date {
    color: #94a3b8 !important;
}
body.dark-mode .author-box {
    background: #0f172a !important;
}
body.dark-mode .post-content blockquote {
    background: #0f172a !important;
    border-left-color: #3b82f6;
}
body.dark-mode .comment {
    background: #0f172a !important;
}
body.dark-mode .comment-form input,
body.dark-mode .comment-form textarea {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}
body.dark-mode .related-card h4 a {
    color: white;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    .single-post {
       
       
    }
    .post-header h1 {
        font-size: 1.8rem;
    }
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
}