/* --- Gaya Responsif Mobile (Versi NON-STICKY) --- */
@media (max-width: 768px) {
    /* (1) Atur tata letak utama menjadi tumpukan vertikal */
    .flex.h-screen {
        flex-direction: column;
        height: auto;
    }

    /* (2) Jadikan 'aside' sebagai header statis biasa (ikut scroll) */
    aside {
        position: static !important; /* MEMASTIKAN TIDAK ADA STICKY */
        width: 100% !important;
        height: auto !important;
        background-color: #111827; /* Warna latar header */
        padding: 1rem;
        border-bottom: 1px solid #374151;
    }

    /* (3) Atur judul dan navigasi di dalam header */
    aside .mb-8 {
        text-align: center;
        margin-bottom: 1rem;
    }
    #main-nav {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Sembunyikan scrollbar di Firefox */
    }
    #main-nav::-webkit-scrollbar {
        display: none; /* Sembunyikan scrollbar di Chrome, Safari */
    }
    .nav-item {
        flex-shrink: 0;
        white-space: nowrap;
        margin-right: 0.5rem;
    }

    /* (4) Atur area konten utama */
    main {
        margin-left: 0 !important;
        padding: 1.5rem 1rem; /* Padding normal, tidak perlu ganjalan */
        flex-grow: 1;
    }

    /* (5) Pastikan panel di dalam konten juga satu kolom */
    #pillar-container, 
    #exportable-content .grid,
    #unified-search-panel .max-w-md,
    #settings-panel .max-w-xl {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
}
/* --- Gaya Umum --- */
body { 
    font-family: 'Inter', sans-serif; 
    background-color: #111827; /* bg-gray-900 */
    color: #e5e7eb; /* text-gray-200 */
    scroll-behavior: smooth; 
}
/* Font khusus untuk teks Arab */
.font-arabic {
    font-family: 'Noto Naskh Arabic', serif;
}
@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fade-in 0.5s ease-out forwards; }

/* --- Navigasi Sidebar --- */
.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
    color: #9ca3af;
}
.nav-item:hover {
    background-color: #1f2937; /* bg-gray-800 */
    color: #f9fafb; /* text-gray-50 */
}
.nav-item.active {
    background-color: #059669; /* bg-emerald-600 */
    color: #ffffff;
    font-weight: 600;
}
.nav-item svg {
    margin-right: 0.75rem;
    width: 1.25rem;
    height: 1.25rem;
}

/* --- Visibilitas Panel --- */
.panel { display: none; }
.panel-active { display: block; }

/* --- Gaya Spesifik Fitur --- */
.dictation-btn.recording svg {
    color: #ef4444; /* text-red-500 */
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.secure-feature-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.group-btn {
    background-color: #374151; /* bg-gray-700 */
    transition: background-color 0.2s;
    width: 100%;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
}
.group-btn:hover {
    background-color: #4b5563; /* bg-gray-600 */
}
.pillar-item {
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
}
.pillar-item:hover {
    background-color: #374151; /* bg-gray-700 */
    color: #10b981; /* text-emerald-500 */
}

/* Gaya untuk Accordion Tafsir & Asbabun Nuzul */
details summary {
    cursor: pointer;
    font-weight: 600;
    color: #34d399; /* emerald-400 */
    transition: color 0.2s;
    list-style: none; /* Hapus panah default */
    display: flex;
    align-items: center;
}
details summary::-webkit-details-marker {
    display: none; /* Hapus panah di Chrome/Safari */
}
details summary:hover {
    color: #6ee7b7; /* emerald-300 */
}
details summary::before {
    content: '►';
    margin-right: 0.5rem;
    font-size: 0.8em;
    transition: transform 0.2s;
}
details[open] > summary::before {
    transform: rotate(90deg);
}
details > div {
    padding: 0.75rem;
    margin-top: 0.5rem;
    background-color: #1f2937; /* bg-gray-800 */
    border-left: 2px solid #10b981; /* border-emerald-500 */
    border-radius: 0 0.375rem 0.375rem 0;
}
