/* ==========================================================================
   Safety First Medical Services — Insights (blog) · v2 · 2026-09-11
   Loaded ONLY by blogs.html and blog/*.html.

   Every rule is scoped under .sfb (the page's <main>) or .sfb-progress —
   class names that exist nowhere else on the site — and none of the legacy
   blog classes from style.css (.blog-details-content, .course-price, …) are
   used any more, so this file needs no override hacks against style.css.

   Two site-wide rules it does have to neutralise, inside .sfb only:
     style.css   section { overflow: hidden }   -> would break position:sticky
     custom.css  h1 { text-transform: capitalize; font-size: 38px }
   ========================================================================== */

/* Height of the site's fixed header. Layout reserves it; the article script
   refines --sfb-offset (scroll targets + sticky sidebar) from the live header. */
/* Height of the site's fixed bar (div#main-menu), measured 2026-09-11:
   129px desktop · 132px tablet (the top bar wraps to two lines) · 71px at
   <=768px (style.css hides the top bar). sfms-blog.js measures the live bar and
   sets --sfb-offset, which takes precedence wherever the script has run. */
:root { --sfb-header: 129px; }
@media (max-width: 991px) { :root { --sfb-header: 132px; } }
@media (max-width: 768px) { :root { --sfb-header: 71px; } }

.sfb {
    --sfb-ink: #0f1c2e;
    --sfb-body: #334155;
    --sfb-muted: #64748b;
    --sfb-line: #e2e8f0;
    --sfb-soft: #f5f8fc;
    --sfb-blue: #0164a7;
    --sfb-blue-600: #01558e;
    --sfb-blue-50: #eaf3fb;
    --sfb-red: #cb052c;
    --sfb-navy: #0b1a2c;
    --sfb-radius: 16px;
    --sfb-shadow: 0 1px 2px rgba(15, 28, 46, .05), 0 12px 32px rgba(15, 28, 46, .08);
    display: block;
    padding-top: var(--sfb-offset, var(--sfb-header));
    padding-bottom: 72px;              /* white space between the CTA band and the site footer */
    color: var(--sfb-body);
    font-family: "Lato", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.sfb section { overflow: visible; }
.sfb h1, .sfb h2, .sfb h3, .sfb p { margin-top: 0; text-transform: none; }
.sfb img { display: block; max-width: 100%; height: auto; }
.sfb a { color: inherit; }
.sfb a:focus-visible,
.sfb button:focus-visible,
.sfb summary:focus-visible { outline: 3px solid rgba(1, 100, 167, .45); outline-offset: 3px; border-radius: 6px; }

/* ------------------------------------------------------------------ hero -- */
.sfb-hero {
    position: relative;
    padding: 64px 0 76px;
    color: #cbd5e1;
    background:
        radial-gradient(900px 420px at 88% -20%, rgba(1, 100, 167, .55), transparent 65%),
        radial-gradient(700px 360px at 0% 125%, rgba(203, 5, 44, .20), transparent 60%),
        linear-gradient(180deg, #0b1a2c 0%, #0f2742 100%);
}

.sfb-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0 0 28px;
    font-size: 13.5px;
    color: #94a3b8;
}
.sfb .sfb-crumb a { color: #cbd5e1; text-decoration: none; }
.sfb .sfb-crumb a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.sfb-crumb > span[aria-hidden] { margin: 0 10px; opacity: .5; }
.sfb-crumb [aria-current] { color: #e2e8f0; }

.sfb-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #9fd0f5;
}
.sfb-eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--sfb-red); }

.sfb .sfb-hero-title {
    margin: 0 0 20px;
    font-size: 60px;
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -.025em;
    color: #fff;
}
.sfb-lead { max-width: 640px; margin: 0 0 24px; font-size: 19px; line-height: 1.65; color: #cbd5e1; }
.sfb-hero-note { margin: 0; font-size: 14px; color: #94a3b8; }
.sfb-hero-note > span[aria-hidden] { margin: 0 10px; opacity: .6; }

/* article hero */
.sfb-hero--post { padding-bottom: 64px; }
.sfb .sfb-post-title {
    max-width: 900px;
    margin: 0 0 28px;
    font-size: 48px;
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -.02em;
    color: #fff;
}
.sfb-byline { display: flex; align-items: center; gap: 14px; }
.sfb-byline p { margin: 0; }
.sfb-avatar {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sfb-blue), #0b8bd9);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
}
.sfb-byline-name { font-size: 15px; font-weight: 700; color: #e2e8f0; }
.sfb .sfb-byline-name a {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, .35);
    text-underline-offset: 3px;
}
.sfb .sfb-byline-name a:hover { text-decoration-color: #fff; }

/* ------------------------------------------------------------- meta line -- */
.sfb-meta { display: flex; flex-wrap: wrap; align-items: center; margin: 0; font-size: 14px; color: var(--sfb-muted); }
.sfb-meta > span[aria-hidden] { margin: 0 8px; opacity: .6; }
.sfb-hero .sfb-meta { color: #94a3b8; }

.sfb-topic { margin: 0; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sfb-blue); }

/* stretched link: the whole card/feature is one click target, one link */
.sfb-stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }

/* --------------------------------------------------------------- listing -- */
.sfb-listing { padding: 72px 0 88px; background: #fff; }

.sfb-feature {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
    margin: 0 0 72px;
    border-radius: 24px;
    transition: background-color .25s ease;
}
@media (min-width: 992px) {
    .sfb-feature { padding: 20px; margin: 0 -20px 72px; }
    .sfb-feature:hover { background: var(--sfb-soft); }
}
.sfb-feature-media { overflow: hidden; border-radius: 18px; box-shadow: var(--sfb-shadow); }
.sfb-feature-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .5s ease; }
.sfb-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 16px; }
.sfb-badge {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 999px;
    background: #fdecef;
    color: var(--sfb-red);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.sfb .sfb-feature-title {
    margin: 0 0 16px;
    font-size: 36px;
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: -.02em;
    color: var(--sfb-ink);
}
.sfb .sfb-feature-title a,
.sfb .sfb-card-title a {
    color: inherit;
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: background-size .3s ease, color .2s ease;
}
.sfb .sfb-feature:hover .sfb-feature-title a,
.sfb .sfb-card:hover .sfb-card-title a { color: var(--sfb-blue); background-size: 100% 2px; }
.sfb-feature:hover .sfb-feature-media img,
.sfb-card:hover .sfb-card-media img { transform: scale(1.035); }

.sfb-excerpt { margin: 0 0 20px; font-size: 17px; line-height: 1.7; color: var(--sfb-body); }
.sfb-feature .sfb-meta { margin-bottom: 24px; }
.sfb-readmore { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: var(--sfb-blue); }
.sfb-readmore i { transition: transform .25s ease; }
.sfb-feature:hover .sfb-readmore i { transform: translateX(4px); }

.sfb-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 16px;
    margin: 0 0 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--sfb-line);
}
.sfb .sfb-section-title { margin: 0; font-size: 26px; font-weight: 900; letter-spacing: -.01em; color: var(--sfb-ink); }
.sfb .sfb-link-all { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--sfb-blue); text-decoration: none; }
.sfb .sfb-link-all:hover { color: var(--sfb-blue-600); }
.sfb .sfb-link-all i { transition: transform .2s ease; }
.sfb .sfb-link-all:hover i { transform: translateX(3px); }

/* auto-fit: two cards share the row instead of leaving an empty third column */
.sfb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 32px; }

.sfb-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--sfb-line);
    border-radius: var(--sfb-radius);
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.sfb-card:hover { transform: translateY(-4px); border-color: #cfdbe8; box-shadow: var(--sfb-shadow); }
.sfb-card-media { overflow: hidden; }
.sfb-card-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .5s ease; }
.sfb-card-body { display: flex; flex: 1; flex-direction: column; padding: 24px 26px 26px; }
.sfb-card .sfb-topic { margin-bottom: 10px; }
.sfb .sfb-card-title { margin: 0 0 12px; font-size: 21px; line-height: 1.35; font-weight: 700; color: var(--sfb-ink); }
.sfb-card .sfb-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin-bottom: 20px;
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--sfb-muted);
}
.sfb-card .sfb-meta { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--sfb-line); font-size: 13.5px; }

.sfb-related { padding: 72px 0 88px; background: var(--sfb-soft); border-top: 1px solid var(--sfb-line); }

/* -------------------------------------------------------------- CTA band -- */
.sfb-cta-band {
    padding: 64px 0;
    background:
        radial-gradient(800px 300px at 100% 0%, rgba(1, 100, 167, .5), transparent 60%),
        linear-gradient(90deg, #0b1a2c, #0f2742);
}
.sfb-cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px; }
.sfb .sfb-cta-title { margin: 0 0 10px; font-size: 30px; line-height: 1.2; font-weight: 900; letter-spacing: -.01em; color: #fff; }
.sfb-cta-text { max-width: 640px; margin: 0; font-size: 16.5px; line-height: 1.65; color: #cbd5e1; }
.sfb-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.sfb .sfb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 24px;
    border: 1.5px solid transparent;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.sfb .sfb-btn:hover { transform: translateY(-1px); }
.sfb .sfb-btn--light { background: #fff; color: var(--sfb-navy); }
.sfb .sfb-btn--light:hover { background: var(--sfb-blue-50); color: var(--sfb-navy); }
.sfb .sfb-btn--ghost { border-color: rgba(255, 255, 255, .4); color: #fff; }
.sfb .sfb-btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); color: #fff; }
.sfb .sfb-btn--primary { width: 100%; background: var(--sfb-blue); color: #fff; }
.sfb .sfb-btn--primary:hover { background: var(--sfb-blue-600); color: #fff; }

/* ---------------------------------------------------------- article page -- */
.sfb-body { padding: 56px 0 80px; background: #fff; }
.sfb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 72px; align-items: start; }
.sfb-article { min-width: 0; max-width: 760px; }

/* the source images are 850x400 — never shown wider than the reading column */
/* the article's lead image (not .sfb-lead, which is the listing hero's subtitle) */
.sfb-figure { margin: 0 0 44px; overflow: hidden; border-radius: 18px; box-shadow: var(--sfb-shadow); }
.sfb-figure img { width: 100%; aspect-ratio: 850 / 400; object-fit: cover; }

.sfb-prose { font-size: 18px; line-height: 1.8; color: var(--sfb-body); }
.sfb-prose p { margin: 0 0 1.2em; }
.sfb-prose > p:first-child { font-size: 21px; line-height: 1.7; color: #1e293b; }
.sfb-prose strong { font-weight: 700; color: var(--sfb-ink); }
.sfb .sfb-prose a {
    color: var(--sfb-blue);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.sfb .sfb-prose a:hover { color: var(--sfb-blue-600); text-decoration-thickness: 2px; }

.sfb .sfb-prose h2 {
    margin: 2.1em 0 .55em;
    font-size: 30px;
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: -.015em;
    color: var(--sfb-ink);
    scroll-margin-top: calc(var(--sfb-offset, var(--sfb-header)) + 24px);
}
.sfb .sfb-prose h3 { margin: 1.6em 0 .5em; font-size: 21px; line-height: 1.4; font-weight: 700; color: var(--sfb-ink); }

.sfb-prose ul,
.sfb-prose ol { margin: 0 0 1.4em; padding: 0; list-style: none; }
.sfb-prose li { position: relative; margin: 0 0 .55em; padding-left: 30px; }
.sfb-prose ul > li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: .62em;
    width: 9px;
    height: 9px;
    border: 2px solid var(--sfb-blue);
    border-radius: 50%;
    background: var(--sfb-blue-50);
}
.sfb-prose ol { counter-reset: sfb; }
.sfb-prose ol > li { counter-increment: sfb; padding-left: 40px; }
.sfb-prose ol > li::before {
    content: counter(sfb);
    position: absolute;
    left: 0;
    top: .15em;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--sfb-blue-50);
    color: var(--sfb-blue);
    font-size: 13px;
    font-weight: 700;
    line-height: 26px;
    text-align: center;
}

/* FAQ accordion (native <details>, works without JS) */
.sfb-faq { margin: .4em 0 0; border-top: 1px solid var(--sfb-line); }
.sfb-faq-item { border-bottom: 1px solid var(--sfb-line); }
.sfb-faq-item summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 4px;
    list-style: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 700;
    color: var(--sfb-ink);
}
.sfb-faq-item summary::-webkit-details-marker { display: none; }
.sfb-faq-item summary:hover { color: var(--sfb-blue); }
.sfb-faq-item summary i {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-top: -2px;
    border-radius: 50%;
    background: var(--sfb-blue-50);
    color: var(--sfb-blue);
    font-size: 13px;
    transition: transform .25s ease, background-color .2s ease, color .2s ease;
}
.sfb-faq-item[open] summary i { transform: rotate(45deg); background: var(--sfb-blue); color: #fff; }
.sfb-faq-answer { padding: 0 54px 20px 4px; }
.sfb .sfb-faq-answer p { margin: 0; font-size: 17px; }

/* share row */
.sfb-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 56px;
    padding: 22px 0;
    border-top: 1px solid var(--sfb-line);
    border-bottom: 1px solid var(--sfb-line);
}
.sfb-share-label { margin: 0; font-size: 15px; font-weight: 700; color: var(--sfb-ink); }
.sfb-share-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.sfb .sfb-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--sfb-line);
    border-radius: 999px;
    background: #fff;
    color: var(--sfb-body);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.sfb .sfb-share-btn:hover,
.sfb .sfb-share-btn.is-copied { background: var(--sfb-blue); border-color: var(--sfb-blue); color: #fff; }
.sfb .sfb-share-copy { display: none; }
.sfb.sfb-js .sfb-share-copy { display: inline-flex; padding: 0 16px; }
.sfb-copy-label { font-size: 14px; }

/* sidebar */
/* stretch to the full row height: with the grid's align-items:start the aside
   was only as tall as its content, leaving the sticky box nowhere to travel */
.sfb-aside { min-width: 0; align-self: stretch; }
.sfb-aside-inner {
    position: sticky;
    top: calc(var(--sfb-offset, var(--sfb-header)) + 28px);
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.sfb-aside-title { margin: 0 0 14px; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sfb-muted); }
.sfb-toc-list {
    max-height: calc(100vh - var(--sfb-offset, var(--sfb-header)) - 330px);
    min-height: 160px;
    margin: 0;
    padding: 0;
    overflow: auto;
    list-style: none;
    border-left: 2px solid var(--sfb-line);
    scrollbar-width: thin;
}
.sfb-toc-list li { margin: 0; }
.sfb .sfb-toc-list a {
    display: block;
    margin-left: -2px;
    padding: 7px 0 7px 16px;
    border-left: 2px solid transparent;
    font-size: 14px;
    line-height: 1.45;
    color: var(--sfb-muted);
    text-decoration: none;
    transition: color .15s ease, border-color .15s ease;
}
.sfb .sfb-toc-list a:hover { color: var(--sfb-ink); }
.sfb .sfb-toc-list a.is-active { border-left-color: var(--sfb-blue); color: var(--sfb-blue); font-weight: 700; }

.sfb-aside-cta { padding: 24px; border-radius: var(--sfb-radius); background: linear-gradient(160deg, #0b1a2c, #10304f); color: #cbd5e1; }
.sfb-aside-cta-title { margin: 0 0 8px; font-size: 18px; line-height: 1.35; font-weight: 700; color: #fff; }
.sfb-aside-cta-text { margin: 0 0 18px; font-size: 14.5px; line-height: 1.6; }

/* "On this page" for narrow screens, above the article */
.sfb-toc-mobile { display: none; margin: 0 0 36px; border: 1px solid var(--sfb-line); border-radius: 14px; background: var(--sfb-soft); }
.sfb-toc-mobile summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    color: var(--sfb-ink);
}
.sfb-toc-mobile summary::-webkit-details-marker { display: none; }
.sfb-toc-mobile summary i { color: var(--sfb-blue); transition: transform .2s ease; }
.sfb-toc-mobile[open] summary i { transform: rotate(180deg); }
.sfb-toc-mobile .sfb-toc-list { max-height: none; min-height: 0; margin: 0 20px 18px; }

/* reading progress (outside .sfb, so literal colours) */
.sfb-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 100000; height: 3px; pointer-events: none; }
.sfb-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #cb052c, #0164a7);
    transform: scaleX(0);
    transform-origin: 0 50%;
}

/* ------------------------------------------------------------ responsive -- */
@media (max-width: 1199px) {
    .sfb-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; }
    .sfb .sfb-hero-title { font-size: 52px; }
    .sfb .sfb-post-title { font-size: 42px; }
}

@media (max-width: 991px) {
    .sfb { padding-bottom: 56px; }
    .sfb-hero { padding: 48px 0 56px; }
    .sfb .sfb-hero-title { font-size: 44px; }
    .sfb .sfb-post-title { font-size: 36px; }
    .sfb-listing,
    .sfb-related { padding: 56px 0 64px; }
    .sfb-feature { grid-template-columns: 1fr; gap: 28px; margin-bottom: 56px; }
    .sfb .sfb-feature-title { font-size: 30px; }
    .sfb-body { padding: 40px 0 64px; }
    .sfb-layout { grid-template-columns: 1fr; gap: 40px; }
    .sfb-article { max-width: none; }
    .sfb-aside-inner { position: static; }
    .sfb-toc { display: none; }
    .sfb-toc-mobile { display: block; }
}

@media (max-width: 575px) {
    .sfb-crumb { margin-bottom: 20px; font-size: 13px; }
    .sfb .sfb-hero-title { font-size: 38px; }
    .sfb-lead { font-size: 17px; }
    .sfb .sfb-post-title { font-size: 30px; }
    .sfb .sfb-feature-title { font-size: 26px; }
    .sfb-feature { margin-bottom: 48px; }
    .sfb-figure { margin-bottom: 32px; border-radius: 14px; }
    .sfb-prose { font-size: 17px; }
    .sfb-prose > p:first-child { font-size: 19px; }
    .sfb .sfb-prose h2 { font-size: 25px; }
    .sfb .sfb-prose h3 { font-size: 19px; }
    .sfb-faq-item summary { font-size: 17px; }
    .sfb-faq-answer { padding-right: 4px; }
    .sfb-share { flex-direction: column; align-items: flex-start; }
    .sfb .sfb-cta-title { font-size: 25px; }
    .sfb-cta-actions,
    .sfb .sfb-cta-actions .sfb-btn { width: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
    .sfb *,
    .sfb *::before,
    .sfb *::after { transition: none !important; }
    .sfb-card:hover,
    .sfb .sfb-btn:hover { transform: none; }
}
