/* ==========================================================================
   5. Reusable Components (Buttons, Cards, etc.)
   ========================================================================== */

/* --- GAYA TOMBOL BERSIH & RAPI --- */
.btn-magic-ghost, .btn-magic-solid {
    position: relative;
    padding: 0.75rem 2rem;
    font-weight: 700;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid transparent;
    transition: all 0.4s ease;
}
.btn-magic-ghost:hover, .btn-magic-solid:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

/* 5.1. Ghost/Glass Button */
.btn-magic-ghost {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-magic-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.8), 0 0 10px rgba(255, 255, 255, 0.5);
    border-color: #34d399;
}

/* 5.2. Solid Button */
.btn-magic-solid {
    color: white;
    background-color: #10b981; /* emerald-500 */
    border-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5); 
}

.btn-magic-solid:hover {
    background-color: #059669; /* emerald-600 */
    box-shadow: 0 0 25px rgba(16, 185, 129, 1), 0 0 15px rgba(110, 231, 183, 0.8);
}

/* Gaya Tombol untuk Mode Terang */
.light-mode .btn-magic-ghost {
    color: var(--color-text-primary);
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--color-border-base);
    text-shadow: none;
}
.light-mode .btn-magic-ghost:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: var(--color-emerald-base);
    color: #064e3b;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.light-mode .btn-magic-solid {
    background-color: #059669;
    color: white; 
    text-shadow: none;
}
.light-mode .btn-magic-solid:hover {
    background-color: #047857;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.8);
}

.ghost-glow-button {
    transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    box-shadow: 0 0 15px rgba(52, 211, 153, 0.4);
}
.ghost-glow-button:hover {
    background-color: #34d399;
    color: #064e3b;
    box-shadow: 0 0 25px rgba(52, 211, 153, 0.8), 0 0 10px rgba(110, 231, 183, 0.5);
}

.social-icon svg {
    transition: transform 0.3s ease, color 0.3s ease, filter 0.3s ease;
}
.social-icon:hover svg {
    transform: translateY(-5px);
    color: #34d399;
    filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.8));
}

/* ==========================================================================
   6. Layout Components (Header, Footer, etc.)
   ========================================================================== */

/* --- PERBAIKAN: Gaya Header dengan Efek Blur --- */
#main-header {
    position: fixed;
    width: 100%;
    z-index: 50;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    border-bottom: 1px solid transparent; /* Tambahkan border transparan sebagai dasar */
}

/* State ketika header di-scroll */
#main-header.header-scrolled {
    background-color: var(--color-bg-header-scrolled, rgba(17, 24, 39, 0.8)); /* Fallback value jika variabel tidak ada */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px var(--color-shadow-base, rgba(0, 0, 0, 0.2));
    border-color: var(--color-border-base, rgba(55, 65, 81, 1));
}


/* ==========================================================================
   6. Homepage Specific Styles (GEM CARDS / KARTU PERMATA)
   ========================================================================== */

@keyframes gem-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
#kategori { perspective: 1200px; }
.cards-grid-container { transition: transform 0.1s linear; }

/* --- PERBAIKAN KRITIS: Memperluas Grid Kategori untuk Lebih dari 3 Kartu --- */
#main-category-grid {
    /* Aturan dasar Tailwind di front-page.php: grid-cols-1 sm:grid-cols-2 */
    /* Menambahkan aturan grid untuk tablet besar (lg) dan desktop (xl) di sini */
    display: grid;
    gap: 2rem; /* Menggunakan gap default dari Tailwind */
}

@media (min-width: 1024px) { /* lg: breakpoint */
    /* Mengubah lg:grid-cols-2 menjadi 3 atau 4 kolom */
    #main-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)); /* Default 3 kolom di desktop */
    }
}

@media (min-width: 1280px) { /* xl: breakpoint (Opsional: Tambah ke 4 kolom jika Anda punya banyak kategori) */
    #main-category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)); /* 4 kolom di layar besar */
    }
}
/* --- AKHIR PERBAIKAN KRITIS --- */

.category-card { --x: 0px; --y: 0px; position: relative; overflow: hidden; background-color: var(--color-bg-secondary); transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1); min-height: 20rem; isolation: isolate; border: 3px solid transparent; box-shadow: 0 5px 30px var(--color-shadow-base); }
.category-card:hover { transform: scale(1.02) translateY(-5px); box-shadow: 0 10px 40px var(--color-shadow-base), 0 0 30px var(--gem-glow-color); }
.category-card:hover::before { opacity: 1; }
.gem-gold { --gem-base-color: #8c850e; --gem-glow-color: rgba(253, 224, 71, 0.8); border-color: #fcd34d; }
.gem-ruby { --gem-base-color: #7f1d1d; --gem-glow-color: rgba(248, 113, 113, 0.8); border-color: #f87171; }
.gem-emerald { --gem-base-color: #065f46; --gem-glow-color: rgba(16, 185, 129, 0.8); border-color: #34d399; }
.gem-diamond { --gem-base-color: #1e3a8a; --gem-glow-color: rgba(96, 165, 250, 0.8); border-color: #60a5fa; }
.gem-sapphire { --gem-base-color: #1e40af; --gem-glow-color: rgba(59, 130, 246, 0.8); border-color: #3b82f6; }
.category-card::before { content: ''; position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); width: 300px; height: 300px; background: radial-gradient(circle, var(--gem-glow-color) 0%, transparent 70%); filter: blur(80px); opacity: 0; transition: opacity 0.5s ease; z-index: -1; pointer-events: none; }
.category-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient( 45deg, var(--gem-base-color) 0%, var(--gem-base-color) 40%, var(--gem-glow-color) 50%, var(--gem-base-color) 60%, var(--gem-base-color) 100% ); background-size: 200% 100%; mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude; -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: exclude; opacity: 0.15; border-radius: 0.75rem; pointer-events: none; z-index: 0; }
.category-card:hover::after { animation: gem-shimmer 3s infinite linear; opacity: 0.4; }
.card-background { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 0.4s ease, filter 0.4s ease; }
.category-card:hover .card-background { filter: brightness(0.6); }
.card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.1) 60%, rgba(0,0,0,0.9) 100%); z-index: 1; }
.card-content { position: absolute; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; width: 100%; padding: 2rem; text-align: left; bottom: 0; left: 0; }
.card-content h3 { color: white; }
.card-content p { color: #d1d5db; }
/* Struktur utama untuk detail yang muncul saat hover */
.category-card .hidden-details { 
    max-height: 0; 
    opacity: 0; 
    padding-top: 0; 
    overflow-y: hidden; 
    transition: opacity 0.5s ease, max-height 0.5s ease, padding 0.5s ease; 
}
.category-card:hover .hidden-details { 
    opacity: 1; 
    /* KRITIS: Beri tinggi yang cukup untuk DESKRIPSI (terpotong) + TOMBOL + margin. */
    max-height: 150px; /* Diperkirakan cukup untuk 3-4 baris teks + tombol */
    padding-top: 1rem; 
    overflow-y: hidden; 
}

/* --- PERUBAHAN: Membatasi TINGGI HANYA pada Wrapper Deskripsi --- */
.category-card .hidden-details .description-wrapper {
    /* Batasi tinggi wrapper deskripsi agar tombol tidak terpotong */
    max-height: 90px; /* Cukup untuk sekitar 3-4 baris teks */
    overflow: hidden;
    margin-bottom: 0.5rem; /* Beri sedikit jarak ke tombol di bawahnya */
}

/* Gaya untuk memotong teks di dalam paragraf (tetap berlaku) */
.category-card .hidden-details p {
    /* Menerapkan pemotongan 3 baris */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Hapus margin-bottom sebelumnya, karena sekarang dikontrol oleh description-wrapper */
    margin-bottom: 0; 
}
/* --- PENYEDERHANAAN GAYA KARTU KUTIPAN --- */
.quote-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-base);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--color-shadow-base);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation-delay: var(--delay) !important;
}
.quote-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--color-shadow-base);
}

.quote-card-content {
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.quote-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--color-text-primary);
    font-style: italic;
    margin-bottom: 1rem;
}
.quote-author {
    font-weight: 600;
    color: var(--color-emerald-base);
}


/* --- PENYESUAIAN GAYA KARTU KHUSUS HALAMAN TENTANG KAMI (TRANSPARANSI) --- */

/* 1. Visi Quote Card */
.quote-card-magic {
    /* Mengganti background solid dengan glass effect */
    background: rgba(16, 185, 129, 0.1); /* Emerald transparan ringan */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 3px solid rgba(16, 185, 129, 0.4); /* Border lebih tebal dan transparan */
    border-radius: 1.5rem; /* Lebih membulat */
    overflow: hidden;
    box-shadow: 0 5px 30px var(--color-shadow-base);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    animation-delay: var(--delay) !important;
}
.quote-card-magic:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 40px var(--color-shadow-base), 0 0 30px rgba(16, 185, 129, 0.7);
}
.light-mode .quote-card-magic {
    background: rgba(16, 185, 129, 0.05); /* Lebih ringan di mode terang */
    border-color: rgba(16, 185, 129, 0.2);
}

.quote-card-magic .quote-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--color-text-primary);
    font-style: italic;
    margin-bottom: 1rem;
}
.quote-card-magic .quote-author {
    font-weight: 600;
    color: var(--color-emerald-base);
}

/* 2. Mission/Timeline Card (Gaya Transparan) */
.timeline-card, .mission-card {
    /* Menjadikannya semi-transparan dan menyatu dengan background tema */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--color-border-base);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.4s ease;
}

.light-mode .timeline-card, .light-mode .mission-card {
    background: rgba(0, 0, 0, 0.05);
}

.timeline-card:hover, .mission-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--color-shadow-base);
}

/* 3. Team Card - Front Face Transparency Fix */
.team-card-wrapper .card-front {
    /* Tetapkan background transparan */
    background-color: transparent !important; 
    
    /* Tambahkan border yang hilang untuk estetika saat transparan */
    border: 1px solid var(--color-border-base);
    border-radius: 1rem;
    
    /* Overwrite border-radius yang terpotong oleh image di atas */
    border-top-left-radius: 0.75rem; 
    border-top-right-radius: 0.75rem;
}


/* 4. Timeline Dot Border Fix */
.dynamic-border {
    border-color: var(--color-bg-primary) !important;
}


/* ==========================================================================
   29. Library Card (Perpustakaan Kerajaan) - NEW
   ========================================================================== */

.library-card {
    position: relative;
    box-shadow: 0 5px 20px var(--color-shadow-base);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border-base);
}

.library-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px var(--color-shadow-base), 0 0 20px rgba(16, 185, 129, 0.3);
    border-color: var(--color-emerald-base);
}

.library-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 180px; /* Tinggi cover buku */
    overflow: hidden;
    /* Efek Kaca Tembus Pandang di atas gambar */
    background: linear-gradient(to top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.5) 100%);
    z-index: 1;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8) grayscale(50%);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.library-card:hover .card-image {
    transform: scale(1.1);
    filter: brightness(1) grayscale(0%);
}

.card-content-wrapper {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Tombol Download */
.btn-download-magic {
    padding: 0.75rem 1rem;
    background-color: var(--color-emerald-base);
    color: white !important;
    font-weight: 700;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.btn-download-magic:hover {
    background-color: #059669; /* emerald-600 */
    box-shadow: 0 0 20px var(--color-emerald-base);
    transform: translateY(-2px);
}


/* ==========================================================================
   27. Team Card STATIC STYLE (REVISED)
   ========================================================================== */
.team-card-wrapper {
    /* Container wrapper baru */
    height: 100%;
    min-height: 20rem; 
    display: flex; 
    flex-direction: column;
    justify-content: stretch;
    
    /* Styling Kartu */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--color-border-base);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 5px 30px var(--color-shadow-base);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.light-mode .team-card-wrapper {
     background: rgba(0, 0, 0, 0.05);
}

.team-card-wrapper:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 40px var(--color-shadow-base), 0 0 30px rgba(16, 185, 129, 0.7);
    border-color: var(--color-emerald-base);
}

.team-card-wrapper .team-image {
    max-width: 100%;
    width: 100%;
    height: 10rem; 
    object-fit: cover;
    /* Margin negatif harus dihapus karena gambar kini di dalam wrapper */
    margin: 0; 
    border-radius: 0.75rem 0.75rem 0 0;
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

.team-card-wrapper:hover .team-image {
    filter: grayscale(0%);
}

.team-card-content {
    padding: 1rem 1.5rem; 
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.social-static-container {
    padding-top: 1rem;
    border-top: 1px solid var(--color-border-base);
    margin-top: 1rem;
}

/* ==========================================================================
   7. General Animations
   ========================================================================== */
.fade-in-section, .fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in-section.is-visible, .fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}
/* ==========================================================================
   16. Premium Archive Page - REVISED (Hanya untuk style card list)
... (Sisa file CSS tetap sama) ...
   ========================================================================== */

.premium-post-card-list {
    background-color: var(--color-bg-secondary);
    backdrop-filter: blur(8px);
    border: 1px solid var(--color-border-base);
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px var(--color-shadow-base);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.premium-post-card-list:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 15px 40px var(--color-shadow-base);
    border-color: var(--color-emerald-base);
}
.premium-post-card-list .card-link-list { display: flex; text-decoration: none; color: var(--color-text-primary); }

/* --- PERBAIKAN KRITIS UNTUK MOBILE: Gambar Lebih Kecil dan Proporsi Content --- */
.premium-post-card-list .card-image-wrapper-list {
    flex-shrink: 0; 
    width: 120px; /* Lebar Gambar Tetap di Mobile */
    height: 120px; /* Tinggi Gambar Tetap di Mobile */
    max-width: none; /* Hapus max-width agar lebih ketat */
    overflow: hidden;
}

@media (min-width: 640px) { /* SM breakpoint */
    .premium-post-card-list .card-image-wrapper-list {
        width: 150px;
        height: 150px;
    }
}
@media (min-width: 1024px) { /* LG breakpoint */
    .premium-post-card-list .card-image-wrapper-list {
        width: 200px; /* Proporsi desktop */
        height: 180px;
    }
}


.premium-post-card-list .card-image-list { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.5s ease; 
}
.premium-post-card-list:hover .card-image-list { transform: scale(1.1); }
.premium-post-card-list .card-content-wrapper-list { 
    padding: 1rem; /* Padding lebih kecil di mobile */
    flex-grow: 1; 
}

/* Judul dan Meta disesuaikan untuk mobile */
.premium-post-card-list .card-category-list {
    display: inline-block; background-color: var(--color-emerald-base); color: white;
    padding: 0.15rem 0.6rem; border-radius: 9999px; font-size: 0.65rem;
    font-weight: bold; margin-bottom: 0.5rem;
}
.premium-post-card-list .card-title-list {
    font-family: 'Playfair Display', serif; 
    font-size: 1rem; /* Judul lebih kecil di mobile */
    font-weight: bold;
    line-height: 1.3; 
    margin-bottom: 0.25rem; 
    color: var(--color-text-primary);
    text-shadow: 0 1px 3px var(--color-shadow-base);
}
.premium-post-card-list .card-meta-list {
    font-size: 0.65rem; /* Meta data sangat kecil di mobile */
    color: var(--color-text-secondary);
}

@media (min-width: 640px) { /* SM breakpoint */
    .premium-post-card-list .card-title-list { font-size: 1.25rem; }
    .premium-post-card-list .card-meta-list { font-size: 0.75rem; }
}
@media (min-width: 1024px) { /* LG breakpoint */
    .premium-post-card-list .card-content-wrapper-list { padding: 1.5rem; }
    .premium-post-card-list .card-title-list { font-size: 1.5rem; }
    .premium-post-card-list .card-meta-list { font-size: 0.875rem; }
}

.premium-post-card-list .card-excerpt-list { font-size: 0.9rem; color: var(--color-text-secondary); line-height: 1.6; }

.premium-post-card-list .card-shine-effect-list {
    position: absolute; top: 0; left: -150%; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg); transition: left 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1; pointer-events: none;
}
.dark-mode .premium-post-card-list .card-shine-effect-list {
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0) 100%);
}
.premium-post-card-list:hover .card-shine-effect-list { left: 150%; }

/* PENAMBAHAN BARU: Gaya untuk Kartu Artikel di Halaman Arsip (Grid View) */
.archive-post-card {
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border-base);
    border-radius: 0.75rem; /* Sesuai dengan rounded-xl */
    box-shadow: 0 4px 6px -1px var(--color-shadow-base), 0 2px 4px -2px var(--color-shadow-base); /* Sesuai dengan shadow-md */
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

.archive-post-card:hover {
    transform: translateY(-0.5rem); /* Sesuai dengan hover:-translate-y-2 */
    box-shadow: 0 10px 15px -3px var(--color-shadow-base), 0 4px 6px -4px var(--color-shadow-base); /* Sesuai dengan hover:shadow-xl */
}

/* Tautan judul di dalam kartu */
.archive-post-card .entry-header h3 a {
    color: var(--color-text-primary);
    transition: color 0.3s ease;
}

.archive-post-card:hover .entry-header h3 a {
    color: var(--color-emerald-base);
}

/* Teks ringkasan (excerpt) */
.archive-post-card .entry-summary {
    color: var(--color-text-secondary);
}

/* ==========================================================================
   20. Top Posts Panel (Homepage) - MOBILE RESPONSIVE UPDATE
   ========================================================================== */

@keyframes gold-shimmer {
  0% { background-position: -300% 0; box-shadow: 0 0 30px #fde047, 0 0 15px #facc15, inset 0 0 10px rgba(253, 224, 71, 0.3); }
  100% { background-position: 300% 0; box-shadow: 0 0 40px #fde047, 0 0 20px #facc15, inset 0 0 15px rgba(253, 224, 71, 0.5); }
}

@keyframes silver-shimmer {
  0% { background-position: -300% 0; box-shadow: 0 0 25px #e5e7eb, 0 0 10px #d1d5db, inset 0 0 8px rgba(229, 231, 235, 0.3); }
  70% { background-position: 150% 0; }
  100% { background-position: 300% 0; box-shadow: 0 0 35px #e5e7eb, 0 0 15px #d1d5db, inset 0 0 12px rgba(229, 231, 235, 0.5); }
}

@keyframes bronze-shimmer {
  0% { box-shadow: 0 0 20px #f59e0b, 0 0 8px #d97706, inset 0 0 6px rgba(245, 158, 11, 0.3); }
  100% { box-shadow: 0 0 30px #f59e0b, 0 0 12px #d97706, inset 0 0 10px rgba(245, 158, 11, 0.5); }
}

/* Mobile-first styles: Compact and clean */
.top-post-card {
    display: flex;
    align-items: center;
    border-radius: 0.75rem;
    padding: 0.5rem;
    border: 2px solid transparent;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    animation-delay: var(--delay);
    background-color: var(--color-bg-secondary);
}

.top-post-card:hover {
    transform: scale(1.02);
    border-color: rgba(255,255,255,0.4);
}
.light-mode .top-post-card {
    background-color: var(--color-bg-primary);
}

.card-rank-badge {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 0.75rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    background-color: rgba(0,0,0,0.4);
    border: 2px solid rgba(255,255,255,0.2);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    z-index: 2;
}

.card-image-container {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-right: 0.75rem;
    z-index: 2;
}
.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content-container {
    flex-grow: 1;
    z-index: 2;
    min-width: 0; /* Fix for flexbox text overflow */
}
.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    line-height: 1.3;
    font-weight: bold;
    margin-bottom: 0.25rem;
    /* Prevent title from breaking layout */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-title a {
    color: var(--color-text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}
.card-title a:hover {
    color: #6ee7b7;
}
.card-meta {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap; /* Allow meta to wrap on very small screens */
}

.card-action {
    margin-left: 0.5rem;
    z-index: 2;
}
.action-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background-color: var(--color-bg-secondary);
    color: var(--color-text-primary);
    font-size: 1.25rem;
    text-decoration: none;
    transition: all 0.3s ease;
}
.action-arrow:hover {
    background-color: #10b981;
    color: white;
    transform: scale(1.1);
}

/* Tablet & Desktop Overrides: Larger and more spacious */
@media (min-width: 768px) {
    .top-post-card {
        border-radius: 1rem;
        padding: 1rem;
    }
    .card-rank-badge {
        width: 3rem;
        height: 3rem;
        font-size: 1.5rem;
        margin-right: 1.5rem;
    }
    .card-image-container {
        width: 4rem;
        height: 4rem;
        border-radius: 0.75rem;
        margin-right: 1.5rem;
    }
    .card-title {
        font-size: 1.25rem;
        white-space: normal; /* Allow title to wrap on desktop */
        overflow: visible;
        text-overflow: clip;
    }
    .card-meta {
        font-size: 0.875rem;
        flex-wrap: nowrap;
    }
    .card-action {
        margin-left: 1.5rem;
    }
    .action-arrow {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.5rem;
    }
}


.top-post-card.rank-1 {
    background: linear-gradient(110deg, var(--color-bg-secondary) 20%, #44403c 50%, var(--color-bg-secondary) 80%); 
    border-color: #fde047;
    animation: gold-shimmer 4s infinite alternate;
}
.rank-1 .card-rank-badge {
    background: linear-gradient(145deg, #fef08a, #eab308);
    color: #422006;
    border-color: #fde047;
    text-shadow: 0 1px 1px rgba(255,255,255,0.5);
}
.rank-1 .card-title a { color: #fef08a; }
.rank-1 .action-arrow { background-color: #eab308; color: #422006; }
.rank-1 .action-arrow:hover { background-color: #fde047; }

.top-post-card.rank-2 {
    background: linear-gradient(110deg, var(--color-bg-secondary) 20%, #737373 50%, var(--color-bg-secondary) 80%);
    border-color: #d1d5db;
    animation: silver-shimmer 5s infinite alternate;
}
.rank-2 .card-rank-badge {
    background: linear-gradient(145deg, #f9fafb, #9ca3af);
    color: #1f2937;
    border-color: #e5e7eb;
}
.rank-2 .card-title a { color: #f9fafb; }

.top-post-card.rank-3 {
    background: linear-gradient(110deg, var(--color-bg-secondary) 20%, #7c2d12 50%, var(--color-bg-secondary) 80%);
    border-color: #f59e0b;
    animation: bronze-shimmer 6s infinite alternate;
}
.rank-3 .card-rank-badge {
    background: linear-gradient(145deg, #fbbf24, #b45309);
    color: #451a03;
    border-color: #f59e0b;
}
.rank-3 .card-title a { color: #fbbf24; }

.top-post-card.rank-4:hover {
    border-color: #34d399; /* emerald-400 */
}

/* --- PERBAIKAN: Gaya Kartu Peringkat untuk Mode Terang --- */
.light-mode .top-post-card.rank-1,
.light-mode .top-post-card.rank-2,
.light-mode .top-post-card.rank-3 {
    background: var(--color-bg-secondary); /* Gunakan background standar mode terang */
    animation: none; /* Matikan animasi shimmer yang tidak cocok */
}

/* Gold Rank Light Mode */
.light-mode .top-post-card.rank-1 { border-color: #eab308; }
.light-mode .rank-1 .card-title a { color: #92400e; } /* Teks Coklat Tua */
.light-mode .rank-1 .action-arrow { background-color: #fde047; color: #422006; }

/* Silver Rank Light Mode */
.light-mode .top-post-card.rank-2 { border-color: #9ca3af; }
.light-mode .rank-2 .card-title a { color: #374151; } /* Teks Abu-abu Tua */

/* Bronze Rank Light Mode */
.light-mode .top-post-card.rank-3 { border-color: #b45309; }
.light-mode .rank-3 .card-title a { color: #92400e; } /* Teks Coklat Tua */

/* Untuk Peringkat 4, pastikan hover berfungsi baik di mode terang */
.light-mode .top-post-card.rank-4:hover {
    border-color: var(--color-emerald-base);
}
/* --- AKHIR PERBAIKAN --- */


/* ==========================================================================
   21. Tombol Kembali ke Atas (Back to Top)
... (Sisa file CSS tetap sama) ...
   ========================================================================== */
.back-to-top-magic {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.8);
    color: white;
    border: 2px solid rgba(110, 231, 183, 0.5);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.7), 0 5px 15px rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    transform: translateY(100px);
    visibility: hidden;
    transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s, box-shadow 0.3s ease;
}

.back-to-top-magic.is-visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.back-to-top-magic:hover {
    background: rgba(5, 150, 105, 0.9);
    box-shadow: 0 0 30px rgba(110, 231, 183, 1), 0 8px 20px rgba(0,0,0,0.4);
    transform: scale(1.1);
}

.back-to-top-magic svg {
    transition: transform 0.3s ease;
}

.back-to-top-magic:hover svg {
    transform: translateY(-2px);
}


/* ==========================================================================
   23. WooCommerce Magic Styles
... (Sisa file CSS tetap sama) ...
   ========================================================================== */

.woocommerce-main {
    position: relative;
    z-index: 1;
}

.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
}
@media (max-width: 1024px) {
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 640px) {
    .woocommerce ul.products { grid-template-columns: repeat(1, 1fr) !important; }
}

.woocommerce-main .page-title,
.woocommerce-main h1,
.woocommerce-main h2,
.woocommerce-main h3,
.woocommerce-main .woocommerce-loop-product__title,
.woocommerce-main .price {
    color: var(--color-text-primary) !important;
    text-shadow: 0 2px 8px var(--color-shadow-base);
}

.woocommerce ul.products li.product {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-base);
    box-shadow: 0 5px 15px var(--color-shadow-base);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.woocommerce-cart-form, .woocommerce-checkout {
    color: var(--color-text-primary);
}
.woocommerce table.shop_table {
    border-color: var(--color-border-base);
    background: var(--color-bg-secondary);
}
.woocommerce table.shop_table th {
    color: var(--color-text-primary);
    border-bottom-color: var(--color-border-base);
}
.woocommerce table.shop_table td {
    border-top-color: var(--color-border-base);
}
.woocommerce .cart-collaterals .cart_totals,
#add_payment_method #payment, .woocommerce-checkout #payment {
    background: var(--color-bg-secondary);
    border-color: var(--color-border-base);
}

.woocommerce-message, .woocommerce-info, .woocommerce-error {
    backdrop-filter: blur(5px);
    border-radius: 0.5rem;
    font-weight: 500;
}
.woocommerce-message, .woocommerce-info {
    background-color: rgba(16, 185, 129, 0.2) !important;
    border-top-color: #10b981 !important;
    color: var(--color-text-primary) !important;
}
.woocommerce-error {
    background-color: rgba(239, 68, 68, 0.2) !important;
    border-top-color: #ef4444 !important;
    color: var(--color-text-primary) !important;
}
.woocommerce-message::before, .woocommerce-info::before { color: #10b981 !important; }
.woocommerce-error::before { color: #ef4444 !important; }

/* ==========================================================================
   24. Magic Comment Section REVISED
... (Sisa file CSS tetap sama) ...
   ========================================================================== */

.single-post-comments-wrapper {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-base);
    color: var(--color-text-primary);
    box-shadow: 0 5px 20px var(--color-shadow-base);
    border-radius: 1rem;
    padding: 2rem;
}

.comments-title {
    color: var(--color-emerald-base) !important;
    text-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
}

.comment-list .comment-body {
    position: relative;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-base);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 15px var(--color-shadow-base);
    transition: all 0.3s ease;
    margin-left: 0; 
}

.comment-list .comment-body:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--color-shadow-base), 0 0 10px rgba(16, 185, 129, 0.2);
}

.comment-author-wrapper .vcard a { color: var(--color-text-primary); }
.comment-author-wrapper .vcard a:hover { color: var(--color-emerald-base); }
.comment-meta a { color: var(--color-text-secondary); }
.comment-meta a:hover { color: var(--color-emerald-base); }

.comment-text {
    padding: 0;
    margin-top: 0 !important;
    color: var(--color-text-primary) !important;
}

.reply-link-magic {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: transparent;
    border: 1px solid var(--color-emerald-base);
    color: var(--color-emerald-base) !important;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(16, 185, 129, 0.4);
}
.reply-link-magic:hover {
    background-color: var(--color-emerald-base);
    color: var(--color-bg-primary) !important;
    box-shadow: 0 0 15px var(--color-emerald-base);
    transform: translateY(-1px);
}

.comment-list .children {
    list-style: none;
    margin-top: 1.5rem;
    padding-left: 1.5rem;
    border-left: 3px solid var(--color-border-base);
}
.comment-list .children li:first-child {
    margin-top: 0;
}
.comment-list .children .comment-body {
    padding: 1rem;
    margin-top: 1rem;
}

.magic-form-field {
    margin-bottom: 1.5rem;
}
.magic-input-field,
.comment-form textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border-base);
    color: var(--color-text-primary);
    box-shadow: inset 0 1px 3px var(--color-shadow-base);
    resize: vertical;
}

.magic-input-field:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-emerald-base);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2), inset 0 1px 3px rgba(0,0,0,0.1);
}

.magic-input-field::placeholder,
.comment-form textarea::placeholder {
    color: var(--color-text-secondary);
    opacity: 0.7;
}

/* ==========================================================================
   26. MODERN SITE FOOTER STYLES
... (Sisa file CSS tetap sama) ...
   ========================================================================== */
.site-footer {
    background-color: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border-base);
    padding: 4rem 0;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.footer-top-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-top-section {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* --- PENAMBAHAN & PERUBAHAN GAYA KUTIPAN FOOTER --- */
.footer-quote {
    max-width: 600px;
    /* Menetapkan tinggi minimum agar layout tidak "melompat" saat teks berganti */
    min-height: 80px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.footer-quote .quote-text,
.footer-quote .quote-author {
    /* Menerapkan transisi untuk menciptakan efek asap (smoke effect) */
    /* Durasi 0.7s ini harus cocok dengan delay di JavaScript */
    transition: opacity 0.7s ease-in-out, transform 0.7s ease-in-out, filter 0.7s ease-in-out;
}

/* Kelas ini ditambahkan oleh JavaScript untuk menyembunyikan kutipan */
.footer-quote.quote-hidden .quote-text,
.footer-quote.quote-hidden .quote-author {
    opacity: 0;
    transform: translateY(15px); /* Sedikit bergerak ke bawah */
    filter: blur(4px); /* Efek blur untuk "asap" */
}

/* Gaya default untuk teks kutipan */
.footer-quote .quote-text {
    font-style: italic;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-primary); 
    margin-bottom: 0.5rem;
}

/* Gaya default untuk penulis kutipan */
.footer-quote .quote-author {
    font-weight: 600;
    color: var(--color-emerald-base);
}
/* --- AKHIR PENAMBAHAN --- */


.footer-social-icons {
    display: flex;
    gap: 1.25rem;
}
.footer-social-icons a svg {
    width: 24px;
    height: 24px;
    color: var(--color-text-secondary);
    transition: color 0.3s ease, transform 0.3s ease;
}
.footer-social-icons a:hover svg {
    color: var(--color-emerald-base);
    transform: scale(1.1);
}

.footer-divider {
    border: 0;
    height: 1px;
    background-color: var(--color-border-base);
    margin: 0 auto 2.5rem;
}

.footer-bottom-section {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .footer-bottom-section {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-navigation .footer-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2rem;
}

.footer-navigation .footer-menu-list a {
    text-decoration: none;
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-navigation .footer-menu-list a:hover {
    color: var(--color-emerald-base);
}

.site-info {
    /* PERBAIKAN: Pastikan teks site-info menggunakan warna dinamis */
    color: var(--color-text-secondary); 
    text-align: center;
}

@media (min-width: 768px) {
    .site-info {
        text-align: right;
    }
}

/* ==========================================================================
   25. Theme Toggle Button Styles (Diperlukan)
   ========================================================================== */
.theme-toggle {
    color: var(--color-text-primary);
    background-color: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 0;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle svg {
    width: 24px;
    height: 24px;
}
/* Dark Mode specific styles */
.dark-mode .theme-toggle {
    color: #f9fafb;
}
.dark-mode .theme-toggle:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: #34d399;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

/* Light Mode specific styles --- PERBAIKAN DI SINI --- */
.light-mode .theme-toggle {
    color: var(--color-text-primary); /* Default: Tombol berwarna gelap di light mode */
}

/* Pengecualian: Buat tombol putih HANYA di home-page saat header belum di-scroll */
.light-mode.home-page #main-header:not(.header-scrolled) .theme-toggle {
    /* Saat belum di-scroll di homepage, tombol harus putih agar terlihat di atas hero */
    color: white; 
}

/* Saat header di-scroll di light mode, pastikan tombol tetap gelap */
.light-mode #main-header.header-scrolled .theme-toggle {
    color: var(--color-text-primary); /* Teks gelap saat scrolled */
}

.light-mode .theme-toggle:hover {
    background-color: rgba(0,0,0,0.1);
    border-color: #1f2937;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

/* ==========================================================================
   28. Mitra Shimmer Card (NEW)
... (Sisa file CSS tetap sama) ...
   ========================================================================== */

@keyframes shimmering {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
@keyframes shimmering-dark {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.mitra-shimmer-card {
    transition: all 0.4s ease-out;
    border: 3px solid transparent;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1); /* Shadow ringan default */
    transform: translateY(0);
}

.mitra-shimmer-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-color: var(--color-emerald-base);
    transform: translateY(-5px);
}

.mitra-shimmer-card-wrapper {
    /* Memastikan kartu memiliki tinggi yang seragam */
    min-height: 20rem; 
    height: 100%;
}

.shimmer-effect {
    position: absolute;
    inset: 0;
    z-index: 5;
    /* Efek Shimmer Light Mode */
    background: linear-gradient(
        90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 800px 100%;
    animation: shimmering 5s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0.8; /* Selalu ada, tapi samar */
    pointer-events: none;
    border-radius: 1rem;
}

/* Dark Mode Overrides untuk Shimmer */
.dark-mode .shimmer-effect {
    /* Efek Shimmer Dark Mode: lebih halus, menggunakan bayangan gelap */
    background: linear-gradient(
        90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 800px 100%;
    animation: shimmering-dark 5s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0.5;
}

/* Penyesuaian Konten Mitra */
.mitra-logo-container {
    transition: all 0.4s ease;
}
.mitra-shimmer-card:hover .mitra-logo-container {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

/* Gaya Overlay CTA saat hover */
.mitra-shimmer-card .absolute {
    transition: all 0.4s ease;
}
.mitra-shimmer-card:hover .mitra-logo-container img {
    filter: none; /* Hilangkan grayscale saat hover */
}

/* Pastikan warna bekerja di mode gelap/terang */
.light-mode .mitra-shimmer-card {
    background-color: var(--color-bg-primary); 
    box-shadow: 0 5px 20px rgba(0,0,0,0.05); 
}
.dark-mode .mitra-shimmer-card {
    background-color: var(--color-bg-secondary);
    box-shadow: 0 5px 20px rgba(255,255,255,0.05); 
}

/* ==========================================================================
   30. Quote Typewriter Panel (BARU)
   ========================================================================== */
/* ... (Konten Quote Typewriter tetap sama) ... */
.quote-typewriter-panel {
    /* Latar belakang transparan seperti yang diminta */
    background: transparent;
    border: none;
    min-height: 120px; /* Memberi ruang agar layout tidak "melompat" saat teks berganti */
    display: flex;
    align-items: center;
    justify-content: center;
}

.quote-typewriter-panel p {
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

/* Kursor yang berkedip */
.quote-typewriter-panel .cursor {
    display: inline-block;
    background-color: var(--color-emerald-base);
    margin-left: 0.1rem;
    width: 3px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { background-color: transparent; }
    50% { background-color: var(--color-emerald-base); }
}

/* ==========================================================================
   31. PENAMBAHAN BARU: Floating Panels & FAB (Article Page)
   PERUBAHAN V7: Menggunakan "Slide-out Tray" simpel
   ========================================================================== */

/* --- Wrapper untuk Tombol FAB di Kanan Atas --- */
#floating-utility-tray {
    /* Wadah utama diposisikan di kanan atas */
    display: flex;
    align-items: center; /* PERBAIKAN: Menambahkan ini untuk menengahkan item secara vertikal */
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border-base);
    border-right: none;
    border-radius: 1rem 0 0 1rem;
    box-shadow: 0 5px 15px var(--color-shadow-base);
    
    /* Inti Logika Slide-out: */
    transform: translateX(calc(100% - 10px)); /* PERUBAHAN: Disesuaikan dari 48px ke 10px */
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#floating-utility-tray:hover {
    transform: translateX(0); /* Tampilkan penuh saat di-hover */
}

/* --- Style untuk "Handle" (Pegangan) --- */
#fab-tray-handle {
    width: 10px; /* PERUBAHAN: Dikecilkan dari 48px */
    /* height: 100%; */ /* PERBAIKAN: Menghapus ini adalah kunci utamanya */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0; /* Pastikan handle tidak mengecil */
    color: var(--color-text-secondary);
    padding: 0; /* PERUBAHAN: Dihapus padding vertikal */
    background-color: var(--color-emerald-base); /* PENAMBAHAN: Membuat handle terlihat seperti garis */
    opacity: 0.7; /* PENAMBAHAN: Membuat garis sedikit transparan */
    transition: opacity 0.3s ease; /* PENAMBAHAN: Transisi hover */
}

/* PERUBAHAN: Hapus media query untuk padding desktop, karena padding sudah 0 */
#fab-tray-handle:hover {
    opacity: 1; /* PENAMBAHAN: Buat lebih jelas saat di-hover */
}

/* PENAMBAHAN: Sembunyikan ikon hamburger */
#fab-tray-handle svg {
    display: none;
}


/* --- Kontainer untuk Tombol Menu --- */
.fab-menu-items {
    padding: 0.75rem; /* Beri padding di sekitar tombol */
    border-left: 1px solid var(--color-border-base); /* Garis pemisah */
}

/* --- Style untuk Tombol Menu Individual (Simpel) --- */
button.fab-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
    border: none;
    background-color: transparent;
    color: var(--color-text-primary);
    text-align: left;
    cursor: pointer;
}

button.fab-menu-item:hover {
    background-color: var(--color-border-base); /* Warna hover simpel */
}

.light-mode button.fab-menu-item:hover {
     background-color: #f3f4f6; /* gray-100 */
}


.fab-menu-item .fab-icon {
    /* Ikon simpel */
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--color-text-secondary);
}

.fab-menu-item:hover .fab-icon {
    color: var(--color-text-primary);
}

/* Warna ikon spesifik */
#fab-toc-trigger .fab-icon {
    color: var(--color-emerald-base);
}
#fab-actions-trigger .fab-icon {
    color: #60a5fa; /* blue-400 */
}
.light-mode #fab-actions-trigger .fab-icon {
    color: #3b82f6; /* blue-600 */
}


.fab-menu-item .fab-label {
    /* Label teks simpel */
    margin-left: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text-primary);
    white-space: nowrap;
}


/* ========================================================
   Panel Melayang (TOC & Aksi) - Style Latar Belakang
   ======================================================== */

/* --- Status Terlihat untuk Panel Melayang --- */
#floating-toc-panel,
#floating-actions-panel {
    /* PERBAIKAN V6: Ganti background ke bg-primary */
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary); /* <--- TAMBAHKAN INI */
}
#floating-toc-panel.is-visible,
#floating-actions-panel.is-visible {
    transform: translateX(0);
}

/* --- Status Terlihat untuk Backdrop --- */
#floating-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* --- Penyesuaian Style untuk List TOC Panel --- */
#floating-toc-panel-container .toc-panel-list {
    list-style: none;
    padding-left: 0;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem; /* space-y-1 */
}

#floating-toc-panel-container .toc-panel-list li a {
    display: block;
    padding: 0.625rem 0.75rem; /* ~p-2.5 */
    border-radius: 0.375rem; /* rounded-md */
    transition: all 0.2s ease;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* PERBAIKAN V6: Paksa warna link di mode terang */
.light-mode #floating-toc-panel-container .toc-panel-list li a {
    color: #374151; /* gray-700 */
}

#floating-toc-panel-container .toc-panel-list li a:hover {
    background-color: rgba(16, 185, 129, 0.1); /* emerald-100/10% */
    color: var(--color-emerald-base);
}
/* PERBAIKAN V6: Paksa warna link hover di mode terang */
.light-mode #floating-toc-panel-container .toc-panel-list li a:hover {
    color: #059669; /* emerald-600 */
}

#floating-toc-panel-container .toc-panel-list li a.is-active {
    background-color: rgba(16, 185, 129, 0.2); /* emerald-200/20% */
    color: var(--color-text-primary);
    font-weight: 600;
}
/* PERBAIKAN V6: Paksa warna link aktif di mode terang */
.light-mode #floating-toc-panel-container .toc-panel-list li a.is-active {
    color: #1f2937; /* gray-800 */
    background-color: rgba(16, 185, 129, 0.1);
}

/* Style untuk nested list (h3, h4) */
#floating-toc-panel-container .toc-nested-list {
    list-style: none;
    margin-left: 0.75rem; /* ~pl-3 */
    margin-top: 0.25rem;
    padding-left: 0.75rem; /* ~pl-3 */
    border-left: 2px solid var(--color-border-base);
    display: flex;
    flex-direction: column;
    gap: 0.25rem; /* space-y-1 */
}

#floating-toc-panel-container .toc-nested-list li a {
    font-size: 0.9em;
}

