/* =========================================
   VARIABEL WARNA & TEMA GLOBAL
   ========================================= */
:root { --dark-blue: #0B192C; --accent-gold: #FFC107; }
body { transition: background-color 0.3s, color 0.3s; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body.dark-mode { background-color: #121212; color: #e0e0e0; }

.bg-dark-blue { background-color: var(--dark-blue); transition: background-color 0.5s; }
.text-dark-blue { color: var(--dark-blue); }
.dark-mode .text-dark-blue { color: #66b2ff; }
.dark-mode .bg-light { background-color: #1e1e1e !important; }
.dark-mode .card { background-color: #242424; color: #fff; border: 1px solid #333 !important; }
.dark-mode .navbar { background-color: #1e1e1e !important; border-bottom: 1px solid #333;}
.dark-mode .navbar-brand, .dark-mode .nav-link { color: #e0e0e0 !important; }

/* =========================================
   KOMPONEN UI UTAMA
   ========================================= */
#heroSection { background: linear-gradient(rgba(11, 25, 44, 0.85), rgba(11, 25, 44, 0.9)), url('https://source.unsplash.com/1600x900/?indonesia,parliament') center/cover; color: white; padding: 160px 0; position: relative; background-attachment: fixed;}
.hover-card { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.hover-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important; }
.footer-custom { background-color: #060e1a; color: #a0aec0; }

/* TOMBOL MENGAPUNG (WA & DARK MODE) */
.floating-tools { position: fixed; bottom: 30px; right: 30px; z-index: 999; display: flex; flex-direction: column; gap: 15px; }
.btn-float { width: 55px; height: 55px; border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 10px rgba(0,0,0,0.3); transition: transform 0.2s; color: white; text-decoration: none; cursor: pointer; border: none;}
.btn-float:hover { transform: scale(1.1); color: white; }
.bg-wa { background-color: #25D366; }
.bg-darkmode { background-color: #333; }
@keyframes pulse-wa { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }
.wa-pulse { animation: pulse-wa 2s infinite; }

/* SOSIAL MEDIA */
.soc-icon { transition: all 0.3s ease; display: inline-flex; justify-content: center; align-items: center; width: 50px; height: 50px; border-radius: 50%; color: white; border: 2px solid white; }
.soc-icon.ig:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%); border-color: transparent; transform: scale(1.15); }
.soc-icon.x:hover { background-color: #000; border-color: transparent; transform: scale(1.15); }

/* INTERAKTIF & TIMELINE */
.gacha-wheel { width: 100%; height: 100%; border-radius: 50%; border: 8px solid var(--dark-blue); box-shadow: 0 0 20px rgba(0,0,0,0.2); background: repeating-conic-gradient(#FFC107 0 45deg, var(--dark-blue) 45deg 90deg); transition: transform 4s cubic-bezier(0.15, 0.9, 0.25, 1); }
.timeline { border-left: 4px solid var(--accent-gold); padding-left: 20px; position: relative; margin-left: 20px;}
.timeline-item { margin-bottom: 25px; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -30px; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--dark-blue); border: 3px solid #fff; box-shadow: 0 0 0 3px var(--accent-gold); }
.news-ticker { background-color: #dc3545; color: white; padding: 8px 15px; font-size: 0.9rem; display: flex; align-items: center; }
.news-ticker span { font-weight: bold; margin-right: 15px; background: #212529; padding: 3px 10px; border-radius: 4px; white-space: nowrap; cursor: pointer;}
.carousel-control-prev-icon, .carousel-control-next-icon { filter: invert(1); }
.carousel-item { z-index: 10 !important; position: relative; min-height: 400px; } 

/* =========================================
   STATUS & MODE ADMIN
   ========================================= */
.admin-only, .mod-only { display: none !important; margin-top: 10px; }
.editable-text { transition: all 0.3s; padding: 5px; border-radius: 5px; }
.admin-mode .editable-text:hover { background-color: rgba(255, 193, 7, 0.2); outline: 1px dashed var(--accent-gold); cursor: pointer; }

.comment-box { background-color: #f8f9fa; border-left: 4px solid var(--dark-blue); padding: 15px; margin-bottom: 10px; border-radius: 0 8px 8px 0; position: relative;}
.dark-mode .comment-box { background-color: #2a2a2a; border-left-color: var(--accent-gold); color: #fff; }
.tracker-item { padding: 15px; border-left: 5px solid #ccc; background: #fff; margin-bottom: 15px; border-radius: 0 8px 8px 0; box-shadow: 0 2px 5px rgba(0,0,0,0.05);}
.dark-mode .tracker-item { background: #2a2a2a; color: white;}
.status-selesai { border-left-color: #198754; }
.status-proses { border-left-color: #ffc107; }
.status-mandek { border-left-color: #dc3545; }
/* ========================================= */
/* FIX BUG: TIMELINE AGENDA PERGERAKAN       */
/* ========================================= */
.timeline {
    border-left: 4px solid #FFC107;
    padding-left: 25px;
    margin-left: 15px;
    position: relative;
}
.timeline-item {
    margin-bottom: 30px;
    position: relative;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -35px;
    top: 0;
    width: 16px;
    height: 16px;
    background-color: #0B192C;
    border: 4px solid #FFC107;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

/* ========================================= */
/* UPGRADE: TABEL PERPUSTAKAAN KAJIAN        */
/* ========================================= */
#pdfContainer tr td {
    padding: 15px 10px;
    vertical-align: middle;
}
.table-hover tbody tr:hover {
    background-color: #f8f9fa !important;
    transition: 0.3s;
}
/* ========================================= */
/* FITUR EDIT LANGSUNG (INLINE CMS)          */
/* ========================================= */
body.admin-mode .editable-text {
    /* Mengubah kursor panah menjadi ikon pensil otomatis saat admin mode */
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23FFC107" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg>'), pointer !important;
    border: 1px dashed transparent;
    transition: all 0.3s ease;
    border-radius: 5px;
}

body.admin-mode .editable-text:hover {
    border-color: #FFC107;
    background-color: rgba(255, 193, 7, 0.1);
    padding: 2px 8px;
}
/* ========================================= */
/* MODERN REPOSITORY CARD LIST (PDF DASHBOARD) */
/* ========================================= */
.doc-card {
    background-color: #ffffff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 16px;
    padding: 20px 24px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: slideUpFadeIn 0.4s ease forwards;
}
.doc-card:hover {
    background-color: #FFF9F5;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(232, 92, 13, 0.08);
    border-color: rgba(232, 92, 13, 0.3);
}

/* Modern Badges (Pill) */
.badge-modern {
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    display: inline-block;
}
.badge-kajian { background-color: #FFF1D6; color: #C77D00; }
.badge-policy { background-color: #E3F2FD; color: #1565C0; }
.badge-riset { background-color: #E8F5E9; color: #2E7D32; }
.badge-artikel { background-color: #F3E5F5; color: #7B1FA2; }
.badge-default { background-color: #F5F5F5; color: #616161; }

/* Modern Buttons */
.btn-download {
    background-color: #0B192C;
    color: #fff;
    border-radius: 999px;
    padding: 8px 24px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: none;
    box-shadow: 0 4px 10px rgba(11, 25, 44, 0.15);
}
.btn-download:hover {
    background-color: #FFC107;
    color: #0B192C;
    transform: scale(1.05);
}

.btn-delete-modern {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: transparent;
    color: #dc3545;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.btn-delete-modern:hover {
    background-color: #FFEbee;
    color: #b71c1c;
}

@keyframes slideUpFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ========================================= */
/* GAMIFICATION & MODERN INTERACTIVE CARDS   */
/* ========================================= */
.modern-card {
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.modern-card:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}
.badge-gami {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bg-danger-soft { background-color: #FFEbee; }
.bg-primary-soft { background-color: #E3F2FD; }
.bg-success-soft { background-color: #E8F5E9; }

/* Polling Options Style */
.poll-option-btn {
    position: relative;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
    z-index: 1;
}
.poll-option-btn:hover:not(:disabled) {
    border-color: #0B192C;
    background-color: #fff;
}
.poll-option-btn.voted {
    border-color: #FFC107;
    color: #0B192C;
}
.poll-progress-fill {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    background-color: rgba(255, 193, 7, 0.2);
    z-index: -1;
    transition: width 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-reaction {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-reaction:hover { background-color: #e9ecef; }

.avatar-circle {
    width: 60px; height: 60px;
    border-radius: 50%;
    background-color: #0B192C;
    color: #FFC107;
    display: flex;
    align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: bold;
}
/* ========================================= */
/* FIX BUG SAFARI IOS - BACKGROUND HILANG    */
/* ========================================= */
@supports (-webkit-touch-callout: none) {
    #heroSection, .bg-cover {
        background-attachment: scroll !important;
    }
}

@media (max-width: 768px) {
    #heroSection {
        background-attachment: scroll !important;
    }
}

html {
    -webkit-text-size-adjust: 100%;
}
