/* My Tools Town blog. Everything is scoped under .mtt-blog so it cannot leak into the tool pages. */
.mtt-blog {
    --blog-primary: #005cc7;
    --blog-primary-dark: #003f8a;
    --blog-accent: #0086ff;
    --blog-ink: #14213d;
    --blog-text: #2b3445;
    --blog-muted: #6b7686;
    --blog-line: #e3e9f2;
    --blog-card: #ffffff;
    --blog-instagram: #d6249f;
    --blog-youtube: #e62117;
    color: var(--blog-text);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.mtt-blog a { color: var(--blog-primary); }
.mtt-blog img { max-width: 100%; height: auto; }

/* ---------- Hero ---------- */
.mtt-blog .blog-hero {
    background: linear-gradient(135deg, #003f8a 0%, #005cc7 55%, #0086ff 100%);
    color: #fff;
    padding: 56px 0 64px;
    margin-bottom: -28px;
}
.mtt-blog .blog-eyebrow {
    display: inline-block;
    margin: 0 0 14px;
    padding: 4px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.mtt-blog .blog-hero-title {
    margin: 0 auto 14px;
    max-width: 780px;
    font-size: clamp(28px, 4.4vw, 44px);
    line-height: 1.15;
    font-weight: 800;
    color: #fff;
}
.mtt-blog .blog-hero-sub {
    margin: 0 auto 26px;
    max-width: 640px;
    font-size: 18px;
    color: rgba(255, 255, 255, .9);
}
.mtt-blog .blog-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.mtt-blog .blog-filter {
    padding: 8px 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .55);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.mtt-blog .blog-filter:hover,
.mtt-blog .blog-filter.is-active { background: #fff; color: var(--blog-primary); text-decoration: none; }

.mtt-blog .blog-main { padding-bottom: 40px; }

/* ---------- Chips and badges ---------- */
.mtt-blog .blog-chip {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff;
    background: var(--blog-primary);
}
.mtt-blog .blog-chip:hover { color: #fff; text-decoration: none; opacity: .9; }
.mtt-blog .blog-chip--instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); }
.mtt-blog .blog-chip--youtube { background: var(--blog-youtube); }
.mtt-blog .blog-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: #fff3cd;
    color: #8a6100;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

/* ---------- Cards ---------- */
.mtt-blog .blog-card,
.mtt-blog .blog-featured {
    background: var(--blog-card);
    border: 1px solid var(--blog-line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 22px rgba(20, 33, 61, .06);
    transition: transform .18s ease, box-shadow .18s ease;
}
.mtt-blog .blog-card:hover,
.mtt-blog .blog-featured:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(20, 33, 61, .12); }
.mtt-blog .blog-card { display: flex; flex-direction: column; }
.mtt-blog .blog-card-media,
.mtt-blog .blog-featured-media { display: block; overflow: hidden; background: #dfe8f5; }
.mtt-blog .blog-card-media img,
.mtt-blog .blog-featured-media img { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.mtt-blog .blog-card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.mtt-blog .blog-card-title {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}
.mtt-blog .blog-card-title a,
.mtt-blog .blog-featured-title a { color: var(--blog-ink); text-decoration: none; }
.mtt-blog .blog-card-title a:hover,
.mtt-blog .blog-featured-title a:hover { color: var(--blog-primary); }
.mtt-blog .blog-card-excerpt { flex: 1; margin: 0 0 14px; color: var(--blog-muted); font-size: 15px; }
.mtt-blog .blog-card-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--blog-muted); font-size: 13px; }
.mtt-blog .blog-card-meta i { margin-right: 4px; }

/* ---------- Featured ---------- */
.mtt-blog .blog-featured { display: flex; margin-bottom: 32px; }
.mtt-blog .blog-featured { align-items: stretch; }
.mtt-blog .blog-featured-media { flex: 0 0 55%; }
.mtt-blog .blog-featured-media img { height: 100%; aspect-ratio: auto; object-position: left center; }
.mtt-blog .blog-featured-body { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 32px 36px; }
.mtt-blog .blog-featured-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mtt-blog .blog-featured-title { margin: 14px 0 10px; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; font-weight: 800; }
.mtt-blog .blog-featured-excerpt { margin: 0 0 14px; font-size: 17px; color: var(--blog-text); }
.mtt-blog .blog-featured .blog-btn { align-self: flex-start; margin-top: 18px; }

/* ---------- Buttons ---------- */
.mtt-blog .blog-btn {
    display: inline-block;
    padding: 11px 24px;
    border-radius: 999px;
    background: var(--blog-primary);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s, transform .15s;
}
.mtt-blog .blog-btn:hover { background: var(--blog-primary-dark); color: #fff; text-decoration: none; transform: translateY(-1px); }
.mtt-blog .blog-btn--light { background: #fff; color: var(--blog-primary); }
.mtt-blog .blog-btn--light:hover { background: #eaf3ff; color: var(--blog-primary-dark); }

/* ---------- Article page ---------- */
.mtt-blog .blog-article-wrap { padding-top: 22px; padding-bottom: 40px; }
.mtt-blog .blog-breadcrumb { margin-bottom: 18px; font-size: 14px; color: var(--blog-muted); }
.mtt-blog .blog-breadcrumb a { color: var(--blog-muted); text-decoration: none; }
.mtt-blog .blog-breadcrumb a:hover { color: var(--blog-primary); text-decoration: underline; }
.mtt-blog .blog-breadcrumb span { margin: 0 6px; }

.mtt-blog .blog-article {
    background: var(--blog-card);
    border: 1px solid var(--blog-line);
    border-radius: 18px;
    padding: 36px 40px 32px;
    box-shadow: 0 6px 22px rgba(20, 33, 61, .05);
}
.mtt-blog .blog-article-title {
    margin: 14px 0 12px;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.18;
    font-weight: 800;
    color: var(--blog-ink);
}
.mtt-blog .blog-article-lead { margin: 0 0 20px; font-size: 19px; color: var(--blog-muted); }
.mtt-blog .blog-byline { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.mtt-blog .blog-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--blog-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
}
.mtt-blog .blog-cover { margin: 0 0 26px; }
.mtt-blog .blog-cover img { display: block; width: 100%; border-radius: 14px; }

/* ---------- Table of contents ---------- */
.mtt-blog .blog-toc {
    background: #f3f8ff;
    border: 1px solid #d6e6fb;
    border-radius: 14px;
    padding: 16px 20px;
}
.mtt-blog .blog-toc ol { margin: 10px 0 0; padding-left: 20px; }
.mtt-blog .blog-toc li { margin: 6px 0; font-size: 15px; }
.mtt-blog .blog-toc a { text-decoration: none; }
.mtt-blog .blog-toc a:hover { text-decoration: underline; }
.mtt-blog .blog-toc summary,
.mtt-blog .blog-toc h2 { margin: 0; font-size: 16px; font-weight: 800; color: var(--blog-ink); cursor: pointer; }
.mtt-blog .blog-toc h2 { cursor: default; }
.mtt-blog .blog-toc--inline { margin-bottom: 26px; }
.mtt-blog .blog-sidebar { position: sticky; top: 20px; }
.mtt-blog .blog-toc--side { display: none; }

/* ---------- Article body ---------- */
.mtt-blog .blog-content { font-size: 18px; line-height: 1.75; color: var(--blog-text); }
.mtt-blog .blog-content p { margin: 0 0 1.2em; }
.mtt-blog .blog-content h2 {
    margin: 2em 0 .6em;
    padding-top: .2em;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 800;
    color: var(--blog-ink);
    scroll-margin-top: 20px;
}
.mtt-blog .blog-content h3 { margin: 1.6em 0 .5em; font-size: 21px; font-weight: 700; color: var(--blog-ink); }
.mtt-blog .blog-content ul,
.mtt-blog .blog-content ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.mtt-blog .blog-content li { margin-bottom: .45em; }
.mtt-blog .blog-content strong { color: var(--blog-ink); }
.mtt-blog .blog-content a { text-decoration: underline; text-underline-offset: 2px; }
.mtt-blog .blog-content blockquote {
    margin: 1.4em 0;
    padding: 12px 20px;
    border-left: 4px solid var(--blog-accent);
    background: #f3f8ff;
    border-radius: 0 10px 10px 0;
    color: var(--blog-ink);
}
.mtt-blog .blog-content table { width: 100%; margin: 0 0 1.4em; border-collapse: collapse; font-size: 16px; }
.mtt-blog .blog-content th,
.mtt-blog .blog-content td { padding: 10px 12px; border: 1px solid var(--blog-line); text-align: left; vertical-align: top; }
.mtt-blog .blog-content th { background: #f3f8ff; color: var(--blog-ink); }

.mtt-blog .callout {
    margin: 1.6em 0;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #cfe3ff;
    background: #eef6ff;
    font-size: 17px;
}
.mtt-blog .callout strong:first-child { display: block; margin-bottom: 4px; color: var(--blog-primary-dark); }
.mtt-blog .callout p:last-child { margin-bottom: 0; }
.mtt-blog .callout--warn { border-color: #ffe0a6; background: #fff8e8; }
.mtt-blog .callout--warn strong:first-child { color: #8a5a00; }

/* Copy-ready lists: bios and captions */
.mtt-blog .blog-content .copy-list { list-style: none; padding-left: 0; margin: 0 0 1.4em; }
.mtt-blog .copy-list li {
    position: relative;
    margin: 0 0 10px;
    padding: 12px 84px 12px 16px;
    border: 1px solid var(--blog-line);
    border-radius: 12px;
    background: #fafcff;
    font-size: 17px;
    line-height: 1.5;
}
.mtt-blog .copy-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    padding: 5px 14px;
    border: 1px solid #cfe0f7;
    border-radius: 999px;
    background: #fff;
    color: var(--blog-primary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.mtt-blog .copy-btn:hover { background: var(--blog-primary); color: #fff; }
.mtt-blog .copy-btn.is-done { background: #1f9d55; border-color: #1f9d55; color: #fff; }

/* ---------- FAQ ---------- */
.mtt-blog .blog-faq { margin-top: 2.4em; }
.mtt-blog .blog-faq h2 { margin-bottom: 14px; font-size: 26px; font-weight: 800; color: var(--blog-ink); }
.mtt-blog .blog-faq details { margin-bottom: 10px; border: 1px solid var(--blog-line); border-radius: 12px; background: #fafcff; }
.mtt-blog .blog-faq summary { padding: 14px 18px; font-size: 17px; font-weight: 700; color: var(--blog-ink); cursor: pointer; }
.mtt-blog .blog-faq details[open] summary { border-bottom: 1px solid var(--blog-line); }
.mtt-blog .blog-faq details p { margin: 0; padding: 14px 18px; font-size: 16px; }

/* ---------- Call to action and share ---------- */
.mtt-blog .blog-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 2.4em 0 1.4em;
    padding: 24px 28px;
    border-radius: 16px;
    background: linear-gradient(135deg, #003f8a, #0086ff);
    color: #fff;
}
.mtt-blog .blog-cta h3 { margin: 0 0 4px; font-size: 21px; font-weight: 800; color: #fff; }
.mtt-blog .blog-cta p { margin: 0; color: rgba(255, 255, 255, .9); font-size: 16px; }
.mtt-blog .blog-cta .blog-btn { flex-shrink: 0; }
.mtt-blog .blog-share { display: flex; align-items: center; gap: 10px; color: var(--blog-muted); font-size: 14px; font-weight: 600; }
.mtt-blog .blog-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #eef3fa;
    color: var(--blog-primary);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.mtt-blog .blog-share a:hover { background: var(--blog-primary); color: #fff; }

/* ---------- Related ---------- */
.mtt-blog .blog-related { margin-top: 44px; }
.mtt-blog .blog-related h2 { margin-bottom: 20px; font-size: 26px; font-weight: 800; color: var(--blog-ink); }

/* ---------- Responsive ---------- */
@media (min-width: 992px) {
    .mtt-blog .blog-toc--side { display: block; }
    .mtt-blog .blog-toc--inline { display: none; }
}
@media (max-width: 991px) {
    .mtt-blog .blog-featured { flex-direction: column; align-items: stretch; }
    .mtt-blog .blog-featured-media { flex-basis: auto; }
    .mtt-blog .blog-featured-media img { height: auto; aspect-ratio: 1200 / 630; }
    }
@media (max-width: 575px) {
    .mtt-blog .blog-hero { padding: 40px 0 52px; }
    .mtt-blog .blog-article { padding: 22px 18px; border-radius: 14px; }
    .mtt-blog .blog-content { font-size: 17px; }
    .mtt-blog .blog-content h2 { font-size: 24px; }
    .mtt-blog .blog-featured-body { padding: 22px 20px; }
    .mtt-blog .blog-cta { flex-direction: column; align-items: flex-start; }
    .mtt-blog .copy-list li { padding-right: 16px; padding-bottom: 48px; }
    .mtt-blog .copy-btn { top: auto; bottom: 10px; transform: none; }
    .mtt-blog .blog-content table { display: block; overflow-x: auto; }
}

/* The site stylesheet hides horizontal overflow on html/body, which stops position: sticky from working.
   "clip" hides it the same way without creating a scroll container. */
html, body { overflow-x: clip; overflow-y: visible; }

/* ---------- Home page "From the Blog" block ---------- */
.mtt-blog .home-blog-hint { display: none; }

@media (max-width: 767px) {
    /* Tighter margins so the block uses more of the screen */
    .home-blog-container { padding-left: 8px; padding-right: 8px; }
    .mtt-blog .home-blog-body { padding: 16px 0 18px !important; }
    .mtt-blog .home-blog-body > p.text-center { padding: 0 14px; margin-bottom: 8px !important; }
    .mtt-blog .home-blog-body .text-center:last-child { padding: 0 14px; }

    .mtt-blog .home-blog-hint {
        display: block;
        margin: 0 0 8px;
        padding: 0 14px;
        text-align: center;
        font-size: 13px;
        font-weight: 600;
        color: var(--blog-primary);
    }

    /* One horizontal, swipeable row instead of a vertical stack */
    .mtt-blog .home-blog-row {
        display: flex;
        flex-wrap: nowrap;
        margin: 0;
        padding: 4px 14px 16px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 14px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .mtt-blog .home-blog-row::-webkit-scrollbar { display: none; }
    .mtt-blog .home-blog-row > [class*="col-"] {
        flex: 0 0 78%;
        max-width: 78%;
        padding: 0 7px;
        margin-bottom: 0 !important;
        scroll-snap-align: start;
    }
    .mtt-blog .home-blog-row::after { content: ""; flex: 0 0 7px; }
    .mtt-blog .home-blog-row .blog-card-title { font-size: 18px; }
    .mtt-blog .home-blog-row .blog-card-excerpt {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}
