/* ======================================================= */
/* ====== VARIBEL UTAMA (Menggunakan Skema Ungu/Biru) ====== */
/* ======================================================= */

:root {
    --color-primary: #667eea; /* Biru/Lavender Cerah */
    --color-secondary: #764ba2; /* Ungu/Violet Tua */
    --color-accent: #00acc1; /* Cyan (Aksen Tooltip) */
    --color-text-dark: #2c3e50; /* Dark Blue/Grey */
    --color-text-light: #f8f9fa; /* Light Grey/White */
}

/* ======================================================= */
/* ====== 1. GLOBAL & LAYOUT ============================= */
/* ======================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Background Ungu/Biru sesuai kode awal */
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* ======================================================= */
/* ====== 2. HEADER & FOOTER ============================= */
/* ======================================================= */

.main-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    font-size: 2.5em;
}

.site-title {
    font-size: 1.8em;
    margin: 0;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.tagline {
    font-size: 0.9em;
    opacity: 0.9;
    font-style: italic;
    color: white;
}

.main-nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.main-footer {
    /* Menggunakan warna gelap untuk kontras */
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    margin-top: 50px;
    padding: 40px 0 0;
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    color: #f1c40f; /* Aksen Kuning/Emas */
    margin-bottom: 15px;
    font-size: 1.2em;
}

.footer-section p {
    line-height: 1.6;
    opacity: 0.9;
}

.footer-link {
    display: block;
    color: white;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #f1c40f;
}

.footer-bottom {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
}


/* ======================================================= */
/* ====== 3. NAVIGASI AYAT (ayat.php) ==================== */
/* ======================================================= */

.ayat-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 0px solid #eee; /* Dibuang jika ingin tanpa garis */
}

.left-nav-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.verse-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* Tombol Dasar (Back, Panah) */
.back-btn, .nav-arrow {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-weight: bold;
    background: rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
   
}

.back-btn, .navr-arrow {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-weight: bold;
    background: rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
   
}


.back-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(-5px);
}

.nav-arrow {
    padding: 8px 12px;
    border-radius: 25px;
    background-color: var(--color-text-light);
    color: var(--color-text-dark);
}

.nav-arrow:hover {
    background-color: var(--color-primary);
    color: white;
}

/* Tombol Ayat Aktif */
.current-verse {
     display: inline-block;
    color: white;
    text-decoration: none;
    font-weight: bold;
    background: rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

/* ======================================================= */
/* ====== 4. HALAMAN DEPAN (index.php) =================== */
/* ======================================================= */

.search-container {
    max-width: 500px;
    margin: 0 auto 30px;
}

.search-box {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    outline: none;
}

.search-box:focus {
    box-shadow: 0 5px 25px rgba(102, 126, 234, 0.3);
}

.surah-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.surah-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.surah-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border-color: var(--color-primary);
}

.surah-number {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-weight: bold;
    font-size: 1.2em;
}

.surah-arabic {
    font-size: 2em;
    color: var(--color-text-dark); /* Diubah dari warna hijau ke warna gelap utama */
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: bold;
}

.surah-latin {
    font-size: 1.3em;
    color: var(--color-text-dark);
    margin-bottom: 5px;
    font-weight: bold;
}

.surah-arti {
    color: #7f8c8d;
    margin-bottom: 10px;
    font-style: italic;
}

.surah-meta {
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    color: var(--color-primary);
    display: inline-block;
    font-weight: bold;
}

/* ======================================================= */
/* ====== 5. HALAMAN DETAIL (surah.php & ayat.php) ======= */
/* ======================================================= */

.surah-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 10px;
    margin-top: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.surah-title {
    color: var(--color-text-dark);
    margin-bottom: 10px;
    font-size: 2em;
}

.ayat-list {
    display: grid;
    gap: 20px;
}

.ayat {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.ayat:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.ayat-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.ayat-number {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
    font-size: 1.1em;
}

.arabic {
    font-size: 2em;
    text-align: right;
    direction: rtl;
    margin-bottom: 20px;
    line-height: 2;
    color: var(--color-text-dark);
    font-weight: 600;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-right: 4px solid var(--color-primary);
    white-space: normal;
    word-wrap: break-word;
}

.arabic:empty {
    display: none;
}

/* Section Tambahan */
.reading-section {
    background: #fff3cd; /* Warna Kuning Muda */
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    border-left: 4px solid #ffc107;
}
.reading-label { color: #856404; font-weight: bold; margin-bottom: 8px; font-size: 0.9em; }
.reading-text { color: #856404; font-style: italic; line-height: 1.6; font-size: 1.1em; }

.translation-section {
    background: #d1ecf1; /* Warna Biru Muda */
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    border-left: 4px solid #0c5460;
}
.translation-label { color: #0c5460; font-weight: bold; margin-bottom: 8px; font-size: 0.9em; }
.translation-text { color: #0c5460; line-height: 1.6; font-size: 1.1em; }


/* ======================================================= */
/* ====== 6. I'RAB SECTION (ayat.php) ==================== */
/* ======================================================= */

.irab-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-top: 25px;
    border-left: 4px solid var(--color-primary); /* Menggunakan warna utama */
    width: 100%;
}

.irab-title {
    font-weight: bold;
    color: var(--color-secondary);
    margin-bottom: 20px;
    font-size: 1.2em;
    text-align: center;
    width: 100%;
}

.irab-words {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: row-reverse; /* Teks Arab dari kanan ke kiri */
    gap: 15px;
    width: 100%;
}

.irab-word {
    flex: 0 0 auto;
    min-width: 160px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    cursor: pointer;
    text-align: center;
    position: relative;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.irab-word:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-color: var(--color-accent); /* Cyan dari Tooltip */
}

.word-arabic {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--color-accent);
    margin-bottom: 5px;
    direction: rtl;
}

.word-translation {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.irab-info {
    font-size: 0.75em;
    color: #e74c3c; /* Warna Merah (Bahaya/Perhatian) */
    font-weight: bold;
    line-height: 1.4;
}

/* TOOLTIP DETAIL */
.irab-tooltip {
    display: none;
    background: var(--color-text-dark);
    color: white;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.9em;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 2px solid var(--color-accent);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 350px;
    z-index: 1000;
    text-align: right;
    direction: rtl;
}

.irab-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: var(--color-text-dark) transparent transparent transparent;
}

.irab-word:hover .irab-tooltip {
    display: block;
}

.tooltip-section {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    direction: ltr; /* Layout LTR untuk memisahkan Label-Value */
}

.tooltip-section strong {
    color: var(--color-accent);
    display: inline-block;
    margin-right: 5px;
    font-weight: bold;
    flex-shrink: 0;
    direction: ltr;
    text-align: left;
}

.tooltip-section span {
    flex-grow: 1;
    direction: rtl; /* Nilai (terutama penjelasan) tetap RTL */
    text-align: right;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.tooltip-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* ======================================================= */
/* ====== 7. INDEX LIST (listayat.php) =================== */
/* ======================================================= */

/* Hapus semua garis horizontal */
hr {
    display: none;
}

.index-list h2 {
    padding: 0;
    margin-top: 30px;
    margin-bottom: 10px;
}

.surah-link {
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 700;
    display: inline-block;
    
    /* Style Tombol Seragam */
    color: var(--color-text-dark);
    background-color: var(--color-text-light);
    padding: 10px 15px;
    border-radius: 8px;
    
    border: 1px solid var(--color-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.surah-link:hover {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* --- Style untuk Daftar Ayat (listayat.php) --- */
.ayat-list {
    list-style: none;
    padding: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ayat-list li a {
    display: block;
    text-decoration: none;
    font-weight: 500;
    background-color: #f0f0f0;
    color: #4a4a4a;
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s, color 0.2s;
}

.ayat-list li a:hover {
    background-color: var(--color-secondary); /* Aksen Ungu */
    color: white;
    border-color: var(--color-secondary);
}

/* ======================================================= */
/* ====== 8. SURAH DETAIL (surah.php) ==================== */
/* ======================================================= */

/* Kontainer Daftar Ayat di surah.php */
.ayat-list-surah {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Tombol Ayat (class="ayat") */
.ayat-list-surah .ayat {
    /* MENGATUR LEBAR TETAP agar semua box seragam */
    width: 80px;
    height: 35px;
    
    display: flex;
    justify-content: center;
    align-items: center;

    /* Style Visual */
    text-decoration: none;
    font-weight: 600;
    background-color: var(--color-text-light); /* Latar Belakang Putih */
    color: var(--color-text-dark);
    border: 1px solid var(--color-primary);
    border-radius: 5px;
    transition: background-color 0.2s, color 0.2s;
}

.ayat-list-surah .ayat:hover {
    background-color: var(--color-primary);
    color: white;
}


/* ======================================================= */
/* ====== 9. RESPONSIVE ================================== */
/* ======================================================= */
@media (max-width: 768px) {
    /* --- Global Layout Adjustments --- */
    .header-container {
        /* Mengubah layout header menjadi kolom agar logo dan menu terpisah */
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .tagline {
        /* Menghilangkan tagline di layar kecil untuk menghemat ruang */
        display: none;
    }
    
    .footer-container {
        /* Mengubah layout footer menjadi satu kolom */
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .container {
        padding: 15px;
    }
    
    .surah-header, .ayat {
        padding: 20px;
    }
    
    /* --- Navigasi Mobile (Ikon Saja) --- */
    .main-nav {
        /* Memastikan menu berbaris rapi dan menggunakan flexbox */
        display: flex !important; 
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 8px !important; 
    }

    /* KUNCI: Sembunyikan Teks Label */
    .main-nav .nav-link .nav-label {
        display: none !important;
    }

 /* KUNCI: Sembunyikan Teks Label */
    .main-navr .nav-link .nav-label {
        display: none !important;
    }

    /* KUNCI: Membuat Tombol Menu menjadi Kotak Ikon yang Seragam */
    .nav-link {
        /* Memastikan display flex diterapkan di link A */
        display: flex !important; 
        justify-content: center !important;
        align-items: center !important;

        /* Ukuran Tetap dan Padding Dihapus */
        width: 40px !important; 
        height: 40px !important; 
        padding: 0 !important; 
        font-size: 1.3em !important; 
        
        /* Opsi: Mengganti border-radius menjadi 50% untuk tombol bulat */
        border-radius: 50% !important;
    }
    
    /* --- Content Adjustments --- */
    .arabic {
        font-size: 1.5em;
        padding: 12px;
    }
    
    .irab-word {
        min-width: 140px;
        padding: 10px;
    }
    
    .irab-tooltip {
        width: 90vw; /* Lebar penuh di layar kecil */
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* Perbaikan Lebar Ayat di Halaman Surah/List Ayat */
    .ayat-list-surah .ayat {
        width: 60px; /* Lebar lebih kecil untuk nomor ayat */
        height: 30px;
    }
}

@media (max-width: 768px) {

    .irab-words {
        display: block; /* biar tidak wrap flex */
    }

    .irab-word {
        width: 100%;      /* full width */
        margin-bottom: 12px;
    }
}


/* ======================================================= */
/* ====== PERBAIKAN LEBAR AYAT (TEMPILKAN DI BAWAH) ======= */
/* ======================================================= */

/* Target: Memastikan setiap box ayat (.ayat) di dalam daftar ayat (.ayat-list) 
   mengambil lebar penuh (100%) agar tidak mengecil atau berjajar.
*/

.ayat-list {
    /* MENGATUR HANYA SATU KOLOM PADA GRID */
    /* Ini memaksa setiap item (.ayat) menempati lebar penuh. */
    grid-template-columns: 1fr !important;
    
    /* Ganti display:grid menjadi block jika Anda tidak yakin struktur HTML-nya */
    /* display: block !important; */
}

.ayat-list .ayat {
    /* MEMAKSA LEBAR 100% */
    width: 100% !important;
    
    /* Hapus margin bawah jika Anda ingin jarak antar ayat diatur oleh gap di .ayat-list */
    margin-bottom: 0 !important; 
    
    /* Memastikan elemen menjadi blok penuh jika .ayat-list menggunakan flex/grid yang salah */
    display: block !important; 
}

/* Versi Desktop - Tampilkan teks */
.nav-arrow {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s;
}

/* Versi Mobile - Sembunyikan teks, tampilkan icon saja */
@media (max-width: 768px) {
    .nav-arrow {
        padding: 12px;
        min-width: 50px;
        justify-content: center;
    }
    
    .nav-arrow::before {
        content: "←";
        font-weight: bold;
    }
    
    .nav-arrow:last-child::before {
        content: "→";
    }
    
    /* Sembunyikan teks "Ayat X" di mobile */
    .nav-arrow span,
    .nav-arrow:not(::before) {
        display: none;
    }
}

/* Atau alternatif lebih simple: */
@media (max-width: 768px) {
    .verse-nav .nav-arrow {
        padding: 12px 15px;
        border-radius: 25px;
        background: rgba(255, 255, 255, 0.2);
        font-size: 0; /* Sembunyikan teks */
    }
    
    .verse-nav .nav-arrow::after {
        content: "←";
        font-size: 16px;
        font-weight: bold;
    }
    
    .verse-nav .nav-arrow:last-child::after {
        content: "→";
    }
}




 
        /* Hero Section */
        .hero {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 80px 0;
            text-align: center;
            margin-bottom: 50px;
        }
        
        .hero h1 {
            font-size: 3.5em;
            margin-bottom: 20px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        }
        
        .hero p {
            font-size: 1.3em;
            max-width: 600px;
            margin: 0 auto 30px;
            opacity: 0.9;
            line-height: 1.6;
        }
        
        .cta-buttons {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }
        
        .cta-button {
            background: rgba(255,255,255,0.2);
            color: white;
            padding: 12px 25px;
            border-radius: 25px;
            text-decoration: none;
            font-weight: bold;
            transition: all 0.3s ease;
            border: 2px solid rgba(255,255,255,0.3);
        }
        
        .cta-button:hover {
            background: white;
            color: #667eea;
            transform: translateY(-2px);
        }
        
        /* Features Section */
        .features {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            margin: 60px 0;
        }
        
        .feature-card {
            background: white;
            padding: 30px;
            border-radius: 15px;
            text-align: center;
            box-shadow: 0 5px 20px rgba(0,0,0,0.1);
            transition: transform 0.3s ease;
        }
        
        .feature-card:hover {
            transform: translateY(-5px);
        }
        
        .feature-icon {
            font-size: 3em;
            margin-bottom: 20px;
        }
        
        .feature-card h3 {
            color: #2c3e50;
            margin-bottom: 15px;
        }
        
        /* Stats Section */
        .stats {
            background: #f8f9fa;
            padding: 50px 0;
            text-align: center;
            margin: 50px 0;
        }
        
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 30px;
            max-width: 1000px;
            margin: 0 auto;
        }
        
        .stat-item {
            padding: 20px;
        }
        
        .stat-number {
            font-size: 2.5em;
            font-weight: bold;
            color: #667eea;
            display: block;
        }
        
        .stat-label {
            color: #7f8c8d;
            font-size: 0.9em;
        }
        
        /* Surah Grid Section */
        .surah-section {
            margin: 60px 0;
        }
        
        .section-title {
            text-align: center;
            margin-bottom: 40px;
            color: #2c3e50;
        }
        
        .surah-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
        }
        
        .surah-card {
            background: rgba(255, 255, 255, 0.95);
            padding: 25px;
            border-radius: 20px;
            text-align: center;
            text-decoration: none;
            color: inherit;
            box-shadow: 0 8px 25px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }
        
        .surah-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 35px rgba(0,0,0,0.2);
            border-color: #667eea;
        }
        
        .surah-number {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 15px;
            font-weight: bold;
            font-size: 1.2em;
        }
        
        .surah-arabic {
            font-size: 2em;
            color: #2c5e1a;
            margin-bottom: 10px;
            line-height: 1.4;
        }
        
        .surah-latin {
            font-size: 1.3em;
            color: #2c3e50;
            margin-bottom: 5px;
            font-weight: bold;
        }
        
        
        
        
        /* blog.css - Taruh di file terpisah atau tambah di style.css */

/* blog.css */
.blog-list {
    max-width: 100%;
    padding: 40px 0;
}

.blog-list h1 {
    text-align: center;
    color: #2c5e8a;
    margin-bottom: 40px;
    font-size: 2.5em;
}

.blog-item {
    background: white;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-left: 5px solid #2c5e8a;
    transition: all 0.3s ease;
}

.blog-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.blog-item h2 {
    margin: 0 0 15px 0;
    font-size: 1.6em;
}

.blog-item h2 a {
    color: #2c5e8a;
    text-decoration: none;
}

.blog-item h2 a:hover {
    color: #1e3d5c;
    text-decoration: underline;
}

.article-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9em;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;
    background: #2c5e8a;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.read-more:hover {
    background: #1e3d5c;
    transform: translateX(5px);
}

/* Article Single */
.article-single {
    background: white;
    padding: 40px;
    margin: 40px 0;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.article-single h1 {
    color: #2c5e8a;
    font-size: 2.2em;
    margin-bottom: 20px;
    line-height: 1.3;
}

.article-single .article-meta {
    padding-bottom: 20px;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.article-content {
    line-height: 1.8;
    font-size: 1.4em;
    color: #333;
    margin-bottom: 30px;
}

.article-content p {
    margin-bottom: 20px;
}

.back-to-blog {
    display: inline-block;
    padding: 10px 20px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.back-to-blog:hover {
    background: #2c5e8a;
    color: white;
}

.no-articles {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 10px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-item, .article-single {
        padding: 20px;
    }
    
    .blog-list h1, .article-single h1 {
        font-size: 1.8em;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 10px;
    }
}


/* BALAGHAH SECTION - FONT LEBIH BESAR */
.balaghah-section {
    background: #f3e5f5;
    border-left: 4px solid #9c27b0;
    margin: 20px 0;
    padding: 20px;
    border-radius: 10px;
}

.balaghah-label {
    color: #7b1fa2;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1.3em; /* ← LEBIH BESAR */
}

.balaghah-items {
    margin-top: 15px;
}

.balaghah-item {
    background: white;
    padding: 15px;
    margin: 12px 0;
    border-radius: 8px;
    border: 1px solid #e1bee7;
    font-size: 1.1em; /* ← TEXT LEBIH BESAR */
}

.balaghah-arabic {
    font-family: 'Traditional Arabic', serif;
    font-size: 1.8em; /* ← ARABIC BESAR BANGET */
    color: #6a1b9a;
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}

.balaghah-type {
    background: #9c27b0;
    color: white;
    padding: 5px 12px;
    border-radius: 2px;
    font-size: 0.9em;
    font-weight: bold;
}

.balaghah-analysis {
    margin: 12px 0;
    color: #333;
    font-weight: bold;
    font-size: 1.05em; /* ← ANALISIS AGAK BESAR */
    line-height: 1.5;
}

.balaghah-explanation {
    color: #666;
    font-size: 1em; /* ← PENJELASAN NORMAL */
    line-height: 1.5;
}


/* === SURAH HEADER SEJAJAR === */
.surah-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.surah-title {
    color: #2c5e8a;
    margin: 0;
    font-size: 1.8em;
}

.surah-meta {
    background: #2c5e8a;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}



/* Tambah di style.css */

/* FONT ARAB MODERN */
.arabic {
    font-family: 'Amiri', 'Scheherazade New', 'Lateef', 'Traditional Arabic', serif;
    font-size: 1.8em;
    line-height: 1.8;
}

.word-arabic {
    font-family: 'Amiri', 'Scheherazade New', 'Traditional Arabic', serif;
    font-size: 2.6em;
}

.balaghah-arabic {
    font-family: 'Scheherazade New', 'Amiri', 'Traditional Arabic', serif;
    font-size: 2em;
}

/* Contoh perbandingan font: */
/* 
Amiri : Modern & elegant
Scheherazade New : Clear & readable  
Lateef : Simple & clean
*/


/* === ILAL SECTION (ELEGAN & FRESH THEME) === */
.ilal-section {
    background: #e0f7fa; /* biru pastel lembut */
    border-left: 4px solid #00838f; /* teal gelap */
    margin: 20px 0;
    padding: 20px;
    border-radius: 10px;
}

.ilal-label {
    color: #006064; /* deep teal */
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1.3em;
}

/* Container item */
.ilal-items {
    margin-top: 15px;
}

/* Individual item (kartu) */
.ilal-item {
    background: white;
    padding: 15px;
    margin: 12px 0;
    border-radius: 8px;
    border: 1px solid #b2ebf2; /* biru muda */
    font-size: 1.1em;
}

/* Kata arab */
.ilal-word {
    font-family: 'Traditional Arabic', serif;
    font-size: 1.8em;
    color: #007c91; /* teal terang */
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}

/* Indeks kata */
.word-index {
    font-size: 0.6em;
    color: #555;
    margin-left: 6px;
}

/* Detail */
.ilal-details div {
    margin-bottom: 4px;
    color: #004d4d;
}

/* Penjelasan */
.ilal-explanation {
    margin-top: 10px;
    padding: 10px;
    background: #e0f2f1; /* hijau kebiruan sangat lembut */
    border-radius: 8px;
    border: 1px solid #b2dfdb;
    color: #003d3d;
    font-style: italic;
    line-height: 1.5;
}

/* Jika data tidak ada */
.ilal-empty {
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    color: #7a5b00;
    margin-top: 10px;
}

 
.ilal-empty {
    background: #fff7e6;
    border-left: 4px solid #ff9800;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.empty-text {
    color: #e65100;
    font-size: 1.2em;
    font-weight: bold;
}

/* ======================== */
/*     ILAL SECTION STYLE   */
/* ======================== */

.ilal-section {
    background: #e8f4ff;
    border-left: 4px solid #1976d2;
    margin: 20px 0;
    padding: 20px;
    border-radius: 12px;
}

.ilal-label {
    color: #0d47a1;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.ilal-item {
    background: #ffffff;
    padding: 18px;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #bbdefb;
}

/* 🔶 Kotak akar kata */
.ilal-root-box {
    background: #e3f2fd;
    border: 2px solid #64b5f6;
    color: #0d47a1;
    font-size: 1.7em;
    font-weight: bold;
    width: fit-content;
    padding: 10px 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    font-family: 'Traditional Arabic', serif;
    display: inline-block;
}

/* 🔷 Deskripsi baris-kalimat */
.ilal-description {
    background: #f5fbff;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1em;
    line-height: 1.6;
    color: #333;
    border: 1px solid #d6eaf8;
    margin-bottom: 15px;
}

/* 🔻 Penjelasan */
.ilal-explanation {
    background: #fffdf5;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    color: #444;
    line-height: 1.6;
    font-size: 1.05em;
}


/* 🌙 Jika tidak ada data */
.ilal-empty {
    background: #fff7e6;
    border-left: 4px solid #ff9800;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.empty-text {
    color: #e65100;
    font-size: 1.2em;
    font-weight: bold;
}

/* sembunyikan hero di mobile */
@media (max-width: 768px) {
  .hero {
    display: none;
  }
}

.balaghah-empty {
    padding: 15px;
    text-align: center;
    color: #888;
    font-style: italic;
    background: #f5f5f5;
    border-radius: 6px;
}


.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.page-subtitle {
    font-size: 16px;
    color: #666;
}

.blog-item {
    background: #ffffff; /* card putih */
    border: 1px solid rgba(0,0,0,0.08);
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 20px;

    /* shadow elegan */
    box-shadow: 0 10px 14px rgba(0,0,0,0.12);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.blog-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}

/* Judul surah */
.blog-item h2 {
    margin: 0 0 8px;
    color: #222; /* teks gelap — terlihat jelas */
}

/* meta */
.blog-item .article-meta span {
    color: #444;
}

.hero-section {
    width: 100%;
    overflow: hidden;
    margin-bottom: 20px; /* biar ada jarak ke konten */
}

.hero-section img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* memastikan foto tetap rapi */
}


/* =======================================
   RESPONSIVITAS GAMBAR THUMBNAIL (HERO)
   ======================================= */

.hero-section {
    /* Pastikan hero section tidak memiliki padding horizontal 
       yang dapat mencegah gambar mencapai tepi layar */
    width: 100%;
    margin: 0;
    padding: 0; 
    overflow: hidden; /* Mencegah horizontal scrollbar jika ada elemen keluar batas */
}

.hero-section img {
    /* 1. KUNCI RESPONSIVITAS: Gambar harus mengambil lebar penuh dari parent-nya */
    width: 100%; 
    
    /* 2. KUNCI RAPI: Memastikan rasio gambar tetap terjaga */
    height: auto; 
    
    /* 3. Menghilangkan spasi default di bawah gambar */
    display: block; 
    
    /* Batas lebar maksimum (opsional, sesuaikan dengan lebar desain Anda, 
       misalnya lebar output generator adalah 1200px) */
    max-width: 1200px; 
    
    /* Menengahkan gambar di layar besar jika max-width kurang dari 100% */
    margin: 0 auto; 
}

/* --- PERBAIKAN UNTUK ANAK PANAH TERBALIK (MOBILE FIX) --- */
.verse-nav, .nav-arrow {
    /* Ini memastikan elemen navigasi dan panahnya dibaca dari kiri ke kanan */
    direction: ltr; 
    unicode-bidi: isolate;
}

.verse-nav, .navr-arrow {
    /* Ini memastikan elemen navigasi dan panahnya dibaca dari kiri ke kanan */
    direction: rtr; 
    unicode-bidi: isolate;
}


/* STRUKTUR SECTION - FONT LEBIH BESAR (Menggunakan skema warna Cyan/Teal) */
.struktur-section {
    background: #e0f7fa; /* Warna latar belakang sangat muda (Light Cyan) */
    border-left: 4px solid #00bcd4; /* Garis kiri (Cyan) */
    margin: 20px 0;
    padding: 20px;
    border-radius: 10px;
}

.struktur-label {
    color: #00838f; /* Warna label judul (Dark Cyan) */
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1.3em; /* ← LEBIH BESAR */
}

.struktur-items {
    margin-top: 15px;
}

.struktur-item {
    background: white;
    padding: 15px;
    margin: 12px 0;
    border-radius: 8px;
    border: 1px solid #b2ebf2; /* Border sangat muda */
    font-size: 1.1em; /* ← TEXT LEBIH BESAR */
}

/* KAMI MENGGANTI .balaghah-arabic DENGAN .struktur-unit-arab DARI KODE PHP ANDA */
.struktur-unit-arab {
    font-family: 'Traditional Arabic', serif;
    font-size: 1.8em; /* ← ARABIC BESAR BANGET */
    color: #00838f; /* Warna Arab (Dark Cyan) */
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}

/* KAMI MENGGANTI .balaghah-type DENGAN .struktur-type-value DARI KODE PHP ANDA */
.struktur-type-value {
    background: #00bcd4; /* Warna latar belakang tipe (Cyan) */
    color: white;
    padding: 5px 12px;
    border-radius: 2px;
    font-size: 0.9em;
    font-weight: bold;
}

/* KAMI MENGGANTI .balaghah-analysis DENGAN .struktur-details/detail-item DARI KODE PHP ANDA */
.struktur-details {
    margin: 12px 0;
    padding-left: 15px;
}

.detail-item {
    color: #333;
    font-weight: bold; /* Sesuai dengan permintaan Anda untuk Analisis */
    font-size: 1.05em; /* ← ANALISIS AGAK BESAR */
    line-height: 1.5;
}

.detail-label {
    color: #666; /* Warna label detail normal */
    font-weight: normal; 
    font-size: 1em; /* ← PENJELASAN NORMAL */
    line-height: 1.5;
    display: inline-block;
    width: 90px; /* Pertahankan lebar agar rapi */
}


.tarkib-section {
    margin-top: 25px;
    background: #fafafa;
    padding: 15px;
    border-radius: 10px;
}

.tarkib-label {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
}

.tarkib-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tarkib-item {
    background: white;
    border: 1px solid #e5e5e5;
    padding: 12px;
    border-radius: 8px;
    width: calc(50% - 12px);
    position: relative;
}

/* Mobile turun satu-satu */
@media (max-width: 768px) {
    .tarkib-item {
        width: 100%;
    }
}

/* Tooltip */
.tarkib-tooltip {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px;
    margin-top: 5px;
    border-radius: 8px;
    width: 250px;
    z-index: 10;
}

.tarkib-item:hover .tarkib-tooltip {
    display: block;
}

.tarkib-arabic {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 5px;
}

.tarkib-meaning {
    color: #444;
    margin-bottom: 5px;
}

.tarkib-info {
    font-size: 14px;
    color: #666;
}

/* === TAFSIR MUTABAR SECTION (SESUAI TEME UTAMA) === */
.tafsir-ai-section {
    background: #e8f4ff; /* Biru pastel lembut - sama kayak ilal-section */
    border-left: 4px solid #1976d2; /* Biru tua - matching */
    margin: 20px 0;
    padding: 20px;
    border-radius: 12px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.tafsir-ai-header {
    background: linear-gradient(135deg, #1976d2 0%, #0d47a1 100%); /* Biru gradient */
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    margin: -20px -20px 20px -20px; /* Extend ke edges */
    border-radius: 8px 8px 0 0;
}

.tafsir-ai-icon {
    font-size: 1.5em;
}

.tafsir-ai-title {
    font-size: 1.3em;
    font-weight: 700;
    flex-grow: 1;
}

.tafsir-ai-badge {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
}

.tafsir-ai-content {
    padding: 0 10px;
}

.tafsir-ai-ringkasan, .tafsir-ai-detail {
    margin-bottom: 20px;
}

.tafsir-ai-label {
    font-weight: 700;
    color: #0d47a1; /* Biru tua */
    margin-bottom: 8px;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tafsir-ai-label::before {
    content: "▸";
    color: #1976d2;
}

.tafsir-ai-ringkasan p, .tafsir-ai-detail p {
    line-height: 1.6;
    color: #333;
    margin: 0;
    text-align: justify;
}

.tafsir-ai-footer {
    background: #e3f2fd; /* Biru sangat muda */
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.tafsir-ai-sumber {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sumber-tag {
    background: #1976d2; /* Biru */
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 500;
}

.tafsir-ai-verse {
    background: #0d47a1; /* Biru tua */
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .tafsir-ai-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tafsir-ai-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .tafsir-ai-badge {
        align-self: flex-start;
    }
}