
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --primary: #2563eb;       
    --primary-dark: #1e40af;
    --bg-color: #f8fafc;      
    --text-dark: #1e293b;
    --text-light: #64748b;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Navbar */
.lawnavbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
    font-weight: 500;
}

/* Container */
.container {
    max-width: 900px;
    margin: 8rem auto 4rem auto;
    padding: 0 20px;
    text-align: center;
}

/* Hero & Search */
.hero-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.hero-title span {
    color: var(--primary);
}

.hero-subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.search-box-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto 2rem;
    display: flex;
    gap: 10px;
}

input#searchInput {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

input#searchInput:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

button#searchBtn {
    padding: 0 25px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

button#searchBtn:hover {
    background-color: var(--primary-dark);
}

/* Filter Chips */
.book-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.filter-chip {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
}

.filter-chip:hover, .filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px); /* Efek melayang sedikit */
}

/* Results Area */
.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: left;
}

.result-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.5s forwards;
    transition: transform 0.2s;
}

.result-card:hover {
    transform: translateY(-5px); 
}

.card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.book-tag {
    font-size: 0.75rem;
    background: #eff6ff;
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.article-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.article-text {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Animations */
@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.empty-state {
    text-align: center;
    color: #94a3b8;
    margin-top: 2rem;
}
/* Mengatur font bawaan (opsional, sesuaikan dengan font webmu) */
body {
    font-family: Arial, sans-serif;
    margin: 0;
}

/* ================== NAVBAR UTAMA ================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(17, 24, 39, 0.9); 
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #374151;
    z-index:100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

/* ================== BRAND / LOGO ================== */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.nav-brand:hover {
    transform: scale(1.05); /* Efek membesar saat disentuh */
}

.brand-logo {
    height: 2.5rem; /* Setara h-10 */
    width: auto;
    object-fit: contain;
}

.brand-text {
    font-size: 1.25rem;
    font-weight: bold;
    /* Efek Gradasi Teks */
    background: linear-gradient(to right, #60a5fa, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ================== TOMBOL MENU & LINK ================== */
.nav-link {
    color: #d1d5db; /* Abu-abu terang */
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #818cf8; /* Berubah ungu saat disentuh */
}

.btn-primary {
    background-color: #4f46e5;
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3); /* Bayangan menyala */
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary:hover {
    background-color: #4338ca;
    transform: scale(1.05);
}

.mobile-center {
    text-align: center;
}

/* ================== RESPONSIVE (TAMPILAN HP VS LAPTOP) ================== */

/* 1. Tampilan Default (Layar HP) */
.nav-desktop {
    display: none; /* Sembunyikan menu deret di HP */
}

.nav-toggle {
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    display: block; /* Munculkan tombol garis tiga */
}

.nav-mobile {
    display: none; /* Sembunyikan menu dropdown secara bawaan */
    background-color: #1f2937;
    border-top: 1px solid #374151;
    position: absolute;
    width: 100%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.nav-mobile.active {
    display: block; /* Class ini akan ditambahkan oleh JavaScript saat diklik */
}

.nav-mobile-inner {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}


@media (min-width: 768px) {
    .nav-toggle {
        display: none; 
    }
    
    .nav-desktop {
        display: flex; 
        align-items: center;
        gap: 2.5rem; 
    }

    .nav-mobile {
        display: none !important; 
    }
}
