/* [BLOG-POST-TEMPLATE] Blog post page design (Nov 2026).
   Loaded only by theme/custommhs/template/extension/module/iblogs/post.twig,
   so nothing here reaches any other page. Every rule is scoped to .cmb-post.

   The post body (.cmb-body) gets light rules only, without !important: the
   HTML written into a post in the editor keeps its own fonts, sizes and
   colours, and these rules fill in only where the post says nothing. */

.cmb-post {
    --cmb-blue: #0083d0;
    --cmb-navy: #14304a;
    --cmb-text: #3d4b5c;
    --cmb-line: #dfe4ec;
    --cmb-soft: #f6f8fb;
}

/* The reading column: centred and kept to a comfortable line length. */
.cmb-post article,
.cmb-post .cmb-related {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Title area ---------------------------------------------------- */
.cmb-post .cmb-head {
    margin: 8px 0 22px;
}

.cmb-post .cmb-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

/* One pill holding every category of the post, separated by a dot. */
.cmb-post .cmb-chip {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    background: #e8f3fb;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.cmb-post .cmb-chip a {
    color: var(--cmb-blue);
    text-decoration: none;
}

.cmb-post .cmb-chip a:hover {
    text-decoration: underline;
}

.cmb-post .cmb-chip-dot {
    margin: 0 6px;
    color: var(--cmb-blue);
}

.cmb-post h1.cmb-title {
    margin: 0 0 14px;
    color: var(--cmb-navy);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
}

.cmb-post .cmb-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6b7785;
    font-size: 13px;
}

.cmb-post .cmb-avatar {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cmb-navy);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .03em;
    position: relative;
    overflow: hidden;
}

/* The author photo, when one has been uploaded, covers the initials. */
.cmb-post .cmb-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Plain text flow, so on a narrow screen the read time wraps along with
   the byline instead of starting a line with the separator dot. */
.cmb-post .cmb-meta-text {
    line-height: 1.5;
}

.cmb-post .cmb-meta .post-meta {
    display: inline;
    margin: 0;
    color: inherit;
    font-size: inherit;
}

.cmb-post .cmb-readtime {
    white-space: nowrap;
}

.cmb-post .cmb-readtime::before {
    content: "\00b7";
    margin: 0 8px;
}

/* ---- Featured image ------------------------------------------------ */
/* The picture is shown as it comes, at its own size (Blog > Settings >
   Post View image size): no frame, background or resizing. Only spacing. */
/* Space above the picture is padding, not margin: a margin here was lost
   on desktop (6px left between the meta line and the picture). */
.cmb-post .cmb-hero {
    margin: 0 0 28px;
    padding: 24px 0 0;
}

/* ---- Post body: light rules only ----------------------------------- */
/* 14px, the site's standard text size: the theme holds every <p> at 14px
   with !important, so lists, links and tables are kept at the same size
   rather than one step larger than the paragraphs around them. */
.cmb-post .cmb-body {
    color: var(--cmb-text);
    font-size: 14px;
    line-height: 1.7;
}

/* Links within the post ("In this guide") glide to their heading instead
   of jumping. This file loads only on the blog post page, so the rule on
   html reaches no other page. Visitors who ask their system for less
   motion keep the instant jump. */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* A heading reached from "In this guide" stops below the site header,
   which stays fixed at the top on desktop (about 165px tall). */
.cmb-post .cmb-body [id] {
    scroll-margin-top: 16px;
}

@media (min-width: 768px) {
    .cmb-post .cmb-body [id] {
        scroll-margin-top: 185px;
    }
}

/* Lists start inside the column; the theme's reset left the numbers
   hanging outside it. */
.cmb-post .cmb-body ol,
.cmb-post .cmb-body ul {
    padding-left: 24px;
}

.cmb-post .cmb-body li {
    margin-bottom: 4px;
}

.cmb-post .cmb-body h2 {
    margin: 34px 0 14px;
    padding-left: 12px;
    border-left: 4px solid var(--cmb-blue);
    color: var(--cmb-navy);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
}

.cmb-post .cmb-body h3 {
    margin: 26px 0 10px;
    color: var(--cmb-navy);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.35;
}

.cmb-post .cmb-body h4 {
    margin: 22px 0 8px;
    color: var(--cmb-navy);
    font-size: 18px;
    font-weight: 700;
}

.cmb-post .cmb-body table {
    width: 100%;
    margin: 18px 0 24px;
    border-collapse: collapse;
    border: 1px solid var(--cmb-line);
    font-size: 14px;
}

.cmb-post .cmb-body th,
.cmb-post .cmb-body thead td {
    background: var(--cmb-blue);
    color: #fff;
    font-weight: 700;
    text-align: left;
}

.cmb-post .cmb-body th,
.cmb-post .cmb-body td {
    padding: 10px 12px;
    border: 1px solid var(--cmb-line);
    vertical-align: top;
}

/* Stripes only on data tables (ones with a header cell). Older posts use
   tables to lay out product pictures, where stripes would look odd. */
.cmb-post .cmb-body table:has(th) tbody tr:nth-child(even) td {
    background: var(--cmb-soft);
}

/* The default template turns every table into a scrolling block so a wide
   one cannot push the page sideways on a phone. On wider screens a table is
   a table again, so it can fill the column. */
@media (min-width: 768px) {
    .cmb-post .cmb-body table {
        display: table;
    }
}

/* ---- Tags ----------------------------------------------------------- */
.cmb-post .cmb-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 8px 0 34px;
    padding-top: 18px;
    border-top: 1px solid var(--cmb-line);
}

.cmb-post .cmb-tags-label {
    color: #6b7785;
    font-weight: 700;
}

.cmb-post .cmb-tags [itemprop="keywords"] {
    display: contents;
}

.cmb-post .cmb-tags a {
    display: inline-block;
    margin: 0;
    padding: 5px 12px;
    border: 1px solid var(--cmb-line);
    border-radius: 999px;
    background: #fff;
    color: var(--cmb-text);
    font-size: 13px;
    text-decoration: none;
}

.cmb-post .cmb-tags a:hover {
    border-color: var(--cmb-blue);
    color: var(--cmb-blue);
}

/* ---- Related posts -------------------------------------------------- */
.cmb-post .cmb-related {
    margin-bottom: 40px;
}

.cmb-post .cmb-related-title {
    margin: 0 0 20px;
    color: var(--cmb-navy);
    font-size: 26px;
    font-weight: 700;
    text-align: center;
}

.cmb-post .cmb-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.cmb-post .cmb-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--cmb-line);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.cmb-post .cmb-card-image {
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--cmb-soft);
}

.cmb-post .cmb-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cmb-post .cmb-card-title {
    margin: 14px 16px 8px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.cmb-post .cmb-card-title a {
    color: var(--cmb-navy);
    text-decoration: none;
}

.cmb-post .cmb-card-more {
    margin: auto 16px 16px;
    color: var(--cmb-blue);
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 767px) {
    .cmb-post h1.cmb-title {
        font-size: 26px;
    }

    /* On phones the title area's own bottom margin does apply, so less
       padding is needed for the same gap above the picture. */
    .cmb-post .cmb-hero {
        padding-top: 2px;
    }

    /* The theme centres headings on phones; with the blue bar on the left a
       heading reads better left-aligned. */
    .cmb-post .cmb-body h2,
    .cmb-post .cmb-body h3,
    .cmb-post .cmb-body h4 {
        text-align: left;
    }

    .cmb-post .cmb-body h2 {
        font-size: 22px;
    }

    /* A list a post sets in two columns ("In this guide") is too tight on a
       phone. The post's own inline style has to be outranked here. */
    .cmb-post .cmb-body ol[style*="columns"],
    .cmb-post .cmb-body ul[style*="columns"] {
        columns: 1 !important;
    }

    .cmb-post .cmb-related-grid {
        grid-template-columns: 1fr;
    }
}
