/* 
   CSS Terpusat untuk Galeri Museum Digital
   Dibuat oleh Gemini Aira untuk efisiensi maintainability.
*/

/* --- PENGATURAN DASAR --- */
@font-face { font-family: 'JawaPalsu'; src: url('../silsilah/asset/fonts/jawa.ttf') format('truetype'); }
body { 
    background-image: url('../silsilah/asset/perkamen.jpg'); 
    background-size: cover; 
    background-attachment: fixed;
    color: #3e2723; 
    font-family: 'Segoe UI', Tahoma, sans-serif;
    padding-top: 80px;
    overflow-y: auto;
}

/* Sembunyikan Scrollbar secara Visual */
html, body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none;
}

/* --- KOMPONEN UMUM --- */
.empty-placeholder {
    height: 300px;
    background: rgba(255,255,255,0.3);
    border: 2px dashed var(--sidebar-color, #974f0c);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #795548;
    margin-top: 20px;
}
.empty-placeholder i { font-size: 3rem; margin-bottom: 15px; opacity: 0.4; }

/* Sub-Navbar (Tab) Sticky */
.nav-tabs-museum { 
    border-bottom: none;
    margin-bottom: 20px;
    position: fixed;
    top: 50px; /* Sesuai dengan tinggi navbar portal utama */
    z-index: 90;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    padding: 5px 5px;
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: 0.3s;
}
@media (min-width: 1080px) {
.nav-tabs-museum { 
    transform: translateY(0px);
    padding-bottom: 5px;
    }
    .nav-tabs-museum:hover { 
    transform: translateY(0px);
    padding-bottom: 5px;
    box-shadow: 0 4px 10px rgb(255, 208, 1);
    border-bottom: 2px solid rgb(255, 208, 1);
    }
}
/* Sembunyikan scrollbar pada navigasi tab tapi tetap bisa digeser */
.nav-tabs-museum::-webkit-scrollbar { display: none; }

.nav-tabs-museum .nav-link { 
    color: #5d4037; 
    border: 1px solid rgba(0,0,0,0.1); 
    font-weight: 700; 
    text-transform: uppercase; 
    font-size: 11px;
    background: rgba(255, 255, 255, 0.5); 
    margin: 0; 
    border-radius: 5px; /* Bentuk Pill/Chips */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    padding: 8px 18px; 
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 3px 0px rgb(0 0 0 / 33%);
}
.nav-tabs-museum .nav-link.active { 
    background-color: #9b4b01;
    color: white !important;
    border-color: #fbbf2400;
    box-shadow: inset 1px 1px 2px 0px rgb(0 0 0);
    transform: scale(1.05);
}

.btn-gold { 
    background: var(--sidebar-color, #974f0c); color: white; border: 2px solid #fbbf24; 
    font-weight: bold; transition: 0.3s;
}
.btn-gold:hover { 
    background: #fbbf24; 
    color: var(--sidebar-color, #974f0c);
    box-shadow: 0 4px 3px 0px rgba(0, 0, 0, 0);
    }

/* --- CUSTOM SEEKER STYLING (Aira) --- */
.time-label {
    font-size: 0.7rem;
    font-weight: bold;
    color: #5d4037;
}
.seek-slider {
    -webkit-appearance: none;
    width: 100%;
    cursor: pointer;
    height: 10px;
    border-radius: 10px;
    outline: none;
    background: rgba(0, 0, 0, 0.15); /* Hapus !important agar bisa diupdate JS */
    border: 1px solid #974f0c;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}
/* Jalur Slider Webkit (Chrome/Safari) */
.seek-slider::-webkit-slider-runnable-track {
    height: 10px;
    border-radius: 10px;
}
.seek-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 15px;
    width: 15px;
    background: #fbbf24;
    border: 2px solid #974f0c;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    margin-top: -3px; /* Tengah-tengah track */
    z-index: 2;
    position: relative;
}
/* Dukungan Firefox */
.seek-slider::-moz-range-thumb {
    height: 15px;
    width: 15px;
    background: #fbbf24;
    border: 2px solid #974f0c;
    border-radius: 50%;
}

/* --- VOLUME SLIDER STYLING --- */
.volume-slider {
    -webkit-appearance: none;
    width: 80px;
    height: 8px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    border: 1px solid #974f0c;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 12px;
    width: 12px;
    background: #974f0c;
    border-radius: 50%;
}
/* Dukungan Firefox */
.volume-slider::-moz-range-thumb {
    height: 12px;
    width: 12px;
    background: #974f0c;
    border: none;
    border-radius: 50%;
}

/* Style khusus tombol repeat aktif (Aira) */
.btn-repeat-active {
    background: #fbbf24 !important;
    color: #974f0c !important;
    border-color: #974f0c !important;
}

/* --- FOTO (GALLERY GRID) --- */
.frame {
    background: #fff;
    padding: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5), inset 0 0 20px rgba(0,0,0,0.2);
    transition: 0.3s;
    margin-bottom: 30px;
    position: relative;
    border-radius: 12px;
}
.frame:hover { transform: scale(1.05) rotate(1deg); z-index: 10; }
.frame img { width: 100%; height: 250px; object-fit: cover; filter: sepia(0.2); border-radius: 12px; border: 2px solid #fff; }
.caption { color: #3e2723; font-weight: bold; margin-top: 10px; text-align: center; font-size: 0.95rem; }

/* --- AUDIO (PLAYLIST) --- */
.main-player-container {
    background: rgb(197 197 197);
    /* border: 2px solid var(--sidebar-color, #974f0c); */
    border-radius: 15px;
    padding: 20px 20px 5px 20px;
    margin-bottom: -25px;
    box-shadow: 6px 6px 6px 0px rgb(0 0 0 / 93%);
    display: none;
    animation: fadeIn 0.5s ease;
    z-index: 100;
    position: relative;
}
#audioElement { width: 100%; height: 45px; margin-top: 10px; filter: sepia(0.5); }
.playlist-container { 
    background: rgb(255 255 255 / 11%);
    backdrop-filter: blur(10px);
    border-radius: 0px 0px 20px 20px;
    /* border: 1px solid rgba(151, 79, 12, 0.3); */
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    padding: 23px 10px 10px 10px;
}
.playlist-item { 
    display: flex;
    align-items: center;
    padding: 5px 18px;
    margin-bottom: 3px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    gap: 15px;
}
.playlist-item:last-child { margin-bottom: 0; }
.playlist-item:hover { 
    background: rgba(251, 191, 36, 0.25); 
    transform: translateX(5px);
    border-color: #fbbf24;
}
.playlist-item.active-track {
    background: var(--sidebar-color, #974f0c);
    color: white !important;
    border-color: #fbbf24;
    box-shadow: 0 4px 15px rgba(151, 79, 12, 0.3);
}
.playlist-item.active-track .item-title,
.playlist-item.active-track .item-date,
.playlist-item.active-track .track-number {
    color: white !important;
}
.track-number {
    font-size: 1.1rem;
    font-weight: 800;
    color: rgba(151, 79, 12, 0.4);
    width: 30px;
    text-align: center;
}
.item-info { flex-grow: 1; min-width: 0; text-align: left; }
.item-title { margin: 0; font-weight: bold; color: #1c0800; font-size: 0.9rem; }
.item-date { color: #5d4037; font-size: 0.7rem; opacity: 0.7; }
.play-indicator {
    display: none;
    color: #fbbf24;
    font-size: 0.8rem;
}
.playlist-item.active-track .play-indicator {
    display: block;
    animation: audio-pulse 1.5s infinite;
}
@keyframes audio-pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

/* --- DOKUMEN (RAK BUKU) --- */
.book-card {
    border: 1px solid #6f5c1d; border-radius: 5px 15px 15px 5px;
    padding: 0px; height: 100%; transition: 0.3s; cursor: pointer;
    box-shadow: 5px 5px 6px 1px rgb(0 0 0 / 47%), inset 15px 0 20px -10px rgba(0, 0, 0, 0.1);
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    background-image: url(../silsilah/asset/perkament1.png);
    background-size: 114%; background-position: -14px -8px;
}
.book-card::before {
    content: ""; position: absolute; left: 14px; top: 0; bottom: 0; width: 1px;
    background: rgba(0, 0, 0, 0.15); box-shadow: 1px 0 3px rgba(255, 255, 255, 0.8); z-index: 100;
}
.book-card:hover { transform: translateY(-10px) rotate(1deg); box-shadow: 10px 20px 30px rgba(0,0,0,0.3); }
.book-cover-area {
    height: 180px; display: flex; justify-content: right;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05); position: relative;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.2);
}
.book-cover-area i { font-size: 2.5rem; color: #b50000 !important; padding-top: 9px; padding-right: 9px; }
.book-badge { position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: bold; background: var(--sidebar-color, #974f0c); color: white; padding: 2px 8px; border-radius: 10px; }
.book-body { padding: 15px; text-align: center; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.book-title { font-size: 0.85rem; font-weight: 800; color: #1c0800; margin-bottom: 5px; line-height: 1.3; }
.book-meta { font-size: 0.7rem; color: #795548; font-style: italic; }

/* --- RESPONSIVE SETTINGS --- */
@media (min-width: 992px) {
    .col-lg-3 {
        flex: 0 0 auto;
        width: 20%;
    }
}

@media (max-width: 768px) {
    .playlist-item { padding: 15px; }
    .nav-tabs-museum { 
        padding: 12px 10px;
        justify-content: flex-start; /* Pastikan mulai dari kiri agar bisa scroll */
    }
    .nav-tabs-museum .nav-link {
        font-size: 10px;
        padding: 7px 14px;
    }
}

/* Floating Action Button (FAB) Museum - Aira */
.btn-fab-museum {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 56px;
    height: 56px;
    background-color: var(--sidebar-color, #974f0c);
    color: #fff;
    border-radius: 50%;
    border: 2px solid #fbbf24;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050; /* Pastikan di atas elemen lain */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.btn-fab-museum:hover { transform: scale(1.1) rotate(90deg); background-color: #fbbf24; color: #974f0c; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fw-bold {
    color: #e9cbbe !important;
    font-family: 'JawaPalsu', serif;
    font-weight: 100 !important;
    font-size: clamp(2.2rem, 5vw, 2rem);
    letter-spacing: 0px;
    text-transform: uppercase;
    margin: 10px 0;
    text-shadow: 2px 2px 0px rgb(255 184 0 / 37%), 2px 2px 5px rgb(2 2 0);
}