.blog-layout {
    display: flex;
    min-height: 100vh;
    background: #f9f9f9;
    font-family: 'Segoe UI', sans-serif;
}

/* Sidebar */
.blog-sidebar {
    width: 250px;
    background: #fff;
    border-right: 1px solid #ddd;
    padding: 20px 20px;
    overflow-y: auto;
}

.blog-sidebar h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #6A1B9A;
}

.blog-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-category-list li {
    margin-bottom: 10px;
}

.blog-category-list a {
    display: block;
    padding: 12px 15px;
    background: #f2f2f2;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    transition: background 0.3s;
}

.blog-category-list a:hover,
.blog-category-list a.active {
    background: #d3c1e5;
    font-weight: bold;
}

/* Main content */
.blog-main {
    flex-grow: 1;
    padding: 30px;
}

.blog-main h1 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
}

.blog-post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.blog-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    transition: transform 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
}

.blog-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.blog-card h3 {
    font-size: 16px;
    margin: 12px;
    color: #0c5cac;
    text-align: center;
}

.blog-card a {
    text-decoration: none;
    color: inherit;
}

@media (max-width: 768px) {
    .blog-layout {
        flex-direction: column;
    }

    .blog-sidebar {
        width: 90%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
}
