/* ===============================
   VARIABLES & BASE
================================ */
:root {
    --marun: #800000;
    --emas: #b8860b;
    --kertas: #f2e8cf;
    --krem: #fffcf2;
    --tinta: #2b1b17;
}

html, body { 
    overflow-x: hidden !important; 
    width: 100%; 
    margin: 0; 
    padding: 0; 
    background-color: var(--kertas);
}

body { 
    font-family: 'Lora', serif; 
    padding-top: 85px; 
    color: var(--tinta); 
}

/* ===============================
   HEADER & DROPDOWN
================================ */
#control-block {
    position: fixed;
    top: 0;
    width: 100%;
    height: 75px;
    background: var(--krem);
    border-bottom: 3px solid var(--marun);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 10000;
}

#fixed-arabic-title {
    font-family: 'Amiri', serif;
    font-size: 2.6rem; 
    color: var(--marun);
    font-weight: bold;
    direction: rtl;
}

.dropbtn {
    background-color: var(--marun) !important;
    color: var(--emas) !important;
    border: 2px solid var(--emas);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: var(--krem);
    min-width: 190px;
    border-radius: 20px;
    border: 2px solid var(--emas);
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 10001;
    overflow: hidden;
}

.dropdown-content.show { display: block; }

.dropdown-content a {
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--tinta);
    font-family: 'Montserrat', sans-serif;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

/* ===============================
   KARTU HADITS UNIVERSAL
================================ */
.hadith-card {
    background: var(--krem);
    margin: 15px auto;
    width: 92%;
    max-width: 750px;
    padding: 30px;
    border-radius: 12px;
    border-left: 10px solid var(--marun);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    box-sizing: border-box;
}

.hadith-no {
    color: var(--emas); 
    font-weight: 800; 
    font-size: 0.8rem; 
    margin-bottom: 10px;
    text-transform: uppercase;
}

.hadith-arabic {
    font-family: 'Amiri', serif; 
    font-size: 1.4rem; 
    text-align: right;
    line-height: 1.5; 
    color: #000; 
    direction: rtl; 
    margin-bottom: 20px;
}

.hadith-id-text { 
    font-family: 'Lora', serif;
    font-size: 1.02rem; 
    line-height: 1.4; 
    text-align: left; 
}

/* ===============================
   KATA PENGANTAR (PREFACE) SECTION
================================ */
.preface-section {
    margin: 25px 15px; 
    padding: 30px; 
    background: #fff; 
    border-radius: 15px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    color: #333; 
    line-height: 1.5;
}
img { 
width: 100px;
height: auto; 
margin-bottom: 5px;
}
.preface-header { text-align: center; margin-bottom: 30px; }
.preface-header h3 { font-family: 'Amiri', serif; font-size: 1.8em; color: #8b4513; margin-bottom: 10px; }
.divider { width: 50px; height: 2px; background: #8b4513; margin: 0 auto; }

.preface-content h4 { color: #8b4513; margin-top: 25px; margin-bottom: 10px; }
.preface-content p { margin-bottom: 15px; text-align: left; }

.preface-signature { text-align: right; font-size: 0.9em; color: #666; }
.author-name { font-weight: bold; color: #333; font-size: 1.1em; }

/* ===============================
   HOME & INTRO SPECIFIC
================================ */
#intro-section {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    color: var(--marun);
    font-family: 'Amiri', serif;
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 10px;
}

.bio-desc { margin-top: 20px; line-height: 1.6; text-align: justify; }

.home-cards {
    display: flex;
    gap: 10px;
    margin: 25px 0;
}

.home-card {
    flex: 1;
    background: #fdfaf0;
    padding: 15px;
    border-left: 5px solid var(--emas);
    border-radius: 8px;
    font-size: 0.85rem;
}

.btn-container { text-align: center; margin-top: 30px; }

.start-btn {
    background: var(--marun);
    color: white;
    padding: 14px 40px;
    border: none;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
}

/* ===============================
   FLOATING NAV & SEARCH
================================ */
#floating-nav {
    position: fixed;
    bottom: 1px;
    width: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    gap: 12px;
    z-index: 9999;
}

.side-btn {
    background-color: var(--marun) !important;
    color: var(--kertas) !important;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid var(--emas);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.search-glass-box {
    background: #fff;
    border: 2.5px solid var(--emas);
    border-radius: 30px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    width: 230px;
    height: 52px;
}

#jumpInput {
    border: none;
    outline: none;
    width: 100%;
    text-align: center;
    font-weight: bold;
    color: var(--marun);
    background: transparent;
}

.execute-btn {
    background-color: var(--marun) !important;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===============================
   UTILITIES & FOOTER
================================ */
.main-footer { text-align: center; padding: 20px; color: #333; }
.main-footer b { color: #8b4513; }

.ornament { text-align: center; color: var(--emas); font-size: 1.5rem; margin: 10px 0; }
.text-center { text-align: center; }
.italic { font-style: italic; }
.quote { font-style: italic; color: #8b4513; border-left: 3px solid #8b4513; padding-left: 15px; margin: 20px 0; }

/* ===============================
   OVERLAY, LOADER & ANIMATION
================================ */
.overlay { 
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 20000;
    justify-content: center;
    align-items: center;
    color: white;
    flex-direction: column;
}

#loading-indicator { display: none; }

.loader-spinner { 
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--marun);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}
