/* ==========================================================================
   news.css — gemeinsame Styles für die News-Übersicht (/news) und alle
   Beitragsseiten (/news/<slug>).

   Die Design-Tokens sind identisch zur Startseite (index.html). Wer dort das
   Farbschema ändert, muss die Werte hier ebenfalls anpassen.
   ========================================================================== */

/* Selbstgehostete Schriften — keine externen Google-Requests (DSGVO) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 500 800;
    font-display: swap;
    src: url('/fonts/plusjakartasans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 500 800;
    font-display: swap;
    src: url('/fonts/plusjakartasans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --bg: #0B0F19;
    --bg-card: #111827;
    --bg-card-hover: #151E30;
    --border: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.18);

    --ink: #F8FAFC;
    --prose: #CBD5E1;
    --muted: #94A3B8;
    --subtle: #64748B;

    --accent: #6366F1;
    --cyan: #38BDF8;

    --font-head: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-main: 'Inter', system-ui, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    --shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
    background-color: var(--bg);
    color-scheme: dark;
}

body {
    background-color: var(--bg);
    color: var(--ink);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

::selection {
    background-color: var(--accent);
    color: #ffffff;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible, button:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 4px;
}

img {
    max-width: 100%;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============ Sticky Navigation (identisch zur Startseite) ============ */
.nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(11, 15, 25, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 24px;
    max-width: 1180px;
    margin: 0 auto;
}

.nav-brand {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: -0.02em;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyan);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    display: block;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--muted);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-highlight);
}

.nav-links a[aria-current="page"] {
    color: var(--cyan);
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.25);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Doppelte Klasse, damit die Regel .btn schlägt — sonst gewinnt das
   später definierte .btn mit gleicher Spezifität.
   Feste Höhe = Höhe des Menü-Schalters, damit beide bündig sind. */
.btn.nav-contact {
    height: 38px;
    padding: 0 16px;
    font-size: 13px;
}

/* Menü-Schalter — nur auf schmalen Displays sichtbar */
.nav-toggle {
    display: none;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--ink);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-highlight);
}

.nav-toggle svg {
    width: 20px;
    height: 20px;
}

.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ============ Buttons (identisch zur Startseite) ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 14.5px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
    background: var(--ink);
    color: var(--bg);
}

.btn-primary:hover {
    background: #E2E8F0;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--ink);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ============ Seitenkopf ============ */
.page-head {
    padding: 140px 0 48px;
}

.page-tag {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
    display: block;
}

.page-title {
    font-family: var(--font-head);
    font-size: clamp(38px, 5vw, 56px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.page-desc {
    color: var(--muted);
    font-size: 17px;
    max-width: 580px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--cyan);
}

.back-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.back-link:hover svg {
    transform: translateX(-3px);
}

/* ============ Meta-Zeile (Kategorie · Datum · Lesezeit) ============ */
.post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12.5px;
}

.post-cat {
    font-weight: 600;
    color: var(--cyan);
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--radius-sm);
    padding: 3px 10px;
    white-space: nowrap;
}

.post-date {
    color: var(--subtle);
    font-variant-numeric: tabular-nums;
}

.post-dot {
    color: var(--subtle);
}

/* ============ Beitragsliste auf /news ============ */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 40px;
}

.post-row {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: grid;
    grid-template-columns: 150px 1fr 24px;
    gap: 32px;
    align-items: start;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-row:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-highlight);
}

.post-row-date {
    font-size: 13px;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    padding-top: 4px;
}

.post-row-cat {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--subtle);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 6px;
}

.post-row-title {
    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin-bottom: 10px;
}

.post-row:hover .post-row-title {
    color: var(--cyan);
}

.post-row-excerpt {
    color: var(--muted);
    font-size: 15.5px;
    line-height: 1.65;
}

.post-row-arrow {
    color: var(--subtle);
    align-self: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.post-row:hover .post-row-arrow {
    color: var(--cyan);
    transform: translateX(4px);
}

.post-row-arrow svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* ============ Beitragsseite ============ */
.article-head {
    padding: 120px 0 0;
}

.article-head .back-link {
    margin-bottom: 32px;
}

.article-title {
    font-family: var(--font-head);
    font-size: clamp(32px, 4.6vw, 50px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.12;
    margin: 18px 0 20px;
}

.article-lead {
    font-size: 19px;
    line-height: 1.7;
    color: var(--muted);
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

/* Fließtext */
.prose {
    padding: 40px 0 8px;
    color: var(--prose);
    font-size: 17.5px;
    line-height: 1.78;
}

.prose > * + * {
    margin-top: 24px;
}

.prose h2 {
    font-family: var(--font-head);
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--ink);
    margin-top: 52px;
    scroll-margin-top: 100px;
}

.prose h3 {
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
    margin-top: 40px;
    scroll-margin-top: 100px;
}

.prose strong {
    color: var(--ink);
    font-weight: 600;
}

.prose a {
    color: var(--cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(56, 189, 248, 0.4);
    transition: text-decoration-color 0.2s ease;
}

.prose a:hover {
    text-decoration-color: var(--cyan);
}

.prose ul, .prose ol {
    padding-left: 22px;
}

.prose li + li {
    margin-top: 10px;
}

.prose li::marker {
    color: var(--subtle);
}

.prose blockquote {
    border-left: 2px solid var(--accent);
    padding: 4px 0 4px 24px;
    font-size: 19px;
    line-height: 1.65;
    color: var(--ink);
    font-family: var(--font-head);
    font-weight: 500;
}

.prose code {
    font-family: var(--font-mono);
    font-size: 14.5px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    color: var(--cyan);
}

/* Durchgestrichener Text — bewusst sichtbar gelassene Streichung */
.prose s,
.prose del {
    color: var(--subtle);
    text-decoration-line: line-through;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--subtle);
}

.prose hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 44px 0;
}

.prose figure {
    margin: 40px 0;
}

.prose figure img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.prose figcaption {
    font-size: 13.5px;
    color: var(--subtle);
    margin-top: 10px;
}

/* Hervorgehobener Kasten im Fließtext (z. B. Kernpunkte) */
.callout {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--prose);
}

.callout-title {
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

.callout ul {
    padding-left: 20px;
    margin-top: 10px;
}

/* ============ Aktionen unter dem Beitrag ============ */
.article-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

.share-btn svg {
    width: 15px;
    height: 15px;
}

/* ============ Autorenbox ============ */
.author-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-top: 40px;
}

.author-photo {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    border: 1px solid var(--border);
}

.author-name {
    font-family: var(--font-head);
    font-size: 17px;
    font-weight: 700;
}

.author-role {
    font-size: 14.5px;
    color: var(--muted);
    margin-top: 2px;
}

.author-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--cyan);
    margin-top: 8px;
    display: inline-block;
}

/* ============ Weitere Beiträge ============ */
.more-posts {
    padding: 80px 0 40px;
}

.more-posts-title {
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}

.more-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.more-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 26px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.more-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-highlight);
}

.more-card-title {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-top: 12px;
}

.more-card:hover .more-card-title {
    color: var(--cyan);
}

/* ============ Footer (identisch zur Startseite) ============ */
footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--subtle);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links {
    display: flex;
    gap: 16px;
}

/* ============ Toast ============ */
#toast-container {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
}

.toast {
    background: var(--ink);
    color: var(--bg);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ============ Responsive ============ */
/* Eigener Breakpoint: die Leiste braucht ~790px, damit alle Links
   nebeneinander passen — darunter das Klappmenü. */
@media (max-width: 880px) {
    .nav-toggle { display: inline-flex; }

    /* Die Linkliste wird zum aufklappbaren Menü unter der Leiste */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px 24px 20px;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 12px 14px;
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .page-head { padding: 110px 0 32px; }
    .article-head { padding: 100px 0 0; }

    .post-row {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 24px;
    }

    .post-row-date { padding-top: 0; }
    .post-row-cat { display: inline; margin-top: 0; margin-left: 10px; }
    .post-row-title { font-size: 21px; }
    .post-row-arrow { display: none; }

    .prose { font-size: 17px; }
    .prose h2 { font-size: 24px; margin-top: 44px; }
    .callout { padding: 20px; }

    .more-grid { grid-template-columns: 1fr; }

    .author-box { flex-direction: column; align-items: flex-start; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
