/* =====================================================
   Article Page - Additional Styles
   ===================================================== */

.container-article {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* =====================================================
   Article Header
   ===================================================== */
.article-header {
    padding: calc(80px + 4rem) 0 3rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.article-header-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.article-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.article-main-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.article-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0;
}

/* =====================================================
   Article Layout
   ===================================================== */
.article-content-section {
    padding: var(--spacing-xl) 0;
}

.article-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
    align-items: start;
}

/* =====================================================
   Table of Contents Sidebar
   ===================================================== */
.toc-sidebar {
    position: sticky;
    top: 100px;
}

.toc-sticky {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
}

/* Sidebar Author Info */
.sidebar-author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-author-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.sidebar-author-details {
    display: flex;
    flex-direction: column;
}

.sidebar-author-details strong {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.sidebar-author-details span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Sidebar Article Meta */
.sidebar-article-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.meta-item i {
    color: var(--primary);
    width: 16px;
}

.toc-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

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

.toc-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-left: 2px solid transparent;
    transition: all var(--transition-fast);
}

.toc-nav a:hover,
.toc-nav a.active {
    color: var(--primary);
    border-left-color: var(--primary);
    padding-left: 1rem;
}

.share-buttons {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.share-buttons h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.share-btns {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.share-btn:hover {
    background: var(--primary);
    color: var(--bg-primary);
    transform: translateY(-3px);
}

/* =====================================================
   Article Main Content
   ===================================================== */
.article-main {
    max-width: 800px;
}

.article-featured-image {
    margin-bottom: 3rem;
    border-radius: 16px;
    overflow: hidden;
}

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

.article-featured-image figcaption {
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
}

/* Article Body Typography */
.article-body {
    line-height: 1.8;
    color: var(--text-secondary);
}

.article-body section {
    margin-bottom: 3rem;
}

.article-body h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    scroll-margin-top: 100px;
}

.article-body h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    scroll-margin-top: 100px;
}

.article-body h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-body p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

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

.article-body ul {
    list-style: disc;
}

.article-body ol {
    list-style: decimal;
}

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

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

/* Info Boxes */
.info-box {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(0, 153, 255, 0.1);
    border: 1px solid rgba(0, 153, 255, 0.3);
    border-left: 4px solid var(--secondary);
    border-radius: 12px;
    margin: 2rem 0;
}

.info-box-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.info-box-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.info-box-content p {
    margin: 0;
    font-size: 1rem;
}

.highlight-box {
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    margin: 2rem 0;
}

.highlight-box h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Code Blocks */
.code-block {
    margin: 2rem 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.code-language {
    font-family: var(--font-code);
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
}

.code-copy {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.code-copy:hover {
    background: var(--primary);
    color: var(--bg-primary);
}

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

.code-block code {
    font-family: var(--font-code);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.tool-card {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
    transition: all var(--transition-normal);
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.tool-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--bg-primary);
}

.tool-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.tool-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* =====================================================
   Article Tags
   ===================================================== */
.article-tags {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.article-tags h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

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

.author-bio img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--primary);
    flex-shrink: 0;
}

.author-bio-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.author-title {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

.author-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

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

.author-social a {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.author-social a:hover {
    background: var(--primary);
    color: var(--bg-primary);
    transform: translateY(-3px);
}

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

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

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

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

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

.related-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.related-card:hover img {
    transform: scale(1.1);
}

.related-content {
    padding: 1.5rem;
}

.related-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.related-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

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

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

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

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

.comment-form textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
    transition: border-color var(--transition-fast);
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.comment-form input {
    padding: 1rem 1.5rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.comment-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.comment {
    display: flex;
    gap: 1.5rem;
}

.comment img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

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

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

.comment-content > p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.comment-actions {
    display: flex;
    gap: 1.5rem;
}

.comment-actions button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.comment-actions button:hover {
    background: var(--bg-card);
    color: var(--primary);
}

/* =====================================================
   Responsive Design
   ===================================================== */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    
    .toc-sidebar {
        position: static;
        order: -1;
    }
    
    .toc-sticky {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    
    .author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .author-bio img {
        margin: 0 auto;
    }
    
    .author-social {
        justify-content: center;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .toc-sticky {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .comment {
        flex-direction: column;
    }
    
    .comment img {
        margin: 0 auto;
    }
}
