/* Wrapper */
.elementor-widget-news {
    width: 100%;
}

/* Grid Layout */
.elementor-widget-news .news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Card block fills the remaining column height so cards line up per column;
   the wp_footer JS equalizer then matches heights across the two columns. */
.ers-news-fill {
    flex-grow: 1;
    min-height: 0;
}

/* Equal card heights: let the grid + cards fill their stretched cell */
.elementor-widget-enc_news_category_widget > .elementor-widget-container,
.elementor-widget-enc_news_category_widget .elementor-widget-news {
    height: 100%;
}
.elementor-widget-news .news-grid {
    align-items: start;
    align-content: start;
}

/* Einzelne News-Card */
.elementor-widget-news .news-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.elementor-widget-news .news-item:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Bild */
.elementor-widget-news .news-image {
    width: 100%;
    height: 0;
    padding-bottom: 66.66%;
    /* 3:2 Verhältnis */
    position: relative;
    overflow: hidden;
}

.elementor-widget-news .news-image img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0;
    left: 0;
}

/* Inhalt */
.elementor-widget-news .news-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px;
}

/* Mehr-lesen-Button */
.elementor-widget-news .news-button {
    align-self: flex-start;
    margin-top: 16px;
    background: #E5471B;
    color: #fff;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

/* Titel */
.elementor-widget-news .news-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.3;
}

.elementor-widget-news .news-title a {
    text-decoration: none;
    color: inherit;
}

/* Teaser */
.elementor-widget-news .news-excerpt {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    color: #555;
}

/* Trenner */
.elementor-widget-news .news-divider {
    border-top: 1px solid #ddd;
    margin-top: auto;
    margin-bottom: 8px;
}

/* Datum */
.elementor-widget-news .news-date {
    font-size: 12px;
    color: #999;
}

/* =========================
   RESPONSIVE
   ========================= */

/* Tablet (optional: 2 Spalten) */
@media (max-width: 768px) {
    .elementor-widget-news .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile <=480px → 1 Spalte */
@media (max-width: 480px) {
    .elementor-widget-news .news-grid {
        grid-template-columns: 1fr;
    }

    .elementor-widget-news .news-item {
        width: 100%;
    }
}
/* Flex columns of equal width */
.ers-news-half { flex: 1 1 0; min-width: 0; }
/* Remote-news grid: stretch its single row so the two cards fill the column */
.ers-rnb-grid { align-items: start; padding: 0 !important; }
/* Flatten the rnb widget wrappers so .rnb-news-box is a direct grid item,
   mirroring .news-item in the ERS grid (removes the wrapper's top offset). */
.ers-rnb-grid > .elementor-widget,
.ers-rnb-grid > .elementor-widget > .elementor-widget-container {
    display: contents;
}
/* Headings: fixed line-height so 'Radailogy' descenders don't make the right
   heading taller than 'News ERS' (which would shift the cards down). */
.ers-news-equalize h2,
.ers-news-equalize .elementor-heading-title {
    line-height: 1.3;
    margin: 0 0 20px;
}
/* Override Elementor's global primary heading color for the news headings */
.ers-news-equalize .elementor-widget-heading .elementor-heading-title,
.ers-news-equalize h2 {
    color: #111 !important;
}
/* Empty / no-news message */
.elementor-widget-news .news-empty,
.news-empty {
    margin: 0;
    padding: 24px 0;
    color: #6b7280;
}

/* =========================
   PAGINATION (Zurück / Weiter) – nur News-Seite
   ========================= */
.elementor-widget-news .news-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
}
.elementor-widget-news .news-nav {
    display: inline-block;
    background: #E5471B;
    color: #fff;
    text-decoration: none;
    padding: 14px 34px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 16px;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease;
}
.elementor-widget-news .news-nav:hover {
    background: #c83c14;
    transform: translateY(-1px);
}
.elementor-widget-news .news-nav-spacer {
    display: inline-block;
}
