/**
 * news-filter.css
 * Volksbank Jade Weser Immobilien – Blog Kategorie-Filter
 *
 * Speichern unter: /assets/css/news-filter.css (im Child-Theme)
 *
 * Farbpalette orientiert am bestehenden Design:
 *   Orange-Akzent: #e8601c  (Volksbank-Orange)
 *   Dunkelgrau:    #333333
 *   Mittelgrau:    #666666
 *   Hellgrau:      #f2f2f2
 *   Rand:          #dddddd
 */

/* ============================================================
   WRAPPER
   ============================================================ */
.news_block {
    position: relative;
}

/* ============================================================
   FILTER-LEISTE
   ============================================================ */
.news_filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
}

/* ============================================================
   FILTER-BUTTONS
   ============================================================ */
.filter-btn {
    /* Reset */
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;

    /* Layout */
    display: inline-flex;
    align-items: center;
    padding: 9px 20px;
    border-radius: 2px;

    /* Typografie */
    font-size: 0.875rem;   /* 14px */
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;

    /* Standard-State */
    background-color: #f2f2f2;
    color: #333333;
    border: 2px solid transparent;

    /* Übergang */
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.1s ease;
}

/* Hover */
.filter-btn:hover {
    background-color: #e8e8e8;
    color: #e8601c;
    border-color: #e8601c;
}

/* Fokus (Accessibility) */
.filter-btn:focus-visible {
    outline: 3px solid #e8601c;
    outline-offset: 2px;
}

/* Aktiver Button */
.filter-btn.active {
    background-color: #e8601c;
    color: #ffffff;
    border-color: #e8601c;
}

.filter-btn.active:hover {
    background-color: #cf5519;
    border-color: #cf5519;
    color: #ffffff;
}

/* Klick-Feedback */
.filter-btn:active {
    transform: scale(0.97);
}

/* ============================================================
   BEITRAGS-GRID: Lade-Zustand
   ============================================================ */
.news_container {
    position: relative;
    transition: opacity 0.2s ease;
}

.news_container.is-loading {
    opacity: 0.45;
    pointer-events: none;
}

/* ============================================================
   LADE-OVERLAY
   ============================================================ */
.news_loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.news_loading[aria-hidden="false"] {
    opacity: 1;
}

/* Spinner */
.news_loading__spinner {
    display: block;
    width: 36px;
    height: 36px;
    border: 3px solid rgba(232, 96, 28, 0.25);
    border-top-color: #e8601c;
    border-radius: 50%;
    animation: vjwi-spin 0.7s linear infinite;
}

@keyframes vjwi-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   KEINE ERGEBNISSE
   ============================================================ */
.news_no_results {
    padding: 32px 0;
    color: #666666;
    font-size: 1rem;
    text-align: center;
    width: 100%;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .news_filter {
        gap: 8px;
    }

    .filter-btn {
        font-size: 0.8125rem; /* 13px */
        padding: 8px 14px;
    }
}
