/* CSS Reset and Base Styles */
:root {
    --brand-blue: #0052CC;
    --brand-blue-dark: #003E99;
    --brand-yellow: #FFC400;
    --text-primary: #172B4D;
    --text-secondary: #5E6C84;
    --bg-light: #FFFFFF;
    --bg-secondary: #F4F5F7;
    --border-color: #DFE1E6;
    --font-global: 'Open Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-global);
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.7;
    scroll-behavior: smooth;
}

html {
    scroll-padding-top: 100px;
}

/* General Utility Styles */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}
.section-padding {
    padding: 80px 0;
}
main > .section-padding:first-child {
    padding-top: 40px;
}
.section-bg {
    background-color: var(--bg-secondary);
}

h1, h2, h3, h4 {
    font-family: var(--font-global);
    color: var(--text-primary);
    font-weight: 700;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: var(--font-global);
    font-size: 0.95rem;
    text-align: center;
}

.btn-primary {
    background-color: var(--brand-blue);
    color: var(--bg-light);
    box-shadow: 0 4px 15px rgba(0, 82, 204, 0.15);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background-color: var(--brand-blue-dark);
    box-shadow: 0 6px 20px rgba(0, 82, 204, 0.2);
}

/* Article Layout */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 4rem;
    align-items: flex-start;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}
.breadcrumb a:hover {
    color: var(--brand-blue);
}
.breadcrumb .separator {
    margin: 0 0.5rem;
}

/* Article Styles */
.article-header {
    margin-bottom: 2rem;
}
.article-header h1 {
    font-size: 2.8rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}
.article-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.article-meta span {
    margin-right: 1.5rem;
}
.article-meta .fa-solid {
    margin-right: 0.5rem;
}
.article-featured-image {
    margin-bottom: 2rem;
}
.article-featured-image img {
    width: 100%;
    border-radius: 12px;
}
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}
.article-content p {
    margin-bottom: 1.5rem;
}
.article-content h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}
.article-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.article-content blockquote {
    margin: 2rem 0;
    padding-left: 1.5rem;
    border-left: 4px solid var(--brand-blue);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Sidebar & TOC */
.article-sidebar {
    position: sticky;
    top: 100px;
}
.toc-box {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.toc-box h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}
.toc-box ol, .toc-box ul {
    list-style-position: inside;
    padding-left: 0;
}
.toc-box li {
    margin-bottom: 0.75rem;
}
.toc-box li a {
    color: var(--text-secondary);
    font-weight: 600;
    text-decoration: none;
}
.toc-box li a:hover {
    color: var(--brand-blue);
}

.mobile-toc {
    display: none;
}

/* Related Posts */
.related-posts {
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    padding-top: 4rem;
}
.related-posts h2 {
    text-align: left;
    font-size: 2rem;
    margin-bottom: 2rem;
}
.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}
.related-post-card {
    background-color: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.related-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.related-post-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.related-post-content {
    padding: 14px 1.5rem 1.5rem; /* Reduced top padding */
}
.related-post-content h3 {
    font-size: 1.15rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}
.related-post-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
}
.related-post-content h3 a:hover {
    color: var(--brand-blue);
}
.related-post-content p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}
.related-post-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-center { display: none; }
    .nav-toggle { display: block; }
    .article-layout {
        grid-template-columns: 1fr;
    }
    .article-sidebar {
        display: none; /* Hide desktop sidebar */
    }
    .mobile-toc {
        display: block; /* Show mobile sidebar */
        margin-bottom: 2rem;
    }
}
@media (max-width: 768px) {
    .article-header h1 { font-size: 2rem; }
    .related-posts-grid { grid-template-columns: 1fr; }
}
