/* MNetWork Remote CMS - Lightweight Stylesheet */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --theme-color: #2563eb;
    --theme-dark: #1d4ed8;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-alt: #f9fafb;
    --border-color: #e5e7eb;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.1);
    --shadow-lg: 0 4px 12px rgba(0,0,0,.1);
    --max-width: 1100px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--text-color);
    background: var(--bg-color);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--theme-color); text-decoration: none; transition: color .2s; }
a:hover { color: var(--theme-dark); }

img { max-width: 100%; height: auto; }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

/* === Header === */
.site-header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--header-pad) 1.25rem;
    gap: 1rem;
}

.site-branding { display: flex; flex-direction: column; }
.site-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
}
.site-title:hover { color: var(--theme-color); }
.site-tagline { font-size: .85rem; color: var(--text-light); }

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: .4rem .65rem;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: .25rem;
}
.main-nav a {
    display: block;
    padding: .45rem .85rem;
    border-radius: var(--radius);
    color: var(--text-color);
    font-size: .9rem;
    font-weight: 500;
    transition: background .2s, color .2s;
}
.main-nav a:hover {
    background: var(--bg-alt);
    color: var(--theme-color);
}

/* === Main Content === */
.site-main { flex: 1; padding: 2.5rem 0; }

.content-area { display: block; }
.content-area.has-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2.5rem;
}

/* === Blog Listing === */
.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.post-card {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}
.post-card:last-child { border-bottom: none; }

.post-card .post-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: .35rem;
    line-height: 1.35;
}
.post-card .post-title a { color: var(--text-color); }
.post-card .post-title a:hover { color: var(--theme-color); }

.post-date {
    display: inline-block;
    font-size: .8rem;
    color: var(--text-light);
    margin-bottom: .5rem;
}

.post-excerpt {
    color: var(--text-light);
    font-size: .95rem;
    margin-bottom: .65rem;
    line-height: 1.6;
}

.read-more {
    font-size: .875rem;
    font-weight: 600;
    color: var(--theme-color);
}
.read-more:hover { text-decoration: underline; }

.no-posts { color: var(--text-light); font-style: italic; }

/* === Single Post / Page === */
.single-post, .single-page, .static-home { max-width: 760px; }

.single-post .post-header { margin-bottom: 1.5rem; }
.single-post .post-title, .single-page .page-title, .static-home h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: .5rem;
}

.entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
}
.entry-content h2 { font-size: 1.5rem; margin: 1.5rem 0 .75rem; font-weight: 600; }
.entry-content h3 { font-size: 1.25rem; margin: 1.25rem 0 .65rem; font-weight: 600; }
.entry-content p { margin-bottom: 1rem; }
.entry-content ul, .entry-content ol { margin: 1rem 0 1rem 1.5rem; }
.entry-content li { margin-bottom: .35rem; }
.entry-content blockquote {
    border-left: 4px solid var(--theme-color);
    padding: .75rem 1.25rem;
    margin: 1.25rem 0;
    background: var(--bg-alt);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-light);
}
.entry-content img { border-radius: var(--radius); margin: 1rem 0; }
.entry-content a { text-decoration: underline; }

.post-footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
.back-link { font-weight: 500; font-size: .9rem; }

/* === 404 === */
.content-404 { text-align: center; padding: 4rem 1rem; }
.content-404 h1 { font-size: 4rem; color: var(--theme-color); margin-bottom: .5rem; }
.content-404 p { color: var(--text-light); margin-bottom: 1.5rem; font-size: 1.1rem; }
.content-404 a {
    display: inline-block;
    padding: .65rem 1.5rem;
    background: var(--theme-color);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 600;
    transition: background .2s;
}
.content-404 a:hover { background: var(--theme-dark); }

/* === Sidebar === */
.sidebar { position: sticky; top: 5rem; align-self: start; }

.widget {
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}
.widget-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .65rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--theme-color);
}
.widget-content { font-size: .9rem; line-height: 1.6; color: var(--text-light); }
.widget-content a { color: var(--theme-color); }
.widget-content ul { list-style: none; }
.widget-content li { padding: .25rem 0; }

/* === Footer === */
.site-footer {
    background: var(--text-color);
    color: #d1d5db;
    padding: 2rem 0 1rem;
    margin-top: auto;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.footer-widget .widget-title {
    color: #fff;
    border-bottom-color: var(--theme-color);
    margin-bottom: .5rem;
    padding-bottom: .4rem;
}
.footer-widget .widget-content { color: #9ca3af; }
.footer-widget .widget-content a { color: #93c5fd; }
.footer-widget .widget-content a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    font-size: .85rem;
    text-align: center;
    color: #9ca3af;
}

/* === Tags === */
.post-tags {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-alt);
    border-radius: var(--radius);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    font-size: .9rem;
}
.tag-link, .tag-cloud a {
    display: inline-block;
    padding: .25rem .75rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-color);
    font-size: .85rem;
    font-weight: 500;
    transition: all .2s;
}
.tag-link:hover, .tag-cloud a:hover {
    background: var(--theme-color);
    color: #fff;
    border-color: var(--theme-color);
    transform: translateY(-1px);
}

.tag-archive .archive-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--theme-color);
}
.tag-description { color: var(--text-light); font-size: 1.1rem; margin-top: .5rem; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: .5rem; }

/* === Responsive === */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-color);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        padding: .5rem;
        display: none;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; }
    .main-nav a { padding: .65rem 1rem; }
    
    .content-area.has-sidebar {
        grid-template-columns: 1fr;
    }
    .sidebar { position: static; }
}
