:root {
    --e-blue: #002C55;
    --e-light-blue: #009FE3;
    --e-bg: #f4f4f4;
    --e-text: #222;
    --e-gray: #8c8c8c;
}

.erci-archive-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Open Sans', sans-serif; 
}

/* --- Toolbar --- */
.erci-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: #fff;
    padding: 20px;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--e-blue);
    align-items: center;
}

/* Suche nimmt verfügbaren Platz links */
.erci-search-wrap {
    flex: 1 1 250px; /* Wachsen, Schrumpfen, Basisbreite */
}

.erci-search-wrap input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    font-size: 16px;
    border-radius: 0;
    background: #f9f9f9;
}

/* Filter Gruppe rechts */
.erci-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 2 1 auto; /* Nimmt mehr Platz ein wenn nötig */
}

.erci-filter-group select {
    flex: 1 1 140px; /* Min Breite pro Select */
    padding: 12px 30px 12px 15px;
    background-color: var(--e-blue);
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px auto;
}

.erci-filter-group select:focus, 
.erci-search-wrap input:focus {
    outline: 2px solid var(--e-light-blue);
}

/* --- GRID LAYOUT --- */
.erci-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    width: 100%;
}

.erci-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    background: #fff;
    color: var(--e-gray);
    font-size: 1.1rem;
    border: 1px dashed #ccc;
}

/* --- CARD DESIGN --- */
.erci-item {
    background: #fff;
    border: 1px solid #eaeaea;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    height: 100%; /* Wichtig für gleiche Höhe */
}

.erci-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,44,85,0.15);
    border-color: var(--e-light-blue);
}

.erci-link-wrap {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.erci-thumb {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #eee;
}

.erci-date-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--e-light-blue);
    color: #fff;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

.erci-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.erci-meta {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--e-gray);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.erci-title {
    margin: 0 0 10px;
    font-size: 1.25rem;
    line-height: 1.35;
    color: var(--e-blue);
    font-weight: 700;
}

.erci-excerpt {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.erci-arrow {
    margin-top: auto;
    color: var(--e-blue);
    font-weight: bold;
    font-size: 1.5rem;
    text-align: right;
    line-height: 1;
}

/* --- UI Elements --- */
.erci-pagination-wrap {
    text-align: center;
    margin-top: 40px;
}

#erci-load-more {
    background: transparent;
    border: 2px solid var(--e-blue);
    color: var(--e-blue);
    padding: 12px 40px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

#erci-load-more:hover {
    background: var(--e-blue);
    color: #fff;
}

.erci-loader {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--e-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.fade-in { animation: fadeIn 0.5s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Mobile */
@media (max-width: 768px) {
    .erci-toolbar { flex-direction: column; align-items: stretch; }
    .erci-filter-group { flex-direction: column; }
    .erci-filter-group select { width: 100%; }
}