:root {
    --primary: #809966;      /* Warna utama MomenLink */
    --primary-dark: #2980b9;
    --text-dark: #242B1D;    /* Warna Judul H1 */
    --text-main: #383E32;    /* Warna isi konten */
    --text-light: #7f8c8d;   /* Warna meta & breadcrumb */
    --bg-body: #fcfcfc;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
    --border: #f0f0f0;
}

/* --- Global Reset --- */
body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-body);
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    color: var(--text-main);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

/* --- Header Blog --- */
.blog-header {
    text-align: center;
    margin-bottom: 40px;
}

.blog-subtitle {
    color: var(--text-light);
    max-width: 600px;
    margin: 10px auto;
}

.btn-back-all {
    display: inline-block;
    margin-top: 15px;
    color: #e67e22;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.btn-back-all:hover {
    color: var(--primary-dark);
}

/* --- Card Body & Elements --- */
.blog-card-body {
    padding: 20px;
}

.blog-card-title {
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.4;
    font-size: 1.25rem;
    color: var(--text-dark);
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 15px;
}

.blog-read-more {
    color: #2ecc71;
    font-weight: bold;
    font-size: 0.9rem;
}

/* --- Badges (Warna Berdasarkan Kategori) --- */
.blog-badge {
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 10px;
    display: inline-block;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 600;
}

.cat-default { background: var(--primary); }
.cat-tutorial { background: #e67e22; }
.cat-tips { background: #9b59b6; }
.cat-update { background: #2ecc71; }

/* --- Empty State --- */
.blog-empty {
    text-align: center;
    grid-column: 1/-1;
    color: var(--text-light);
    padding: 100px 0;
    font-size: 1.1rem;
}

/* Perhalus tampilan gambar agar tidak kaku */
.isi-content img {
    transition: transform 0.3s ease;
}

/* Tambahkan efek hover halus pada card agar interaktif */
.blog-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.blog-card:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

/* Mencegah kata yang terlalu panjang memecah layout di HP */
.isi-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Scrollbar halus untuk sidebar yang panjang */
.tutorial-series-list::-webkit-scrollbar {
    width: 4px;
}
.tutorial-series-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
    margin-top:24px;
}


/* ========= ARTIKEL ======*/

/* --- Container & Layout --- */
.blog-wrapper {
    max-width: 1200px;
    margin: 20px auto 40px; /* Margin atas 20px sudah cukup jika header aman */
    padding: 0 20px;    
}

.blog-main-layout {
    display: grid;
    grid-template-columns: 1fr 320px; /* Konten Utama | Sidebar */
    gap: 40px;
}

/* --- Breadcrumb --- */
.breadcrumb-container { 
    margin-bottom: 25px; 
    font-size: 14px; 
    color: var(--text-light);
    display: block;
    position: relative !important; /* Paksa dia tetap di alur normal */
}

.breadcrumb-container a { 
    text-decoration: none; 
    color: var(--primary); 
}

.breadcrumb-container .current-page { 
    color: #999; 
    font-weight: normal; 
}

/* --- toc-container --- */

.toc-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
}
.toc-container h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #2c3e50;
}
.toc-container ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.toc-container li.toc-level-3 {
    margin-left: 20px; /* Menjorok untuk sub-bab */
    font-size: 0.9rem;
}
.toc-container a {
    text-decoration: none;
    color: #3498db;
}
.toc-container a:hover {
    text-decoration: underline;
}

/* --- Sticky Sidebar Logic --- */
@media (min-width: 993px) {
    .sidebar-sticky-wrapper {
        position: sticky;
        top: 24px; /* Jarak dari atas saat melayang */
        display: flex;
        flex-direction: column;
        gap: 30px;
        max-height: 90vh;
        overflow-y: auto;
    }
}

.tutorial-series-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    
    max-height: 400px; /* Batasi  tinggi jika artikel tutorialnya ada puluhan */
    overflow-y: auto;  /* Muncul scrollbar kecil jika list terlalu panjang */
    padding-right: 5px;    
}

.tutorial-item {
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    gap: 10px;
    line-height: 1.4;
}

.tutorial-item:hover {
    background: #F2F5F0;
    color: var(--primary);
}

.tutorial-item.active-tutorial {
    background: var(--primary);
    color: #fff !important;
    font-weight: 600;
}

.tutorial-item .num {
    opacity: 0.6;
}

.tutorial-item.active-tutorial .num {
    opacity: 1;
}

/* --- Mobile vs Desktop Display --- */
.mobile-toc { display: none; }

@media (max-width: 992px) {
    .mobile-toc { 
        display: block; 
        margin-bottom: 30px; 
    }
    .desktop-toc { display: none; }
}


/* --- Detail Content Area --- */
.blog-content-area {
    background: var(--white);
    padding: 28px;
}

.blog-title-detail {
    font-size: 2.6rem;
    color: var(--text-dark); /* Judul H1 Elegan */
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: -1px;
}

/* Styling Global (Desktop) */
.blog-meta-detail { 
    margin-bottom: 30px; 
    color: var(--text-light); 
    font-size: 14px; 
    display: flex;
    gap: 20px;
    flex-wrap: wrap; /* Agar tidak terpotong jika layar medium */
}

/* Responsif Mobile */
@media (max-width: 480px) {
    .blog-meta-detail {
        flex-direction: column; 
        gap: 10px;              
        align-items: flex-start;
    }
}

.blog-feature-img-detail {
    width: 100%;
    height: auto;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
    display: block;
}


/* Untuk Label ADVERTISEMENT */
.ads-label {
    display: block; 
    color: #bbb; 
    margin-bottom: 5px;
    font-size: 10px;
}

/* Section Related Posts */
.related-posts {
    margin-top: 60px; 
    padding-top: 40px; 
    border-top: 1px solid var(--border);
}

.related-title {
    font-size: 24px; 
    margin-bottom: 30px;
    color: var(--text-dark);
}

.blog-card-link {
    text-decoration: none; 
    color: inherit;
}

.blog-card-body {
    padding: 20px;
}

.blog-card-body h4 {
    font-size: 18px; 
    margin-bottom: 10px;
    color: var(--text-dark);
}

.blog-card-body small {
    color: var(--text-light);
}

/* --- ISI KONTEN (CKEditor Fix) --- */
.isi-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-main);
}

.isi-content p { margin-bottom: 25px; }

/* Mencegah Gambar Meluap ke Samping */
.isi-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px;
    margin: 30px auto;
    display: block;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.isi-content h2, .isi-content h3 {
    color: var(--text-dark);
    margin-top: 40px;
    margin-bottom: 20px;
}

/* --- Share Buttons --- */
.share-post { 
    margin-top: 60px; 
    padding: 30px; 
    background: #f8fafc;
    border-radius: 15px;
}
.share-post h4 { margin-top: 0; margin-bottom: 15px; color: var(--text-dark); }
.share-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.share-buttons a {
    padding: 12px 20px; 
    border-radius: 10px; 
    color: #fff; 
    text-decoration: none; 
    font-size: 14px; 
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s;
}
.share-fb { background: #3b5998; }
.share-wa { background: #25d366; }
.share-tw { background: #1da1f2; }
.share-buttons a:hover { opacity: 0.8; }

/* --- Sidebar Styling --- */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget { 
    background: var(--white); 
    padding: 25px; 
    border-radius: 18px; 
    border: 1px solid var(--border); 
    box-shadow: var(--shadow);
}

.sidebar-widget h3 { 
    font-size: 18px; 
    margin-bottom: 20px; 
    border-left: 4px solid var(--primary); 
    padding-left: 15px;
    color: var(--text-dark);
}

.sidebar-post-item {
    display: flex; 
    gap: 15px; 
    margin-bottom: 20px; 
    text-decoration: none; 
    color: inherit;
    align-items: center;
}
.sidebar-post-item img { 
    width: 70px; 
    height: 70px; 
    border-radius: 10px; 
    object-fit: cover; 
}
.sidebar-post-info h4 { 
    font-size: 14px; 
    margin: 0; 
    line-height: 1.4; 
    color: var(--text-dark);
}
.sidebar-post-item:hover h4 { color: var(--primary); }

/* --- Related Posts & Grid --- */
.related-posts { margin-top: 80px; }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.blog-card {
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    overflow: hidden;
    border: 1px solid var(--border);
}

.blog-card:hover { transform: translateY(-8px); }

.blog-feature-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin: 0 !important; /* Override content img margin */
}

/* --- Ads Wrapper --- */
.ads-wrapper {
    margin: 40px 0;
    text-align: center;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 10px;
}

/* --- Responsif Mobile --- */
@media (max-width: 992px) {
    .blog-main-layout { grid-template-columns: 1fr; }
    .blog-title-detail { font-size: 2rem; }
}

@media (max-width: 480px) {
    .blog-wrapper { padding: 0 15px; margin: 20px auto; }
    .blog-title-detail { font-size: 1.7rem; }
    .share-buttons a { width: 100%; justify-content: center; }
    
    .isi-content {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  .blog-content-area {
    padding: 10px;
  }
}

/* --- Promo Baner -- */
.promo-banner {
    display: block;
    background: linear-gradient(135deg, #9CAF88, #809966);
    color: white !important;
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border: 2px dashed rgba(255,255,255,0.3);
}

.ads-label {
    display: block;
    color: #bbb;
    font-size: 10px;
    margin-bottom: 5px;
    text-align: center;
}

.ads-card-grid {
    background: #fdfdfd; /* Warna background sedikit beda */
    border: 1px dashed #ddd !important; /* Border putus-putus khas iklan */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}