/**
 * Flashtech Knowledge Base article styling.
 *
 * Matches the new blog's visual language (reading width, typography, heading hierarchy, figures,
 * captions, CTA buttons — mirrors Magefan_Blog/web/css/blog-custom.css) and adds technical
 * installation-guide components (table of contents, callouts, step galleries, FAQ).
 *
 * SCOPED to .flashtech-kb-article so it can never affect other pages, and loaded ONLY on KB
 * article pages via app/design/frontend/Sm/autostore/Mirasvit_Kb/layout/kbase_article_view.xml.
 * Reusable across every Knowledge Base guide — new articles just use these classes.
 */

.flashtech-kb-article {
    max-width: 820px;      /* comfortable measure, close to the blog's 760px; diagrams still fill it */
    margin: 0 auto;
    color: #2c2c2c;
    font-size: 17px;
    line-height: 1.75;
    word-wrap: break-word;
}
.flashtech-kb-article img { max-width: 100%; height: auto; }
.flashtech-kb-article p { margin: 0 0 1.15em; }
.flashtech-kb-article a { color: #d81f26; text-decoration: underline; }
.flashtech-kb-article strong { color: #111; }

/* Heading hierarchy — blog sizing, with a restrained brand-red rule for the technical feel.
 * The page title is the H1 (Mirasvit renders it); the article body uses H2/H3 only. */
.flashtech-kb-article h2 {
    font-size: 27px; line-height: 1.25; font-weight: 700; color: #111;
    margin: 2em 0 .6em; padding-bottom: .3em; border-bottom: 2px solid #d81f26;
    scroll-margin-top: 20px;
}
.flashtech-kb-article h3 {
    font-size: 20px; font-weight: 700; color: #111; margin: 1.7em 0 .4em; scroll-margin-top: 20px;
}
.flashtech-kb-article ul, .flashtech-kb-article ol { margin: 0 0 1.35em 1.3em; padding: 0; }
.flashtech-kb-article li { margin: .35em 0; }

/* Lead image + lead paragraph */
.flashtech-kb-article .kb-hero { margin: 0 0 1.3em; text-align: center; }
.flashtech-kb-article .kb-hero img { border-radius: 8px; max-width: 560px; }
.flashtech-kb-article .kb-lead { font-size: 19px; line-height: 1.6; }

/* Shop buttons (top row) — mirrors the blog's .ft-cta button */
.flashtech-kb-article .kb-cta-buttons { margin: 0 0 1.4em; }
.flashtech-kb-article a.kb-btn {
    display: inline-block; background: #d81f26; color: #fff; text-decoration: none;
    font-weight: 700; font-size: 15px; padding: 12px 22px; border-radius: 6px;
    margin: 5px 10px 5px 0; transition: background .15s;
}
.flashtech-kb-article a.kb-btn:hover { background: #b0161c; color: #fff; }

/* Callouts: note (brand red), warning (amber), tip (green) */
.flashtech-kb-article .kb-note,
.flashtech-kb-article .kb-warning,
.flashtech-kb-article .kb-tip {
    padding: 15px 18px; margin: 1.5em 0; border-left: 4px solid #999;
    background: #f6f6f6; border-radius: 0 6px 6px 0;
}
.flashtech-kb-article .kb-note    { border-left-color: #d81f26; background: #f7f7f7; }
.flashtech-kb-article .kb-warning { border-left-color: #e5a400; background: #fff8e6; }
.flashtech-kb-article .kb-tip     { border-left-color: #2e9c4a; background: #eef9f0; }
.flashtech-kb-article .kb-note p:last-child,
.flashtech-kb-article .kb-warning p:last-child,
.flashtech-kb-article .kb-tip p:last-child { margin-bottom: 0; }

/* Table of contents / quick navigation */
.flashtech-kb-article .kb-toc {
    border: 1px solid #e3e3e3; border-radius: 8px; background: #fafafa;
    padding: 16px 20px; margin: 1.6em 0 2em;
}
.flashtech-kb-article .kb-toc__title {
    font-weight: 700; color: #111; margin: 0 0 .5em; font-size: 14px;
    text-transform: uppercase; letter-spacing: .04em;
}
.flashtech-kb-article .kb-toc ul { columns: 2; column-gap: 34px; margin: 0 0 0 1.1em; padding: 0; }
.flashtech-kb-article .kb-toc li { margin: .3em 0; }

/* Figures + captions (blog style) */
.flashtech-kb-article figure { margin: 1.6em 0; text-align: center; }
.flashtech-kb-article figure img { border-radius: 8px; }
.flashtech-kb-article figcaption { font-size: 14px; color: #777; margin-top: .5em; }

/* Two-up image gallery — collapses to one column on mobile */
.flashtech-kb-article .kb-gallery { display: flex; gap: 20px; flex-wrap: wrap; margin: 1.6em 0; }
.flashtech-kb-article .kb-gallery figure { flex: 1 1 280px; margin: 0; }

/* FAQ */
.flashtech-kb-article .kb-faq h3 { font-size: 19px; margin: 1.4em 0 .3em; }

/* Bottom product CTA (dark panel) */
.flashtech-kb-article .kb-cta {
    background: #111; color: #fff; padding: 26px 28px; border-radius: 8px; margin: 2.4em 0 1em;
}
.flashtech-kb-article .kb-cta h2 { color: #fff; border: 0; padding: 0; margin: 0 0 .4em; font-size: 26px; }
.flashtech-kb-article .kb-cta p:last-child { margin-bottom: 0; }
.flashtech-kb-article .kb-cta a { color: #fff; text-decoration: underline; }
/* the CTA links are wrapped in <strong>; without this the body's dark strong color would render
   the link text black-on-black (invisible). Keep all text in the dark panel white. */
.flashtech-kb-article .kb-cta,
.flashtech-kb-article .kb-cta strong,
.flashtech-kb-article .kb-cta a strong { color: #fff; }

/* Responsive: single column below 600px */
@media (max-width: 600px) {
    .flashtech-kb-article { font-size: 16px; }
    .flashtech-kb-article h2 { font-size: 23px; }
    .flashtech-kb-article h3 { font-size: 19px; }
    .flashtech-kb-article .kb-toc ul { columns: 1; }
    .flashtech-kb-article .kb-gallery { gap: 14px; }
}

/* ==========================================================================
   "Start here" panel for installation guides (2026-12-04, shared KB design).
   Sits at the top of a product-specific guide: one card per product variation (white / RGB / ColorChase, key fob vs
   app ...), each with its product link and installation manual, so nobody has to read the whole guide to find them.
   Markup (article body, written per guide; only real product URLs and manual files):
     <section class="kb-start"><h2>…</h2><p class="kb-start__lead">…</p><div class="kb-start__grid">
       <article class="kb-kit"><p class="kb-kit__tag">Key fob remote</p><h3>…</h3><p class="kb-kit__meta">SKU · sizes</p>
         <div class="kb-kit__actions"><a class="kb-kit__btn" href="/product.html">View kit</a>
           <a class="kb-kit__pdf" href="/manuals/….pdf" target="_blank" rel="noopener">Installation manual <span>PDF, 0.9 MB</span></a></div>
         <ul class="kb-kit__more"><li><a …>App setup guide</a></li></ul></article> …</div></section>
   ========================================================================== */
.flashtech-kb-article .kb-start { margin: 0 0 2.2em; padding: 22px; background: #f4f5f6; border: 1px solid #dce0e4; border-top: 3px solid #C91B27; }
.flashtech-kb-article .kb-start > h2 { margin: 0 0 .3em; padding: 0; border: 0; font: 800 22px/1.2 Arial, Helvetica, sans-serif; letter-spacing: -.02em; }
.flashtech-kb-article .kb-start__lead { margin: 0 0 16px; font-size: 15px; color: #555d67; line-height: 1.55; }
.flashtech-kb-article .kb-start__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.flashtech-kb-article .kb-kit { min-width: 0; display: flex; flex-direction: column; padding: 18px; background: #fff; border: 1px solid #dce0e4; }
.flashtech-kb-article .kb-kit__tag { align-self: flex-start; margin: 0 0 10px; padding: 3px 9px; border-radius: 12px; background: #fbecee; color: #A51420; font: 800 11px/1.4 Arial, Helvetica, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.flashtech-kb-article .kb-kit h3 { margin: 0 0 4px; font: 800 18px/1.25 Arial, Helvetica, sans-serif; letter-spacing: -.01em; }
.flashtech-kb-article .kb-kit__meta { margin: 0 0 14px; font-size: 14px; color: #555d67; line-height: 1.5; }
.flashtech-kb-article .kb-kit__actions { display: grid; gap: 8px; margin-top: auto; }
.flashtech-kb-article a.kb-kit__btn { display: block; padding: 10px 14px; border-radius: 3px; background: #C91B27; color: #fff; text-align: center; font: 700 14px/1.3 Arial, Helvetica, sans-serif; text-decoration: none; }
.flashtech-kb-article a.kb-kit__btn:hover { background: #A51420; color: #fff; }
.flashtech-kb-article a.kb-kit__pdf { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid #c9ced4; border-radius: 3px; color: #202329; font: 700 14px/1.3 Arial, Helvetica, sans-serif; text-decoration: none; }
.flashtech-kb-article a.kb-kit__pdf::before { content: ""; flex: none; width: 16px; height: 18px; margin-right: -2px; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 18'%3E%3Cpath d='M2 1h8l4 4v12H2z' fill='none' stroke='%23C91B27' stroke-width='1.4'/%3E%3Cpath d='M5 10h6M5 13h6' stroke='%23C91B27' stroke-width='1.4'/%3E%3C/svg%3E"); }
.flashtech-kb-article a.kb-kit__pdf span { margin-left: auto; font-weight: 400; font-size: 12.5px; color: #555d67; white-space: nowrap; }
.flashtech-kb-article a.kb-kit__pdf:hover { border-color: #C91B27; color: #C91B27; }
.flashtech-kb-article .kb-kit__more { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid #ebedf0; font-size: 14px; }
.flashtech-kb-article .kb-kit__more li { margin: 3px 0; }
.flashtech-kb-article .kb-kit__more a { color: #C91B27; font-weight: 700; text-decoration: none; }
.flashtech-kb-article .kb-kit__more a:hover { text-decoration: underline; }
@media (max-width: 600px) {
    .flashtech-kb-article .kb-start { padding: 16px; margin-left: -4px; margin-right: -4px; }
    .flashtech-kb-article .kb-start__grid { grid-template-columns: 1fr; }
}
