/* ============================================================================
   Single post — editorial travel / study article
   Loaded only on singular WordPress posts.
   ============================================================================ */

body.single-post {
    background:
        radial-gradient(circle at 8% 12%, rgba(220, 238, 249, .55), transparent 26rem),
        var(--sky-25);
}

body.single-post .section {
    padding-block: clamp(3.75rem, 8vw, 7.5rem);
}

body.single-post .section > .wrap {
    width: min(100% - 2.5rem, 1180px);
}

body.single-post .single-post {
    max-width: 1080px;
    margin-inline: auto;
}

body.single-post .single-post > .eyebrow {
    margin-bottom: clamp(1.15rem, 2vw, 1.5rem);
    color: var(--blue-800);
}

body.single-post .single-post > h1 {
    max-width: 1040px;
    margin: 0 0 clamp(1.35rem, 2.4vw, 1.85rem);
    font-size: clamp(2.65rem, 6.2vw, 5.35rem);
    line-height: 1.08;
    letter-spacing: -.04em;
    text-wrap: balance;
}

/* Bài tư vấn LIA cần nhịp tiêu đề thoáng hơn vì copy có 2 dòng dài. */
body.single-post.postid-139 .single-post > h1 {
    max-width: 960px;
    font-size: clamp(2.4rem, 4.8vw, 4.25rem);
    line-height: 1.5;
    letter-spacing: -.025em;
}

body.single-post .single-post .post-meta {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    margin: 0;
    padding: .5rem .8rem;
    border: 1px solid var(--sky-veil);
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .72);
    color: var(--ink-soft);
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .04em;
}

body.single-post .single-post .post-meta::before {
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: var(--brand-green);
    content: "";
}

body.single-post .single-post__media {
    position: relative;
    margin-top: clamp(2.25rem, 5vw, 4.5rem);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: clamp(1.25rem, 3vw, 2rem);
    background: var(--sky-100);
    box-shadow: var(--shadow-lg);
}

body.single-post .single-post__media::after {
    position: absolute;
    inset: auto 0 0;
    height: 35%;
    background: linear-gradient(180deg, transparent, rgba(8, 47, 73, .2));
    content: "";
    pointer-events: none;
}

body.single-post .single-post__media img {
    width: 100%;
    aspect-ratio: 16 / 8.8;
    object-fit: cover;
    border-radius: 0;
}

body.single-post .single-post__content {
    max-width: 860px;
    margin: clamp(3.25rem, 7vw, 6.5rem) auto 0;
    color: var(--ink-soft);
    font-size: clamp(1rem, 1.25vw, 1.08rem);
    line-height: 1.85;
}

body.single-post .single-post__content .MTTable_Content > * {
    max-width: 100%;
}

body.single-post .single-post__content p:empty {
    display: none;
}

body.single-post .single-post__content h2,
body.single-post .single-post__content h3 {
    color: var(--ink);
    text-wrap: balance;
}

body.single-post .single-post__content h2 {
    position: relative;
    margin: clamp(3.25rem, 7vw, 5.75rem) 0 1.2rem;
    padding-top: 1.4rem;
    font-size: clamp(1.85rem, 3.5vw, 3rem);
    line-height: 1.08;
    letter-spacing: -.045em;
}

body.single-post .single-post__content h2::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 3.25rem;
    height: .2rem;
    border-radius: var(--r-pill);
    background: linear-gradient(90deg, var(--brand-green), var(--brand-blue));
    content: "";
}

body.single-post .single-post__content h2:first-child {
    margin-top: 0;
    padding: 1.75rem clamp(1.25rem, 4vw, 2.5rem) 0;
    border-left: 4px solid var(--brand-green);
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(220, 238, 249, .72), transparent 80%);
    font-size: clamp(2rem, 4vw, 3.35rem);
}

body.single-post .single-post__content h2:first-child::before {
    left: clamp(1.25rem, 4vw, 2.5rem);
    width: 2.25rem;
}

body.single-post .single-post__content h3 {
    margin: 2rem 0 .65rem;
    color: var(--blue-800);
    font-size: clamp(1.12rem, 1.8vw, 1.45rem);
    line-height: 1.25;
    letter-spacing: -.02em;
}

body.single-post .single-post__content h3:first-of-type {
    margin-top: 1.65rem;
}

body.single-post .single-post__content p {
    margin: 0 0 1.15rem;
}

body.single-post .single-post__content p > strong {
    color: var(--blue-800);
    font-weight: 700;
}

body.single-post .single-post__content p:has(> strong) {
    margin-top: 1.7rem;
    margin-bottom: .45rem;
    padding: .8rem 1rem;
    border: 1px solid var(--sky-veil);
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, .76);
    box-shadow: var(--shadow-xs);
}

body.single-post .single-post__content p:has(> strong) + p {
    margin-bottom: 1.1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--green-100);
}

body.single-post .single-post__content ul,
body.single-post .single-post__content ol {
    display: grid;
    gap: .7rem;
    margin: 1.3rem 0 1.75rem;
    padding: 0;
    list-style: none;
}

body.single-post .single-post__content li {
    position: relative;
    padding: .95rem 1rem .95rem 3.25rem;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, .72);
    box-shadow: var(--shadow-xs);
}

body.single-post .single-post__content ul li::before {
    position: absolute;
    top: .9rem;
    left: 1rem;
    display: grid;
    width: 1.35rem;
    height: 1.35rem;
    place-items: center;
    border-radius: 50%;
    background: var(--green-100);
    color: var(--green-800);
    content: "✓";
    font-size: .75rem;
    font-weight: 700;
}

body.single-post .single-post__content ol {
    counter-reset: article-step;
}

body.single-post .single-post__content ol li {
    counter-increment: article-step;
}

body.single-post .single-post__content ol li::before {
    position: absolute;
    top: .85rem;
    left: 1rem;
    display: grid;
    width: 1.55rem;
    height: 1.55rem;
    place-items: center;
    border-radius: 50%;
    background: var(--sky-100);
    color: var(--blue-800);
    content: counter(article-step, decimal-leading-zero);
    font-size: .7rem;
    font-weight: 700;
}

body.single-post .single-post__content p:has(> img) {
    margin: 2.25rem 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body.single-post .single-post__content p > img:not(.emoji) {
    width: 100%;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
}

body.single-post .single-post__content .emoji {
    display: inline;
    width: 1.15em;
    height: 1.15em;
    margin: 0 .25em 0 0;
    vertical-align: -.18em;
}

body.single-post .single-post__content h2:last-of-type + h3 {
    margin-top: 1.6rem;
}

body.single-post .single-post__content h2:nth-last-of-type(2) ~ p:has(> strong:last-child) {
    border-color: rgba(22, 163, 74, .25);
    background: linear-gradient(135deg, rgba(240, 253, 244, .95), rgba(255, 255, 255, .78));
}

body.single-post .single-post__content a {
    text-decoration: underline;
    text-decoration-color: rgba(3, 105, 161, .35);
    text-underline-offset: .18em;
}

@media (max-width: 640px) {
    body.single-post .section {
        padding-block: 2.75rem 4rem;
    }

    body.single-post .section > .wrap {
        width: min(100% - 2rem, 1180px);
    }

    body.single-post .single-post > h1 {
        font-size: clamp(2.35rem, 12vw, 3.5rem);
        line-height: 1.08;
        letter-spacing: -.035em;
    }

    body.single-post.postid-139 .single-post > h1 {
        font-size: clamp(2.1rem, 10vw, 3rem);
        line-height: 1.5;
        letter-spacing: -.02em;
    }

    body.single-post .single-post__media {
        margin-top: 2rem;
        border-radius: 1.15rem;
    }

    body.single-post .single-post__media img {
        aspect-ratio: 1 / .9;
    }

    body.single-post .single-post__content {
        margin-top: 3.5rem;
        font-size: 1rem;
        line-height: 1.75;
    }

    body.single-post .single-post__content h2 {
        margin-top: 3.5rem;
        font-size: 1.95rem;
    }

    body.single-post .single-post__content h2:first-child {
        padding: 1.25rem 1rem 0;
        font-size: 2.05rem;
    }

    body.single-post .single-post__content h2:first-child::before {
        left: 1rem;
    }

    body.single-post .single-post__content li {
        padding: .85rem .85rem .85rem 2.95rem;
    }

    body.single-post .single-post__content ul li::before,
    body.single-post .single-post__content ol li::before {
        left: .85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.single-post .single-post__media,
    body.single-post .single-post__content li {
        transition: none;
    }
}
