/* ==========================================================================
   Hravotéka – blog (doplnok k ../styles.css, mobile-first)
   Používa tokeny zo styles.css: --bg, --ink, --text, --accent, --line …
   ========================================================================== */

.blog-page .site-footer { padding-bottom: 40px; margin-top: 0; }
.blog-main { padding: 28px 0 64px; }
.blog-wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 var(--gutter); }
.blog-main a { text-underline-offset: 3px; }

/* ---------- Výpis článkov ---------- */
.blog-intro { max-width: 40rem; margin: 0 0 28px; }
.blog-intro h1 { font-size: clamp(2rem, 7vw, 3rem); margin: 0 0 10px; }
.blog-intro p { font-size: 1.08rem; color: var(--muted); margin: 0; }

.post-list { display: grid; gap: 20px; }
.post-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: box-shadow .15s ease, transform .15s ease;
}
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.post-card:focus-within { outline: 3px solid #2F6FE0; outline-offset: 3px; }
.post-card-media { aspect-ratio: 3 / 2; background: var(--bg-tint); overflow: hidden; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; }
.post-card-media.is-sheet { display: grid; place-items: center; padding: 14px; }
.post-card-media.is-sheet img { width: auto; max-width: 100%; height: 100%; object-fit: contain; border-radius: 6px; box-shadow: var(--shadow); background: #fff; }
.post-card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.post-card h2 { font-size: 1.22rem; line-height: 1.25; letter-spacing: -.015em; margin: 0; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a::after { content: ""; position: absolute; inset: 0; }
.post-card h2 a:focus-visible { outline: none; }
.post-card:hover h2 a { color: var(--accent-dark); }
.post-card p { margin: 0; font-size: .97rem; line-height: 1.6; }
.post-card .post-meta { margin-top: auto; padding-top: 6px; }
.post-meta { font-size: .84rem; font-weight: 600; color: var(--muted); }

.blog-note { max-width: 40rem; margin: 32px 0 0; font-size: .9rem; color: var(--muted); }

/* ---------- Článok ---------- */
.post { font-size: 1.0625rem; line-height: 1.75; }
.post-head, .post-body > * { max-width: 40rem; margin-left: auto; margin-right: auto; }
.crumbs { font-size: .88rem; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--ink); }
.post-head h1 { font-size: clamp(1.75rem, 6.4vw, 2.6rem); line-height: 1.14; letter-spacing: -.025em; margin: 0 0 14px; }
.post-lead { font-size: 1.2rem; line-height: 1.55; color: var(--ink); font-weight: 500; margin: 0 0 12px; }
.post-head .post-meta { margin: 0 0 22px; }

.post-hero, .post-body > .post-hero { max-width: 56rem; margin: 0 auto 28px; }
.post-hero img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.post figcaption { font-size: .84rem; line-height: 1.5; color: var(--muted); margin-top: 8px; }

.post-body h2 { font-size: clamp(1.3rem, 4.6vw, 1.55rem); line-height: 1.25; letter-spacing: -.02em; margin-top: 2.1em; margin-bottom: .55em; }
.post-body h3 { font-size: 1.08rem; margin-top: 1.5em; margin-bottom: .35em; }
.post-body p { margin-top: 0; margin-bottom: 1.05em; }
.post-body a { color: var(--accent-dark); }
.post-body ul, .post-body ol { padding-left: 1.3em; margin-top: 0; margin-bottom: 1.1em; display: grid; gap: .45em; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li::marker { color: var(--accent); font-weight: 700; }

/* Boxy */
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-top: 1.6em; margin-bottom: 1.6em; box-shadow: var(--shadow); }
.box > :last-child { margin-bottom: 0; }
.box-title { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--accent-dark); margin: 0 0 10px; }
.box-summary { border-top: 4px solid var(--accent); }
.box-tip { background: var(--ok-soft); border-color: #CFE3D5; box-shadow: none; }
.box-tip .box-title { color: var(--ok); }
.box-note { background: var(--bg-tint); box-shadow: none; font-size: .97rem; }
.box-note .box-title { color: var(--ink); }
.box-try { border-left: 4px solid var(--accent); }
.box-try h2 { margin-top: 0; font-size: 1.3rem; }
.box-try ol { gap: .8em; }

.post-body blockquote.pull { margin-top: 1.8em; margin-bottom: 1.8em; padding: 4px 0 4px 20px; border-left: 4px solid var(--accent); font-size: 1.28rem; line-height: 1.4; font-weight: 700; letter-spacing: -.015em; color: var(--ink); text-wrap: balance; }
.post-body blockquote.pull p { margin: 0; }

/* Ukážky listov */
.sheets { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1.8em; margin-bottom: 1.8em; }
.sheets.is-one { grid-template-columns: minmax(0, 300px); justify-content: center; }
.post-body > .sheets.is-wide { max-width: 56rem; }
.sheets .sheet { margin: 0; }
.sheets img { width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.sheets > figcaption { grid-column: 1 / -1; margin-top: 0; }
.sheet-label { display: block; margin-top: 8px; font-size: .84rem; font-weight: 700; color: var(--ink); text-align: center; }
figure.photo { margin-top: 1.8em; margin-bottom: 1.8em; }
figure.photo img { width: 100%; height: auto; border-radius: var(--radius); }

/* Tabuľka (týždenný plán) */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-top: 1.4em; margin-bottom: 1.6em; }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: .95rem; line-height: 1.5; }
.table-wrap caption { text-align: left; padding: 12px 14px 0; font-weight: 700; color: var(--ink); }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table-wrap thead th { background: var(--bg-tint); color: var(--ink); font-weight: 700; font-size: .84rem; }
.table-wrap tbody th { color: var(--ink); font-weight: 700; white-space: nowrap; }
.table-wrap tr:last-child th, .table-wrap tr:last-child td { border-bottom: 0; }

/* Zdroje */
.sources { margin-top: 2.6em; padding-top: 1.2em; border-top: 1px solid var(--line); font-size: .9rem; line-height: 1.6; color: var(--muted); }
.post-body .sources h2 { font-size: 1rem; margin: 0 0 .6em; letter-spacing: 0; }
.sources li { overflow-wrap: anywhere; }
.sources p { margin-bottom: .6em; }

/* Jemná výzva */
.cta-card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 24px 22px; margin-top: 2.4em; margin-bottom: 0; }
.post-body .cta-card h2 { margin: 0 0 .4em; font-size: 1.3rem; }
.cta-card p { font-size: .98rem; line-height: 1.65; }
.cta-actions { display: grid; gap: 10px; margin-top: 16px; }
.post-body .cta-actions a { text-decoration: none; min-height: 48px; padding: 12px 22px; font-size: 1rem; }
.post-body .cta-actions .btn-primary { color: #fff; }
.post-body .cta-actions .btn-ghost { color: var(--ink); }
.cta-actions .btn-ghost:hover { background: var(--bg-tint); }

/* Ďalšie články */
.more { margin-top: 2.6em; }
.post-body .more h2 { font-size: 1.15rem; margin: 0 0 .6em; }
.post-body .more ul { list-style: none; padding: 0; gap: 0; border-top: 1px solid var(--line); }
.more li { border-bottom: 1px solid var(--line); }
.post-body .more a { display: block; padding: 12px 0; color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.4; }
.post-body .more a:hover { color: var(--accent-dark); text-decoration: underline; }
.more-all { margin-top: 1em; font-size: .95rem; font-weight: 600; }

@media (min-width: 560px) {
  .cta-actions { grid-auto-flow: column; justify-content: start; }
  .sheets.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 760px) {
  .blog-main { padding-top: 44px; padding-bottom: 88px; }
  .post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .post-card.is-featured { grid-column: 1 / -1; flex-direction: row; }
  .post-card.is-featured .post-card-media { flex: 0 0 52%; aspect-ratio: auto; min-height: 320px; }
  .post-card.is-featured .post-card-body { justify-content: center; padding: 32px; gap: 12px; }
  .post-card.is-featured h2 { font-size: 1.7rem; line-height: 1.18; }
  .post-card.is-featured p { font-size: 1.04rem; }
  .post-card.is-featured .post-meta { margin-top: 0; }
  .sheets.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .box { padding: 24px 28px; }
  .cta-card { padding: 30px 32px; }
}
@media (prefers-reduced-motion: reduce) { .post-card { transition: none; } .post-card:hover { transform: none; } }
@media print {
  .cta-card, .more, .crumbs { display: none !important; }
  .blog-main { padding: 0; }
}
