/* ==========================================================================
   Blog (články): navazuje na css/styles.css, používá stejné proměnné.
   Karty jako Služby: světlý povrch, tenký rámeček, záře pod kurzorem. Žádné pilulky.
   ========================================================================== */
.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; }

.blog-page, .post { padding-top: clamp(7.5rem, 13vw, 10rem); }
.blog-page { padding-bottom: var(--block); }

/* ---------- Hlavička výpisu ---------- */
.blog-head { max-width: 54rem; margin-bottom: clamp(2.25rem, 4vw, 3.25rem); }
.blog-head .label, .blog-head .crumbs { margin-bottom: 1.5rem; }
.blog-head .label::after { display: none; }
.blog-title { font-size: clamp(2.4rem, 5.2vw, 4rem); line-height: 1.02; letter-spacing: -.045em; font-weight: 500; text-wrap: balance; margin: 0; }
.blog-title .serif { color: var(--accent); font-size: 1.06em; letter-spacing: -.02em; font-family: var(--serif); font-style: italic; font-weight: 400; }
.blog-lead { margin-top: 1.25rem; color: var(--muted); max-width: 40rem; font-size: 1.0625rem; line-height: 1.6; }

/* Drobečková navigace */
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .65rem; font-size: .75rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.crumbs li { display: inline-flex; align-items: center; gap: .5rem; }
.crumbs li:first-child::before { content: ""; width: 10px; height: 10px; background: var(--accent); flex: none; clip-path: polygon(50% 0%, 64% 36%, 100% 50%, 64% 64%, 50% 100%, 36% 64%, 0% 50%, 36% 36%); }
.crumbs li + li::before { content: ""; width: 4px; height: 4px; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: rotate(-45deg); flex: none; }
.crumbs a { color: var(--ink-2); text-decoration: none; transition: color var(--t); }
.crumbs a:hover { color: var(--accent); }

/* Filtr kategorií: textové odkazy na lince, aktivní s červenou čarou */
.blog-filter { border-bottom: 1px solid var(--line-2); margin-bottom: clamp(2rem, 4vw, 2.75rem); overflow-x: auto; scrollbar-width: none; }
.blog-filter::-webkit-scrollbar { display: none; }
.blog-filter ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(1.25rem, 3vw, 2.25rem); }
.blog-filter a { position: relative; display: inline-flex; align-items: baseline; gap: .45rem; padding: .85rem 0; color: var(--muted); text-decoration: none; font-size: .9375rem; white-space: nowrap; transition: color var(--t); }
.blog-filter a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--t); }
.blog-filter a:hover { color: var(--ink); }
.blog-filter a[aria-current="page"] { color: var(--ink); }
.blog-filter a[aria-current="page"]::after { transform: scaleX(1); }
.blog-filter-n { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Karty článků ---------- */
.post-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }

.post-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t); }
.post-card::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity var(--t);
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(212,0,0,0.053), transparent 60%); }
.post-card:hover { border-color: var(--line-2); transform: translateY(-4px); box-shadow: 0 24px 44px -28px rgba(28,28,31,.35); }
.post-card:hover::before { opacity: 1; }
.post-card:focus-within { border-color: var(--line-2); }
.post-card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.post-card-media picture, .post-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-card-media img { transition: transform var(--t); }
.post-card:hover .post-card-media img { transform: scale(1.02); }
.post-card-body { display: flex; flex-direction: column; flex: 1; padding: clamp(1.4rem, 2.4vw, 1.75rem); }
.post-meta { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; margin: 0 0 1rem; font-size: .8125rem; color: var(--muted); }
.post-meta-cat, .post-meta-date { display: inline-flex; align-items: center; gap: .4rem; }
.post-meta-cat { color: var(--ink-2); font-size: .6875rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.post-meta .ph { width: 14px; height: 14px; flex: none; color: var(--muted); }
.post-card-title { font-size: clamp(1.25rem, 1.7vw, 1.45rem); line-height: 1.2; letter-spacing: -.03em; font-weight: 500; margin: 0 0 .7rem; text-wrap: balance; }
.post-card-link { color: inherit; text-decoration: none; }
/* celá karta je klikatelná, odkaz zůstává jediným prvkem pro klávesnici a čtečky */
.post-card-link::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.post-card-link:focus-visible { outline: none; }
.post-card:has(.post-card-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.post-card-excerpt { color: var(--muted); font-size: .9375rem; line-height: 1.55; margin: 0 0 1.5rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-more { margin: auto 0 0; display: inline-flex; align-items: center; gap: .5rem; font-size: .875rem; font-weight: 500; color: var(--ink); }
.post-card-more .ph { width: 18px; height: 18px; color: var(--accent); transition: transform var(--t); }
.post-card:hover .post-card-more .ph { transform: translateX(3px); }

/* Textový odkaz se šipkou */
.text-link { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); font-weight: 500; font-size: .9375rem; text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: rgba(28,28,31,.18); transition: color var(--t), text-decoration-color var(--t); }
.text-link .ph { width: 18px; height: 18px; color: var(--accent); transition: transform var(--t); }
.text-link:hover { text-decoration-color: currentColor; }
.text-link:hover .ph { transform: translateX(3px); }

.blog-empty { padding: 2.5rem 0; border-top: 1px solid var(--line-2); display: grid; gap: 1.25rem; justify-items: start; color: var(--ink-2); }
.blog-empty p { margin: 0; }

/* Stránkování */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: 1.25rem; border-top: 1px solid var(--line-2); font-size: .9375rem; }
.pager-link { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); text-decoration: none; font-weight: 500; transition: color var(--t); }
.pager-link .ph { width: 18px; height: 18px; color: var(--accent); }
.pager-link:hover { color: var(--accent); }
.pager-link.is-disabled { color: var(--muted); opacity: .45; }
.pager-link.is-disabled .ph { color: currentColor; }
.pager-status { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Článek (sloupec vycentrovaný v kontejneru) ---------- */
.post-head { max-width: 54rem; margin: 0 auto clamp(2rem, 4vw, 3rem); }
.post-head .crumbs { margin-bottom: 1.75rem; }
.post-title { font-size: clamp(2.2rem, 4.8vw, 3.75rem); line-height: 1.04; letter-spacing: -.045em; font-weight: 500; text-wrap: balance; margin: 0; }
.post-facts { display: flex; flex-wrap: wrap; gap: .85rem 1.75rem; margin: 1.75rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line-2); }
.post-facts div { display: grid; gap: .2rem; }
.post-facts dt { font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.post-facts dd { margin: 0; display: inline-flex; align-items: center; gap: .45rem; font-size: .9375rem; color: var(--ink); }
.post-facts dd .ph { width: 16px; height: 16px; flex: none; color: var(--muted); }
.post-facts a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: rgba(28,28,31,.18); transition: color var(--t), text-decoration-color var(--t); }
.post-facts a:hover { text-decoration-color: currentColor; }
.post-facts-edit { margin-left: auto; }
.post-facts-edit[hidden] { display: none; }
.post-facts-edit a { display: inline-flex; align-items: center; gap: .4rem; color: var(--accent); text-decoration: none; font-weight: 500; }
.post-facts-edit a:hover { color: var(--accent-hover); }
.post-facts-edit dd .ph { width: 15px; height: 15px; color: inherit; }

.post-cover { max-width: 54rem; margin: 0 auto clamp(2.5rem, 5vw, 4rem); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.post-cover picture, .post-cover img { display: block; width: 100%; height: auto; }

.post-layout { display: grid; gap: 3rem; max-width: 54rem; margin: 0 auto; padding-bottom: var(--block); }

/* Typografie textu článku */
.prose { font-size: 1.0625rem; line-height: 1.72; color: var(--ink-2); }
.prose > * + * { margin-top: 1.15em; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.5rem, 2.4vw, 1.95rem); line-height: 1.15; letter-spacing: -.035em; font-weight: 500; color: var(--ink); margin-top: 2.2em; }
.prose h3 { font-size: clamp(1.2rem, 1.8vw, 1.4rem); line-height: 1.25; letter-spacing: -.025em; font-weight: 500; color: var(--ink); margin-top: 1.9em; }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose a { color: var(--ink); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: rgba(28,28,31,.18); transition: color var(--t), text-decoration-color var(--t); }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong, .prose b { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { padding: 0; list-style: none; display: grid; gap: .55em; }
.prose ul > li { position: relative; padding-left: 1.4rem; }
.prose ul > li::before { content: ""; position: absolute; left: 2px; top: .78em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-2); opacity: .5; }
.prose ol { counter-reset: li; }
.prose ol > li { position: relative; padding-left: 2rem; counter-increment: li; }
.prose ol > li::before { content: counter(li, decimal-leading-zero); position: absolute; left: 0; top: .2em; font-size: .8125rem; letter-spacing: .04em; color: var(--accent); font-weight: 500; font-variant-numeric: tabular-nums; }
.prose li > p { margin: 0; }
.prose li > ul, .prose li > ol { margin-top: .55em; }
.prose blockquote { margin: 2em 0; padding: 1.4rem 0 0; border-top: 1px solid var(--line-2); font-family: var(--serif); font-style: italic; font-size: clamp(1.45rem, 2.4vw, 1.9rem); line-height: 1.3; letter-spacing: -.01em; color: var(--ink); position: relative; }
.prose blockquote::before { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; background: var(--accent); }
.prose blockquote p { margin: 0; }
.prose blockquote p + p { margin-top: .6em; }
.prose hr { border: 0; height: 1px; background: var(--line-2); margin: 2.5em 0; }
.prose img { display: block; max-width: 100%; height: auto; border-radius: var(--r-md); border: 1px solid var(--line); margin: 2em 0; }
.prose figure { margin: 2em 0; }
.prose figcaption { margin-top: .6rem; font-size: .875rem; color: var(--muted); }
.prose-table { overflow-x: auto; margin: 2em 0; border-top: 1px solid var(--line-2); }
.prose-table:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: .8rem 1rem .8rem 0; border-bottom: 1px solid var(--line); }
.prose th { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); font-weight: 500; border-bottom-color: var(--line-2); }
.prose th p, .prose td p { margin: 0; }
.prose code { font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }

/* Patička článku: štítky */
.post-foot { display: grid; gap: 2rem; align-content: start; padding-top: 2rem; border-top: 1px solid var(--line-2); }
.post-foot-h { font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 0 0 .9rem; }
.post-tags ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem .6rem; }
.post-tags a { display: inline-flex; align-items: center; padding: .4rem .9rem; border-radius: var(--r-btn); border: 1px solid var(--line-2); background: rgba(255, 255, 255, .55); color: var(--ink); font-size: .8125rem; font-weight: 500; text-decoration: none; transition: border-color var(--t), background-color var(--t), color var(--t); }
.post-tags a:hover { border-color: var(--ink); background: #fff; }

/* CTA na konzultaci (tmavý blok jako Kontakt) */
.post-cta { margin-bottom: 10px; }
.post-cta-grid { display: grid; gap: 2rem; align-items: end; }
.post-cta .label { margin-bottom: 1.5rem; }
.post-cta .sec-title { margin: 0; }
.post-cta-side { display: grid; gap: 1.5rem; justify-items: start; }
.post-cta-side p { margin: 0; color: var(--on-dark-2); font-size: 1.0625rem; max-width: 26rem; }
@media (min-width: 1024px) { .post-cta-grid { grid-template-columns: 1.4fr 1fr; gap: 4rem; } }
.btn-light { background: #eeede9; color: #1c1c1f; border-color: #eeede9; padding: 0 1.25rem 0 1.4rem; min-height: 52px; gap: .75rem; text-decoration: none; }
.btn-light:hover { background: #fff; border-color: #fff; }
.btn-light .btn-icon { width: auto; height: auto; background: none; color: var(--accent); }
.btn-light:hover .btn-icon { background: none; transform: translateX(3px); }
.btn-light:focus-visible { outline: 2px solid var(--accent-on-dark); outline-offset: 3px; }

/* Související články a blok na homepage */
.related-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.25rem 2rem; margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem); }
.related-title { font-size: clamp(1.6rem, 2.8vw, 2.25rem); line-height: 1.1; letter-spacing: -.04em; font-weight: 500; margin: 0; }
.home-posts .label { margin-bottom: 1.5rem; }
.home-posts .sec-title { margin: 0; }

/* Archiv podle měsíců: textové odkazy oddělené linkou, žádné pilulky */
.blog-archive { margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: 1.5rem; border-top: 1px solid var(--line-2); display: grid; gap: 1rem; }
@media (min-width: 760px) { .blog-archive { grid-template-columns: 12rem minmax(0, 1fr); gap: 2rem; } }
.blog-archive-h { font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: .35rem 0 0; }
.blog-archive-years { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.blog-archive-year { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.25rem; font-size: .9375rem; }
.blog-archive-year > a { font-weight: 500; min-width: 3rem; }
.blog-archive ul ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.blog-archive a { color: var(--ink-2); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: rgba(28,28,31,.18); transition: color var(--t), text-decoration-color var(--t); }
.blog-archive a:hover { color: var(--ink); text-decoration-color: currentColor; }
.blog-archive a[aria-current="page"] { color: var(--ink); text-decoration-color: var(--accent); }
.blog-archive-n { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; margin-left: .3rem; }

/* 404 */
.nf-actions { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; padding-top: 2rem; border-top: 1px solid var(--line-2); }
.nf-actions .btn { text-decoration: none; }
.nf-code { font-family: var(--serif); font-style: italic; color: var(--accent); }

/* Aktivní položka menu na stránkách blogu */
.nav-links a[aria-current="page"] { color: var(--ink); }

/* Lišta náhledu z administrace */
.preview-bar { position: fixed; left: 12px; bottom: 12px; z-index: 200; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; padding: .7rem 1rem; background: var(--ink); color: #fff; border-radius: var(--r-btn, 3px); font-size: .875rem; box-shadow: 0 14px 34px -16px rgba(28,28,31,.5); }
.preview-bar strong { display: inline-flex; align-items: center; gap: .5rem; font-weight: 500; }
.preview-bar strong::before { content: ""; width: 6px; height: 6px; background: var(--accent-on-dark); }
.preview-bar span { color: #c9c8cd; }
.preview-bar a { color: #fff; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: rgba(255,255,255,.22); transition: text-decoration-color var(--t); }
.preview-bar a:hover { text-decoration-color: currentColor; }

@media (max-width: 430px) {
  .blog-title { font-size: clamp(2.1rem, 10vw, 2.6rem); }
  .post-title { font-size: clamp(1.95rem, 9.2vw, 2.4rem); overflow-wrap: break-word; }
  .post-facts { gap: .85rem 1.5rem; }
  .related-head .text-link { width: 100%; }
}
@media (max-width: 759px) {
  .post-facts { gap: .9rem 1.75rem; }
  .pager-link span { display: none; }
  .pager-link { padding: .5rem; margin: -.5rem; }
}
