/* ------------------------------------- Übersicht ------------------------------------- */

.news-section { padding-top: 3rem; text-align: left; }

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.news-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.news-card:hover {
    border-color: #4D21EB;
    transform: translateY(-4px);
}

/* Neuester Artikel auf Seite 1 groß über die volle Breite */
.news-card--featured { grid-column: 1 / -1; }
@media (min-width: 800px) {
    .news-card--featured { flex-direction: row; }
    .news-card--featured .news-image { flex: 0 0 55%; aspect-ratio: auto; min-height: 300px; }
    .news-card--featured .news-body { justify-content: center; padding: 2.5rem; }
    .news-card--featured .news-title { font-size: 1.8rem; }
}

/* Ohne Bild: Farbverlauf als Platzhalter */
.news-image {
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(ellipse at top left, rgba(182, 255, 0, 0.18), transparent 55%),
        radial-gradient(ellipse at bottom right, rgba(77, 33, 235, 0.55), transparent 60%),
        #0D1020;
}
.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem 1.5rem 1.5rem;
    flex: 1;
}
.news-date {
    font-size: 0.75rem;
    color: var(--brand-neon-lime);
    letter-spacing: 0.08em;
}
.news-title {
    font-size: 1.2rem;
    line-height: 1.3;
}
.news-teaser {
    color: var(--font-secundary);
    font-size: 0.9rem;
}
.news-more {
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 0.85rem;
    color: #8f74ff;
}

.pagination {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}
.pagination-info { color: var(--font-secundary); font-size: 0.85rem; }

/* ------------------------------------- Artikel ------------------------------------- */

.article {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 16px 5rem;
}
.article-back {
    display: inline-block;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    color: var(--font-secundary);
    text-decoration: none;
}
.article-back:hover { color: var(--brand-neon-lime); }

.article-meta {
    font-size: 0.8rem;
    color: var(--brand-neon-lime);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}
.article-header h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    line-height: 1.15;
}
.article-teaser {
    margin-top: 1rem;
    font-size: 1.15rem;
    color: var(--font-secundary);
}

.article-image {
    width: 100%;
    border-radius: 14px;
    margin: 2rem 0;
    display: block;
}

.article-body { margin-top: 2rem; font-size: 1.05rem; }
.article-body.rich-text { line-height: 1.8; }

.article-authors { color: var(--font-secundary); }

/* Vorschau eines Artikels in Bearbeitung */
.article-preview-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 0.75rem 1rem;
    border: 1px dashed #8f74ff;
    border-radius: 10px;
    background: rgba(77, 33, 235, 0.15);
    font-size: 0.9rem;
}

/* ------------------------------------- Redaktion ------------------------------------- */

.news-admin { max-width: 1000px; margin: 0 auto; padding: 2.5rem 16px 5rem; }
.news-admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.news-admin h2 { font-size: 1.1rem; margin: 2rem 0 0.75rem; }
.news-admin-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; padding: 0; }
.news-admin-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.news-admin-thumb {
    width: 96px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at bottom right, rgba(77, 33, 235, 0.55), transparent 60%),
        #0D1020;
}
.news-admin-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-admin-item h3 { font-family: "Exo 2", system-ui, sans-serif; font-size: 1rem; margin: 0; }
.news-admin-item h3 a { color: var(--font); text-decoration: none; }
.news-admin-item h3 a:hover { color: var(--brand-neon-lime); }
.news-admin-meta { color: var(--font-secundary); font-size: 0.82rem; margin-top: 0.2rem; }
.news-admin-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-end; }
.news-admin-actions form { display: inline; }
.news-status {
    display: inline-block;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    font: 600 0.72rem "Exo 2", system-ui, sans-serif;
    vertical-align: middle;
}
.news-status--draft { background: rgba(255, 196, 0, 0.15); color: #ffd666; border: 1px solid rgba(255, 196, 0, 0.4); }
.news-status--published { background: rgba(182, 255, 0, 0.12); color: var(--brand-neon-lime); border: 1px solid rgba(182, 255, 0, 0.35); }

.news-form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.5rem; align-items: start; }
.news-form-side { display: flex; flex-direction: column; gap: 1rem; }
.news-cover-preview { width: 100%; border-radius: 10px; display: block; margin-bottom: 0.75rem; border: 1px solid var(--border); }
.news-form-buttons { display: flex; flex-direction: column; gap: 0.5rem; }
.news-form-buttons .btn { width: 100%; white-space: normal; }
.field-hint { color: var(--font-secundary); font-size: 0.82rem; margin: -0.4rem 0 1rem; }

@media (max-width: 860px) {
    .news-form-layout { grid-template-columns: minmax(0, 1fr); }
    .news-admin-item { grid-template-columns: 64px minmax(0, 1fr); }
    .news-admin-thumb { width: 64px; }
    .news-admin-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.news-save-hint { margin: 0.75rem 0 0; }

/* Bearbeitungssperre */
.news-lock-info { color: var(--font-secundary); font-size: 0.85rem; margin: -0.75rem 0 1rem; }
.news-admin-lock { color: #ffd666; font-size: 0.82rem; margin-top: 0.2rem; }
.news-lock-lost {
    margin-bottom: 1rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--brand-red);
    border-radius: 10px;
    background: rgba(230, 48, 76, 0.15);
}
.news-lock-lost[hidden] { display: none; }
.news-locked { max-width: 640px; }
.news-locked-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.news-locked-actions form { display: inline; }

/* Raster dürfen nie breiter als der Bildschirm werden (Editor, Datei-Feld) */
.news-form-layout > * { min-width: 0; }
@media (max-width: 600px) {
    .news-admin { padding-top: 1.5rem; }
    .news-admin h1 { font-size: clamp(1.35rem, 6.5vw, 2rem); }
}
