/* ========================================
   Blog Post Page Styles
   ======================================== */

/* Breadcrumb Navigation */
.breadcrumb-section {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 5rem;
}

.breadcrumb-section .container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.breadcrumb-section a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-section a:hover {
    color: var(--accent-secondary);
}

.breadcrumb-section span {
    color: var(--text-muted);
}

.breadcrumb-section span:last-child {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Blog Post Header */
.blog-post {
    background-color: white;
}

.blog-post-list {
    background-color: white;
}

.post-header {
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.03), rgba(108, 92, 231, 0.03));
    border-bottom: 1px solid var(--border-color);
    padding: 4rem 0;
}

.post-header .container {
    max-width: 1200px;
}

.post-meta-top {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.post-category {
    display: inline-block;
    background-color: rgba(45, 212, 191, 0.1);
    color: var(--accent-primary);
    padding: 0.375rem 0.875rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

.post-date,
.reading-time {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.post-date::before,
.reading-time::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background-color: var(--text-muted);
    border-radius: 50%;
    margin-right: 0.75rem;
}

.post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .post-title {
        font-size: 3rem;
    }
}

.post-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.author-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.author-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Post Content Layout */
.post-content {
    padding: 4rem 0;
}

@media (min-width: 1024px) {
    .post-content .container {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 3rem;
        max-width: 1200px;
    }
}

.post-body {
    max-width: 800px;
}

/* Post Body Typography */
.post-body p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.post-body h2 {
    font-size: 1.875rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.post-body h3 {
    font-size: 1.25rem;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.post-body ul,
.post-body ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.post-body li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.post-body code {
    background-color: #f5f5f5;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #d63384;
}

.post-body pre {
    background-color: #f5f5f5;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

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

/* Blockquotes */
.post-body blockquote {
    border-left: 4px solid var(--accent-primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background-color: rgba(45, 212, 191, 0.03);
    padding: 1.5rem;
    padding-left: 1.5rem;
    border-left: 4px solid var(--accent-primary);
}

.post-body blockquote p {
    color: var(--text-secondary);
    font-style: italic;
    margin: 0;
}

/* Post Sidebar */
.post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (max-width: 1023px) {
    .post-sidebar {
        margin-top: 3rem;
        padding-top: 3rem;
        border-top: 1px solid var(--border-color);
    }
}

.sidebar-widget {
    background-color: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.sidebar-widget h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 0.75rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.share-btn:hover {
    color: white;
    border-color: transparent;
}

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

.share-linkedin:hover {
    background-color: #0a66c2;
}

.share-email:hover {
    background-color: var(--accent-primary);
}

/* Related Posts */
.related-posts {
    list-style: none;
}

.related-posts li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.related-posts li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.related-posts a {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.related-posts a:hover {
    color: var(--accent-secondary);
}

.related-date {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    background-color: white;
    border: 1px solid var(--border-color);
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.tag:hover {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* Post Navigation */
.post-navigation {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 3rem 0;
}

.post-navigation .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 767px) {
    .post-navigation .container {
        grid-template-columns: 1fr;
    }
}

.nav-post {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    background-color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-post:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-0.25rem);
}

.nav-post.prev-post {
    text-align: left;
}

.nav-post.next-post {
    text-align: right;
}

.nav-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-title {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.4;
}

.nav-post:hover .nav-title {
    color: var(--accent-primary);
}

/* Comments Section */
.comments-section {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0;
}

.comments-section .container {
    max-width: 800px;
}

.comments-section h2 {
    margin-bottom: 2rem;
}

.comments-list {
    margin-bottom: 3rem;
}

.comment {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.comment:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.comment-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.comment-header strong {
    color: var(--text-primary);
}

.comment-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.comment-content p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.comment-reply {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.comment-reply:hover {
    color: var(--accent-secondary);
}

/* Comment Form */
.comment-form {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.comment-form h3 {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.comment-form .btn {
    width: 100%;
}

/* Syntax Highlighting */
.hljs {
    background-color: #f5f5f5 !important;
    color: #2c3e50 !important;
}

.hljs-string {
    color: #27ae60 !important;
}

.hljs-number {
    color: #e74c3c !important;
}

.hljs-literal {
    color: #e74c3c !important;
}

.hljs-attr {
    color: #3498db !important;
}

.hljs-title {
    color: #2980b9 !important;
}

.hljs-function {
    color: #2980b9 !important;
}

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

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

    .post-body h3 {
        font-size: 1.125rem;
    }

    .post-body pre {
        padding: 1rem;
        font-size: 0.875rem;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}
