/* Filtered Posts Container */
.zbs-filtered-posts-container {
    display: flex;
    gap: 30px;
    margin: 20px 0;
}

/* Posts Wrapper */
.zbs-posts-wrapper {
    flex: 1;
    min-width: 0;
}

/* Posts Grid */
.zbs-posts-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.zbs-posts-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.zbs-posts-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.zbs-posts-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Post Card */
.zbs-post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    opacity: 1;
    transform: translateY(0);
}

.zbs-post-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.zbs-post-card.hidden {
    display: none;
}

.zbs-post-card.filtering {
    opacity: 0;
    transform: translateY(20px);
}

/* Post Thumbnail */
.zbs-post-thumbnail {
    position: relative;
    overflow: hidden;
    background: #fff;
    /* aspect-ratio: 16 / 9; */
}

.zbs-post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.2s ease;
}

.zbs-post-card:hover .zbs-post-thumbnail img {
    transform: scale(1.03);
}

/* Post Content */
.zbs-post-content {
    padding: 20px;
}

.zbs-post-title {
    margin: 0 0 12px;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 600;
}

.zbs-post-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.zbs-post-title a:hover {
    color: #761cc0;
}

/* Post Excerpt */
.zbs-post-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Post Meta */
.zbs-post-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
}

.zbs-post-meta span {
    display: flex;
    align-items: center;
}

.zbs-post-meta span:before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: #ccc;
    border-radius: 50%;
    margin-right: 8px;
}

/* Post Tags */
.zbs-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.zbs-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f0f0f0;
    color: #666;
    font-size: 11px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Filter Sidebar */
.zbs-filter-sidebar {
    width: 250px;
    flex-shrink: 0;
}

.zbs-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.zbs-filter-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    padding-bottom: 10px;
    border-bottom: 2px solid #761cc0;
    flex: 1;
}

/* Toggle button - hidden on desktop */
.zbs-filter-toggle {
    display: none;
    background: #761cc0;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 14px 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-left: 15px;
}

.zbs-filter-toggle:hover {
    background: #5a1390;
}

.zbs-toggle-icon {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    position: relative;
    transition: transform 0.3s ease;
}

.zbs-toggle-icon::before,
.zbs-toggle-icon::after {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    position: absolute;
    transition: transform 0.3s ease;
}

.zbs-toggle-icon::before {
    top: -6px;
}

.zbs-toggle-icon::after {
    bottom: -6px;
}

/* Expanded state */
.zbs-filter-sidebar.expanded .zbs-toggle-icon {
    background: transparent;
}

.zbs-filter-sidebar.expanded .zbs-toggle-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.zbs-filter-sidebar.expanded .zbs-toggle-icon::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Tag Filters */
.zbs-tag-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zbs-tag-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: inherit;
}

.zbs-tag-filter:hover {
    background: #f8f9fa;
    border-color: #761cc0;
    color: #761cc0;
}

.zbs-tag-filter.active {
    background: #761cc0;
    color: #fff;
    border-color: #761cc0;
}

.zbs-tag-filter.active .zbs-tag-count {
    color: rgba(255, 255, 255, 0.8);
}

.zbs-tag-count {
    font-size: 12px;
    color: #999;
    margin-left: auto;
}

/* Pagination */
.zbs-pagination {
    margin-top: 40px;
}

.zbs-pagination ul {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.zbs-pagination li {
    margin: 0;
    list-style: none;
}

.zbs-pagination li::before {
    display: none;
    content: none;
}

.zbs-pagination a,
.zbs-pagination span {
    display: inline-block;
    min-width: 36px;
    height: 36px;
    line-height: 36px;
    padding: 0 12px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
}

.zbs-pagination a:hover {
    background: #761cc0;
    color: #fff;
    border-color: #761cc0;
}

.zbs-pagination .current {
    background: #761cc0;
    color: #fff;
    border-color: #761cc0;
}

.zbs-pagination .dots {
    border: none;
}

/* No Results Messages */
.zbs-no-posts,
.zbs-no-tags {
    padding: 20px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Loading State - Faster visual feedback */
.zbs-posts-grid.loading {
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

/* Responsive Design */
@media (max-width: 992px) {
    .zbs-filtered-posts-container {
        flex-direction: column;
    }

    .zbs-filter-sidebar {
        width: 100%;
        order: -1;
        margin-bottom: 30px;
    }

    .zbs-filter-header {
        margin-bottom: 0;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 8px;
    }

    .zbs-filter-title {
        border: none;
        padding: 0;
    }

    .zbs-filter-toggle {
        display: block;
    }

    .zbs-tag-filters {
        flex-direction: row;
        flex-wrap: wrap;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        margin-top: 15px;
    }

    .zbs-filter-sidebar.expanded .zbs-tag-filters {
        max-height: 2000px;
        transition: max-height 0.5s ease-in;
    }

    .zbs-tag-filter {
        flex: 0 1 calc(50% - 4px);
    }
}

@media (max-width: 768px) {
    .zbs-posts-grid.columns-3,
    .zbs-posts-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .zbs-post-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .zbs-posts-grid {
        grid-template-columns: 1fr !important;
    }

    .zbs-tag-filter {
        flex: 1 1 100%;
    }

    .zbs-filtered-posts-container {
        gap: 20px;
    }

    .zbs-post-content {
        padding: 15px;
    }
}