/* =======================================================
   STYLING KHUSUS UNTUK HALAMAN SINGLE POST
   ======================================================= */

/* --- STYLING DAFTAR ISI (TOC) --- */
.akd-daftar-isi-wrapper {
    /* Reset counter agar tidak mempengaruhi heading di dalam TOC */
    counter-reset: h2-counter h3-counter h4-counter h5-counter h6-counter;
}

.akd-daftar-isi {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf5 100%);
    border: 1px solid #d1e3f7;
    border-left: 5px solid #00597E;
    padding: 25px 30px;
    margin-top: 0; /* Jarak atas 0 agar tidak jauh */
    margin-bottom: 2em;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 89, 126, 0.1);
    font-family: 'Inter', sans-serif;
}

/* JUDUL TOC TANPA NOMOR & TANPA ICON */
.akd-daftar-isi .akd-daftar-isi-title {
    font-size: 1.5em;
    font-weight: 700;
    color: #003d5a;
    margin-top: 0;
    margin-bottom: 20px;
    display: block; /* Kembalikan ke block */
    /* Override styling H3 umum agar tidak kena pengaturan heading */
    padding-left: 0 !important;
    border: none !important;
}

/* PERBAIKAN PASTI: Matikan nomor H3 untuk judul TOC dengan selector yang sangat spesifik */
body.single-post .entry-content .akd-daftar-isi .akd-daftar-isi-title::before {
    display: none !important;
}

.akd-daftar-isi ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.akd-daftar-isi ul li {
    margin-bottom: 12px;
}

.akd-daftar-isi ul li a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05em;
    transition: all 0.2s ease-in-out;
    padding-left: 20px;
    position: relative;
}

.akd-daftar-isi ul li a::before {
    content: "▶";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #00597E;
    font-size: 0.7em;
    transition: transform 0.2s ease-in-out;
}

.akd-daftar-isi ul li a:hover {
    color: #00597E;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.akd-daftar-isi ul li a:hover::before {
    transform: translateY(-50%) rotate(90deg);
}

.akd-daftar-isi .akd-daftar-isi-sub {
    padding-left: 30px; /* Tambah indentasi */
    margin-top: 10px;
    /* --- TAMBAHKAN INI UNTUK GARIS VERTIKAL --- */
    border-left: 2px solid #cbd5e0; /* Garis lebih lembut */
    margin-left: 10px; /* Beri jarak dari teks utama */
}

.akd-daftar-isi .akd-daftar-isi-sub li {
    margin-bottom: 8px; /* Jarak antar sub-item lebih rapat */
}

.akd-daftar-isi .akd-daftar-isi-sub li a {
    font-weight: 400;
    font-size: 0.95em;
    color: #4a5568; /* Warna link sub-item lebih tenang */
}

/* --- STYLING HEADING DENGAN NOMOR OUTLINE (FINAL - KOTAK) --- */
/* Target untuk tema biasa dan Elementor */
body.single-post .entry-content,
.elementor-widget-theme-post-content .elementor-post__content {
    /* Reset counter utama di level konten */
    counter-reset: h2-counter h3-counter;
}

/* H2: Judul Utama, TANPA NOMOR, TAPI MENAIKKAN COUNTER */
body.single-post .entry-content h2:not(.akd-daftar-isi-title),
.elementor-widget-theme-post-content .elementor-post__content h2:not(.akd-daftar-isi-title) {
    margin-top: 2.5em !important;
    margin-bottom: 1.2em !important;
    font-size: 1.8em !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    color: #1a1a1a !important;
    padding-bottom: 0.5em !important;
    border-bottom: 2px solid #e0e0e0 !important;
    counter-increment: h2-counter !important;
    counter-reset: h3-counter !important;
    padding-left: 0 !important;
}
body.single-post .entry-content h2:not(.akd-daftar-isi-title)::before,
.elementor-widget-theme-post-content .elementor-post__content h2:not(.akd-daftar-isi-title)::before {
    display: none !important;
}

/* H3: Sub-judul Level 1 (KOTAK) */
body.single-post .entry-content h3,
.elementor-widget-theme-post-content .elementor-post__content h3 {
    position: relative !important;
    padding-left: 45px !important;
    margin-top: 2em !important;
    margin-bottom: 1em !important;
    font-size: 1.4em !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    counter-increment: h3-counter !important;
    counter-reset: h4-counter !important;
}
body.single-post .entry-content h3::before,
.elementor-widget-theme-post-content .elementor-post__content h3::before {
    content: counter(h3-counter) !important;
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background-color: #00597E !important;
    color: #ffffff !important;
    min-width: 30px !important;
    height: 30px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.8em !important;
    font-weight: bold !important;
    line-height: 1 !important;
    text-align: center !important;
    padding: 0 5px !important;
    box-sizing: border-box !important;
}

/* H4: Sub-judul Level 2 (KOTAK) */
body.single-post .entry-content h4,
.elementor-widget-theme-post-content .elementor-post__content h4 {
    position: relative !important;
    padding-left: 45px !important;
    margin-top: 1.8em !important;
    margin-bottom: 0.8em !important;
    font-size: 1.2em !important;
    font-weight: 600 !important;
    color: #34495e !important;
    counter-increment: h4-counter !important;
    counter-reset: h5-counter !important;
}
body.single-post .entry-content h4::before,
.elementor-widget-theme-post-content .elementor-post__content h4::before {
    content: counter(h4-counter) !important;
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background-color: #3498db !important;
    color: #ffffff !important;
    min-width: 30px !important;
    height: 30px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.7em !important;
    font-weight: bold !important;
    line-height: 1 !important;
    text-align: center !important;
    padding: 0 5px !important;
    box-sizing: border-box !important;
}

/* H5: Sub-judul Level 3 (KOTAK) */
body.single-post .entry-content h5,
.elementor-widget-theme-post-content .elementor-post__content h5 {
    position: relative !important;
    padding-left: 45px !important;
    margin-top: 1.5em !important;
    margin-bottom: 0.6em !important;
    font-size: 1.1em !important;
    font-weight: 600 !important;
    color: #555 !important;
    counter-increment: h5-counter !important;
}
body.single-post .entry-content h5::before,
.elementor-widget-theme-post-content .elementor-post__content h5::before {
    content: counter(h5-counter) !important;
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background-color: #9b59b6 !important;
    color: #ffffff !important;
    min-width: 30px !important;
    height: 30px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.6em !important;
    font-weight: bold !important;
    line-height: 1 !important;
    text-align: center !important;
    padding: 0 5px !important;
    box-sizing: border-box !important;
}

/* --- STYLING BLOCKQUOTE --- */
/* Target untuk tema biasa dan Elementor */
body.single-post .entry-content blockquote,
.elementor-widget-theme-post-content .elementor-post__content blockquote {
    margin: 1.5em 0;
    padding: 15px 20px 15px 45px;
    border-left: 5px solid #00597E;
    background-color: #f8f9fa;
    font-style: italic;
    color: #555;
    position: relative;
}

body.single-post .entry-content blockquote::before,
.elementor-widget-theme-post-content .elementor-post__content blockquote::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 10px;
    font-size: 3em;
    color: #bdc3c7;
    font-family: Georgia, serif;
    line-height: 1;
}

/* --- STYLING LIST (UL/OL) --- */
/* Target untuk tema biasa dan Elementor */
body.single-post .entry-content ul,
.elementor-widget-theme-post-content .elementor-post__content ul {
    padding-left: 20px;
}

body.single-post .entry-content ul li,
.elementor-widget-theme-post-content .elementor-post__content ul li {
    list-style-type: none;
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
}

body.single-post .entry-content ul li::before,
.elementor-widget-theme-post-content .elementor-post__content ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background-color: #00597E;
    border-radius: 50%;
}

/* --- STYLING INTERNAL LINK --- */
.akd-internal-link-wrapper {
    background-color: #f0f4f8 !important; /* Background lebih abu-abu */
    border: 1px solid #d1d9e0 !important;
    border-left: 4px solid #4a5568 !important; /* Warna border lebih tua */
    padding: 15px 20px;
    margin: 2em 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
}

.akd-internal-link-wrapper strong {
    color: #2d3748 !important; /* Teks lebih gelap */
    margin-right: 10px;
    font-weight: 700;
}

.akd-internal-link-wrapper a {
    color: #4a5568 !important; /* Warna link lebih tenang */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.akd-internal-link-wrapper a:hover {
    text-decoration: underline;
    color: #2d3748 !important; /* Warna hover lebih gelap lagi */
}


/* =======================================================
   RESPONSIF UNTUK PERANGKAT MOBIL
   ======================================================= */

@media (max-width: 768px) {
    /* --- Font untuk Tablet --- */
    body.single-post .entry-content h2:not(.akd-daftar-isi-title) { font-size: 1.6em; }
    body.single-post .entry-content h3 { font-size: 1.3em; }
    body.single-post .entry-content h4 { font-size: 1.15em; }
    body.single-post .entry-content h5 { font-size: 1.1em; }
    
    .akd-daftar-isi { padding: 20px 25px; }
    .akd-daftar-isi .akd-daftar-isi-title { font-size: 1.3em; }
    .akd-daftar-isi ul li a { font-size: 1em; }
}

@media (max-width: 480px) {
    /* --- Font untuk Mobile --- */
    body.single-post .entry-content h2:not(.akd-daftar-isi-title) { font-size: 1.5em; }
    body.single-post .entry-content h3 { font-size: 1.2em; }
    body.single-post .entry-content h4 { font-size: 1.1em; }
    body.single-post .entry-content h5 { font-size: 1.05em; }

    .akd-daftar-isi { padding: 15px 20px; }
    .akd-daftar-isi .akd-daftar-isi-title { font-size: 1.2em; }
    .akd-daftar-isi ul li a { font-size: 0.95em; }

    /* Perkecil kotak nomor di mobile */
    body.single-post .entry-content h3::before,
    body.single-post .entry-content h4::before,
    body.single-post .entry-content h5::before {
        min-width: 26px;
        height: 26px;
        font-size: 0.7em;
    }
    body.single-post .entry-content h3 { padding-left: 38px; }
    body.single-post .entry-content h4 { padding-left: 38px; }
    body.single-post .entry-content h5 { padding-left: 38px; }
}

/* =======================================================
   PERBAIKAN TAMBAHAN UNTUK MOBILE
   ======================================================= */

@media (max-width: 768px) {
    /* --- Perbaikan Internal Link untuk Tablet/Mobile --- */
    .akd-internal-link-wrapper {
        flex-direction: column; /* Teks dan link ditumpuk vertikal */
        align-items: flex-start; /* Rata kiri */
        text-align: left;
    }
    .akd-internal-link-wrapper strong {
        font-size: 0.9em; /* Font lebih kecil */
        margin-right: 0;
        margin-bottom: 5px; /* Beri jarak antar baris */
    }
    .akd-internal-link-wrapper a {
        font-size: 0.9em; /* Font lebih kecil */
    }
}

@media (max-width: 480px) {
    /* --- Perbaikan Internal Link untuk Mobile Kecil --- */
    .akd-internal-link-wrapper strong {
        font-size: 10px; /* Font lebih kecil lagi */
    }
    .akd-internal-link-wrapper a {
        font-size: 10px; /* Font lebih kecil lagi */
    }
}