/* Blog Article Styles */

.blog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
}

/* Table of Contents - Fixed Sidebar */
.toc-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.toc-sidebar::-webkit-scrollbar {
    width: 4px;
}

.toc-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.toc-sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

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

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 0.75rem;
}

.toc-list a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.toc-list a:hover {
    color: var(--primary-color);
    background: rgba(255, 107, 53, 0.1);
    padding-left: 1rem;
}

.toc-list a.active {
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(255, 107, 53, 0.1);
    padding-left: 1rem;
}

/* Article Content */
.article-content {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
}

.entry-title {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.article-meta {
    color: var(--text-light);
    font-size: 0.9rem;
}

.the_content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.the_content p {
    margin-bottom: 1.5rem;
}

.the_content h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    scroll-margin-top: 100px;
}

.the_content h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
    scroll-margin-top: 100px;
}

.the_content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s;
}

.the_content a:hover {
    border-bottom-color: var(--primary-color);
}

.the_content ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.the_content li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.the_content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.download-box {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.download-box a {
    color: white;
    font-weight: 600;
    text-decoration: underline;
}

.toc-sublist {
    list-style: none;
    padding-left: 1.2rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.toc-sublist li {
    margin-bottom: 0.5rem;
}

.toc-sublist a {
    font-size: 0.85rem;
    color: var(--text-light);
    opacity: 0.8;
}

.toc-sublist a:hover,
.toc-sublist a.active {
    opacity: 1;
}

main {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.intro {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.intro h2 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    border-top: 4px solid #667eea;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.category-card h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.category-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .toc-sidebar {
        position: relative;
        top: 0;
        max-height: none;
        margin-bottom: 2rem;
    }

    .article-content {
        padding: 2rem;
    }

    .entry-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .blog-container {
        padding: 1rem;
    }

    .article-content {
        padding: 1.5rem;
    }

    .entry-title {
        font-size: 1.75rem;
    }

    .the_content {
        font-size: 1rem;
    }

    .the_content h2 {
        font-size: 1.5rem;
    }

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