:root {
    --cfcs-news-green: #0FA837;
    --cfcs-news-bg: #f5f7f8;
    --cfcs-news-card-bg: #ffffff;
    --cfcs-news-text: #111111;
    --cfcs-news-muted: #777777;
    --cfcs-news-radius-lg: 24px;
    --cfcs-news-radius-pill: 999px;
    --cfcs-news-shadow-soft: 0 14px 30px rgba(0, 0, 0, 0.06);
}

/* HEADER
--------------------------------------------------*/

.cfcs-news-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 50px;
}

.cfcs-news-grid-title {
    margin: 0;
    font-size: 50px;
    font-weight: 700;
}

/* TABS (Kategorien)
--------------------------------------------------*/

.cfcs-news-grid-tabs-wrapper {
    position: relative;
}

.cfcs-news-grid-tabs-inner {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
}

/* Standard: ohne Slider einfach flex */
.cfcs-news-grid-tabs-inner {
    overflow: visible;
}

/* Wenn mehr als 4 Kategorien: Slider */
.cfcs-news-grid.has-slider .cfcs-news-grid-tabs-inner {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
}

.cfcs-news-grid.has-slider .cfcs-news-grid-tabs-inner::-webkit-scrollbar {
    display: none; /* Chrome / Safari */
}

.cfcs-news-grid-tab {
    border: unset;
    padding: 13px 29px;
    border-radius: var(--cfcs-news-radius-pill);
    background: #F7F7F7;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: .2s ease;
}

.cfcs-news-grid-tab:hover {
    border: unset;
    background: #003302;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.cfcs-news-grid-tab.active {
    border: unset;
    background: #003302;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

/* Slider Buttons */
.cfcs-news-grid-btn {
    display: none;
}

.cfcs-news-grid.has-slider .cfcs-news-grid-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
}

.cfcs-news-grid.has-slider .cfcs-news-grid-btn.prev {
    right: 52px;
}

.cfcs-news-grid.has-slider .cfcs-news-grid-btn.next {
    right: 16px;
}

/* PANELS / GRID
--------------------------------------------------*/

.cfcs-news-grid-panels {
    position: relative;
}

.cfcs-news-grid-panel {
    display: none;
}

.cfcs-news-grid-panel.active {
    display: block;
}

.cfcs-news-grid-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

/* CARD
--------------------------------------------------*/

.cfcs-news-grid-card {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
    background: #F6F6F6;
    border-radius: 20px;
    overflow: hidden;
}

.cfcs-news-grid-card:hover .cfcs-news-grid-image{
    transform: scale(1.1);
}

/* Bild links */
.cfcs-news-grid-image {
    min-height: 220px;
    background-size: cover;
    background-position: center center;
    height: 100%;
    transition: 0.3s ease;
}

/* Inhalt rechts */
.cfcs-news-grid-content {
    padding: 24px 24px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Kategorie-Pill */
.cfcs-news-grid-content .pill {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--cfcs-news-radius-pill);
    background: #003302;
    color: #ffffff;
    font-size: 12px;
    margin-bottom: 10px;
}

/* Titel */
.cfcs-news-grid-content h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
}

.cfcs-news-grid-content h3 a {
    color: inherit;
    text-decoration: none;
}

.cfcs-news-grid-content h3 a:hover {
    text-decoration: underline;
}

/* Excerpt */
.cfcs-news-grid-content .excerpt {
    margin: 20px 0 50px 0;
    font-size: 16px;
    line-height: 1.5;
    color: black;
}

/* Datum */
.cfcs-news-grid-content .date {
    font-size: 12px;
    color: var(--cfcs-news-muted);
    display: inline;
}

/* Read more */
.cfcs-news-grid-content .read-more {
    display: inline-block;
    font-size: 16px;
    font-weight: 500;
    color: var(--cfcs-news-green);
    text-decoration: underline;
    margin-bottom: 30px;

}

.cfcs-news-grid-content .read-more:hover {
    color: #003302;
}


/* RESPONSIVE
--------------------------------------------------*/

@media (max-width: 1024px) {
    .cfcs-news-grid-card {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    }
}

@media (max-width: 900px) {
    .cfcs-news-grid-cards {
        grid-template-columns: 1fr;
    }

    .cfcs-news-grid-card {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
    }
}

@media (max-width: 768px) {

    .cfcs-news-grid-tabs-inner{
        flex-wrap: wrap;
    }

    .cfcs-news-grid {
        padding: 24px 18px;
        margin-bottom: 60px;
    }

    .cfcs-news-grid-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cfcs-news-grid-card {
        grid-template-columns: 1fr;
    }

    .cfcs-news-grid-image {
        min-height: 180px;
    }

    .cfcs-news-grid-content {
        padding: 18px 18px 16px;
    }

    .cfcs-news-grid-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .cfcs-news-grid {
        padding: 20px 14px;
    }

    .cfcs-news-grid-title {
        font-size: 22px;
    }

    .cfcs-news-grid-tabs-inner {
        gap: 8px;
    }

    .cfcs-news-grid-tab {
        padding: 7px 14px;
        font-size: 13px;
    }

}
