/* ========================================
   Article Page Specific Styles
   ======================================== */

/* Article Layout */
.article-page {
    padding-top: 80px;
}

.article-header {
    background: var(--bg-secondary);
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--border-color);
}

.article-header-content {
    max-width: 900px;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--primary);
    transition: var(--transition);
}

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

/* Article Title */
.article-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Article Meta */
.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

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

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    font-size: 1.5rem;
}

.author-info strong {
    display: block;
    color: var(--text-primary);
}

.meta-divider {
    color: var(--text-muted);
    margin: 0 0.5rem;
}

.article-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.tag {
    padding: 0.375rem 0.875rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Featured Image */
.featured-image {
    width: 100%;
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

/* Article Layout - Sidebar + Content */
.article-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
}

/* Sidebar */
.article-sidebar {
    position: relative;
}

.sidebar-sticky {
    position: sticky;
    top: 100px;
}

/* Table of Contents */
.toc-widget,
.share-widget {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.toc-widget h3,
.share-widget h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc-link {
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    border-left: 3px solid transparent;
    transition: var(--transition);
    font-size: 0.9rem;
}

.toc-link:hover,
.toc-link.active {
    color: var(--primary);
    border-left-color: var(--primary);
    background: var(--bg-tertiary);
    border-radius: 0 8px 8px 0;
}

/* Share Buttons */
.share-buttons-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.share-btn {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: left;
    transition: var(--transition);
    font-size: 0.9rem;
}

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

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

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

.share-btn.copy {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.share-btn:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

/* Sidebar Ad */
.ad-sidebar {
    margin: 0;
}

.ad-sidebar .ad-placeholder {
    min-height: 600px;
}

/* Main Article Content */
.article-content {
    max-width: 800px;
    min-width: 0;
}

.article-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.article-content .lead {
    font-size: 1.375rem;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.article-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 3rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0 1.5rem 2rem;
    line-height: 2;
}

.article-content li {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.article-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article-content code {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    color: var(--primary);
}

/* Code Blocks */
.code-block {
    background: #1e293b;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
}

.code-header {
    background: #0f172a;
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
}

.code-header span {
    color: #94a3b8;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

.copy-code-btn {
    padding: 0.375rem 0.875rem;
    background: #334155;
    color: #e2e8f0;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.copy-code-btn:hover {
    background: #475569;
}

.code-block pre {
    padding: 1.5rem;
    margin: 0;
    overflow-x: auto;
}

.code-block code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #e2e8f0;
    background: none;
    padding: 0;
}

/* Info Boxes */
.tip-box,
.warning-box {
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    border-left: 4px solid;
}

.tip-box {
    background: rgba(74, 222, 128, 0.1);
    border-left-color: #4ade80;
}

.warning-box {
    background: rgba(251, 191, 36, 0.1);
    border-left-color: #fbbf24;
}

.tip-box strong,
.warning-box strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

/* Ad Placements */
.ad-article-header,
.ad-article-footer {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.ad-in-article {
    margin: 3rem 0;
}

/* Article Footer */
.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.article-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.article-tags-footer {
    color: var(--text-secondary);
}

.article-tags-footer strong {
    color: var(--text-primary);
    margin-right: 0.5rem;
}

/* Author Bio */
.author-bio {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 3rem 0;
    display: flex;
    gap: 2rem;
}

.author-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.author-details h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.author-details strong {
    display: block;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.author-details p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

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

.author-social a {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
}

.author-social a:hover {
    background: var(--primary);
    color: white;
}

/* Related Articles */
.related-articles {
    margin: 4rem 0;
}

.related-articles h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

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

.related-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.related-image {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-content {
    padding: 1.5rem;
}

.related-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

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

.related-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.related-link {
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
}

.related-link:hover {
    transform: translateX(5px);
    display: inline-block;
}

/* Comments Section */
.comments-section {
    margin: 4rem 0;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

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

.comment-form {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 3rem;
}

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

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    margin-bottom: 1rem;
}

.comment-form textarea {
    resize: vertical;
}

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

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

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

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

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

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

.comment-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.comment-reply {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.comment-reply:hover {
    text-decoration: underline;
}

.load-more-comments {
    display: block;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        display: none;
    }

    .article-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .article-title {
        font-size: 2rem;
    }

    .article-content p,
    .article-content li {
        font-size: 1rem;
    }

    .article-content .lead {
        font-size: 1.125rem;
    }

    .featured-image {
        height: 250px;
    }

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

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

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

    .article-actions {
        flex-wrap: wrap;
    }
}