/* ============================================
   REVVED UP CARS - CATEGORY FILTER BAR
   Version: 4.0.0 - Full fix
   ============================================ */

/* Filter bar container */
.category-filter-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 16px !important;
    margin-bottom: 20px !important;
    background: #ffffff !important;
    border-radius: 10px !important;
    position: sticky !important;
    top: 70px !important;
    z-index: 100 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08) !important;
    border: 1px solid #e8ebe8 !important;
}

[data-theme="dark"] .category-filter-bar {
    background: #1E1E1E !important;
    border-color: #333 !important;
}

/* Filter label */
.category-filter-bar .filter-label {
    color: #666 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-right: 8px !important;
}

/* Filter pills */
.category-filter-bar .filter-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 14px !important;
    background: #f5f5f5 !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
    border-radius: 18px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

.category-filter-bar .filter-pill:hover {
    border-color: #C5D631 !important;
    background: #fafcf0 !important;
}

.category-filter-bar .filter-pill.active {
    background: #C5D631 !important;
    color: #1a1f1a !important;
    border-color: #C5D631 !important;
    font-weight: 600 !important;
}

/* Count badge */
.category-filter-bar .filter-pill .count {
    font-size: 11px !important;
    background: rgba(0,0,0,0.1) !important;
    padding: 2px 6px !important;
    border-radius: 10px !important;
}

/* Dark mode */
[data-theme="dark"] .category-filter-bar .filter-pill {
    background: #2a2a2a !important;
    color: #ccc !important;
    border-color: #444 !important;
}

[data-theme="dark"] .category-filter-bar .filter-pill:hover {
    border-color: #C5D631 !important;
}

[data-theme="dark"] .category-filter-bar .filter-pill.active {
    background: #C5D631 !important;
    color: #1a1f1a !important;
}

/* Hidden articles */
.article-card.hidden {
    display: none !important;
}

/* No results */
.no-results-message {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    padding: 40px 20px !important;
    color: #888 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .category-filter-bar {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        top: 60px !important;
    }
    
    .category-filter-bar::-webkit-scrollbar {
        display: none !important;
    }
    
    .category-filter-bar .filter-pill {
        flex-shrink: 0 !important;
    }
}




/* ============================================
   POPULAR ARTICLES - MAGAZINE STYLE v2.1
   Fix: Compact layout, override theme defaults
   ============================================ */

/* Override widget container for popular section */
.sidebar-widget.popular-widget {
    background: #ffffff !important;
    border-radius: 12px !important;
    padding: 20px !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important;
    border: 1px solid #e8ebe8 !important;
}

[data-theme="dark"] .sidebar-widget.popular-widget {
    background: #1E1E1E !important;
    border-color: #333 !important;
}

.popular-widget .widget-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    margin: 0 0 16px 0 !important;
    padding: 0 0 12px 0 !important;
    border-bottom: 2px solid #e0e5e0 !important;
    color: #1a1f1a !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    position: relative !important;
}

.popular-widget .widget-title::after {
    content: "" !important;
    position: absolute !important;
    bottom: -2px !important;
    left: 0 !important;
    width: 50px !important;
    height: 2px !important;
    background: #C5D631 !important;
}

[data-theme="dark"] .popular-widget .widget-title {
    color: #ffffff !important;
    border-color: #3a3a3a !important;
}

/* Articles list - compact */
.popular-articles-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Individual article card - horizontal layout */
.popular-article-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 12px !important;
    text-decoration: none !important;
    padding: 8px !important;
    margin: 0 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.popular-article-card:hover {
    background: rgba(197, 214, 49, 0.1) !important;
    transform: translateX(3px) !important;
}

[data-theme="dark"] .popular-article-card:hover {
    background: rgba(197, 214, 49, 0.15) !important;
}

/* Image container - fixed size */
.popular-article-image {
    position: relative !important;
    flex-shrink: 0 !important;
    width: 72px !important;
    height: 72px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #f0f0f0 !important;
}

.popular-article-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s ease !important;
    display: block !important;
}

.popular-article-card:hover .popular-article-image img {
    transform: scale(1.08) !important;
}

/* Rank badge - small overlay on image */
.popular-rank {
    position: absolute !important;
    top: 4px !important;
    left: 4px !important;
    width: 20px !important;
    height: 20px !important;
    background: linear-gradient(135deg, #C5D631 0%, #a8b82a 100%) !important;
    color: #1a1f1a !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25) !important;
    z-index: 2 !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* Content area - compact text */
.popular-article-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 3px !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Category label - small tag */
.popular-category {
    display: inline-block !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #C5D631 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    line-height: 1.2 !important;
}

/* Article title */
.popular-title {
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: #1a1f1a !important;
    margin: 0 !important;
    padding: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    transition: color 0.2s ease !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.popular-article-card:hover .popular-title {
    color: #3d4a3d !important;
}

[data-theme="dark"] .popular-title {
    color: #f0f0f0 !important;
}

[data-theme="dark"] .popular-article-card:hover .popular-title {
    color: #ffffff !important;
}

/* Meta info - date */
.popular-meta {
    font-size: 11px !important;
    color: #888 !important;
    font-weight: 400 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    line-height: 1.2 !important;
}

[data-theme="dark"] .popular-meta {
    color: #777 !important;
}

/* Remove any pseudo-element dividers that may cause issues */
.popular-article-card::before,
.popular-article-card::after {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .popular-article-image {
        width: 64px !important;
        height: 64px !important;
    }
    
    .popular-title {
        font-size: 12px !important;
    }
}

@media (max-width: 768px) {
    .popular-articles-list {
        gap: 10px !important;
    }
    
    .popular-article-image {
        width: 60px !important;
        height: 60px !important;
    }
}
