/* ==========================================================================
   BLOG POST BODY — style.css v2
   Prose styles for technical, content-dense articles.
   These are also conditionally enqueued on is_singular('post') via functions.php
   so they apply to the wp:post-content block in single.html.
   ========================================================================== */

/* ── Article content area ────────────────────────────────────────────────────── */
.blog-post-body__content {
    min-width: 0; /* prevents overflow in CSS grid */
}

/* ── Tag list (wp:post-terms renders this) ───────────────────────────────────── */
.blog-post-body__tags,
.wp-block-post-terms.blog-post-body__tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
    font-size: 13px;
    color: var(--color-text-muted);
}
.blog-post-body__tags a,
.wp-block-post-terms.blog-post-body__tags a {
    display: inline-flex;
    padding: 4px 12px;
    background: var(--color-bg-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.2s;
}
.blog-post-body__tags a:hover,
.wp-block-post-terms.blog-post-body__tags a:hover {
    background: var(--color-dark);
    color: white;
    border-color: var(--color-dark);
}

/* ==========================================================================
   PROSE — typography for post content
   Applied via .prose class on the article wrapper in single.html
   ========================================================================== */

.prose {
    color: var(--color-text);
    font-size: 17px;
    line-height: 1.85;
    font-family: var(--font-primary);
}

/* ── Headings ─────────────────────────────────────────────────────────────── */
.prose h2 {
    font-size: clamp(22px, 2.8vw, 30px);
    font-weight: 800;
    color: var(--color-text-dark);
    letter-spacing: -0.025em;
    margin: 2.2em 0 0.65em;
    line-height: 1.2;
    padding-top: 0.25em;
    border-top: 2px solid var(--color-border);
}
.prose h2:first-child { margin-top: 0; border-top: none; }

.prose h3 {
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 700;
    color: var(--color-text-dark);
    margin: 1.9em 0 0.5em;
    line-height: 1.3;
    letter-spacing: -0.015em;
}
.prose h4 {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin: 1.6em 0 0.4em;
    letter-spacing: -0.01em;
}
.prose h5, .prose h6 {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin: 1.4em 0 0.4em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Body text ────────────────────────────────────────────────────────────── */
.prose p { margin: 0 0 1.5em; }
.prose p:last-child { margin-bottom: 0; }

/* ── Links ────────────────────────────────────────────────────────────────── */
.prose a {
    color: var(--color-secondary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color 0.15s;
}
.prose a:hover { color: var(--color-primary); }

/* ── Lists ────────────────────────────────────────────────────────────────── */
.prose ul, .prose ol {
    padding-left: 1.6em;
    margin: 0 0 1.5em;
}
.prose li { margin-bottom: 0.5em; line-height: 1.75; }
.prose li > ul, .prose li > ol { margin-top: 0.4em; margin-bottom: 0.4em; }

/* Tighter list style — matches Intero's clean aesthetic */
.prose ul li::marker { color: var(--color-secondary); }
.prose ol li::marker { color: var(--color-secondary); font-weight: 700; }

/* ── Blockquote (pull quote treatment) ───────────────────────────────────── */
.prose blockquote,
.prose .wp-block-quote {
    border-left: 3px solid var(--color-secondary);
    margin: 2.2em 0;
    padding: 20px 28px;
    background: var(--color-bg-muted);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    position: relative;
}
.prose blockquote p,
.prose .wp-block-quote p {
    font-size: 18px;
    font-style: italic;
    color: var(--color-text-dark);
    line-height: 1.7;
    margin: 0;
}
.prose blockquote cite,
.prose .wp-block-quote cite {
    display: block;
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
    color: var(--color-secondary);
    margin-top: 12px;
    letter-spacing: 0.04em;
}

/* ── Callout boxes (use WP paragraph class or inline HTML) ───────────────── */
/* Usage: add class "callout-tip", "callout-note", or "callout-warning" to WP paragraph block */
.prose .callout-tip,
.prose .callout-note,
.prose .callout-warning {
    padding: 18px 22px 18px 56px;
    border-radius: var(--radius-md);
    margin: 1.8em 0;
    font-size: 15px;
    line-height: 1.7;
    position: relative;
}
.prose .callout-tip::before,
.prose .callout-note::before,
.prose .callout-warning::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 20px;
    width: 20px;
    height: 20px;
    background-size: 20px 20px;
    background-repeat: no-repeat;
}
.prose .callout-tip {
    background: rgba(46,196,182,0.07);
    border-left: 3px solid var(--color-secondary);
}
.prose .callout-tip::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232EC4B6' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
}
.prose .callout-note {
    background: rgba(43,123,185,0.07);
    border-left: 3px solid var(--color-blue);
}
.prose .callout-note::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232B7BB9' stroke-width='2'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z'/%3E%3C/svg%3E");
}
.prose .callout-warning {
    background: rgba(232,75,26,0.06);
    border-left: 3px solid var(--color-primary);
}
.prose .callout-warning::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E84B1A' stroke-width='2'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E");
}

/* ── Images & captions ────────────────────────────────────────────────────── */
.prose img,
.prose .wp-block-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 2em 0;
    display: block;
    box-shadow: 0 4px 20px rgba(18,16,54,0.08);
}
.prose figure,
.prose .wp-block-image {
    margin: 2em 0;
}
.prose figcaption,
.prose .wp-block-image figcaption,
.prose .wp-element-caption {
    font-size: 13px;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: -12px;
    margin-bottom: 0;
    font-style: italic;
    line-height: 1.5;
}

/* ── Code (inline) ────────────────────────────────────────────────────────── */
.prose code {
    background: rgba(18,16,54,0.06);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: var(--color-primary);
    white-space: nowrap;
}

/* ── Code blocks ──────────────────────────────────────────────────────────── */
.prose pre,
.prose .wp-block-code {
    background: var(--color-dark);
    color: rgba(255,255,255,0.85);
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: 2em 0;
    font-size: 14px;
    line-height: 1.7;
    border: 1px solid rgba(255,255,255,0.06);
}
.prose pre code,
.prose .wp-block-code code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
    white-space: pre;
}

/* ── Tables ───────────────────────────────────────────────────────────────── */
.prose table,
.prose .wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    font-size: 15px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--color-border);
}
.prose thead th,
.prose .wp-block-table thead th {
    background: var(--color-dark);
    color: white;
    padding: 12px 18px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.04em;
}
.prose td,
.prose .wp-block-table td {
    padding: 11px 18px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    vertical-align: top;
}
.prose tr:last-child td { border-bottom: none; }
.prose tr:nth-child(even) td { background: var(--color-bg-muted); }

/* ── Horizontal rule ──────────────────────────────────────────────────────── */
.prose hr,
.prose .wp-block-separator {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 2.8em 0;
}

/* ── WP block embeds (video, tweet, etc.) ────────────────────────────────── */
.prose .wp-block-embed {
    margin: 2em 0;
}
.prose .wp-block-embed__wrapper {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* ── Related posts (legacy — blog-post-body block renders this) ──────────── */
.blog-post-body { padding: 48px 0 80px; width: 100%; background: var(--color-bg); }
.blog-post-body__layout { max-width: 800px; }
.blog-post-body__related { margin-top: 80px; padding-top: 56px; border-top: 1px solid var(--color-border); }
.blog-post-body__related-heading { font-size: clamp(20px,2.5vw,26px); font-weight: 800; color: var(--color-text-dark); letter-spacing: -0.02em; margin: 0 0 28px; }
.blog-post-body__related-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 640px) { .blog-post-body__related-grid { grid-template-columns: repeat(3,1fr); } }
.blog-post-body__related-card { text-decoration: none; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow 0.2s, transform 0.2s; }
.blog-post-body__related-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }
.blog-post-body__related-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.blog-post-body__related-img--placeholder { aspect-ratio: 16/9; background: linear-gradient(135deg, rgba(46,196,182,0.12) 0%, rgba(43,123,185,0.08) 100%); }
.blog-post-body__related-info { padding: 0 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.blog-post-body__related-cat { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-secondary); }
.blog-post-body__related-title { font-size: 14px; font-weight: 700; color: var(--color-text-dark); line-height: 1.35; margin: 0; }
.blog-post-body__related-date { font-size: 11px; color: var(--color-text-muted); }

/* ── Author bio card ─────────────────────────────────────────────────────── */
.blog-post-body__author-card { display: flex; gap: 18px; align-items: flex-start; background: var(--color-bg-muted); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 22px; margin-top: 40px; }
.blog-post-body__author-avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.blog-post-body__author-label { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-secondary); margin-bottom: 4px; }
.blog-post-body__author-name { font-size: 15px; font-weight: 700; color: var(--color-text-dark); margin-bottom: 8px; }
.blog-post-body__author-bio { font-size: 13px; color: var(--color-text); line-height: 1.65; margin: 0; }

/* ============================================================================
   VC migration cleanup — added 2026-04-30
   These classes are inserted into post_content during the Visual Composer
   shortcode strip (see vc-strip-bulk-update.php). Authors can also drop the
   CTA banner into a Custom HTML block in Gutenberg using:
     <aside class="intero-blog-cta-banner">
       <div class="intero-blog-cta-banner__inner">
         <h3 class="intero-blog-cta-banner__heading">Headline copy</h3>
         <a class="intero-blog-cta-banner__btn" href="/contact/">Get Started &rarr;</a>
       </div>
     </aside>
   ============================================================================ */

/* === Navy banner CTA ============================================================ */
.intero-blog-cta-banner {
    display: block;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-alt) 100%);
    border-radius: 12px;
    padding: 48px 40px;
    margin: 3em 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.intero-blog-cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(46, 196, 182, 0.18) 0%, transparent 60%);
    pointer-events: none;
}

.intero-blog-cta-banner__inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.intero-blog-cta-banner__heading {
    color: var(--color-text-light) !important;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 28px;
    line-height: 1.25;
    font-family: inherit;
    letter-spacing: -0.01em;
}

.intero-blog-cta-banner__btn {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-text-light) !important;
    padding: 14px 36px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.18s ease, transform 0.18s ease;
}

.intero-blog-cta-banner__btn:hover {
    background: #c2390f;
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .intero-blog-cta-banner { padding: 32px 24px; }
    .intero-blog-cta-banner__heading { font-size: 22px; }
}

/* === Strip WPBakery inline highlight colors from headings ======================== */
/* Old site applied colored backgrounds/white text to headings via VC shortcode
   attributes. Strip those inline styles so headings follow the prose color system. */
.prose h1[style],
.prose h2[style],
.prose h3[style],
.prose h4[style],
.prose h5[style],
.prose h6[style] {
    color: var(--color-text-dark) !important;
    background-color: transparent !important;
    background: transparent !important;
    padding: revert !important;
}

/* === Section callout heading ==================================================== */
.intero-blog-callout {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin: 2.2em 0 0.6em;
    line-height: 1.3;
    letter-spacing: -0.01em;
    position: relative;
    padding-left: 18px;
}

.intero-blog-callout::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.18em;
    bottom: 0.18em;
    width: 4px;
    background: var(--color-secondary);
    border-radius: 2px;
}

/* === Inline rectangle CTA ======================================================= */
.intero-blog-cta-wrap {
    margin: 2em 0;
    text-align: center;
}

.intero-blog-cta-rect {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-text-light) !important;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 16px 40px;
    border-radius: 4px;
    border: 2px solid var(--color-primary);
    transition: all 0.2s ease;
    font-family: inherit;
}

.intero-blog-cta-rect:hover {
    background: var(--color-bg);
    color: var(--color-primary) !important;
    border-color: var(--color-primary);
}

/* ============================================================================
   Polish fixes — added 2026-04-30 (post VC-strip cleanup)
   1. Space below the hero image, before the article body starts.
   2. Remove underline on CTA buttons (override .prose a default).
   3. Reposition tag from after-content to top-of-article with Tagged-in label.
   4. More breathing room between article end and the global footer.
   ============================================================================ */

/* (1) Space below the hero image */
.blog-post-header__img-wrap {
    padding-bottom: 32px;
}

/* (2) Override .prose a underline for CTA buttons (specificity match) */
.prose .intero-blog-cta-banner__btn,
.prose .intero-blog-cta-rect,
.prose a.intero-blog-cta-banner__btn,
.prose a.intero-blog-cta-rect {
    text-decoration: none;
}
.prose .intero-blog-cta-banner__btn:hover,
.prose .intero-blog-cta-rect:hover {
    text-decoration: none;
}

/* (3) Top-of-article tag treatment with "Tagged in" label
   Render order: post-terms (now at the TOP of the article) -> post-content. */
.blog-post-body__tags--top {
    /* Override the default bottom-of-article styling (border-top, big margin-top) */
    margin-top: 0 !important;
    margin-bottom: 32px !important;
    padding-top: 0 !important;
    border-top: none !important;
    align-items: center;
}

.blog-post-body__tags--top::before {
    content: "Tagged in";
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-right: 4px;
}

/* When tags are NOT at the top (legacy bottom position), preserve old styling */
.blog-post-body__tags:not(.blog-post-body__tags--top) {
    /* keep existing default styles */
}

/* (4) Breathing room before the footer / final CTA */
.blog-post-body__content {
    padding-bottom: 48px;
}

@media (min-width: 1024px) {
    .intero-post-layout {
        padding-bottom: 64px;
    }
}

/* Make sure the global final-cta block has a top margin so it doesn't kiss the
   article content end on mobile (where the sidebar drops below the article). */
.intero-page--post > .wp-block-intero-final-cta,
.intero-page--post > .wp-block-group:last-of-type {
    margin-top: 32px;
}
