/* CSS Variables for consistent theming */
:root {
    /* Color Palette */
    --primary: #8bc34a; /* Lime green accent */
    --primary-dark: #689f38;
    --secondary: #1e293b; /* Dark slate */
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --border-color: #e2e8f0;
    --ad-bg: #0f172a;
    
    /* Typography */
    --font-sys: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    
    /* Spacing & Layout */
    --container-width: 1200px;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    --radius: 8px;
}

/* Base Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sys);
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--secondary);
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary);
}

p {
    margin-bottom: var(--spacing-md);
}

/* Layout Utility */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* --- Header & Navigation --- */
.top-bar {
    background-color: var(--primary);
    color: white;
    padding: var(--spacing-sm) 0;
    font-size: 0.875rem;
    text-align: center;
}

.main-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.main-nav {
    display: flex;
    gap: var(--spacing-lg);
}

.main-nav a {
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
}

.nav-actions {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary);
}

.btn-ad {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
}

/* --- Article Header --- */
.article-header {
    margin-bottom: var(--spacing-lg);
}

.article-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.category-tag {
    background: var(--primary);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.social-share {
    display: flex;
    gap: 0.5rem;
    margin-bottom: var(--spacing-lg);
}

.social-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.2s;
}
.social-icon:hover { transform: translateY(-2px); }
.bg-fb { background: #1877F2; }
.bg-tw { background: #1DA1F2; }
.bg-in { background: #0A66C2; }
.bg-pi { background: #E60023; }
.bg-wa { background: #25D366; }
.bg-link { background: var(--text-muted); }

/* --- Hero Image --- */
.hero-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: var(--spacing-xl);
}

/* --- Main Content Layout --- */
.content-layout {
    /* REMOVED SIDEBAR: Removed grid definition to let content fill full container width */
    display: block; 
    margin-bottom: var(--spacing-xl);
}

/* Article Body styling */
.article-body {
    background: var(--bg-surface);
    padding: var(--spacing-lg);
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.article-body h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.article-body h3 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
}

.article-body ul, .article-body ol {
    margin-bottom: var(--spacing-md);
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

/* Responsive Blockquote */
blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    background: var(--bg-body);
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--secondary);
    font-size: 1.1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* Responsive Table */
.table-responsive {
    overflow-x: auto;
    margin: 2rem 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--bg-body);
    font-weight: 600;
    color: var(--secondary);
}

tr:last-child td { border-bottom: none; }
tr:nth-child(even) { background-color: #fcfcfc; }

/* Tags */
.article-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.tag {
    background: var(--bg-body);
    color: var(--text-main);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}
.tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* --- Author Box --- */
.author-box {
    display: flex;
    gap: 1.5rem;
    background: var(--bg-body);
    padding: 2rem;
    border-radius: var(--radius);
    margin: 3rem 0;
    align-items: center;
    border: 1px solid var(--border-color);
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    margin-bottom: 0.25rem;
}

.author-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* --- Comments Section --- */
.comments-section {
    margin: 3rem 0;
}

.comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    margin-bottom: 1rem;
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-submit:hover { background: var(--primary-dark); }

/* --- Related Posts Grid --- */
.related-posts {
    margin-top: 4rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.card {
    background: var(--bg-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.card-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--secondary);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-col p, .footer-col a {
    color: #94a3b8;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
}
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a:hover { color: var(--primary); }

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #334155;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-surface);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    .main-nav.show {
        display: flex;
    }
    .mobile-menu-btn {
        display: block;
    }
    .article-title {
        font-size: 2rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .author-box {
        flex-direction: column;
        text-align: center;
    }
}