/* ============================================================
   FILE: css/04-news.css
   VERSION: 5.1
   LAST MODIFIED: March 12, 2026
   DESCRIPTION: News-Teaser System.
                v5.1: H1-Teaser-Balken Fix: Erlaubt Umbruch auf Desktop
                und reduziert die Schriftgröße für bessere Ästhetik.
   ============================================================ */

/* 1. DER TEASER-BLOCK */
.news-teaser-item {
    margin-bottom: 40px !important;
    padding-bottom: 30px !important;
    border-bottom: 2px solid #ddd !important;
    clear: both !important;
    display: block !important;
    position: relative !important;
}
.news-teaser-item:last-child {
    border-bottom: none !important;
}
.news-teaser-content-flex {
    display: flex !important;
    align-items: flex-start !important;
    margin-top: -7px !important;
}

/* 2. DER H1-BALKEN (In der Übersicht) */
.news-teaser-h1-balken {
    display: flex !important; /* Flex für vertikale Zentrierung */
    align-items: center !important;
    position: relative !important;
    width: 100% !important;

    /* SYNC: Mindesthöhe bleibt 36px */
    min-height: var(--sync-height-desktop) !important;
    height: auto !important; /* Darf bei Umbruch wachsen */

    /* Abstände & Typografie */
    padding: 5px 135px 5px 15px !important; /* Platz für Datum rechts */
    margin: 0 0 30px 0 !important;
    font-family: "Open Sans", sans-serif !important;

    /* NEU: Schrift etwas kleiner */
    font-size: 1.2rem !important;
    line-height: 1.2 !important;

    font-weight: bold !important;
    color: #ffffff !important;
    box-shadow: var(--sync-shadow) !important;
    box-sizing: border-box !important;

    /* FIX: Umbruch erlauben, Abschneiden verhindern */
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.theme-orange .news-teaser-h1-balken {
    background-color: var(--brand-orange) !important;
}
.theme-blau .news-teaser-h1-balken {
    background-color: var(--brand-blue) !important;
}

/* 3. DAS DATUM - DESKTOP */
.news-teaser-date {
    position: absolute !important;
    top: 0 !important;
    right: 15px !important;
    line-height: 36px !important;
    font-size: 0.8rem !important;
    color: #ffffff !important;
    z-index: 999 !important;
    font-family: "Open Sans", sans-serif !important;
    text-align: right !important;
    display: block !important;
}
.news-teaser-date .date-full {
    display: inline !important;
}
.news-teaser-date .date-short {
    display: none !important;
}

/* 4. BILD & TEXT & LINKS */
.news-teaser-img-180 {
    flex-shrink: 0 !important;
    width: 180px !important;
    margin: 7px 25px 10px 0 !important;
}
.news-teaser-img-180 img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 4px;
    box-shadow: 3px 3px 5px #666 !important;
}
.news-teaser-text-box {
    flex: 1 !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: #text-color !important;
}
.news-weiterlesen-link,
.news-back-link {
    font-weight: bold !important;
    text-decoration: none !important;
    display: inline-block !important;
    margin-top: 10px !important;
}
.theme-orange .news-weiterlesen-link,
.theme-orange .news-back-link {
    color: var(--brand-orange) !important;
}
.theme-blau .news-weiterlesen-link,
.theme-blau .news-back-link {
    color: var(--brand-blue) !important;
}

/* 5. PAGINATION */
.pagination-wrapper {
    margin: 40px 0 20px 0 !important;
    clear: both !important;
}
.pagination .nav-links {
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}
.pagination .page-numbers {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 15px !important;
    background: #fff !important;
    color: var(--text-color) !important;
    text-decoration: none !important;
    font-weight: bold !important;
    font-size: 0.9rem !important;
    border: 1px solid #ddd !important;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s ease !important;
}
.pagination .page-numbers.current {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border-color: var(--primary-color) !important;
    box-shadow: var(--sync-shadow) !important;
}
.pagination a.page-numbers:hover {
    background-color: #f0f0f0 !important;
    border-color: var(--border-gray) !important;
    transform: translateY(-1px) !important;
}
.pagination .screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* 6. RESPONSIVE */
@media (max-width: 1023px) {
    .news-teaser-h1-balken {
        font-size: 1.15rem !important;
        white-space: normal !important;
        padding: 5px 135px 5px 15px !important;
        line-height: 1.3 !important;
        min-height: auto !important;
    }
}

@media (max-width: 600px) {
    .news-teaser-content-flex {
        flex-direction: column !important;
        margin-top: 0 !important;
    }
    .news-teaser-h1-balken {
        font-size: 1.1rem !important;
        padding: 4px 100px 5px 15px !important;
        line-height: 1.3 !important;
        margin-bottom: 20px !important;
    }
    .news-teaser-date {
        top: 7px !important;
        font-size: 0.75rem !important;
        font-weight: bold !important;
    }
    .news-teaser-date span.date-full {
        display: none !important;
    }
    .news-teaser-date span.date-short {
        display: inline !important;
        color: #ffffff !important;
    }
    .news-teaser-img-180 {
        width: 100% !important;
        max-width: 180px !important;
        margin: 0 auto 20px auto !important;
    }
    .pagination .page-numbers {
        height: 32px !important;
        min-width: 32px !important;
        padding: 0 12px !important;
        font-size: 0.85rem !important;
    }
}

@media (max-width: 390px) {
    .news-teaser-h1-balken {
        font-size: 1rem !important;
        padding: 4px 90px 5px 12px !important;
    }
    .news-teaser-date {
        font-size: 0.7rem !important;
        right: 12px !important;
    }
    .pagination .page-numbers {
        height: 30px !important;
        min-width: 30px !important;
        padding: 0 10px !important;
        font-size: 0.8rem !important;
    }
}
