/* ============================================================
   news.css – Styling für die öffentlichen News-Seiten
   ============================================================
   Alle Klassen beginnen bewusst mit "news-", damit nichts mit
   bestehenden Klassen/Tags deiner Webseite kollidiert.

   ANPASSEN: Nur die Variablen unten in :root ändern (Farben, Font).
   Größen/Abstände sind bewusst fest im CSS, wie besprochen.
   ============================================================ */

:root {
    --news-color-primary: #1a1a1a;      /* Haupttextfarbe, Überschriften */
    --news-color-text: #333333;         /* Fließtext */
    --news-color-muted: #767676;        /* Meta-Infos, Bildunterschriften */
    --news-color-background: #ffffff;
    --news-color-link: #0066cc;
    --news-color-link-hover: #004999;
    --news-color-border: #e5e5e5;
    --news-font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Container ---------- */
/* Breite/Zentrierung/Innenabstand kommen bewusst von den Tailwind-Klassen am <main>-Tag
   (max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-10), damit es sich wie die Root-Seiten verhält -
   hier nur noch Typografie/Farbe. */
.news-page,
.news-article {
    font-family: var(--news-font-family);
    color: var(--news-color-text);
    background: var(--news-color-background);
}

/* ---------- Übersicht ---------- */
.news-list-page-title {
    font-size: 2rem;
    color: var(--news-color-primary);
    margin-bottom: 1.5rem;
}

.news-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--news-color-border);
}

.news-item-layout {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.news-item-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.news-item-thumb-link,
.news-item-thumb {
    display: block;
}

.news-item-thumb {
    width: 148px;
    height: 104px;
    object-fit: cover;
    border-radius: 8px;
    background: #f3f4f6;
}

.news-item-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--news-color-muted);
    font-size: 0.8rem;
}

.news-item-title {
    font-size: 1.4rem;
    margin: 0 0 0.5rem;
}

.news-item-title a {
    color: var(--news-color-primary);
    text-decoration: none;
}

.news-item-title a:hover {
    color: var(--news-color-link-hover);
}

.news-item-excerpt {
    color: var(--news-color-text);
    margin: 0 0 0.5rem;
}

.news-item-date {
    color: var(--news-color-muted);
    font-size: 0.85rem;
}

/* ---------- Einzelbeitrag ---------- */
.news-title {
    font-size: 2.2rem;
    line-height: 1.25;
    color: var(--news-color-primary);
    margin: 0 0 1rem;
}

.news-meta {
    color: var(--news-color-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.news-meta-secondary {
    margin-top: -1rem;
}

.news-body::after {
    content: "";
    display: table;
    clear: both;
}

.news-cover-frame,
.news-cover-button {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.news-cover-frame,
.news-cover-button {
    border: none;
    padding: 0;
    background: transparent;
}

.news-cover-button {
    cursor: zoom-in;
}

.news-cover {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

.news-cover-size-small {
    width: 28%;
}

.news-cover-size-medium {
    width: 45%;
}

.news-cover-size-large {
    width: 62%;
}

.news-cover-size-full {
    float: none;
    width: 100%;
    margin: 0 0 1.5rem;
}

@media (max-width: 600px) {
    .news-item-layout {
        flex-direction: column;
    }

    .news-item-thumb {
        width: 100%;
        height: 180px;
    }

    .news-cover-frame,
    .news-cover-button,
    .news-cover-size-small,
    .news-cover-size-medium,
    .news-cover-size-large,
    .news-cover-size-full {
        float: none;
        width: 100%;
        margin: 0 0 1.5rem;
    }

    .news-figure-left,
    .news-figure-right,
    .news-figure-full {
        float: none;
        width: 100%;
        margin: 1.2rem 0;
    }
}

/* ---------- Inhalt (aus Editor.js gerendert) ---------- */
.news-p {
    line-height: 1.7;
    margin: 0 0 1.2rem;
}

.news-heading {
    color: var(--news-color-primary);
    margin: 2rem 0 1rem;
    line-height: 1.3;
}

.news-h2 { font-size: 1.6rem; }
.news-h3 { font-size: 1.3rem; }
.news-h4 { font-size: 1.1rem; }

.news-list {
    margin: 0 0 1.2rem;
    padding-left: 1.4rem;
    line-height: 1.7;
}

.news-list-item {
    margin-bottom: 0.4rem;
}

.news-figure {
    margin: 1.8rem 0;
}

.news-figure-left {
    float: left;
    width: 45%;
    margin: 0 1.5rem 1rem 0;
}

.news-figure-right {
    float: right;
    width: 45%;
    margin: 0 0 1rem 1.5rem;
}

.news-figure-full {
    float: none;
    width: 100%;
    margin: 1.8rem 0;
}

.news-image {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

.news-lightbox-open {
    overflow: hidden;
}

.news-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.news-lightbox[hidden] {
    display: none;
}

.news-lightbox-backdrop {
    position: absolute;
    inset: 0;
    border: none;
    background: rgba(17, 24, 39, 0.82);
    cursor: zoom-out;
}

.news-lightbox-dialog {
    position: relative;
    z-index: 1;
    max-width: min(1000px, 92vw);
    max-height: 90vh;
}

.news-lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    border-radius: 10px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.news-lightbox-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.72);
    color: #ffffff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.news-caption {
    font-size: 0.85rem;
    color: var(--news-color-muted);
    text-align: center;
    margin-top: 0.5rem;
}

.news-related {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--news-color-border);
}

.news-related-title {
    font-size: 1.4rem;
    color: var(--news-color-primary);
    margin: 0 0 1rem;
}

.news-related-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
    gap: 1rem;
}

.news-related-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.9rem;
    border: 1px solid var(--news-color-border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: #fafafa;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.news-related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.news-related-thumb {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 16 / 9;
    background: #eef2f7;
}

.news-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-related-content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.news-related-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--news-color-primary);
}

.news-related-card-excerpt {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--news-color-text);
}

@media (max-width: 600px) {
    .news-related-list {
        grid-template-columns: 1fr;
    }
}

.news-quote {
    border-left: 4px solid var(--news-color-border);
    padding: 0.5rem 0 0.5rem 1.2rem;
    margin: 1.8rem 0;
    font-style: italic;
    color: var(--news-color-text);
}

.news-quote-source {
    font-style: normal;
    font-size: 0.85rem;
    color: var(--news-color-muted);
    margin-top: 0.5rem;
}

.news-divider {
    border: none;
    border-top: 1px solid var(--news-color-border);
    margin: 2.5rem 0;
}

.news-link,
.news-link-block a {
    color: var(--news-color-link);
    text-decoration: underline;
}

.news-link:hover,
.news-link-block a:hover {
    color: var(--news-color-link-hover);
}

.news-share {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--news-color-border);
}

.news-share-title {
    font-size: 1.2rem;
    color: var(--news-color-primary);
    margin: 0 0 0.5rem;
}

.news-share-copy {
    margin: 0 0 1rem;
    color: var(--news-color-muted);
}

.news-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.news-share-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: none;
    border-radius: 999px;
    padding: 0.55rem 0.8rem;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    font-size: 0.88rem;
}

.news-share-button-facebook {
    background: #1877f2;
}

.news-share-button-instagram {
    background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af);
}

.news-share-button-whatsapp {
    background: #25d366;
}

.news-share-button-copy {
    background: #111827;
}

.news-share-icon {
    width: 14px;
    height: 14px;
    display: inline-flex;
}

.news-share-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ---------- Pagination ---------- */
.news-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--news-color-border);
}

.news-pagination-link {
    color: var(--news-color-link);
    text-decoration: none;
    font-weight: 600;
}

.news-pagination-link:hover {
    color: var(--news-color-link-hover);
}

.news-pagination-info {
    color: var(--news-color-muted);
    font-size: 0.9rem;
}
