/*--------------------------------------------------------------
# Archiv-Layout mit Sidebar
--------------------------------------------------------------*/

.archive-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2.5rem;
    align-items: start;
    margin-top: 2rem;
}

.archive-main {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}

.archive-sidebar {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: calc( 80px + 2rem );
}

.archive-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.archive-empty {
    color: var( --text-muted );
    padding: 2rem 0;
}


/*--------------------------------------------------------------
# Archiv-Eintrag
--------------------------------------------------------------*/

.archive-entry {
    display: flex;
    min-height: 200px;
    border-radius: var( --radius );
    box-shadow: var( --shadow-1 );
    overflow: hidden;
    margin: 0;
    transition: transform .2s ease;
}

.archive-entry:hover {
    transform: translateY( -4px );
}

.archive-entry__link {
    display: flex;
    flex-direction: row;      /* Bild links, Text rechts */
    flex: 1;
    text-decoration: none;
    color: inherit;
}

/* ── Bild ────────────────────────────────── */
.archive-entry__image {
    width: 240px;
    flex-shrink: 0;
    overflow: hidden;
}

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

/* ── Body ────────────────────────────────── */
.archive-entry__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding: 1.25rem 1.5rem;
}

/* Ohne Bild: crimson Akzent links */
.archive-entry__body:only-child {
    border-left: 3px solid var( --brand );
}

.archive-entry__date {
    font-family: var( --font-monospace );
    font-size: 0.8rem;
    color: var( --text-muted );
}

.archive-entry__title {
    font-family: var( --font-display );
    font-size: 1.15rem;
    line-height: 1.25;
    margin: 0.4rem 0 0 0;
    color: var( --text-muted );
    transition: color .2s ease;
}

.archive-entry:hover .archive-entry__title {
    color: var( --brand );
}

.archive-entry__text {
    font-size: 0.9rem;
    color: var( --text-muted );
    line-height: 1.55;
    margin: 0.6rem 0 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Schlagwörter in der Karte ───────────── */
.archive-entry__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 1rem;
}

.archive-entry__tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid var( --border-strong );
    border-radius: 999px;
    color: var( --text-muted );
    transition: border-color .15s, color .15s;
}

.archive-entry:hover .archive-entry__tag {
    border-color: var( --brand );
    color: var( --brand );
}


/*--------------------------------------------------------------
# Filter-Sidebar
--------------------------------------------------------------*/

.archive-filter {
    margin-bottom: 2rem;
}

.archive-filter__title {
    font-family: var( --font-display );
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var( --text-muted );
    margin: 0 0 0.85rem 0;
}

/* ── Suche ───────────────────────────────── */
.archive-search__row {
    display: flex;
    gap: 0.4rem;
}

input[type="search"].archive-search__input {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    border: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    border-radius: var( --radius );
    box-shadow: var( --shadow-invert-1 );
    background: none;
    font-family: var( --font-body );
    font-size: 0.88rem;
    color: var( --text-muted );
}

input[type="search"].archive-search__input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var( --brand );
}

.archive-search__btn {
    flex-shrink: 0;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var( --brand );
    color: #fff;
    border: none;
    border-radius: var( --radius );
    cursor: pointer;
    transition: background .15s;
}

.archive-search__btn:hover {
    background: var( --brand-dark );
}

/* ── Listen (Bereiche, Jahre) ────────────── */
.archive-filter__list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 2px solid var( --border );
}

.archive-filter__link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0 0.4rem 0.85rem;
    margin-left: -2px;
    border-left: 2px solid transparent;
    color: var( --text-muted );
    text-decoration: none;
    font-size: 0.88rem;
    transition: color .15s, border-color .15s;
}

.archive-filter__link:hover,
.archive-filter__link.is-active {
    color: var( --brand );
    border-left-color: var( --brand );
}

.archive-filter__link.is-active {
    font-weight: 600;
}

.archive-filter__count {
    font-size: 0.75rem;
    color: var( --text-muted );
}

/* ── Schlagwörter ────────────────────────── */
.archive-filter__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.archive-filter__tag {
    display: inline-block;
    font-size: 0.78rem;
    padding: 0.25rem 0.7rem;
    border: 1px solid var( --border-strong );
    border-radius: 999px;
    color: var( --text-muted );
    text-decoration: none;
    transition: border-color .15s, color .15s, background .15s;
}

.archive-filter__tag:hover {
    border-color: var( --brand );
    color: var( --brand );
}

.archive-filter__tag.is-active {
    background: var( --brand );
    border-color: var( --brand );
    color: #fff;
}

/* ── Reset ───────────────────────────────── */
.archive-filter__reset {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var( --text-muted );
    text-decoration: none;
    transition: color .15s;
}

.archive-filter__reset:hover {
    color: var( --brand );
}


/*--------------------------------------------------------------
# Paginierung
--------------------------------------------------------------*/

.pagination {
    margin-top: 3rem;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    border: 1px solid var( --border-strong );
    border-radius: var( --radius );
    color: var( --text-soft );
    text-decoration: none;
    font-size: 0.9rem;
    transition: border-color .15s, background .15s, color .15s;
}

.pagination .page-numbers:hover {
    border-color: var( --brand );
    color: var( --brand );
}

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

.pagination .page-numbers.dots {
    border: none;
    min-width: auto;
}


/*--------------------------------------------------------------
# Mobil
--------------------------------------------------------------*/

@media ( max-width: 900px ) {
    .archive-layout {
        grid-template-columns: 1fr;
    }

    .archive-main {
        grid-column: 1;
        grid-row: 2;
    }

    .archive-sidebar {
        grid-column: 1;
        grid-row: 1;
        position: static;
        padding: 1.25rem;
        background: var( --neutral-100 );
        border-radius: var( --radius );
    }

    .archive-filter:last-of-type {
        margin-bottom: 0;
    }
}

@media ( max-width: 600px ) {
    .archive-entry__link {
        flex-direction: column;
    }

    .archive-entry__image {
        width: 100%;
        height: 190px;
    }

    .archive-entry__body:only-child {
        border-left: none;
        border-top: 3px solid var( --brand );
    }
}