/* ========================================
   KLARTEXT — KI-Nachrichten ohne Meinung
   ======================================== */

:root {
    --bg: #fafaf9;
    --bg-card: #ffffff;
    --bg-dark: #1a1a1a;
    --text: #1a1a1a;
    --text-secondary: #6b6b6b;
    --text-muted: #999;
    --accent: #2563eb;
    --accent-soft: #dbeafe;
    --border: #e5e5e5;
    --border-light: #f0f0f0;
    --red: #dc2626;
    --red-soft: #fef2f2;
    --green: #16a34a;
    --yellow: #f59e0b;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Source Serif 4', Georgia, serif;
    --max-width: 1200px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f0f0f;
        --bg-card: #1a1a1a;
        --bg-dark: #0a0a0a;
        --text: #e5e5e5;
        --text-secondary: #a3a3a3;
        --text-muted: #666;
        --border: #2a2a2a;
        --border-light: #222;
        --accent-soft: #1e3a5f;
        --red-soft: #2d1515;
        --shadow: 0 1px 3px rgba(0,0,0,0.3);
        --shadow-lg: 0 10px 25px rgba(0,0,0,0.4);
    }
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- HEADER ---- */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.92);
}

@media (prefers-color-scheme: dark) {
    .site-header { background: rgba(15,15,15,0.92); }
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.logo-accent { color: var(--accent); }
.logo-small { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }

.tagline {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.date-display {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--accent-soft);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    cursor: help;
}

.badge-icon { font-size: 1rem; }

/* ---- PHILOSOPHY BANNER ---- */
.philosophy-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    padding: 1.25rem 0;
    font-size: 0.95rem;
    text-align: center;
    line-height: 1.6;
}

.philosophy-banner strong { color: #60a5fa; }

/* ---- TICKER ---- */
.ticker-bar {
    background: var(--red);
    color: white;
    padding: 0.6rem 0;
    font-size: 0.85rem;
    font-weight: 600;
    overflow: hidden;
}

.ticker-bar .container { display: flex; align-items: center; gap: 0.75rem; }

.ticker-label {
    background: white;
    color: var(--red);
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ---- TOP STORY ---- */
.top-story {
    margin: 2rem 0;
}

.top-story-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.top-story-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--accent);
}

.top-story-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.top-story-card h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.top-story-card .summary {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 800px;
}

.top-story-card .meta {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.source-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.source-tag {
    background: var(--border-light);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ---- CATEGORY NAV ---- */
.category-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.cat-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-sans);
}

.cat-btn:hover { border-color: var(--accent); color: var(--accent); }
.cat-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ---- NEWS GRID ---- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.news-card .card-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.news-card h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.news-card .card-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
}

.news-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.bias-indicator {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.bias-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--green);
}

.bias-dot.medium { background: var(--yellow); }
.bias-dot.high { background: var(--red); }

/* ---- TRANSPARENCY SECTION ---- */
.transparency-section {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 4rem 0;
}

.transparency-section h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
}

.transparency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.transparency-card {
    text-align: center;
    padding: 1.5rem;
}

.tc-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

.transparency-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.transparency-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---- FOOTER ---- */
.site-footer {
    background: var(--bg-dark);
    color: #999;
    padding: 3rem 0 1.5rem;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #333;
}

.footer-brand .logo-small { color: #fff; }
.footer-brand .logo-small .logo-accent { color: var(--accent); }
.footer-brand p { margin-top: 0.5rem; font-size: 0.85rem; }
.footer-brand a { color: var(--accent); }

.footer-info { font-size: 0.85rem; line-height: 1.6; }

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.footer-links a { color: #999; }
.footer-links a:hover { color: #fff; }

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    font-size: 0.8rem;
}

/* ---- MODALS ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2.5rem;
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-content h2 { margin-bottom: 1.5rem; }
.modal-content h3 { margin: 1.5rem 0 0.5rem; font-size: 1rem; }
.modal-content p { margin-bottom: 0.75rem; font-size: 0.9rem; line-height: 1.6; color: var(--text-secondary); }
.modal-content strong { color: var(--text); }

.modal-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}
.modal-close:hover { background: var(--border-light); color: var(--text); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .top-story-card { padding: 1.5rem; }
    .top-story-card h2 { font-size: 1.5rem; }
    .news-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .header-inner { flex-direction: column; align-items: flex-start; }
}
