/* =========================================================
   Archives – categorieën, tags, CPT-archieven
   ========================================================= */

/* ---------------------------------------------------------
   1. Archive header
--------------------------------------------------------- */

.archive-header {
    margin: 2rem 0 2.5rem;
}

.archive-title {
    margin: 0 0 0.5rem;
    font-size: 1.9rem;
    font-weight: 800;
}

.archive-description,
.archive-header .lead {
    max-width: 70ch;
    color: var(--muted);
    line-height: 1.6;
}

/* ---------------------------------------------------------
   2. Term navigation (filters / pills)
--------------------------------------------------------- */

.archive .term-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.archive .term-nav a {
    display: inline-block;
    padding: 0.4rem 0.75rem;

    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;

    background: #f3f4f6;
    color: var(--card-fg);
    text-decoration: none;

    transition: background-color .2s ease;
}

.archive .term-nav a:hover {
    background: #e5e7eb;
}

/* ---------------------------------------------------------
   3. Archive grid
--------------------------------------------------------- */

.archive .post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* ---------------------------------------------------------
   4. Archive item (card)
--------------------------------------------------------- */

.archive-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;

    border: 1px solid var(--ring);
    box-shadow: var(--shadow-sm);

    display: flex;
    flex-direction: column;

    transition: transform .2s ease, box-shadow .2s ease;
}

.archive-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* image */
.archive-item__media {
    aspect-ratio: 16 / 9;
    background: #e5e7eb;
}

.archive-item__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* content */
.archive-item__body {
    padding: 1rem 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* meta */
.archive-item__meta {
    font-size: 0.8rem;
    color: var(--muted);
}

/* title */
.archive-item__title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.archive-item__title a {
    color: inherit;
    text-decoration: none;
}

.archive-item__title a:hover {
    text-decoration: underline;
}

/* excerpt */
.archive-item__excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--muted);
}

/* ---------------------------------------------------------
   5. Pagination
--------------------------------------------------------- */

.archive-pagination {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin: 2.5rem 0;
}

.archive-pagination .page-numbers {
    padding: 0.45rem 0.75rem;
    border-radius: 8px;

    background: var(--card-bg);
    border: 1px solid var(--ring);
    color: var(--card-fg);

    font-weight: 600;
    text-decoration: none;
}

.archive-pagination .page-numbers.current {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.archive-pagination a.page-numbers:hover {
    background: #f3f4f6;
}

/* ---------------------------------------------------------
   6. Sidebar (sticky on desktop)
--------------------------------------------------------- */

@media (min-width: 1024px) {
    .archive #secondary.widget-area {
        position: sticky;
        top: 24px;
    }
}

/* ---------------------------------------------------------
   7. Dark mode tweaks
--------------------------------------------------------- */

@media (prefers-color-scheme: dark) {

    .archive .term-nav a {
        background: rgba(255, 255, 255, 0.06);
    }

    .archive .term-nav a:hover {
        background: rgba(255, 255, 255, 0.12);
    }

    .archive-item__media {
        background: #1f2933;
    }

}