/* ================================ */
/* CATEGORY PAGE STYLES             */
/* ================================ */

/* Back Link */
.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

.back-link:hover {
    color: var(--secondary);
}

/* Breadcrumb */
.breadcrumb {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.breadcrumb-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.breadcrumb a {
    color: var(--text-muted);
    transition: color var(--transition);
}

.breadcrumb a:hover {
    color: var(--secondary);
}

.breadcrumb-sep {
    color: var(--text-muted);
}

.breadcrumb-current {
    color: var(--text);
    font-weight: 500;
}

/* Category Header */
.category-header {
    padding: 60px 24px;
    text-align: center;
}

.category-header-inner {
    max-width: 800px;
    margin: 0 auto;
}

.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--bg);
    border-radius: 50%;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.category-header h1 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.category-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 16px;
}

.category-stats {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Category Content */
.category-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Articles List */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.article-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    padding: 24px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.article-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.article-row-image {
    height: 160px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.article-row-icon {
    color: var(--text-muted);
    opacity: 0.5;
}

.article-row-content {
    display: flex;
    flex-direction: column;
}

.article-row-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.breaking-tag {
    background: var(--secondary);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.article-row h2 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
}

.article-row h2 a {
    transition: color var(--transition);
}

.article-row h2 a:hover {
    color: var(--secondary);
}

.article-row-excerpt {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 12px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-row-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.article-row-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.author-avatar-small {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
}

.article-row-stats {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.article-row-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* No Articles */
.no-articles {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text);
    transition: all var(--transition);
}

.pagination-btn:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.pagination-numbers {
    display: flex;
    gap: 4px;
}

.pagination-numbers a,
.pagination-current {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.pagination-numbers a {
    color: var(--text);
}

.pagination-numbers a:hover {
    background: var(--bg-dark);
}

.pagination-current {
    background: var(--secondary);
    color: white;
    font-weight: 600;
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 80px 24px;
}

.error-icon {
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 24px;
}

.error-page h1 {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: 12px;
}

.error-page p {
    color: var(--text-light);
    margin-bottom: 24px;
}

/* ================================ */
/* DARK MODE FIXES                  */
/* ================================ */
html.dark-mode .breadcrumb {
    background: #111827;
    border-bottom-color: #1e293b;
}

html.dark-mode .category-header {
    background: transparent;
}

html.dark-mode .category-header h1 {
    color: #f1f5f9;
}

html.dark-mode .category-icon {
    background: #374151;
}

html.dark-mode .article-row {
    background: #1f2937;
}

html.dark-mode .article-row:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

html.dark-mode .article-row h2 a {
    color: #f1f5f9;
}

html.dark-mode .article-row h2 a:hover {
    color: var(--secondary);
}

html.dark-mode .article-row-excerpt {
    color: #94a3b8;
}

html.dark-mode .pagination-btn {
    background: #1f2937;
    border-color: #374151;
    color: #e2e8f0;
}

html.dark-mode .pagination-btn:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

html.dark-mode .pagination-numbers a {
    color: #e2e8f0;
}

html.dark-mode .pagination-numbers a:hover {
    background: #374151;
}

html.dark-mode .pagination {
    border-top-color: #374151;
}

/* Responsive */
@media (max-width: 768px) {
    .category-header h1 {
        font-size: 2rem;
    }

    .article-row {
        grid-template-columns: 1fr;
    }

    .article-row-image {
        height: 180px;
    }

    .pagination {
        flex-wrap: wrap;
    }
}
