/* ============================================================
   SINGLE POST
   ============================================================ */

/* Jednotné jemně teplé pozadí webu (10/2026) — dřív zelený gradient, pak
   čistě bílá; teplý tón #FAF7F0 nechá bílé karty obsahu vyniknout. */
body.single-post {
    background: #FAF7F0;
}

#single-post {
    min-height: 60vh;
    /* Kontejner pro absolutní .bg-decorations (SVG tvary po stranách);
       obsah nad nimi drží z-index na přímých potomcích. */
    position: relative;
}

#single-post > *:not(.bg-decorations) {
    position: relative;
    z-index: 1;
}

/* ── Hero ─────────────────────────────────────────────────── */
/* Editorial hlavička bez cover obrázku (og-covery zdvojovaly titulek) —
   kategorie, H1 a autorský řádek, oddělené jemnou linkou od obsahu. */
.single-hero {
    padding: 48px 0 0;
}

.single-hero-content {
    padding: 8px 0 32px;
    border-bottom: 1px solid #ecefe3;
}

.single-byline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.single-byline-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #87BA41;
    background: #fff;
    flex: 0 0 auto;
}

.single-byline-text strong {
    display: block;
    font-size: 15px;
    color: #191D14;
    line-height: 1.3;
    margin-bottom: 2px;
}

.single-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
}

.single-breadcrumb a {
    color: #87BA41;
    text-decoration: none;
    transition: color .2s;
}

.single-breadcrumb a:hover {
    color: #426900;
}

.single-breadcrumb span:last-child {
    color: #555;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.single-title {
    color: #191D14;
    font-size: clamp(26px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    max-width: 800px;
}

.single-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #777;
    font-size: 14px;
}

.single-meta-sep {
    opacity: .4;
}


/* ── Body grid ────────────────────────────────────────────── */
.single-body {
    padding-top: 56px !important;
    padding-bottom: 80px !important;
}

.single-content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}

/* ── Article content ──────────────────────────────────────── */
.single-content {
    background: #fff;
    border: 1px solid #eef1e6;
    border-radius: 16px;
    padding: 48px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .06);
}

.single-content > *:first-child {
    margin-top: 0;
}

/* Typografie článku — mezery sjednocené (10/2026): nadpisy 1,6/1,4 em nad,
   0,6/0,5 em pod; bloky (odstavce, seznamy, tabulky, obrázky) 1,2 em pod. */
.single-content h2 {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 700;
    color: #191D14;
    margin: 1.6em 0 0.6em;
    padding-bottom: 8px;
    border-bottom: 2px solid #87BA4130;
}

.single-content h2:first-child {
    margin-top: 0;
}

.single-content h3 {
    font-size: clamp(17px, 2.5vw, 22px);
    font-weight: 600;
    color: #2B4700;
    margin: 1.4em 0 0.5em;
}

.single-content p {
    font-size: 17px;
    line-height: 1.8;
    color: #2d3424;
    margin: 0 0 1.2em;
}

.single-content ul,
.single-content ol {
    font-size: 17px;
    line-height: 1.8;
    color: #2d3424;
    padding-left: 1.4em;
    margin: 0 0 1.2em;
}

.single-content li {
    margin-bottom: .4em;
}

.single-content strong {
    color: #191D14;
}

.single-content a {
    color: #87BA41;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.single-content a:hover {
    color: #426900;
}

/* Tabulky */
.single-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    margin: 0 0 1.2em;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .07);
}

.single-content th {
    background: #87BA41;
    color: #fff;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
}

.single-content td {
    padding: 11px 16px;
    border-bottom: 1px solid #f0f0ec;
    color: #2d3424;
}

.single-content tr:last-child td {
    border-bottom: none;
}

.single-content tr:nth-child(even) td {
    background: #f7faf2;
}

/* Obrázky v obsahu — vycentrované */
.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 0 auto 1.2em;
    display: block;
}

.single-content figure {
    margin: 0 auto 1.2em;
    text-align: center;
}

.single-content figure img {
    margin-bottom: 0;
}

.single-content figcaption {
    font-size: 13.5px;
    color: #6b7062;
    margin-top: 8px;
}

/* ── CTA box ──────────────────────────────────────────────── */
.single-cta-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, #f2f8e8 0%, #e8f4d4 100%);
    border: 1px solid #87BA4140;
    border-radius: 14px;
    padding: 28px 32px;
    margin-top: 48px;
}

.single-cta-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.single-cta-text strong {
    font-size: 18px;
    color: #191D14;
}

.single-cta-text span {
    font-size: 14px;
    color: #555;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.single-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-card {
    background: #fff;
    border: 1px solid #eef1e6;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .06);
    text-align: center;
}

.sidebar-author-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 14px;
    border: 3px solid #87BA41;
}

.sidebar-author-img img {
    width: 100%;
    height: 100%;
    /* Čtvercový ořez hlavy (jc-avatar-v2) — cover vyplní kolečko. */
    object-fit: cover;
    display: block;
    background: #fff;
}

.sidebar-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
}

.sidebar-author-info strong {
    font-size: 17px;
    color: #191D14;
    font-weight: 700;
}

.sidebar-author-info span {
    font-size: 13px;
    color: #87BA41;
    font-weight: 500;
}

.sidebar-author-bio {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin: 0 0 20px;
}

/* CTA v kartě autora: na celou šířku, ikona + text vycentrované
   (btn-cta je flex zarovnaný doleva — tady by tlačítko vypadalo prázdně). */
.sidebar-cta {
    width: 100%;
    justify-content: center;
}

.sidebar-cta,
.single-cta-box .btn-cta {
    color: #191D14;
}

.sidebar-cta svg,
.single-cta-box .btn-cta svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: block;
}

/* Ikony mají barvy natvrdo v SVG (bubble-chat stroke #fff — na zeleném
   tlačítku nebyla vidět) → vždy barvou textu tlačítka, kvůli kontrastu. */
.sidebar-cta svg path,
.sidebar-cta svg rect,
.single-cta-box .btn-cta svg path,
.single-cta-box .btn-cta svg rect {
    stroke: currentColor;
}

/* Související články */
.sidebar-related {
    background: #fff;
    border: 1px solid #eef1e6;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .06);
}

.sidebar-related-title {
    font-size: 15px;
    font-weight: 700;
    color: #191D14;
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.related-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0ec;
    transition: color .2s;
}

.related-item:last-child {
    border-bottom: none;
}

.related-item:hover span {
    color: #87BA41;
}

/* Místo miniatur (og-covery s textem byly v 60×50 px nečitelné) zelená
   šipka v kolečku — čisté a konzistentní s ikonografií webu. */
.related-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #87ba4126;
    color: #426900;
    flex-shrink: 0;
    transition: background .2s, color .2s;
}

.related-arrow svg {
    width: 14px;
    height: 14px;
}

/* Ikona má stroke natvrdo (#000) — CSS vlastnost přebije atribut,
   šipka tak přebírá barvu kolečka (zelená / bílá na hoveru). */
.related-arrow svg path {
    stroke: currentColor;
}

.related-item:hover .related-arrow {
    background: #87BA41;
    color: #fff;
}

.related-item span {
    font-size: 14px;
    font-weight: 500;
    color: #2d3424;
    line-height: 1.4;
    transition: color .2s;
}

/* ── Responzivita ─────────────────────────────────────────── */
@media (max-width: 991px) {
    /* Pod 992 px je hlavička position:fixed (57 px) a nezabírá místo v toku —
       bez odsazení ležela přes horní část coveru (ostatní stránky to řeší
       margin-top: 80px u #primary). */
    #single-post {
        padding-top: 64px;
    }

    .single-content-grid {
        grid-template-columns: 1fr;
    }

    .single-sidebar {
        position: static;
    }
}

@media (max-width: 767px) {
    .single-hero {
        min-height: 0;
        padding-top: 16px;
    }

    .single-hero-content {
        padding-top: 8px;
        padding-bottom: 24px;
    }

    .single-breadcrumb {
        margin-bottom: 10px;
    }

    .single-byline {
        margin-top: 16px;
    }

    .single-byline-avatar {
        width: 42px;
        height: 42px;
    }

    .single-content {
        padding: 28px 20px;
    }

    /* Širší tabulky (srovnání) na úzkém displeji rolují vodorovně místo
       rozbití layoutu. */
    .single-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* !important: základní pravidlo .single-body má !important (přebíjí
       .wpb-content-wrapper), bez něj se mobilní mezery neuplatnily. */
    .single-body {
        padding-top: 24px !important;
        padding-bottom: 48px !important;
    }

    .single-content-grid {
        gap: 28px;
    }

    .single-cta-box {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px 20px;
    }
}

/* Kontrast textu (WCAG AA) — 10/2026 */
.single-breadcrumb,
.single-meta {
    color: #6b7062;
}

.single-breadcrumb a,
.single-content a,
.sidebar-author-info span,
.related-item:hover span {
    color: #57782a;
}
