/**
 * Typografie článků blogu — veřejná stránka i editor.
 * Tailwind Preflight maže listy/nadpisy; tyto styly je vrací.
 */

.article-body,
.ck-content,
.blog-html-editor {
    color: #334155;
    font-size: 1.125rem;
    line-height: 1.85;
}

.article-body > *:first-child,
.ck-content > *:first-child {
    margin-top: 0;
}

.article-body p,
.ck-content p {
    margin: 0 0 1.15em;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6,
.ck-content h1,
.ck-content h2,
.ck-content h3,
.ck-content h4,
.ck-content h5,
.ck-content h6 {
    color: #0f172a;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.25;
    margin: 1.75em 0 0.6em;
}

.article-body h1, .ck-content h1 { font-size: 2rem; }
.article-body h2, .ck-content h2 { font-size: 1.65rem; }
.article-body h3, .ck-content h3 { font-size: 1.3rem; }
.article-body h4, .ck-content h4 { font-size: 1.1rem; }

.article-body strong,
.article-body b,
.ck-content strong,
.ck-content b {
    font-weight: 700;
    color: #0f172a;
}

.article-body em,
.article-body i,
.ck-content em,
.ck-content i {
    font-style: italic;
}

.article-body a,
.ck-content a {
    color: #b8962e;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.article-body a:hover,
.ck-content a:hover {
    color: #0f172a;
}

.article-body ul,
.article-body ol,
.ck-content ul,
.ck-content ol {
    display: block !important;
    margin: 0.85em 0 1.35em !important;
    padding-left: 1.6em !important;
    list-style-position: outside !important;
}

.article-body ul,
.ck-content ul {
    list-style-type: disc !important;
}

.article-body ul ul,
.ck-content ul ul {
    list-style-type: circle !important;
    margin: 0.35em 0 !important;
}

.article-body ol,
.ck-content ol {
    list-style-type: decimal !important;
}

.article-body ol ol,
.ck-content ol ol {
    list-style-type: lower-alpha !important;
    margin: 0.35em 0 !important;
}

.article-body li,
.ck-content li {
    display: list-item !important;
    margin: 0.4em 0 !important;
    padding-left: 0.2em;
}

.article-body li::marker,
.ck-content li::marker {
    color: #d4af37;
    font-weight: 700;
}

.article-body li > p,
.ck-content li > p {
    margin: 0.15em 0;
}

.article-body sub,
.ck-content sub {
    vertical-align: sub;
    font-size: 0.75em;
    line-height: 0;
}

.article-body sup,
.ck-content sup {
    vertical-align: super;
    font-size: 0.75em;
    line-height: 0;
}

.article-body blockquote,
.ck-content blockquote {
    margin: 1.5em 0;
    padding: 0.85em 1.15em;
    border-left: 4px solid #d4af37;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.1), transparent);
    border-radius: 0 1rem 1rem 0;
    color: #475569;
    font-style: italic;
}

.article-body hr,
.ck-content hr {
    border: 0;
    height: 1px;
    margin: 2em 0;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.article-body img,
.ck-content img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 12px 28px -16px rgba(15, 23, 42, 0.35);
    margin: 1.25em 0;
}

.article-body figure,
.ck-content figure {
    margin: 1.5em 0;
}

.article-body figure.media,
.ck-content figure.media {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 1rem;
}

.article-body figure.media oembed,
.article-body figure.media iframe,
.ck-content figure.media iframe {
    display: block;
    width: 100%;
    min-height: 220px;
    aspect-ratio: 16 / 9;
    border: 0;
}

.article-body figcaption,
.ck-content figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.5em;
}

.article-body pre,
.ck-content pre {
    margin: 1.25em 0;
    padding: 1rem 1.15rem;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 1rem;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.6;
}

.article-body code,
.ck-content code {
    font-size: 0.88em;
    background: #f1f5f9;
    color: #0f172a;
    padding: 0.12em 0.4em;
    border-radius: 0.4rem;
}

.article-body pre code,
.ck-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

@media (max-width: 639px) {
    .article-body,
    .ck-content {
        font-size: 1.05rem;
        line-height: 1.8;
    }
    .article-body h2, .ck-content h2 { font-size: 1.4rem; }
    .article-body h3, .ck-content h3 { font-size: 1.2rem; }
}
