/* VX Classic Custom */
:root {
    --vx-border: #e5e7eb;
    --vx-text: #374151;
    --vx-bg: #ffffff;
    --vx-bg-alt: #f9fafb;
    --vx-accent: #2563eb;
    --vx-card-bg: #ffffff;
}

html.dark-mode {
    --vx-border: #374151;
    --vx-text: #e5e7eb;
    --vx-bg: #111827;
    --vx-bg-alt: #1f2937;
    --vx-accent: #3b82f6;
    --vx-card-bg: #1f2937;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--vx-text);
    background: var(--vx-bg);
    transition: background .3s, color .3s;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.vx-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--vx-card-bg);
    border: 1px solid var(--vx-border);
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    transition: transform .25s ease, box-shadow .25s ease, background .3s;
}

.vx-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,.15);
}

.vx-card__img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
}

html.dark-mode .vx-card__img {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    opacity: .7;
}

.vx-card__img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vx-card__img--placeholder::after {
    content: "📄";
    font-size: 2rem;
    opacity: .6;
}

.vx-card__body {
    padding: 20px;
}

.vx-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: .75rem;
}

.vx-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: .75rem;
}

.vx-badge--beginner { background: #dcfce7; color: #166534; }
.vx-badge--intermediate { background: #fef3c7; color: #92400e; }
.vx-badge--advanced { background: #fee2e2; color: #991b1b; }
.vx-badge--featured {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: #fff;
}

html.dark-mode .vx-badge--beginner { background: #14532d; color: #dcfce7; }
html.dark-mode .vx-badge--intermediate { background: #78350f; color: #fef3c7; }
html.dark-mode .vx-badge--advanced { background: #7f1d1d; color: #fee2e2; }

.vx-reading {
    color: #9ca3af;
}

.vx-topic {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 500;
    font-size: .75rem;
    text-decoration: none;
}

html.dark-mode .vx-topic {
    background: #334155;
    color: #e2e8f0;
}

.vx-topic:hover {
    background: #e2e8f0;
}

html.dark-mode .vx-topic:hover {
    background: #475569;
}

.vx-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 8px;
}

.vx-title a {
    text-decoration: none;
    color: inherit;
}

.vx-title a:hover {
    color: var(--vx-accent);
}

.vx-excerpt {
    font-size: .875rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 16px;
}

html.dark-mode .vx-excerpt {
    color: #9ca3af;
}

.vx-featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

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

.pagination .nav-links, .posts-navigation .nav-links {
    display: flex;
    gap: 8px;
    justify-content: center;
    list-style: none;
    padding: 0;
}

.pagination a, .pagination span, .posts-navigation a, .posts-navigation span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--vx-border);
    background: var(--vx-card-bg);
    color: var(--vx-text);
    text-decoration: none;
    font-size: .875rem;
    transition: all .2s;
}

.pagination a:hover, .posts-navigation a:hover {
    background: var(--vx-accent);
    color: #fff;
    border-color: var(--vx-accent);
}

.pagination .current, .posts-navigation .current {
    background: var(--vx-accent);
    color: #fff;
    border-color: var(--vx-accent);
}

/* Responsive */
@media (max-width: 768px) {
    .posts-grid { grid-template-columns: 1fr !important; }
    .vx-card__body { padding: 16px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr) !important; }
}