/*
 * The article layout of megastroj.cz (resources/css/app.css there, "the real style" of the old megastroj.cz), in plain CSS for
 * both blogs (owner 16.11.2026: "style the blog pages like the Czech Megastroj"): the text column 744 px, the banner and the
 * photos 130 % of it (never wider than the page), numbered H2 in the site color, dots in the accent color, boxes with the old
 * icons, tables with lines, "Obsah článku", the photo tiles and "Ďalšie podobné články". Colors per site: --mb-* on .mb-article
 * (config/megablogs.php). Fonts come from the old site's own CSS (Red Hat Display / Sora).
 */
.mb-article { --mb-line: #d3dfe6; --mb-soft: #f3f6f8; --mb-muted: #5e7180; container-type: inline-size; color: var(--mb-ink); padding: 0 0 40px; }
.mb-article *, .mb-article *::before, .mb-article *::after { box-sizing: border-box; }
.mb-col { max-width: 744px; margin-inline: auto; }
.mb-wide { display: block; width: min(130%, 100cqw); max-width: none; margin-left: calc((100% - min(130%, 100cqw)) / 2); }

.mb-article h1 { margin: 10px auto 20px; max-width: 980px; text-align: center; font-size: 30px; line-height: 36px; font-weight: 800; color: var(--mb-ink); }
.mb-perex { margin-bottom: 20px; font-size: 20px; line-height: 28px; }
.mb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 0 auto 30px; font-size: 15px; color: var(--mb-muted); }
.mb-meta span { display: inline-flex; align-items: center; gap: 8px; }
.mb-meta svg { width: 18px; height: 18px; flex: none; color: var(--mb-brand); }
.mb-meta a { color: var(--mb-brand); }
.mb-cover { margin: 0 auto 30px; }
.mb-cover img { height: 300px; object-fit: cover; border-radius: 6px; }
@media (min-width: 900px) { .mb-article h1 { font-size: 36px; line-height: 44px; font-weight: 900; } .mb-meta { margin: 40px auto; } }

/* contents of the article */
.mb-toc { margin: 0 auto 30px; padding: 20px 30px; border: 1px solid var(--mb-line); border-radius: 5px; background: #fff; box-shadow: 0 0 5px rgba(0,0,0,.15); }
.mb-toc p { margin: 0 0 10px; font-weight: 700; font-size: 18px; }
.mb-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.mb-toc li { counter-increment: toc; margin: 0 0 6px; padding-left: 28px; position: relative; line-height: 22px; }
.mb-toc li::before { content: counter(toc) "."; position: absolute; left: 0; color: var(--mb-brand); font-weight: 700; }
.mb-toc a { color: var(--mb-ink); text-decoration: none; }
.mb-toc a:hover { color: var(--mb-brand); text-decoration: underline; }

/* the text */
.mb-body { counter-reset: kapitola; font-size: 16px; line-height: 24px; color: var(--mb-ink); }
.mb-body > * { margin-top: 0; margin-bottom: 20px; }
.mb-body p { margin: 0 0 20px; }
.mb-body a { color: var(--mb-brand); text-decoration: underline; text-underline-offset: 3px; }
.mb-body strong, .mb-body b { font-weight: 700; }
.mb-body h2, .mb-body h3, .mb-body h4 { color: var(--mb-brand); font-weight: 700; scroll-margin-top: 20px; text-align: left; }
.mb-body h2 { counter-increment: kapitola; display: flex; align-items: flex-start; gap: .5em; margin: 0 0 20px; padding-top: 30px; font-size: 24px; line-height: 30px; }
.mb-body h2::before { content: counter(kapitola) "."; flex: none; position: relative; top: -.15em; width: 1.5em; height: 1.5em; line-height: 1.5em; border-radius: 9999px; background: var(--mb-brand); color: #fff; text-align: center; font-size: .9em; }
.mb-body h3 { margin: 0 0 16px; padding-top: 10px; font-size: 21px; line-height: 28px; }
.mb-body h4 { margin: 0 0 14px; font-size: 18px; line-height: 24px; }
.mb-body ul { margin: 30px 20px; padding: 0; list-style: none; }
.mb-body ul > li { position: relative; margin: 0 0 10px; padding-left: 35px; font-size: 17px; line-height: 24px; }
.mb-body ul > li::before { content: ""; position: absolute; left: 6px; top: 8px; width: 8px; height: 8px; border-radius: 4px; background: var(--mb-accent); }
.mb-body ul.plus > li::before, .mb-body ul.minus > li::before { left: 4px; top: 4px; width: 16px; height: 16px; border-radius: 0; background: url(/css/clanek/seznam-plus.svg?v=2) center / 16px auto no-repeat; }
.mb-body ul.minus > li::before { background-image: url(/css/clanek/seznam-minus.svg?v=2); }
.mb-body ol { margin: 30px 20px; padding: 0; list-style: none; counter-reset: item; }
.mb-body ol > li { position: relative; margin: 0 0 10px; padding-left: 35px; }
.mb-body ol > li::before { content: counter(item) ". "; counter-increment: item; position: absolute; left: 0; color: var(--mb-brand); font-weight: 700; }
.mb-body li > p { margin: 0; }
.mb-body .box { border-radius: 8px; padding: 30px 60px; background: #f8f8f8 no-repeat 30px 35px; }
.mb-body .box > :last-child { margin-bottom: 0; }
.mb-body .box-notice { background-color: #f3f6f8; background-image: url(/css/clanek/box-notice.svg); }
.mb-body .box-warning { background-color: #ffebf0; background-image: url(/css/clanek/box-warning.svg); }
.mb-body .box-lightbulb { padding-left: 80px; background-color: #fffbec; background-image: url(/css/clanek/box-lightbulb.svg); }
.mb-body .box-leaf { padding-left: 80px; background-color: #eafffa; background-image: url(/css/clanek/box-leaf.svg); color: #006657; }
/* a quote / note: a calm box in the site color (the blogs use it for "Upozornění", "Tip" …) */
.mb-body blockquote { margin: 0 0 20px; padding: 22px 28px; border-left: 5px solid var(--mb-brand); border-radius: 6px; background: var(--mb-soft); font-style: normal; }
.mb-body blockquote > :last-child, .mb-body blockquote p:last-child { margin-bottom: 0; }
.mb-body > p img, .mb-body > a img, .mb-body > figure img, .mb-body > img, .mb-body > p > a > img {
    display: block; width: min(130%, 100cqw) !important; max-width: none; height: auto !important; margin-left: calc((100% - min(130%, 100cqw)) / 2); border-radius: 6px;
}
.mb-body img { max-width: 100%; height: auto; }
.mb-body figure { margin: 0 0 20px; }
.mb-body figcaption { margin-top: 8px; font-size: 14px; color: var(--mb-muted); text-align: center; }
.mb-body iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
.mb-body table { width: 100%; border: 0; border-collapse: collapse; }
.mb-body td, .mb-body th { padding: 12px 15px; border: 0; border-bottom: 1px solid var(--mb-line); vertical-align: top; text-align: left; }
.mb-body th { font-weight: 700; }
.mb-body tr:hover > td { background: var(--mb-soft); }
.mb-body hr { margin: 30px 0; border: 0; border-top: 1px solid var(--mb-line); }
.mb-body .txc { text-align: center; }
.mb-body .collapse { cursor: pointer; display: block; counter-increment: none; margin-bottom: 10px; padding: 5px 5px 5px 40px; border-bottom: 1px solid var(--mb-line); font-size: 16px; line-height: 20px; font-weight: 400; color: var(--mb-ink); background: url(/css/clanek/collapse.svg) no-repeat 12px 10px; }
.mb-body h2.collapse::before { content: none; }
@media (max-width: 899px) {
    .mb-body table { display: block; overflow-x: auto; }
    .mb-body .box { padding-right: 20px; }
    .mb-body ul, .mb-body ol { margin: 24px 0; }
}

/* the article's photos as tiles (the old gallery; a click opens the old photo viewer) */
.mb-gallery { padding-top: 30px; }
.mb-gallery h2 { margin: 0 0 12px; font-size: 18px; font-weight: 700; color: var(--mb-ink); }
.mb-gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .mb-gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.mb-gallery-grid a { display: block; aspect-ratio: 4 / 3; border-radius: 8px; background: var(--mb-soft) center / cover no-repeat; transition: transform .3s; }
.mb-gallery-grid a:hover { transform: scale(1.03); }

/* back to the blog */
.mb-back { margin: 40px auto 0; padding-top: 20px; border-top: 1px solid var(--mb-line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 15px; }
.mb-back a { color: var(--mb-brand); font-weight: 600; text-decoration: none; }
.mb-back a:hover { text-decoration: underline; }

/* related articles: a row to scroll */
.mb-related { margin: 50px 0 20px; }
.mb-related h2 { margin: 0 0 20px; text-align: center; font-size: 22px; font-weight: 700; color: var(--mb-ink); }
.mb-related-track { display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 6px; }
.mb-related-track a { flex: none; width: 250px; padding: 0 12px; color: var(--mb-ink); text-decoration: none; scroll-snap-align: start; }
.mb-related-track a > span { display: block; aspect-ratio: 4 / 3; border-radius: 10px; background: var(--mb-line) center / cover no-repeat; }
.mb-related-track h3 { margin: 10px 0; font-size: 16px; line-height: 22px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mb-related-track a:hover h3 { color: var(--mb-brand); text-decoration: underline; }
