/* ============================================
   REVVED UP CARS - MODERN ARCHIVE PAGES
   Version: 1.0.0 - Complete Redesign
   ============================================ */

/* ============================================
   1. PAGE FOUNDATION
   ============================================ */

body.archive,
body.category,
body.tag,
body.search,
body.tax-post_tag {
    background-color: var(--revved-bg-primary, #f4f6f5) !important;
    color: var(--revved-text-primary, #1a1f1a) !important;
}

[data-theme="dark"] body.archive,
[data-theme="dark"] body.category,
[data-theme="dark"] body.tag {
    background-color: #121212 !important;
}

/* Main content area */
.archive .site-content,
.category .site-content,
.tag .site-content {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* ============================================
   2. PAGE HEADER / HERO SECTION
   ============================================ */

.archive-header,
.page-header,
.category-header,
.revved-breadcrumb-area {
    background: linear-gradient(135deg, #1a1f1a 0%, #2d332d 100%) !important;
    padding: 60px 20px !important;
    margin-bottom: 40px !important;
    text-align: center !important;
    position: relative !important;
}

.archive-header::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: url("data:image/svg+xml,%3Csvg width=60 height=60 viewBox=0 0 60 60 xmlns=http://www.w3.org/2000/svg%3E%3Cg fill=none fill-rule=evenodd%3E%3Cg fill=%23C5D631 fill-opacity=0.05%3E%3Cpath d=M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") !important;
    opacity: 0.5 !important;
    pointer-events: none !important;
}

/* Breadcrumb */
.archive-header .breadcrumb,
.revved-breadcrumb {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 14px !important;
    margin-bottom: 16px !important;
    position: relative !important;
    z-index: 1 !important;
}

.archive-header .breadcrumb a,
.revved-breadcrumb a {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
}

.archive-header .breadcrumb a:hover,
.revved-breadcrumb a:hover {
    color: #C5D631 !important;
}

/* Page Title */
.archive-header h1,
.archive-title,
.page-title,
h1.archive-title,
.revved-breadcrumb-area h1 {
    color: #ffffff !important;
    font-family: "DM Sans", sans-serif !important;
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    margin: 0 0 12px !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Page Description */
.archive-header .archive-description,
.archive-description,
.category-description,
.term-description {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 1.1rem !important;
    max-width: 600px !important;
    margin: 0 auto !important;
    line-height: 1.6 !important;
    position: relative !important;
    z-index: 1 !important;
}

/* ============================================
   3. FEATURED/HERO ARTICLES SECTION
   ============================================ */

.featured-posts-section,
.hero-posts,
.archive .revved-overlay-hero,
.category .revved-overlay-hero {
    display: grid !important;
    grid-template-columns: 1.5fr 1fr !important;
    gap: 20px !important;
    margin-bottom: 48px !important;
}

/* Featured article cards */
.featured-posts-section .featured-card,
.hero-posts .post-card,
.archive .revved-overlay-hero .revved-post-item {
    position: relative !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    aspect-ratio: 16/10 !important;
    max-height: 350px !important;
}

/* Main featured (larger) */
.featured-posts-section .featured-card:first-child,
.archive .revved-overlay-hero .revved-post-item:first-child {
    grid-row: span 2 !important;
    aspect-ratio: auto !important;
    max-height: 100% !important;
}

/* Featured image */
.featured-posts-section .featured-card img,
.archive .revved-overlay-hero .revved-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.4s ease !important;
}

.featured-posts-section .featured-card:hover img,
.archive .revved-overlay-hero .revved-post-item:hover img {
    transform: scale(1.05) !important;
}

/* Featured overlay gradient */
.featured-posts-section .featured-card::after,
.archive .revved-overlay-hero .revved-post-item::after {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        transparent 100%
    ) !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

/* Featured content */
.featured-posts-section .featured-content,
.archive .revved-overlay-hero .revved-post-content {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 24px !important;
    z-index: 2 !important;
    background: transparent !important;
}

/* Featured title */
.featured-posts-section .featured-title,
.archive .revved-overlay-hero .revved-post-title a {
    color: #ffffff !important;
    font-family: "DM Sans", sans-serif !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5) !important;
    display: block !important;
    margin-top: 10px !important;
}

.archive .revved-overlay-hero .revved-post-item:first-child .revved-post-title a {
    font-size: 1.75rem !important;
}

/* Featured meta */
.featured-posts-section .featured-meta,
.archive .revved-overlay-hero .revved-post-meta,
.archive .revved-overlay-hero .revved-post-meta a {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 13px !important;
}

/* ============================================
   4. POPULAR / TRENDING SECTION
   ============================================ */

.popular-section,
.trending-section,
.revved-popular-posts,
[class*="popular"],
.archive .widget_popular_posts {
    background: var(--revved-bg-card, #ffffff) !important;
    border-radius: 16px !important;
    padding: 32px !important;
    margin-bottom: 40px !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important;
}

[data-theme="dark"] .popular-section,
[data-theme="dark"] [class*="popular"] {
    background: #1E1E1E !important;
}

/* Section title */
.popular-section h2,
.popular-section h3,
.trending-section h2,
[class*="popular"] .section-title,
[class*="popular"] h2,
.revved-section-title h2,
.revved-section-title h2 {
    color: var(--revved-text-primary, #1a1f1a) !important;
    font-family: "DM Sans", sans-serif !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin: 0 0 24px !important;
    padding-bottom: 16px !important;
    border-bottom: 2px solid var(--revved-border-color, #e0e5e0) !important;
    position: relative !important;
}

[data-theme="dark"] .popular-section h2,
[data-theme="dark"] [class*="popular"] h2 {
    color: #ffffff !important;
    border-color: #3a3a3a !important;
}

/* Accent underline */
.popular-section h2::after,
[class*="popular"] h2::after {
    content: "" !important;
    position: absolute !important;
    bottom: -2px !important;
    left: 0 !important;
    width: 60px !important;
    height: 2px !important;
    background: #C5D631 !important;
}

/* Popular posts list */
.popular-section .post-list,
.popular-posts-list,
[class*="popular"] ul,
[class*="popular"] .posts-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Popular post item */
.popular-section .post-item,
.popular-posts-list li,
[class*="popular"] .post-item,
[class*="popular"] li {
    display: flex !important;
    gap: 16px !important;
    padding: 16px !important;
    background: var(--revved-bg-tertiary, #f8faf8) !important;
    border-radius: 12px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    align-items: center !important;
}

[data-theme="dark"] .popular-section .post-item,
[data-theme="dark"] [class*="popular"] li {
    background: #2a2a2a !important;
}

.popular-section .post-item:hover,
[class*="popular"] li:hover {
    transform: translateX(4px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
}

/* Popular post number */
.popular-section .post-number,
[class*="popular"] .number,
[class*="popular"] .rank {
    flex-shrink: 0 !important;
    width: 36px !important;
    height: 36px !important;
    background: #C5D631 !important;
    color: #1a1f1a !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 14px !important;
}

/* Popular post thumbnail */
.popular-section .post-thumb,
[class*="popular"] .thumb,
[class*="popular"] img {
    flex-shrink: 0 !important;
    width: 80px !important;
    height: 60px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    object-fit: cover !important;
}

/* Popular post title */
.popular-section .post-title,
.popular-section .post-title a,
[class*="popular"] .title,
[class*="popular"] .title a,
[class*="popular"] h4,
[class*="popular"] h4 a,
[class*="popular"] li a {
    color: var(--revved-text-primary, #1a1f1a) !important;
    font-family: "DM Sans", sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
    flex: 1 !important;
}

[data-theme="dark"] .popular-section .post-title a,
[data-theme="dark"] [class*="popular"] li a {
    color: #ffffff !important;
}

.popular-section .post-title a:hover,
[class*="popular"] li a:hover {
    color: #647c40 !important;
}

/* ============================================
   5. MAIN ARTICLE GRID
   ============================================ */

.archive-posts,
.posts-grid,
.archive .content-area,
.category .posts-container {
    margin-bottom: 48px !important;
}

/* Grid layout */
.archive-posts .posts-list,
.posts-grid,
.archive .grid-style-2,
.archive .grid-style-3,
.category .posts-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
}

/* Article card */
.archive-posts .post-card,
.posts-grid .post-item,
.archive .revved-post-item:not(.revved-overlay-hero .revved-post-item),
.category .revved-post-item {
    background: var(--revved-bg-card, #ffffff) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

[data-theme="dark"] .archive .revved-post-item:not(.revved-overlay-hero .revved-post-item) {
    background: #1E1E1E !important;
}

.archive-posts .post-card:hover,
.posts-grid .post-item:hover,
.archive .revved-post-item:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12) !important;
}

/* Card image */
.archive-posts .post-thumb,
.posts-grid .post-thumb,
.archive .revved-thumb {
    aspect-ratio: 16/10 !important;
    overflow: hidden !important;
}

.archive-posts .post-thumb img,
.posts-grid .post-thumb img,
.archive .revved-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.4s ease !important;
}

.archive .revved-post-item:hover .revved-thumb img {
    transform: scale(1.05) !important;
}

/* Card content */
.archive-posts .post-content,
.posts-grid .post-content,
.archive .revved-post-content {
    padding: 20px !important;
    background: var(--revved-bg-card, #ffffff) !important;
}

[data-theme="dark"] .archive .revved-post-content {
    background: #1E1E1E !important;
}

/* Category badge */
.archive .revved-category,
.archive .category-badge {
    display: inline-block !important;
    background: #C5D631 !important;
    color: #1a1f1a !important;
    padding: 4px 12px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 10px !important;
}

/* Article title */
.archive-posts .post-title,
.posts-grid .post-title,
.archive .revved-post-title {
    margin: 0 0 12px !important;
}

.archive-posts .post-title a,
.posts-grid .post-title a,
.archive .revved-post-title a {
    color: var(--revved-text-primary, #1a1f1a) !important;
    font-family: "DM Sans", sans-serif !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
}

[data-theme="dark"] .archive .revved-post-title a {
    color: #ffffff !important;
}

.archive .revved-post-title a:hover {
    color: #647c40 !important;
}

/* Article meta */
.archive-posts .post-meta,
.posts-grid .post-meta,
.archive .revved-post-meta {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 13px !important;
    color: var(--revved-text-muted, #7a847a) !important;
}

.archive .revved-post-meta a {
    color: var(--revved-text-muted, #7a847a) !important;
}

/* Article excerpt */
.archive .revved-post-excerpt,
.archive .post-excerpt {
    color: var(--revved-text-secondary, #5a645a) !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-top: 12px !important;
}

[data-theme="dark"] .archive .revved-post-excerpt {
    color: #b0b0b0 !important;
}

/* ============================================
   6. SIDEBAR WIDGETS
   ============================================ */

.archive .sidebar,
.category .sidebar,
.archive-sidebar {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
}

.archive .sidebar .widget,
.archive .widget {
    background: var(--revved-bg-card, #ffffff) !important;
    border-radius: 16px !important;
    padding: 24px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}

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

/* Widget title */
.archive .sidebar .widget-title,
.archive .widget-title {
    color: var(--revved-text-primary, #1a1f1a) !important;
    font-family: "DM Sans", sans-serif !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin: 0 0 20px !important;
    padding-bottom: 12px !important;
    border-bottom: 2px solid var(--revved-border-color, #e0e5e0) !important;
    position: relative !important;
}

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

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

/* Widget links */
.archive .sidebar .widget a {
    color: var(--revved-text-primary, #1a1f1a) !important;
}

[data-theme="dark"] .archive .sidebar .widget a {
    color: #e0e0e0 !important;
}

.archive .sidebar .widget a:hover {
    color: #647c40 !important;
}

/* ============================================
   7. CATEGORY PILLS / FILTER
   ============================================ */

.category-filter-bar,
.archive-filter,
.filter-pills {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-bottom: 32px !important;
    padding: 20px !important;
    background: var(--revved-bg-card, #ffffff) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
}

.category-filter-bar .filter-pill,
.filter-pills .pill,
.filter-pills a {
    padding: 8px 18px !important;
    background: var(--revved-bg-tertiary, #f0f2f0) !important;
    color: var(--revved-text-primary, #1a1f1a) !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    border: 1px solid transparent !important;
}

.category-filter-bar .filter-pill:hover,
.filter-pills a:hover {
    border-color: #C5D631 !important;
    color: #647c40 !important;
}

.category-filter-bar .filter-pill.active,
.filter-pills a.active {
    background: #C5D631 !important;
    color: #1a1f1a !important;
}

/* ============================================
   8. PAGINATION
   ============================================ */

.archive .pagination,
.archive .nav-links,
.archive-pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 48px 0 !important;
}

.archive .pagination a,
.archive .nav-links a,
.archive .page-numbers {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 16px !important;
    background: var(--revved-bg-card, #ffffff) !important;
    color: var(--revved-text-primary, #1a1f1a) !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
}

.archive .pagination a:hover,
.archive .nav-links a:hover,
.archive .page-numbers:hover {
    background: #C5D631 !important;
    color: #1a1f1a !important;
}

.archive .page-numbers.current,
.archive .pagination .current {
    background: #C5D631 !important;
    color: #1a1f1a !important;
}

/* ============================================
   9. RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1199px) {
    .archive-posts .posts-list,
    .archive .grid-style-2,
    .archive .grid-style-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 991px) {
    .featured-posts-section,
    .archive .revved-overlay-hero {
        grid-template-columns: 1fr !important;
    }
    
    .featured-posts-section .featured-card:first-child,
    .archive .revved-overlay-hero .revved-post-item:first-child {
        grid-row: span 1 !important;
    }
    
    .archive-header h1,
    .archive-title {
        font-size: 2rem !important;
    }
}

@media (max-width: 767px) {
    .archive-posts .posts-list,
    .archive .grid-style-2,
    .archive .grid-style-3,
    .posts-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .archive-header,
    .page-header {
        padding: 40px 16px !important;
    }
    
    .archive-header h1 {
        font-size: 1.75rem !important;
    }
    
    .popular-section,
    [class*="popular"] {
        padding: 20px !important;
    }
    
    .popular-section .post-item,
    [class*="popular"] li {
        padding: 12px !important;
    }
}

/* ============================================
   10. SPECIFIC PAGE OVERRIDES
   ============================================ */

/* Reviews page */
body.category-reviews .archive-header,
body.category-reviews .page-header {
    background: linear-gradient(135deg, #1a1f1a 0%, #2d3a2d 100%) !important;
}

/* Topics page */
body.page-template-topics .page-header {
    background: linear-gradient(135deg, #1a1f1a 0%, #2a2f35 100%) !important;
}

/* News page */
body.category-news .archive-header {
    background: linear-gradient(135deg, #1a1f1a 0%, #35302a 100%) !important;
}
