/* ==========================================================================
   1. IMPORT GOOGLE FONTS (Wajib di baris pertama)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Poppins:wght@400;500;600;700&display=swap');

/* ==========================================================================
   1. GLOBAL TYPOGRAPHY & BASE STYLE (Kontras Diperbaiki untuk Accessibility)
   ========================================================================== */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: #1e293b; /* Diubah dari #334155 menjadi lebih gelap sedikit agar lolos kontras WCAG */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .fw-bold {
    font-family: 'Poppins', sans-serif;
    color: #0f172a; /* Diubah dari #1e293b agar kontras teks judul tajam */
    letter-spacing: -0.01em; 
}

h1 { font-weight: 700; }
h2, h3 { font-weight: 600; }

/* ==========================================================================
   3. DETAIL ARTIKEL / BLOG CONTENT
   ========================================================================== */
.blog-content p {
    text-align: justify !important;   
    line-height: 1.7 !important;       
    margin-bottom: 1.5rem !important;  
    color: #334155 !important;         
    font-size: 1.05rem !important;     
}

.hover-title:hover {
    color: #0d6efd !important;
    text-decoration: underline;
}

.hover-card:hover {
    background-color: #f1f3f5 !important;
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

/* ==========================================================================
   4. NAVBAR & NAVIGATION
   ========================================================================== */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(33, 37, 41, 0.95) !important;
}

/* ==========================================================================
   5. PRODUCT & UTILITIES
   ========================================================================== */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

.img-container-premium {
    background-color: #ffffff; 
    border: 1px solid #e2e8f0; 
    border-radius: 12px;       
    padding: 12px;             
    margin: 15px 15px 0 15px;  
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.img-product-fit {
    width: 100%;
    height: 160px;             
    object-fit: contain;       
    border-radius: 8px;
}

.transition-hover {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.transition-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2.5rem rgba(92, 70, 228, 0.15) !important; 
    border-color: rgba(92, 70, 228, 0.3) !important;
}

.icon-box-premium {
    width: 65px;
    height: 65px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   6. BADGE & INTERACTIVE COMPONENTS
   ========================================================================== */
.badge-category-premium {
    display: inline-flex;
    align-items: center;
    gap: 6px; 
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 30px; 
    margin-bottom: 8px;
}

.badge-source-code {
    background-color: #e0f2fe; 
    color: #0369a1;            
}

.badge-zoom {
    background-color: #e0e7ff; 
    color: #4338ca;            
}

.badge-umum {
    background-color: #e2e8f0; 
    color: #334155; /* Makin kontras di atas latar abu-abu */           
}

/* ==========================================================================
   7. PAGE LOADER EFFECT
   ========================================================================== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9); 
    z-index: 9999; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Efek hover bawaan kolom kanan */
.hover-card:hover {
    background-color: #f1f3f5 !important;
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

/* ==========================================================================
   PORTAL BLOG - Perbaikan Total Gambar RichEditor Filament (Anti-Gagal)
   ========================================================================== */

/* 1. Amankan gambar agar tetap muncul, hilangkan paksa semua teks di dalam pembungkus attachment */
.blog-content attachment-wrapper a, 
.blog-content .attachment-wrapper a,
.blog-content figure a {
    display: block !important;
    pointer-events: none !important; /* Matikan fungsi klik download */
    color: transparent !important;   /* Transparankan teks utama */
    font-size: 0 !important;          /* Lenyapkan ukuran teks utama */
    line-height: 0 !important;        /* Hilangkan jarak spasi teks */
    text-decoration: none !important;
}

/* 2. Lenyapkan paksa semua tag anak (span/teks kapasitas file) agar tidak mengintip */
.blog-content attachment-wrapper a *,
.blog-content .attachment-wrapper a * {
    display: inline-block;
    color: transparent !important;   /* Buat teks teks kapasitas jadi transparan */
    font-size: 0 !important;          /* Ukuran teks anak jadi nol */
    line-height: 0 !important;
    opacity: 0 !important;            /* Hilangkan total secara visual */
}

/* 3. Atur ulang styling gambar agar tampil proporsional dan responsif */
.blog-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    margin-top: 10px;
    margin-bottom: 15px;
    display: block;
}
.btn-wa-premium:hover {
    background: linear-gradient(135deg, #22c35e, #0f7569) !important; /* Warna sedikit lebih gelap pas di-hover agar ada efek ditekan */
    color: #ffffff !important;
}
.btn-wa-premium:hover i {
    color: #ffffff !important;
}