/* ============================================
   REVVED UP CARS - GLOBAL TEMPLATE STYLES
   Covers: page, archive, search, 404, comments
   Version: 1.0.0
   ============================================ */

/* ============================================
   SHARED VARIABLES
   ============================================ */
:root {
    --revved-accent: #C5D631;
    --revved-accent-dark: #9eb029;
    --revved-dark: #1E1E1E;
    --revved-text: #333333;
    --revved-text-light: #666666;
    --revved-border: #e5e5e5;
    --revved-bg-light: #f9f9f9;
}

/* ============================================
   PAGE STYLES
   ============================================ */
.revved-page {
    padding: 50px 0;
}

.revved-page .revved-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--revved-dark);
    line-height: 1.2;
    margin: 0;
}

.page-featured-image {
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
}

.page-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   ARCHIVE / SEARCH SHARED STYLES
   ============================================ */
.revved-archive,
.revved-search {
    padding: 40px 0;
}

.revved-archive .revved-container,
.revved-search .revved-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Archive/Search Header */
.archive-header,
.search-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--revved-border);
}

.archive-label,
.search-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--revved-accent-dark);
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.archive-title,
.search-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--revved-dark);
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.archive-description,
.archive-count,
.search-count {
    color: var(--revved-text-light);
    font-size: 16px;
    margin: 0;
}

/* Author Archive Header */
.author-archive-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    text-align: left;
}

.author-archive-header .author-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.author-archive-header .author-bio {
    color: var(--revved-text-light);
    font-size: 15px;
    margin: 10px 0 0;
    max-width: 500px;
}

/* Search Again Form */
.search-again {
    margin-top: 25px;
}

.search-form-large {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.search-input-large {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 16px;
    outline: none;
}

.search-btn-large {
    background: var(--revved-accent);
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    color: var(--revved-dark);
    transition: background 0.25s ease;
}

.search-btn-large:hover {
    background: var(--revved-accent-dark);
}

/* Archive/Search Layout */
.archive-layout,
.search-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 50px;
}

.archive-sidebar,
.search-sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

/* Article Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.article-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card-image {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .card-image img {
    transform: scale(1.05);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
}

.card-content {
    padding: 20px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.card-category {
    background: var(--revved-accent);
    color: var(--revved-dark);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 3px;
    text-decoration: none;
}

.card-date {
    font-size: 12px;
    color: var(--revved-text-light);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.card-title a {
    color: var(--revved-dark);
    text-decoration: none;
}

.card-title a:hover {
    color: var(--revved-accent-dark);
}

.card-excerpt {
    font-size: 14px;
    color: var(--revved-text-light);
    line-height: 1.6;
    margin: 0;
}

/* Search Results List */
.search-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-result-item {
    display: flex;
    gap: 20px;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: all 0.25s ease;
}

.search-result-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.result-image {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-content {
    flex: 1;
}

.result-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.result-type {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--revved-accent-dark);
}

.result-date {
    font-size: 12px;
    color: var(--revved-text-light);
}

.result-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.result-title a {
    color: var(--revved-dark);
    text-decoration: none;
}

.result-title a:hover {
    color: var(--revved-accent-dark);
}

.result-excerpt {
    font-size: 14px;
    color: var(--revved-text-light);
    line-height: 1.5;
    margin: 0 0 10px 0;
}

.result-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--revved-accent-dark);
    text-decoration: none;
}

.result-link:hover {
    text-decoration: underline;
}

/* Pagination */
.archive-pagination,
.search-pagination {
    margin-top: 40px;
    text-align: center;
}

.archive-pagination .nav-links,
.search-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.archive-pagination a,
.archive-pagination span,
.search-pagination a,
.search-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background: #ffffff;
    border: 1px solid var(--revved-border);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--revved-text);
    text-decoration: none;
    transition: all 0.25s ease;
}

.archive-pagination a:hover,
.search-pagination a:hover {
    background: var(--revved-accent);
    border-color: var(--revved-accent);
    color: var(--revved-dark);
}

.archive-pagination .current,
.search-pagination .current {
    background: var(--revved-accent);
    border-color: var(--revved-accent);
    color: var(--revved-dark);
}

/* No Posts/Results */
.no-posts,
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-posts i,
.no-results i {
    font-size: 60px;
    color: var(--revved-border);
    margin-bottom: 20px;
}

.no-posts h2,
.no-results h2 {
    font-size: 24px;
    color: var(--revved-dark);
    margin: 0 0 10px 0;
}

.no-posts p,
.no-results p {
    color: var(--revved-text-light);
    margin: 0 0 20px 0;
}

.btn-home {
    display: inline-block;
    background: var(--revved-accent);
    color: var(--revved-dark);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.25s ease;
}

.btn-home:hover {
    background: var(--revved-accent-dark);
}

.suggested-categories {
    margin-top: 30px;
}

.suggested-categories h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.category-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.category-btn {
    background: var(--revved-bg-light);
    color: var(--revved-text);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.category-btn:hover {
    background: var(--revved-accent);
    color: var(--revved-dark);
}

/* ============================================
   404 PAGE STYLES
   ============================================ */
.revved-404 {
    padding: 60px 0;
}

.revved-404 .revved-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

.error-content {
    text-align: center;
}

.error-icon {
    font-size: 80px;
    color: var(--revved-accent);
    margin-bottom: 20px;
}

.error-title {
    font-size: 120px;
    font-weight: 900;
    color: var(--revved-dark);
    line-height: 1;
    margin: 0;
}

.error-subtitle {
    font-size: 32px;
    font-weight: 700;
    color: var(--revved-dark);
    margin: 10px 0 20px;
}

.error-message {
    font-size: 18px;
    color: var(--revved-text-light);
    max-width: 500px;
    margin: 0 auto 30px;
}

.error-search {
    margin-bottom: 40px;
}

.search-form-404 {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.search-input-404 {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 16px;
    outline: none;
}

.search-btn-404 {
    background: var(--revved-accent);
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    color: var(--revved-dark);
}

.error-links {
    margin-bottom: 50px;
}

.error-links h3 {
    font-size: 18px;
    margin-bottom: 20px;
}

.link-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--revved-bg-light);
    color: var(--revved-dark);
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.link-btn:hover {
    background: var(--revved-accent);
}

.error-recent h3 {
    font-size: 18px;
    margin-bottom: 25px;
}

.error-recent .recent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.error-recent .recent-card {
    text-align: left;
}

.error-recent .recent-image {
    display: block;
    aspect-ratio: 16/10;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.error-recent .recent-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.error-recent .recent-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.error-recent .recent-title a {
    color: var(--revved-dark);
    text-decoration: none;
}

.error-recent .recent-title a:hover {
    color: var(--revved-accent-dark);
}

/* ============================================
   COMMENTS STYLES
   ============================================ */
.revved-comments {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--revved-border);
}

.comments-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--revved-dark);
    margin: 0 0 30px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list .comment {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--revved-bg-light);
    border-radius: 10px;
}

.comment-list .children {
    margin-left: 40px;
    margin-top: 20px;
    padding-left: 20px;
    border-left: 2px solid var(--revved-accent);
    list-style: none;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.comment-author img {
    border-radius: 50%;
}

.comment-author .fn {
    font-weight: 600;
    color: var(--revved-dark);
}

.comment-metadata {
    font-size: 12px;
    color: var(--revved-text-light);
    margin-bottom: 10px;
}

.comment-content p {
    margin: 0;
    line-height: 1.6;
}

.reply a {
    font-size: 13px;
    font-weight: 600;
    color: var(--revved-accent-dark);
    text-decoration: none;
}

.comments-closed {
    text-align: center;
    padding: 20px;
    background: var(--revved-bg-light);
    border-radius: 8px;
    color: var(--revved-text-light);
}

/* Comment Form */
.revved-comment-form .comment-reply-title {
    font-size: 22px;
    font-weight: 700;
    margin: 30px 0 20px;
}

.revved-comment-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.revved-comment-form input[type="text"],
.revved-comment-form input[type="email"],
.revved-comment-form input[type="url"],
.revved-comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--revved-border);
    border-radius: 6px;
    font-size: 15px;
    margin-bottom: 15px;
    transition: border-color 0.25s ease;
}

.revved-comment-form input:focus,
.revved-comment-form textarea:focus {
    outline: none;
    border-color: var(--revved-accent);
}

.revved-comment-form .submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--revved-accent);
    color: var(--revved-dark);
    font-size: 15px;
    font-weight: 600;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.25s ease;
}

.revved-comment-form .submit-btn:hover {
    background: var(--revved-accent-dark);
}

/* ============================================
   SIDEBAR WIDGET STYLES
   ============================================ */
.revved-sidebar .widget {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    margin-bottom: 25px;
}

.revved-sidebar .widget-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--revved-dark);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--revved-accent);
}

.revved-sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.revved-sidebar .widget li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--revved-border);
}

.revved-sidebar .widget li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.revved-sidebar .widget a {
    color: var(--revved-text);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.25s ease;
}

.revved-sidebar .widget a:hover {
    color: var(--revved-accent-dark);
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */
@media (max-width: 991px) {
    .archive-layout,
    .search-layout {
        grid-template-columns: 1fr;
    }
    
    .archive-sidebar,
    .search-sidebar {
        position: static;
    }
    
    .author-archive-header {
        flex-direction: column;
        text-align: center;
    }
    
    .error-recent .recent-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .revved-archive,
    .revved-search,
    .revved-page,
    .revved-404 {
        padding: 30px 0;
    }
    
    .archive-title,
    .search-title {
        font-size: 28px;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .error-title {
        font-size: 80px;
    }
    
    .error-subtitle {
        font-size: 24px;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .search-result-item {
        flex-direction: column;
    }
    
    .result-image {
        width: 100%;
        height: 180px;
    }
    
    .error-recent .recent-grid {
        grid-template-columns: 1fr;
    }
    
    .link-buttons {
        flex-direction: column;
        align-items: center;
    }
}
