/*
 * Epilepsja — ZUBU — Styles for static blog
 * Minimalistyczne, lekkie, mobile-first.
 * v=20260424
 */

:root {
    --bg: #fafafa;
    --bg-muted: #f0f2f5;
    --bg-card: #ffffff;
    --border: #e1e5e9;
    --border-strong: #c5cdd5;
    --text: #1a1d21;
    --text-muted: #5e6873;
    --accent: #0a66c2;
    --accent-hover: #0852a0;
    --success: #0d7a3f;
    --warning: #b85c00;
    --danger: #b91c1c;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
    --radius: 6px;
    --radius-lg: 10px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 18px;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================
 * Header & breadcrumb & nav
 * ========================================================== */

.site-header {
    background: linear-gradient(180deg, #fff 0%, #f7f8fa 100%);
    border-bottom: 1px solid var(--border);
    padding: 18px 0 22px;
}

.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}
.breadcrumb a:hover {
    color: var(--accent);
    text-decoration: underline;
}
.breadcrumb .sep {
    margin: 0 6px;
    color: var(--border-strong);
}
.breadcrumb .current {
    color: var(--text);
}

.site-title {
    font-size: 28px;
    font-weight: 600;
    margin: 12px 0 0 0;
    line-height: 1.25;
    color: var(--text);
}

@media (min-width: 768px) {
    .site-title { font-size: 34px; }
}

.main-nav {
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 10;
}
.main-nav .container {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding-top: 0;
    padding-bottom: 0;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    flex: 1 1 auto;
    justify-content: center;
}
.nav-link:hover {
    color: var(--text);
    text-decoration: none;
}
.nav-link.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}
.nav-icon { font-size: 16px; }
.nav-label { white-space: nowrap; }

@media (min-width: 768px) {
    .main-nav .container { justify-content: flex-start; gap: 4px; }
    .nav-link { flex: 0 0 auto; padding: 14px 18px; font-size: 15px; }
}

/* ==========================================================
 * Newsletter
 * ========================================================== */

.newsletter-box {
    background: linear-gradient(135deg, #eaf3fb 0%, #f3e9fa 100%);
    border-bottom: 1px solid var(--border);
    padding: 28px 0;
}
.newsletter-inner {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .newsletter-inner { grid-template-columns: 1fr 1fr; align-items: center; gap: 30px; }
}
.newsletter-title {
    font-size: 20px;
    margin: 0 0 6px 0;
    color: var(--text);
}
.newsletter-desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
}
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.newsletter-form input[type="email"] {
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    font-size: 16px;
    background: #fff;
    color: var(--text);
    width: 100%;
}
.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(10,102,194,0.1);
}
.btn {
    display: inline-block;
    padding: 12px 18px;
    border: 1px solid var(--border-strong);
    background: #fff;
    color: var(--text);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}
.btn:hover { background: var(--bg-muted); }
.btn.primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn.primary:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.newsletter-status {
    margin: 4px 0 0 0;
    font-size: 13px;
    min-height: 18px;
}
.newsletter-status.success { color: var(--success); }
.newsletter-status.error { color: var(--danger); }

.newsletter-consent {
    font-size: 11px;
    color: var(--text-muted);
    margin: 4px 0 0 0;
    line-height: 1.5;
}

/* ==========================================================
 * Main content
 * ========================================================== */

.content { padding: 28px 0 40px; }

.section-intro {
    color: var(--text-muted);
    font-size: 15px;
    margin: 0 0 22px 0;
    line-height: 1.55;
    max-width: 760px;
}

/* ==========================================================
 * Listing cards
 * ========================================================== */

.listing-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}
.card h2 {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 10px 0;
}
.card h2 a {
    color: var(--text);
    text-decoration: none;
}
.card h2 a:hover {
    color: var(--accent);
}

.card .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 10px 0;
    font-size: 12px;
    color: var(--text-muted);
}
.card .meta time { font-weight: 500; }

.card .summary {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
}

.card .read-more {
    margin: 12px 0 0 0;
    font-size: 13px;
}
.card .read-more a {
    color: var(--accent);
    font-weight: 500;
}

.empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

/* ==========================================================
 * Source badges
 * ========================================================== */

.source-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: var(--bg-muted);
    color: var(--text-muted);
}
.source-badge.pubmed { background: #e0f2fe; color: #075985; }
.source-badge.preprint { background: #fef3c7; color: #92400e; }
.source-badge.ilae { background: #ddd6fe; color: #5b21b6; }
.source-badge.viamedica { background: #d1fae5; color: #065f46; }
.source-badge.trial { background: #fce7f3; color: #9d174d; }
.source-badge.ema { background: #fee2e2; color: #991b1b; }
.source-badge.faers { background: #fed7aa; color: #9a3412; }

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: var(--bg-muted);
    color: var(--text-muted);
}
.status-badge.serious { background: #fee2e2; color: #991b1b; }
.status-badge.status-trwa-rekrutacja { background: #d1fae5; color: #065f46; }
.status-badge.status-zakonczone { background: #e5e7eb; color: #374151; }

/* ==========================================================
 * Pagination
 * ========================================================== */

.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 32px 0 16px 0;
    padding: 18px 0;
    border-top: 1px solid var(--border);
}
.page-btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s;
}
.page-btn:hover {
    background: var(--bg-muted);
    text-decoration: none;
}
.page-info {
    font-size: 13px;
    color: var(--text-muted);
}
.page-nums {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    justify-content: center;
    font-size: 13px;
    color: var(--text-muted);
}
.page-nums a {
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 4px;
}
.page-nums strong {
    color: var(--text);
    background: var(--bg-muted);
    padding: 2px 8px;
    border-radius: 4px;
}

@media (min-width: 600px) {
    .pagination { flex-direction: row; justify-content: space-between; flex-wrap: wrap; }
}

/* ==========================================================
 * Detail / static article view
 * ========================================================== */

.static-article {
    max-width: 760px;
    margin: 0 auto;
}
.static-article h1 {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 14px 0;
    color: var(--text);
}
@media (min-width: 768px) {
    .static-article h1 { font-size: 30px; }
}

.static-article .meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0 0 16px 0;
    color: var(--text-muted);
    font-size: 13px;
}
.static-article .meta-line time { font-weight: 500; }

.static-article .detail-title-en {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 0 24px 0;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.static-article section {
    margin-top: 28px;
}
.static-article h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--text);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.static-article p {
    margin: 0 0 12px 0;
    line-height: 1.65;
    color: var(--text);
}
.static-article ul.findings {
    list-style: none;
    padding: 0;
    margin: 0;
}
.static-article ul.findings li {
    padding: 10px 0 10px 30px;
    line-height: 1.55;
    color: var(--text);
    position: relative;
    border-bottom: 1px dashed var(--border);
}
.static-article ul.findings li:last-child { border-bottom: none; }
.static-article ul.findings li::before {
    content: "•";
    position: absolute;
    left: 8px;
    top: 8px;
    color: var(--accent);
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
}

.static-article .abstract-en {
    background: var(--bg-muted);
    border-left: 3px solid var(--border-strong);
    padding: 14px 18px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-muted);
    border-radius: 0 var(--radius) var(--radius) 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.static-article dl.meta-grid {
    display: grid;
    grid-template-columns: minmax(140px, max-content) 1fr;
    gap: 8px 18px;
    font-size: 14px;
    margin: 0;
}
.static-article dl.meta-grid dt {
    color: var(--text-muted);
    font-weight: 600;
}
.static-article dl.meta-grid dd {
    margin: 0;
    word-break: break-word;
    color: var(--text);
}

.static-article .cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 0 0;
    padding: 20px 0 0;
    border-top: 1px solid var(--border);
}
.static-article .cta-row a {
    padding: 10px 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    transition: background 0.15s;
}
.static-article .cta-row a:hover {
    background: var(--bg-muted);
    text-decoration: none;
}

.warning-box {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-left: 4px solid #f97316;
    border-radius: var(--radius);
    padding: 14px 18px;
    margin: 0 0 24px 0;
}
.warning-box p {
    margin: 0;
    font-size: 14px;
    color: #7c2d12;
    line-height: 1.55;
}

/* ==========================================================
 * Related items aside
 * ========================================================== */

.static-aside {
    max-width: 760px;
    margin: 40px auto 0;
    background: var(--bg-card);
    padding: 22px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.static-aside h3 {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 12px 0;
    font-weight: 600;
}
.static-aside ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.static-aside ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    line-height: 1.45;
}
.static-aside ul li:last-child { border-bottom: none; }
.static-aside ul li a {
    color: var(--accent);
    text-decoration: none;
}
.static-aside ul li a:hover { text-decoration: underline; }
.static-aside ul li .meta {
    color: var(--text-muted);
    font-size: 12px;
    margin-left: 6px;
}

/* ==========================================================
 * Footer & disclaimer
 * ========================================================== */

.disclaimer-box {
    background: #fffbeb;
    border-top: 1px solid #fde68a;
    border-bottom: 1px solid #fde68a;
    padding: 16px 0;
    margin-top: 40px;
}
.disclaimer-box p {
    margin: 0;
    font-size: 13px;
    color: #78350f;
    line-height: 1.55;
}

.site-footer {
    background: #1a1d21;
    color: #c5cdd5;
    padding: 24px 0;
    font-size: 13px;
}
.site-footer a {
    color: #93c5fd;
    text-decoration: none;
}
.site-footer a:hover {
    color: #dbeafe;
    text-decoration: underline;
}
.site-footer p {
    margin: 0 0 10px 0;
    line-height: 1.55;
}
.site-footer p:last-child { margin-bottom: 0; }
.site-footer .sep {
    margin: 0 6px;
    color: #5e6873;
}
.site-footer .stats {
    background: #2a2e34;
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-bottom: 14px;
    font-size: 13px;
}
.site-footer .stats strong {
    color: #fff;
    font-weight: 600;
}
.site-footer .copyright {
    font-size: 11px;
    color: #5e6873;
    margin-top: 6px;
}

/* ==========================================================
 * Print styles
 * ========================================================== */

@media print {
    .main-nav, .newsletter-box, .site-footer, .disclaimer-box, .static-aside, .pagination {
        display: none !important;
    }
    body { background: #fff; }
    .container { max-width: 100%; padding: 0; }
    a { color: inherit; text-decoration: none; }
    .static-article { max-width: 100%; }
    .static-article .cta-row { display: none; }
}
