body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: #f8fafc;
    color: #333;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1e40af;
    padding: 15px 50px;
    color: white;
}
.navbar nav a {
    color: rgb(255, 255, 255);
    margin-left: 20px;
    text-decoration: none;
    font-weight: 500;
}
.navbar nav a:hover {
    text-decoration: underline;
}
.btn-login {
    background-color: rgb(21, 254, 0);
    color: #1e40af;
    padding: 8px 15px;
    border-radius: 5px;
}

/* Hero Section */
.hero {
    background: linear-gradient(to right, #1e3a8a, #1e40af);
    color: white;
    text-align: center;
    padding: 100px 20px;
}
.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.hero-content p {
    font-size: 1.1rem;
}
.btn-primary {
    background-color: white;
    color: #1e3a8a;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}
.btn-primary:hover {
    background-color: #e0e7ff;
}

/* Statistik */
.stats {
    display: flex;
    justify-content: center;
    background: white;
    padding: 50px 20px;
    gap: 40px;
}
.stat-box {
    text-align: center;
}
.stat-box h2 {
    color: #1e40af;
    font-size: 2rem;
}

/* About */
.about {
    text-align: center;
    padding: 50px 20px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    background-color: #1e3a8a;
    color: white;
    margin-top: 50px;
}
/* ===== OPAC PAGE ===== */
.opac-container {
    padding: 60px 20px;
    text-align: center;
    background-color: #f5f6fa;
}

.opac-container h1 {
    color: #1e3a8a;
    font-size: 2rem;
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.search-box input {
    width: 320px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.search-box button {
    padding: 10px 18px;
    border: none;
    background-color: #1e40af;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background-color: #1d4ed8;
}

/* Book list */
.book-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.book-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s;
    text-align: left;
}

.book-card:hover {
    transform: translateY(-5px);
}

.book-cover img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.book-info {
    padding: 15px;
}

.book-info h3 {
    color: #1e3a8a;
    margin: 0 0 10px;
}

.btn-detail {
    display: inline-block;
    margin-top: 10px;
    background: #2563eb;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-detail:hover {
    background: #1d4ed8;
}

.no-result {
    color: #6b7280;
    font-style: italic;
    margin-top: 20px;
}
/* ========== HEADER NAVBAR ========== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1E3A8A;
    color: #fff;
    padding: 10px 50px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.logo-text {
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 0.5px;
}

.navbar nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
}

.navbar nav a:hover {
    text-decoration: underline;
}

.btn-login {
    background-color: #22C55E;
    padding: 6px 15px;
    border-radius: 5px;
    color: white !important;
    font-weight: 600;
    margin-left: 15px;
}
.btn-login:hover {
    background-color: #16A34A;
}
/* Toggle button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 26px;
    cursor: pointer;
    z-index: 1001; /* agar selalu di atas menu */
}

/* Navbar mobile */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 20px;
        position: relative;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        right: 20px;
        top: 12px;
    }

    .navbar nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #1E3A8A;
        margin-top: 50px; /* beri jarak agar tidak tumpang tindih logo */
        border-top: 1px solid rgba(255,255,255,0.2);
        z-index: 1000;
    }

    .navbar nav.active {
        display: flex;
    }

    .navbar nav a {
        margin: 10px 0;
        padding: 10px 15px;
        width: 100%;
        text-align: left;
        box-sizing: border-box;
    }

    .btn-login {
        width: 100%;
        margin: 5px 0;
        text-align: center;
    }

    .logo-container {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
}
