.blog-header {
    background: var(--bg-light);
    padding: 3rem 0;
    text-align: center;
}

.blog-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.blog-content {
    padding: 3rem 0;
}

.blog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
}

.blog-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    /* Hide scrollbar but keep functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari, and Opera */
.blog-sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar-widget {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin-bottom: 1rem;
}

.widget-toggle {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-light);
    transition: transform 0.3s;
}

.widget-content {
    overflow: visible;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.widget-content.collapsed {
    max-height: 0 !important;
    opacity: 0;
    overflow: hidden;
}

.search-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
}

.category-list {
    list-style: none;
}

.category-list > li {
    margin-bottom: 0.5rem;
}

.category-list a {
    color: var(--text-light);
    text-decoration: none;
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.category-list a:hover,
.category-list a.active {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Count badges */
.count {
    font-size: 0.85em;
    color: var(--text-light);
    font-weight: normal;
}

.category-list a:hover .count,
.category-list a.active .count {
    color: var(--primary-color);
}

/* Category with subcategories */
.category-item {
    margin-bottom: 0.5rem;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.expand-icon {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-light);
    transition: transform 0.3s;
}

/* Nested subcategory list */
.subcategory-list {
    list-style: none;
    margin-top: 0.5rem;
    margin-left: 0;
    padding-left: 1rem;
    border-left: 2px solid var(--bg-light);
}

.subcategory-list li {
    margin-bottom: 0.25rem;
}

.subcategory-list a {
    padding: 0.4rem 0.5rem;
    font-size: 0.9rem;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    line-height: 1.8;
}

.tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: var(--bg-light);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s;
    font-weight: 500;
}

.tag:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.tag.active {
    background: var(--primary-color);
    color: var(--white);
}

.tag-count {
    font-size: 0.85em;
    opacity: 0.8;
}

.blog-main {
    min-height: 400px;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* Pagination */
.pagination {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
}

.pagination-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination-ellipsis {
    padding: 0.5rem;
    color: var(--text-light);
}

@media (max-width: 968px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
    }
}
