/* Siitepölytilanne.fi -- blogin yhteinen tyylitiedosto.
   Samat värit/tokenit kuin landing.html, jotta blogi tuntuu samalta sivustolta. */

:root {
    --black:   #0f1209;
    --surface: #171a10;
    --card:    #1e2217;
    --border:  #2d3222;
    --green:   #639922;
    --amber:   #d4880a;
    --red:     #c0392b;
    --text:    #e8e5dc;
    --muted:   #8a9080;
    --accent:  #a8cc44;
    --pro:     #5ba3d9;
    --radius:  12px;
    --max:     760px;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--black);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.65;
    font-size: 16px;
}

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

a { color: var(--accent); }

/* ── Ylätunniste ── */
.blog-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}
.blog-topbar img { height: 44px; width: auto; }
.blog-topbar a.back-link {
    font-size: 14px;
    color: var(--muted);
    text-decoration: none;
}
.blog-topbar a.back-link:hover { color: var(--text); }

/* ── Listaussivu ── */
.blog-hero { padding: 48px 0 24px; text-align: center; }
.blog-hero-logo { width: min(90vw, 480px); height: auto; margin: 0 auto 20px; display: block; }
.blog-hero h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 10px; }
.blog-hero p { color: var(--muted); max-width: 560px; margin: 0 auto; }

.article-list { padding: 24px 0 72px; display: flex; flex-direction: column; gap: 16px; }
.article-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    text-decoration: none;
    display: block;
    color: var(--text);
    transition: border-color 0.15s;
}
.article-card:hover { border-color: var(--accent); }
.article-card .date { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.article-card h2 { font-size: 19px; margin-bottom: 6px; }
.article-card p { color: var(--muted); font-size: 14px; margin: 0; }

/* ── Yksittäinen artikkeli ── */
article.post { padding: 40px 0 24px; }
article.post .date { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
article.post h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 20px; line-height: 1.25; }
article.post h2 { font-size: 20px; margin: 32px 0 12px; color: var(--accent); }
article.post p { margin-bottom: 16px; }
article.post ul { margin: 0 0 16px 20px; }
article.post li { margin-bottom: 8px; }
article.post .lead { font-size: 18px; color: var(--text); margin-bottom: 24px; }

.cta-box {
    background: var(--card);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    margin: 32px 0;
}
.cta-box p { margin-bottom: 14px; }
.cta-box a.btn {
    display: inline-block;
    background: var(--accent);
    color: #10130a;
    font-weight: 600;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
}

.sources { font-size: 13px; color: var(--muted); margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border); }
.sources a { color: var(--muted); }

/* ── Siitepölykalenteri (sama kuin landing.html) ── */
.calendar-grid {
    display: grid;
    grid-template-columns: 110px repeat(12, 1fr);
    gap: 4px;
    font-size: 12px;
    overflow-x: auto;
    margin: 20px 0;
}
.cal-header { color: var(--muted); text-align: center; padding: 4px 2px; font-size: 11px; }
.cal-plant {
    color: var(--text);
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    white-space: nowrap;
}
.cal-empty { background: var(--surface); border-radius: 4px; height: 24px; }
.cal-low   { background: rgba(99,153,34,0.5); border-radius: 4px; height: 24px; }
.cal-mid   { background: rgba(212,136,10,0.6); border-radius: 4px; height: 24px; }
.cal-high  { background: rgba(192,57,43,0.7); border-radius: 4px; height: 24px; }
.cal-legend { display: flex; gap: 20px; margin-top: 12px; flex-wrap: wrap; }
.cal-legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.cal-legend-dot { width: 12px; height: 12px; border-radius: 3px; }
@media (max-width: 640px) {
    .calendar-grid { font-size: 10px; grid-template-columns: 70px repeat(12, 1fr); }
}

/* ── Mainospaikka ──
   Piilossa oletuksena (display:none) -- blog-ads.js näyttää sen vain jos
   AdSense-tili on hyväksytty ja ADSENSE_SLOT täytetty config.php:ssä. */
.blog-ad-slot {
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    margin: 32px 0;
    min-height: 90px;
}

footer.blog-footer {
    border-top: 1px solid var(--border);
    padding: 28px 0 40px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}
footer.blog-footer a { color: var(--muted); text-decoration: none; }
footer.blog-footer a:hover { color: var(--text); }
