/* ============================================================
   Nusantara SEO Engine — Frontend CSS v1.7.0
   Universal: kompatibel dengan semua tema WordPress populer
   Astra, GeneratePress, Kadence, OceanWP, Elementor, dll
============================================================ */

/* ── Universal content selector ──
   Mendukung semua tema populer dengan satu rule set.
   Menggunakan :where() untuk spesifisitas rendah sehingga
   tema bisa override dengan mudah tanpa !important
──────────────────────────────────────────────────────────── */
:where(
    .single .entry-content,
    .single .post-content,
    .single .post-entry,
    .single .article-content,
    .single .post-body,
    .single article .content,
    .single article .the-content,
    .blog-post .entry-content,
    /* Astra */
    .ast-article-single .entry-content,
    /* GeneratePress */
    .singular .entry-content,
    /* Kadence */
    .entry-content.wp-block-post-content,
    /* OceanWP */
    .single-post .entry-content,
    /* Elementor */
    .elementor-widget-theme-post-content .elementor-widget-container,
    /* Hello Elementor */
    .hentry .entry-content,
    /* Neve */
    .nv-single-post-wrap .entry-content,
    /* Divi */
    #page-container .entry-content,
    /* Newspaper / Jannah */
    .post-content,
    /* Twenty Twenty-Four */
    .wp-block-post-content
) {
    font-size: 16px;
    line-height: 1.85;
    color: #1a202c;
}

/* Paragraf — justify + spacing */
:where(
    .single .entry-content p,
    .single .post-content p,
    .single .post-entry p,
    .single article .content p,
    .ast-article-single .entry-content p,
    .singular .entry-content p,
    .entry-content.wp-block-post-content p,
    .elementor-widget-theme-post-content p,
    .hentry .entry-content p,
    .nv-single-post-wrap .entry-content p,
    .post-content p
) {
    text-align: justify;
    text-justify: inter-word;
    margin-bottom: 1.4em;
    line-height: 1.85;
    font-size: 16px;
    color: #2d3748;
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* H2 — section utama */
:where(
    .single .entry-content h2,
    .single .post-content h2,
    .ast-article-single .entry-content h2,
    .singular .entry-content h2,
    .entry-content.wp-block-post-content h2,
    .elementor-widget-theme-post-content h2,
    .hentry .entry-content h2,
    .post-content h2
) {
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: 700;
    color: #1a202c;
    margin: 2em 0 0.75em;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--nse-brand-color, #7c3aed);
    line-height: 1.3;
}

/* H3 — sub-section */
:where(
    .single .entry-content h3,
    .single .post-content h3,
    .ast-article-single .entry-content h3,
    .singular .entry-content h3,
    .entry-content.wp-block-post-content h3,
    .elementor-widget-theme-post-content h3,
    .hentry .entry-content h3,
    .post-content h3
) {
    font-size: clamp(16px, 1.8vw, 18px);
    font-weight: 700;
    color: #2d3748;
    margin: 1.6em 0 0.6em;
    padding-left: 12px;
    border-left: 4px solid var(--nse-brand-color, #7c3aed);
    line-height: 1.4;
}

/* H4 */
:where(
    .single .entry-content h4,
    .singular .entry-content h4,
    .post-content h4
) {
    font-size: 16px;
    font-weight: 700;
    color: #4a5568;
    margin: 1.4em 0 0.5em;
}

/* Bold */
:where(
    .single .entry-content strong,
    .single .post-content strong,
    .singular .entry-content strong,
    .post-content strong
) {
    font-weight: 700;
    color: #1a202c;
}

/* Unordered list */
:where(
    .single .entry-content ul,
    .singular .entry-content ul,
    .post-content ul,
    .elementor-widget-theme-post-content ul
) {
    margin: 0.8em 0 1.4em;
    padding-left: 0;
    list-style: none;
}

:where(
    .single .entry-content ul li,
    .singular .entry-content ul li,
    .post-content ul li,
    .elementor-widget-theme-post-content ul li
) {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    line-height: 1.7;
    text-align: justify;
    color: #2d3748;
}

:where(
    .single .entry-content ul li::before,
    .singular .entry-content ul li::before,
    .post-content ul li::before
) {
    content: '✓';
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--nse-brand-color, #7c3aed);
    font-weight: 700;
    font-size: 14px;
}

/* Ordered list */
:where(
    .single .entry-content ol,
    .singular .entry-content ol,
    .post-content ol
) {
    margin: 0.8em 0 1.4em;
    padding-left: 24px;
}

:where(
    .single .entry-content ol li,
    .singular .entry-content ol li,
    .post-content ol li
) {
    margin-bottom: 10px;
    line-height: 1.7;
    text-align: justify;
    color: #2d3748;
}

:where(
    .single .entry-content ol li::marker,
    .singular .entry-content ol li::marker
) {
    color: var(--nse-brand-color, #7c3aed);
    font-weight: 700;
}

/* Blockquote */
:where(
    .single .entry-content blockquote,
    .singular .entry-content blockquote,
    .post-content blockquote
) {
    background: #faf5ff;
    border-left: 5px solid var(--nse-brand-color, #7c3aed);
    border-radius: 0 8px 8px 0;
    margin: 1.8em 0;
    padding: 18px 22px;
    font-size: 16px;
    color: #4a5568;
    font-style: italic;
    line-height: 1.7;
}

:where(
    .single .entry-content blockquote p,
    .singular .entry-content blockquote p
) {
    margin: 0;
    text-align: left;
}

/* Gambar */
:where(
    .single .entry-content img,
    .singular .entry-content img,
    .post-content img
) {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    margin: 1em 0;
}

/* Link */
:where(
    .single .entry-content a,
    .singular .entry-content a,
    .post-content a
):not(.nse-author-name):not(.nse-wa-btn) {
    color: var(--nse-brand-color, #7c3aed);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: color .15s;
}

/* HR */
:where(
    .single .entry-content hr,
    .singular .entry-content hr
) {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin: 2.5em 0;
}

/* ── Table of Contents ── */
.nse-toc {
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    border-left: 5px solid var(--nse-brand-color, #7c3aed);
    border-radius: 0 10px 10px 0;
    padding: 20px 24px;
    margin: 28px 0;
    font-size: 15px;
}

.nse-toc-title {
    font-weight: 700;
    font-size: 16px;
    margin: 0 0 14px;
    color: #1a202c;
}

.nse-toc-list {
    margin: 0;
    padding-left: 22px;
}

.nse-toc-list li {
    margin-bottom: 8px;
    line-height: 1.6;
    font-size: 14px;
}

.nse-toc-list a {
    color: var(--nse-brand-color, #6d28d9);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: all .15s;
}

.nse-toc-list a:hover {
    border-bottom-color: var(--nse-brand-color, #7c3aed);
}

/* ── Author Box ── */
.nse-author-box {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    border-top: 4px solid var(--nse-brand-color, #7c3aed);
    border-radius: 10px;
    padding: 24px;
    margin-top: 48px;
    margin-bottom: 24px;
}

.nse-author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid #e9d5ff;
}

.nse-author-info { flex: 1; }

.nse-author-label {
    font-size: 11px;
    color: var(--nse-brand-color, #7c3aed);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    margin: 0 0 4px;
}

.nse-author-name {
    font-size: 17px;
    font-weight: 700;
    color: #1a202c;
    text-decoration: none !important;
    display: block;
    margin-bottom: 8px;
}

.nse-author-bio {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.65;
    margin: 0;
    text-align: left !important;
}

/* ── WhatsApp Button ── */
.nse-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25d366;
    color: #fff !important;
    text-decoration: none !important;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    transition: background .15s;
    margin: 8px 0;
}

.nse-wa-btn:hover {
    background: #1ebe5d;
    color: #fff !important;
}

/* ── NSE Anchor Link ── */
.nse-link {
    color: var(--nse-brand-color, #0066cc);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color .2s ease;
}

.nse-link:hover {
    color: var(--nse-brand-color, #004499);
    text-decoration: none;
}

/* ── Mobile ── */
@media (max-width: 640px) {
    :where(
        .single .entry-content p,
        .singular .entry-content p,
        .post-content p
    ) {
        font-size: 15px;
        line-height: 1.8;
        text-align: left; /* justify tidak nyaman di mobile */
    }

    .nse-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .nse-author-bio {
        text-align: center !important;
    }
}

/* ══════════════════════════════════════════════════════
   NSE Engine — Komponen Konversi Tinggi
   CTA, WA Button, Highlight Box, Pull Quote
══════════════════════════════════════════════════════ */

/* ── WA Button — menonjol, tak bisa dilewatkan ── */
.nse-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25d366;
    color: #fff !important;
    text-decoration: none !important;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    transition: all .2s;
    margin: 12px 0;
    box-shadow: 0 4px 16px rgba(37,211,102,.35);
}

.nse-wa-btn:hover {
    background: #1ebe5d;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(37,211,102,.45);
}

/* ── CTA Box — kotak ajakan bertindak ── */
.nse-cta-box {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #25d366;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 28px 0;
    text-align: center;
}

.nse-cta-box p {
    text-align: center !important;
    font-size: 15px;
    font-weight: 600;
    color: #166534;
    margin-bottom: 12px;
}

/* ── Highlight Box — poin penting ── */
.nse-highlight {
    background: #faf5ff;
    border-left: 5px solid var(--nse-brand-color, #7c3aed);
    border-radius: 0 10px 10px 0;
    padding: 16px 20px;
    margin: 20px 0;
    font-size: 15px;
    color: #3b0764;
    line-height: 1.7;
}

/* ── Pull Quote — kutipan penting ── */
.nse-pullquote {
    border-left: 4px solid var(--nse-brand-color, #7c3aed);
    background: #faf5ff;
    padding: 16px 20px;
    margin: 24px 0;
    font-size: 17px;
    font-style: italic;
    font-weight: 500;
    color: #4c1d95;
    line-height: 1.6;
}

/* ── Warning / Tips Box ── */
.nse-tips-box {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-left: 5px solid #d97706;
    border-radius: 0 8px 8px 0;
    padding: 14px 18px;
    margin: 20px 0;
    font-size: 14px;
    color: #78350f;
    line-height: 1.6;
}

/* ── Comparison Table — tabel perbandingan ── */
:where(
    .single .entry-content table,
    .singular .entry-content table,
    .post-content table
) {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

:where(
    .single .entry-content table th,
    .singular .entry-content table th,
    .post-content table th
) {
    background: var(--nse-brand-color, #7c3aed);
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
}

:where(
    .single .entry-content table td,
    .singular .entry-content table td,
    .post-content table td
) {
    padding: 9px 14px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
    color: #374151;
}

:where(
    .single .entry-content table tr:nth-child(even),
    .singular .entry-content table tr:nth-child(even)
) {
    background: #f9fafb;
}

/* ── Price Badge — harga yang menonjol ── */
.nse-price {
    display: inline-block;
    background: var(--nse-brand-color, #7c3aed);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 4px 14px;
    border-radius: 20px;
    margin: 2px 0;
}

/* ── Artikel Intro yang humanis ── */
:where(
    .single .entry-content > p:first-of-type,
    .singular .entry-content > p:first-of-type,
    .post-content > p:first-of-type
) {
    font-size: 17px;
    line-height: 1.9;
    color: #1a202c;
    font-weight: 400;
}

/* ── Numbered Steps — langkah-langkah ── */
.nse-steps {
    counter-reset: nse-step;
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.nse-steps li {
    counter-increment: nse-step;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.nse-steps li:last-child {
    border-bottom: none;
}

.nse-steps li::before {
    content: counter(nse-step);
    min-width: 28px;
    height: 28px;
    background: var(--nse-brand-color, #7c3aed);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ── Reading progress indicator ── */
#nse-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--nse-brand-color, #7c3aed);
    z-index: 9999;
    width: 0%;
    transition: width .1s linear;
}
