/* =========================================
   BLOG SYSTEM STYLES
   ========================================= */

/* Hero */
.blog-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #0f172a 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    margin-top: var(--nav-height);
}

.blog-hero h1 {
    font-size: 3.5rem;
    margin: 10px 0;
    color: white;
}

.sub-tag {
    color: var(--secondary);
    font-family: 'Oswald', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Filter Bar */
.blog-filter-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: var(--nav-height);
    z-index: 90;
}

.filter-flex {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.search-box {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.search-box input {
    padding: 10px 15px;
    border: none;
    outline: none;
    width: 250px;
    background: var(--bg-body);
    color: var(--text-main);
}

.search-btn {
    background: var(--secondary);
    border: none;
    padding: 0 15px;
    cursor: pointer;
    color: white;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: 0.4s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--secondary);
}

.b-img {
    height: 220px;
    width: 100%;
    object-fit: cover;
}

.b-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.b-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: block;
}

.b-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.b-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.b-link {
    color: var(--secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Single Post Layout */
.single-post-wrapper {
    margin-top: var(--nav-height);
}

.post-header-section {
    padding: 60px 0 40px;
    background: var(--bg-body);
    text-align: center;
}

.entry-title {
    font-size: 3rem;
    max-width: 900px;
    margin: 15px auto;
}

.meta-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.featured-img-box img {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 40px;
}

.content-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 50px;
}

.post-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-main);
}

.post-body h2 {
    font-size: 2rem;
    margin: 40px 0 20px;
    color: var(--primary);
    border-bottom: 2px solid var(--secondary);
    display: inline-block;
    padding-bottom: 5px;
}

.post-body p {
    margin-bottom: 20px;
}

.post-body ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.post-body li {
    margin-bottom: 10px;
    list-style: disc;
}

.sticky-widget {
    position: sticky;
    top: 120px;
}

.toc-list li {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.toc-list a {
    color: var(--text-muted);
}

.toc-list a:hover {
    color: var(--secondary);
}

/* Mobile */
@media (max-width: 992px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .post-sidebar {
        display: none;
    }

    /* Hide TOC on mobile for simplicity */
    .blog-hero h1,
    .entry-title {
        font-size: 2.2rem;
    }
}