/* ── V2 Blog Post Detail ── */

/* Progress Bar */
.v2-page .pgb {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bl);
    pointer-events: none;
    z-index: 100;
}

.v2-page .pgbf {
    height: 100%;
    background: var(--cr);
    width: 0%;
    transition: width 50ms linear;
}

/* Post Hero */
.v2-page .post-hero {
    background: var(--ch);
    padding: 64px;
    position: relative;
    overflow: hidden;
}

.v2-page .post-hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(232, 23, 93, 0.12) 0%, transparent 70%);
    top: -100px;
    right: -100px;
}

.v2-page .post-hero-in {
    max-width: 780px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.v2-page .post-hero-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.v2-page .post-hero-meta .cat-badge {
    display: inline-block;
    background: var(--cr);
    color: var(--wh);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 11px;
    border-radius: 9999px;
    text-decoration: none;
    transition: opacity 150ms ease;
}

a.cat-badge:hover {
    opacity: 0.85;
}

.v2-page .post-hero-meta span {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
}

.v2-page .post-hero-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
}

.v2-page .post-hero h1 {
    font-size: 40px;
    font-weight: 800;
    color: var(--wh);
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 16px;
}

.v2-page .post-hero .post-hero-excerpt {
    font-size: 17px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.7;
    margin-bottom: 28px;
}

.v2-page .post-hero-author {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.v2-page .post-hero-author .mav {
    width: 40px;
    height: 40px;
    font-size: 15px;
}

.v2-page .post-hero-author .author-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--wh);
}

.v2-page .post-hero-author .author-role {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
}

/* Article + Sidebar Grid.
   Areas let the TOC sit top-right on desktop yet jump above the body on mobile
   (see responsive block) while the CTA/related sidebar stays last. */
.v2-page .pgr {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 64px;
    display: grid;
    grid-template-columns: 1fr 280px;
    grid-template-areas:
        "main toc"
        "main side";
    align-items: start;
    gap: 24px 52px;
    padding-top: 40px;
    padding-bottom: 80px;
}

/* min-width:0 lets the 1fr track shrink below its content's intrinsic width —
   without it, long TOC link text blows the grid wider than the viewport. */
.v2-page .pgr > .pcol-main { grid-area: main; min-width: 0; }
.v2-page .pgr > .post-toc  { grid-area: toc; min-width: 0; }
.v2-page .pgr > .pcol-side { grid-area: side; min-width: 0; }

/* Post Body Typography */
.v2-page .pbdy h2 {
    font-size: 24px;
    font-weight: 800;
    color: #f62369;
    margin: 34px 0 12px;
}

.v2-page .pbdy h3 {
    font-size: 19px;
    font-weight: 800;
    color: #f62369;
    margin: 22px 0 9px;
}

.v2-page .pbdy p {
    font-size: 16px;
    font-weight: 600;
    color: var(--t2);
    line-height: 1.75;
    margin-bottom: 16px;
}

.v2-page .pbdy strong {
    font-weight: 800;
    color: var(--t1);
}

/* Inline content links — distinct blue so they stand out from body text.
   Scoped to paragraphs/list items so custom-block link styles below win. */
.v2-page .pbdy p a,
.v2-page .pbdy li a {
    color: #2563EB;
    font-weight: 700;
    text-decoration: none;
}

.v2-page .pbdy p a:hover,
.v2-page .pbdy li a:hover {
    text-decoration: underline;
}

.v2-page .pbdy ul {
    margin: 0 0 16px 0;
    padding: 0;
}

.v2-page .pbdy li {
    font-size: 16px;
    font-weight: 600;
    color: var(--t2);
    line-height: 1.75;
    margin-bottom: 7px;
    list-style: none;
    position: relative;
    padding-left: 18px;
}

/* Absolute marker keeps inline children (<strong> + text) flowing on one line.
   A flex li would split each inline child into its own column. */
.v2-page .pbdy li::before {
    content: '\2022';
    color: var(--cr);
    font-weight: 800;
    position: absolute;
    left: 0;
    top: 0;
}

/* Tables (migrated post content uses bare <table>; first row acts as header) */
.v2-page .pbdy table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0;
    font-size: 14px;
    border: 1px solid var(--bl);
}

.v2-page .pbdy th,
.v2-page .pbdy td {
    border: 1px solid var(--bl);
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
    font-weight: 600;
    color: var(--t2);
    line-height: 1.65;
}

.v2-page .pbdy thead th,
.v2-page .pbdy thead td,
.v2-page .pbdy table tr:first-child td {
    background: var(--of);
    font-weight: 800;
    color: var(--t1);
}

.v2-page .pbdy tbody tr:nth-child(even) td {
    background: rgba(17, 17, 17, 0.02);
}

.v2-page .pbdy thead + tbody tr:nth-child(even) td {
    background: rgba(17, 17, 17, 0.02);
}

/* Lead Paragraph */
.v2-page .pled {
    font-size: 18px;
    font-weight: 600;
    color: var(--t2);
    line-height: 1.7;
    margin-bottom: 26px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--bl);
}

/* Stat Grid */
.v2-page .s3g {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 22px 0;
}

.v2-page .s3b {
    background: var(--of);
    border-radius: 11px;
    padding: 16px;
    text-align: center;
    border: 1px solid var(--bl);
}

.v2-page .s3b .sn {
    font-size: 30px;
    font-weight: 900;
    color: var(--cr);
    letter-spacing: -1px;
    line-height: 1;
}

.v2-page .s3b .sl {
    font-size: 11px;
    font-weight: 700;
    color: var(--t2);
    margin-top: 4px;
}

/* Blockquote */
.v2-page .pbdy blockquote {
    border-left: 4px solid var(--cr);
    padding: 12px 20px;
    margin: 22px 0;
    background: var(--crt);
    border-radius: 0 10px 10px 0;
}

.v2-page .pbdy blockquote p {
    font-size: 16px;
    font-weight: 700;
    color: var(--t1);
    line-height: 1.65;
    font-style: italic;
    margin: 0;
}

.v2-page .pbdy blockquote cite {
    display: block;
    margin-top: 7px;
    font-size: 11px;
    font-weight: 700;
    color: var(--tm);
    font-style: normal;
}

/*
 * Legacy migrated custom blocks.
 * Imported posts carry inline HTML with these `dd-*` classes (highlight boxes
 * and CTA buttons). The old theme styled them; v2 never did, so the elements —
 * notably the "TRY FOR FREE" button — rendered as raw browser defaults.
 * Restyled here with v2 tokens, scoped to the article body so every imported
 * post renders consistently.
 */
.v2-page .pbdy .dd-custom-block {
    margin: 24px 0;
}

.v2-page .pbdy a.dd-highlight-link {
    color: var(--cr);
    font-size: 24px;
    font-weight: 700;
    width: 100%;
    display: flex;
    justify-content: center;
    text-align: center;
    text-decoration: none;
}

.v2-page .pbdy a.dd-highlight-link:hover {
    text-decoration: underline;
}

.v2-page .pbdy .dd-highlight-area,
.v2-page .pbdy .dd-highlight-area-with-btn {
    width: 100%;
    background: var(--of);
    border: 1px solid var(--bl);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.v2-page .pbdy .dd-highlight-area h4,
.v2-page .pbdy .dd-highlight-area-with-btn h4 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
    color: var(--t1);
}

.v2-page .pbdy .dd-highlight-area p,
.v2-page .pbdy .dd-highlight-area-with-btn p {
    margin: 0 0 16px;
    font-size: 16px;
}

.v2-page .pbdy .dd-highlight-area-with-btn p:last-child {
    margin-bottom: 0;
}

.v2-page .pbdy .dd-highlight-area-with-btn_link {
    display: inline-block;
    text-decoration: none;
}

.v2-page .pbdy .dd-highlight-area-with-btn_button {
    background: var(--cr);
    color: var(--wh);
    border: 2px solid var(--cr);
    border-radius: 9999px;
    font-size: 15px;
    font-weight: 700;
    padding: 11px 28px;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
}

.v2-page .pbdy .dd-highlight-area-with-btn_button:hover {
    background: var(--wh);
    color: var(--cr);
}

/* Tags */
.v2-page .ptags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 24px 0;
    padding-top: 22px;
    border-top: 1px solid var(--bl);
}

.v2-page .ptag {
    background: var(--of);
    border: 1px solid var(--bl);
    border-radius: 9999px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--t2);
}

/* Share Row */
.v2-page .shrow {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 16px 0;
    border-top: 1px solid var(--bl);
    border-bottom: 1px solid var(--bl);
    margin: 18px 0;
}

.v2-page .shbtn {
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid var(--bl);
    background: var(--wh);
    transition: all 150ms;
    font-family: 'Nunito', sans-serif;
    color: var(--t2);
}

.v2-page .shbtn:hover {
    border-color: var(--cr);
    color: var(--cr);
}

/* Sidebar Widgets */
.v2-page .sbw {
    background: var(--wh);
    border-radius: 13px;
    border: 1px solid var(--bl);
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.v2-page .sbw h3 {
    font-size: 14px;
    font-weight: 800;
    color: var(--t1);
    margin-bottom: 12px;
}

/* TOC Links */
.v2-page .tocl {
    display: block;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--t2);
    cursor: pointer;
    border-left: 2px solid transparent;
    transition: all 150ms;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
}

.v2-page .tocl:hover,
.v2-page .tocl.on {
    background: var(--crt);
    color: var(--cr);
    border-left-color: var(--cr);
}

/* CTA Sidebar */
.v2-page .ctsb {
    background: var(--cr);
    border-radius: 13px;
    padding: 20px;
    text-align: center;
    margin-bottom: 18px;
}

.v2-page .ctsb h3 {
    font-size: 15px;
    font-weight: 800;
    color: var(--wh);
    margin-bottom: 8px;
}

.v2-page .ctsb p {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 14px;
    line-height: 1.5;
}

.v2-page .ctsb a {
    display: block;
    background: var(--wh);
    color: var(--cr);
    border-radius: 9999px;
    padding: 9px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

/* Related-posts grid styles live in core/v2-core.css (single source of truth). */

/* ── BLOG POST RESPONSIVE ── */
@media (max-width: 768px) {
    .v2-page .post-hero { padding: 40px 20px; }
    .v2-page .post-hero h1 { font-size: 28px; }
    .v2-page .post-hero .post-hero-excerpt { font-size: 15px; }
    .v2-page .pgr {
        grid-template-columns: 1fr;
        grid-template-areas:
            "toc"
            "main"
            "side";
        gap: 32px;
        padding: 24px 20px 40px;
    }
    .v2-page .s3g { grid-template-columns: repeat(2, 1fr); }
    .v2-page .rg3 { grid-template-columns: 1fr; }
    .v2-page .pbdy table { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 480px) {
    .v2-page .post-hero h1 { font-size: 24px; }
    .v2-page .s3g { grid-template-columns: 1fr; }
}
