/* AJAX News Teasers – Frontend */
.ajax-news-section.is-loading .ajax-news-results {
    opacity: .45;
    pointer-events: none;
    transition: opacity .2s ease;
}

.ajax-news-featured-wrap { margin-bottom: 24px; }

/* Basis: Standard-Pills dürfen umbrechen. */
.ajax-news-section .ajax-news-filter {
    display: flex;
    gap: 10px;
}

.ajax-news-section .ajax-news-filter--wrap {
    flex-wrap: wrap;
}

/* Horizontaler Slider / Scrollbereich */
.ajax-news-section .ajax-news-head {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.ajax-news-section .ajax-news-filter-scroll-wrap {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) 40px !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

/* Extra hohe Spezifität + !important gegen Breakdance/Theme-Styles */
.ajax-news-section .ajax-news-filter.ajax-news-filter--scroll {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    align-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 2px 2px 12px !important;
    scroll-behavior: smooth;
}

.ajax-news-section .ajax-news-filter.ajax-news-filter--scroll > .ajax-news-filter__button {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: max-content !important;
    white-space: nowrap !important;
}

.ajax-news-section .ajax-news-filter__nav {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    padding: 0 !important;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.ajax-news-section .ajax-news-filter__nav:hover,
.ajax-news-section .ajax-news-filter__nav:focus-visible { opacity: .72; }

.ajax-news-section .ajax-news-filter--dropdown { display: block !important; width: 100% !important; }

.ajax-news-section .ajax-news-filter__select {
    width: min(100%, 420px);
    min-height: 44px;
    padding: 0 42px 0 14px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.ajax-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.ajax-news-card-wrap { min-width: 0; }

.ajax-news-empty {
    margin: 0;
    padding: 24px;
    border: 1px solid #e4ded8;
    border-radius: 12px;
}

.ajax-news-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.ajax-news-section .ajax-news-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 28px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s ease;
}

.ajax-news-section .ajax-news-load-more:hover,
.ajax-news-section .ajax-news-load-more:focus-visible {
    opacity: .72;
}

.ajax-news-section .ajax-news-load-more:disabled {
    opacity: .45;
    cursor: wait;
}

@media (max-width: 991px) {
    .ajax-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .ajax-news-grid { grid-template-columns: 1fr; }
    .ajax-news-section .ajax-news-filter-scroll-wrap {
        grid-template-columns: 34px minmax(0, 1fr) 34px !important;
        gap: 6px !important;
    }
    .ajax-news-section .ajax-news-filter__nav {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        font-size: 22px;
    }
}
