/* =============================================================
   BGM News 4.0 – Karten, Startseite, Einzelseite
   Farben über CSS-Variablen (Einstellungen), Schrift vom Theme.
   ============================================================= */

.bgm-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 24px;
    align-items: start;
    margin: 0;
}

/* ---------- Karte ---------- */
.bgm-news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 64, 112, .06);
    transition: box-shadow .2s ease;
}
.bgm-news-card:hover,
.bgm-news-card:focus-within {
    box-shadow: 0 8px 24px rgba(0, 64, 112, .12);
}

.bgm-news-card-image {
    display: block;
    aspect-ratio: 16 / 10;
    background: #eef2f6;
    overflow: hidden;
}
.bgm-news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bgm-news-card-bar {
    height: 6px;
    background: linear-gradient(90deg, var(--bgm-news-primary) 0%, var(--bgm-news-accent) 100%);
}

.bgm-news-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px 20px;
    flex: 1;
}
.bgm-news-card-date {
    font-size: 14px;
    font-weight: 600;
    color: var(--bgm-news-tertiary);
}
.bgm-news-card-title {
    margin: 0;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 700;
}
.bgm-news-card-title a {
    color: var(--bgm-news-primary);
    text-decoration: none;
}
.bgm-news-card-title a:hover {
    text-decoration: underline;
    text-decoration-color: var(--bgm-news-accent);
    text-decoration-thickness: 3px;
    text-underline-offset: 3px;
}
.bgm-news-card-excerpt {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
    color: #3d4b57;
    flex: 1;
}
.bgm-news-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.bgm-news-card-more {
    align-self: flex-start;
    margin-top: 4px;
    font-size: 15px;
    font-weight: 700;
    color: var(--bgm-news-primary);
    text-decoration: none;
    border-bottom: 3px solid var(--bgm-news-accent);
    padding-bottom: 2px;
}
.bgm-news-card-more:hover {
    color: #002d50;
}

/* ---------- Chips & Tags ---------- */
.bgm-news-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    background: #e8f0f7;
    color: var(--bgm-news-primary);
    text-decoration: none;
    white-space: nowrap;
}
a.bgm-news-chip:hover {
    background: var(--bgm-news-primary);
    color: #fff;
}
.bgm-news-chip-more {
    background: transparent;
    border: 1px solid #c9d6e2;
}
.bgm-news-tag {
    display: inline-flex;
    padding: 4px 10px;
    font-size: 13px;
    color: #4a5866;
    border: 1px solid #d5dde5;
    border-radius: 999px;
}

/* ---------- Buttons ---------- */
.bgm-news-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    background: var(--bgm-news-primary);
    color: var(--bgm-news-accent);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.bgm-news-btn:hover {
    background: #002d50;
    color: #fff;
}
.bgm-news-btn-outline {
    background: transparent;
    color: var(--bgm-news-primary);
    border: 2px solid var(--bgm-news-primary);
}
.bgm-news-btn-outline:hover {
    background: var(--bgm-news-primary);
    color: var(--bgm-news-accent);
}
.bgm-news-btn-whatsapp {
    background: #1f8f4e;   /* dunkleres WhatsApp-Grün: Kontrast ≥ 4.5:1 mit Weiß */
    color: #fff;
}
.bgm-news-btn-whatsapp:hover {
    background: #17703c;
    color: #fff;
}

/* ---------- Startseite ---------- */
.bgm-news-latest {
    margin: 64px 0;
}
.bgm-news-latest-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--bgm-news-accent);
}
.bgm-news-latest-title {
    margin: 0;
    font-size: clamp(22px, 3vw, 28px);
    color: var(--bgm-news-primary);
}

/* ---------- Seitenzahlen ---------- */
.bgm-news-pagination {
    margin-top: 40px;
}
.bgm-news-pagination ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.bgm-news-pagination .page-numbers {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid #c9d6e2;
    border-radius: 6px;
    color: var(--bgm-news-primary);
    font-weight: 600;
    text-decoration: none;
}
.bgm-news-pagination .page-numbers.current {
    background: var(--bgm-news-primary);
    border-color: var(--bgm-news-primary);
    color: var(--bgm-news-accent);
}
.bgm-news-pagination a.page-numbers:hover {
    background: #e8f0f7;
}

.bgm-news-empty {
    text-align: center;
    color: #4a5866;
}

/* ---------- Einzelseite ---------- */
.bgm-news-single-date {
    color: var(--bgm-news-tertiary);
    font-weight: 600;
}
.bgm-news-single-title {
    margin-top: 8px !important;
    color: var(--bgm-news-primary);
}
.bgm-news-single-image img {
    border-radius: 10px;
}
.bgm-news-single .wp-block-post-content {
    font-size: 17px;
    line-height: 1.65;
}
.bgm-news-single .wp-block-post-content a {
    color: var(--bgm-news-primary);
    text-decoration-color: var(--bgm-news-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}
.bgm-news-single-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px !important;
    padding-top: 20px;
    border-top: 1px solid #e3e8ee;
}
.bgm-news-single-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px !important;
}

/* ---------- Fokus & Bewegung ---------- */
.bgm-news-card a:focus-visible,
.bgm-news-btn:focus-visible,
.bgm-news-pagination a:focus-visible {
    outline: 3px solid var(--bgm-news-accent);
    outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    .bgm-news-card { transition: none; }
}

/* Titelbild auf der Einzelseite vollständig (Plakate), max. Höhe begrenzt */
.bgm-news-single-image img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    background: #f4f6f9;
}
