/* ============================================================
 * article-v2.css — geekflare-inspired blog + article typography
 *
 * Loaded AFTER css/586.css and css/blog-extra.css on blog-article.php
 * + article.php. Overrides the older WordPress-flavoured rules with
 * a cleaner reading style + the rounded card TOC pattern from
 * geekflare guides.
 *
 * Typography contract (per Voltra design brief):
 *   h2                          1.875rem (30px)  — section header
 *   h3                          1.375rem (22px)  — subsection
 *   p, li, ul, ol               1rem     (16px)  — body copy
 *   table th, table td          0.875rem (14px)  — data density
 *
 * Everything else (colours, spacing, tables) keeps Voltra's palette
 * so the page still reads as ours, not as a geekflare clone.
 * ============================================================ */

/* Scope guards. Every rule sits under one of the two article
   containers used across the site so we can't accidentally poison
   other pages that reuse the .toc / .author-box class names. */
.article-content,
.article-body {
    color: #d4d4d4;
    font-size: 1rem;
    line-height: 1.75;
}

/* ── Headings ─────────────────────────────────────────────────── */
/* h2: 1.875rem, no italic, no uppercase. Geekflare-style
   sentence-case section header sitting on quiet 1.5px underline
   accent so the anchor point stays visible while scrolling. */
.article-content h2,
.article-content h2.wp-block-heading,
.article-body    h2,
.article-body    h2.wp-block-heading {
    font-size: 1.875rem !important;    /* 30px */
    line-height: 1.25 !important;
    font-weight: 800 !important;
    font-style: normal !important;
    text-transform: none !important;
    letter-spacing: -0.01em !important;
    color: #ffffff;
    margin: 44px 0 16px !important;
    padding: 0 0 10px !important;
    border-bottom: 1.5px solid rgba(255, 213, 0, 0.18) !important;
    scroll-margin-top: 100px;    /* anchor lands below sticky nav */
}
.article-content h2:first-child,
.article-body    h2:first-child { margin-top: 0 !important; }

.article-content h3,
.article-content h3.wp-block-heading,
.article-body    h3,
.article-body    h3.wp-block-heading {
    font-size: 1.375rem !important;    /* 22px */
    line-height: 1.35 !important;
    font-weight: 800 !important;
    font-style: normal !important;
    text-transform: none !important;
    letter-spacing: -0.005em !important;
    color: #ffffff;
    margin: 32px 0 10px !important;
    padding: 0 !important;
    border: 0 !important;
    scroll-margin-top: 100px;
}

.article-content h4,
.article-content h4.wp-block-heading,
.article-body    h4,
.article-body    h4.wp-block-heading {
    font-size: 1.125rem !important;    /* 18px */
    line-height: 1.4 !important;
    font-weight: 800 !important;
    font-style: normal !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: #ffffff;
    margin: 24px 0 8px !important;
    padding: 0 !important;
    border: 0 !important;
}

/* ── Body copy ─────────────────────────────────────────────────── */
.article-content p,
.article-body    p {
    font-size: 1rem !important;        /* 16px */
    line-height: 1.75 !important;
    color: #d4d4d4;
    margin-bottom: 18px;
}

/* Lists — both bulleted and numbered live at the body font size so
   list-heavy how-tos read at the same visual weight as prose. */
.article-content ul,
.article-content ol,
.article-body    ul,
.article-body    ol {
    font-size: 1rem !important;
    line-height: 1.75 !important;
    color: #d4d4d4;
    margin: 8px 0 20px 22px;
    padding: 0;
}
.article-content li,
.article-body    li {
    font-size: 1rem !important;
    line-height: 1.75 !important;
    margin: 0;
    padding: 0 0 4px 16px !important;   /* top 0, right 0, bottom 4, left 16 */
    color: #d4d4d4;
}
.article-content ul,
.article-body    ul { list-style: disc; }
.article-content ol,
.article-body    ol { list-style: decimal; }
.article-content li::marker,
.article-body    li::marker { color: #FFD500; }

/* Nested lists shrink slightly so the hierarchy reads. */
.article-content li > ul,
.article-content li > ol,
.article-body    li > ul,
.article-body    li > ol {
    margin-top: 6px;
    margin-bottom: 6px;
}

/* ── Tables ────────────────────────────────────────────────────── */
/* Font size 0.875rem per the design brief; everything else left as
   default so tables render with the browser's native structure and
   the existing 586.css / kb.css rules keep working. */
.article-content table,
.article-body    table {
    font-size: 0.875rem !important;   /* 14px cells */
}
.article-content table th,
.article-body    table th,
.article-content table td,
.article-body    table td {
    font-size: 0.875rem !important;   /* 14px cells */
}

/* ── Table of Contents (site bento-card pattern) ───────────────── */
/* Uses the same background + border tokens the rest of the marketing
   site uses for sidebar cards (kb-side-card, kb-panel, blog-sidebar-
   card) so the TOC reads as native to voltra.gg's dark theme instead
   of a foreign white/cream box. Kept the geekflare interaction model
   (collapse chevron + pill rows + "Show N more" toggle). */
.toc-v2 {
    background: rgba(49, 49, 49, 0.36);
    border: 1px solid rgba(255, 255, 255, 0.045);
    padding: 20px 20px 16px;
    color: #ffffff;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 18px;    /* space before the deploy CTA card below */
}
.toc-v2-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 10px;
    cursor: pointer;
    user-select: none;
}
.toc-v2-head-label {
    font-size: 0.8125rem;    /* 13px */
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffffff;
}
.toc-v2-head-chev {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    color: #b7b7b7;
    font-size: 12px;
    transition: transform 200ms ease;
}
.toc-v2.is-collapsed .toc-v2-head-chev { transform: rotate(180deg); }
.toc-v2.is-collapsed .toc-v2-list,
.toc-v2.is-collapsed .toc-v2-more { display: none; }

.toc-v2-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.8125rem !important;
}
.toc-v2-list li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
.toc-v2-list li::marker { content: none; }
.toc-v2-list a {
    display: block;
    padding: 8px 10px;
    margin: 2px 0;
    color: #b7b7b7;
    text-decoration: none !important;
    border-left: 2px solid transparent !important;
    border-right: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0;
    font-size: 0.8125rem !important;
    line-height: 1.45;
    transition: background 150ms, color 150ms, border-color 150ms;
}
.toc-v2-list a:hover {
    background: rgba(255, 213, 0, 0.06);
    border-left-color: rgba(255, 213, 0, 0.5) !important;
    color: #ffffff;
}
/* Active/current section — gold left rule + tinted background, same
   treatment as the KB left-rail TOC (.kb-toc li a.active). */
.toc-v2-list a.is-active {
    background: rgba(255, 213, 0, 0.10);
    border-left-color: var(--yellow) !important;
    color: #ffffff;
    font-weight: 700;
}
/* Nested level (h3 under h2) — indented + slightly smaller */
.toc-v2-list li ul { margin: 0 !important; padding: 0 !important; }
.toc-v2-list li ul a {
    padding-left: 24px;
    font-size: 0.75rem !important;   /* 12px */
}

.toc-v2-more {
    display: block;
    width: 100%;
    padding: 10px 12px;
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #d4d4d4;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    text-align: center;
    transition: background 150ms, border-color 150ms, color 150ms;
    font-family: inherit;
}
.toc-v2-more:hover {
    background: rgba(255, 213, 0, 0.08);
    border-color: rgba(255, 213, 0, 0.4);
    color: #ffffff;
}
.toc-v2-more .chev { margin-left: 6px; transition: transform 200ms; display: inline-block; }
.toc-v2.is-expanded .toc-v2-more .chev { transform: rotate(180deg); }
.toc-v2:not(.is-expanded) .toc-v2-list li[data-toc-overflow] { display: none; }

/* ── Legacy share rail — killed. The share icons rail on the left
       of the article grid was removed from the PHP but keep this
       fallback in case any cached page still ships the markup. ── */
.share-rail { display: none !important; }

/* Article grid re-flow now that share-rail is gone: two columns
   (content + sidebar) instead of three. Retains the sticky-ish
   sidebar behaviour via .article-side. */
.article-grid {
    grid-template-columns: minmax(0, 1fr) 300px !important;
    gap: 40px !important;
}
@media (max-width: 1024px) {
    .article-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
}

/* Author box — 2 columns now that the socials div is gone from the
   PHP (see blog-article.php). Left = logo, right = author info.
   NO display:none on last-child here — with the socials removed,
   :last-child is the info div and we do NOT want to hide it (that
   was the bug in the previous revision). */
.author-box { grid-template-columns: 82px 1fr !important; }

/* ── Hero override — geekflare-style clean text header ────────── */
/* The legacy .article-hero rule (in blog-extra.css) has a 580px
   min-height and a full-bleed background image because the older
   layout leaned on the featured art. With the image gone we shrink
   to a compact text-only header and drop the ::before overlay that
   was there to darken the image. */
.article-hero-v2 {
    background: transparent !important;
    background-image: none !important;
    min-height: 0 !important;
    padding: 130px 0 44px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.article-hero-v2::before { display: none !important; }
.article-hero-v2 h1 {
    font-size: 48px !important;
    line-height: 54px !important;
    max-width: 820px;
    margin: 10px 0 14px !important;
}
.article-hero-v2 p {
    max-width: 720px;
    font-size: 17px;
    line-height: 1.65;
    color: #b7b7b7;
    margin-bottom: 6px;
}

/* ── Hero meta + share row (geekflare guide pattern) ───────────── */
/* Sits under the H1 + excerpt. Left cluster is author avatar+name
   with date + read time inline; right cluster is share icons pinned
   to the row's right edge. Wraps to a stacked column on mobile so
   nothing gets clipped or squeezed. */
.article-hero-v2 .article-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}
.article-hero-v2 .article-meta-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 0.8125rem;    /* 13px */
    color: #b7b7b7;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
}
.article-hero-v2 .article-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #b7b7b7;
    font-size: 0.8125rem;
}
.article-hero-v2 .article-meta-item i { color: var(--yellow); font-size: 12px; }
.article-hero-v2 .article-meta-dot {
    width: 3px; height: 3px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: inline-block;
}

.article-hero-v2 .article-author-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.article-hero-v2 .article-author-chip img {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #111;
    padding: 6px;
    border: 1.5px solid rgba(255, 213, 0, 0.4);
    object-fit: contain;
}
.article-hero-v2 .article-author-chip .a-label {
    display: block;
    font-size: 0.6875rem;    /* 11px */
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}
.article-hero-v2 .article-author-chip .a-name {
    display: block;
    font-size: 0.875rem;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -0.005em;
}

.article-hero-v2 .article-meta-share {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.article-hero-v2 .article-meta-share .share-label {
    font-size: 0.6875rem;    /* 11px */
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 800;
    margin-right: 4px;
}
.article-hero-v2 .article-meta-share a,
.article-hero-v2 .article-meta-share button {
    width: 36px; height: 36px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 150ms, border-color 150ms, color 150ms, transform 150ms;
    font-family: inherit;
}
.article-hero-v2 .article-meta-share a:hover,
.article-hero-v2 .article-meta-share button:hover {
    background: rgba(255, 213, 0, 0.10);
    border-color: rgba(255, 213, 0, 0.5);
    color: var(--yellow);
    transform: translateY(-1px);
}

/* On mobile the share row drops below the meta so both stay readable */
@media (max-width: 720px) {
    .article-hero-v2 .article-meta-row { flex-direction: column; align-items: flex-start; gap: 14px; }
    .article-hero-v2 .article-meta-share { flex-wrap: wrap; }
}

/* Hide the legacy .blog-meta (Date · Read · Category chips) on
   article pages using the new hero — its data is now in the
   .article-meta-row above. */
.article-hero-v2 .blog-meta { display: none; }
