/* =========================================
   1. DASAR & RESET 
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
}

/* =========================================
   2. CSS KHUSUS HALAMAN INDEX (UTAMA)
   ========================================= */
.halaman-utama {
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('perpus.jpg');
    justify-content: center;
}

/* =========================================
   3. CSS HALAMAN BACA ARTIKEL (KEMBALI GELAP ESTETIK)
   ========================================= */
.halaman-baca {
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('perpus.jpg');
}

.di-mana-abdul {
    padding: 30px 20px;
    text-align: center;
    width: 100%;
}

.judul-text {
    font-size: 28px;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

/* Grid Koleksi Artikel - Kembali 4 Kolom Gelap */
.daftar-buku {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    padding: 30px 20px;
    width: 100%;
    max-width: 1200px;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Kotak Artikel Semi-Transparan Keren */
.card-buku {
    background: rgba(0, 0, 0, 0.6);        /* Latar belakang kotak gelap transparan */
    padding: 18px;
    border-radius: 15px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-link:hover .card-buku {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
}

.card-link:active .card-buku {
    transform: scale(0.95);               
}

.foto-buku {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
}

/* Judul Artikel Berwarna Putih Agar Terbaca */
.card-buku p {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
}

/* Tombol Baca Sekarang Versi Transparan */
.btn-baca-sekarang {
    display: block;
    width: 100%;
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
    text-align: center;
    font-weight: bold;
    border-radius: 25px;
    font-size: 14px;
    margin-top: auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: background 0.2s;
}

.btn-baca-sekarang:hover {
    background-color: #0056b3;             /* Jadi biru pas disentuh */
    border-color: #0056b3;
}

/* =========================================
   4. CSS TOMBOL & NAVIGASI 
   ========================================= */
.menu-kontainer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 600px;
    margin-bottom: 30px;
}

.btn {
    text-decoration: none;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 22px;
    border-radius: 50px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    font-weight: 600;
    transition: background 0.2s;
}

.btn:hover {
    background: #0056b3;
    border-color: #0056b3;
}

/* =========================================
   5. CSS SISTEM POP-UP (MODAL)
   ========================================= */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.modal-overlay:target {
    display: flex;
}

.konten-baca {
    background: #1a1a1a;
    width: 90%;
    max-width: 600px;
    max-height: 85%;
    padding: 25px;
    border-radius: 20px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tombol-tutup {
    float: right;
    color: #ff4d4d;
    text-decoration: none;
    font-weight: bold;
}

.teks-cerita {
   white-space: pre-wrap;
   line-height: 1.8;
   font-size: 16px;
   color: #e0e0e0;
}

/* =========================================
   6. CSS RESPONSIF 
   ========================================= */
@media (max-width: 768px) {
    .daftar-buku {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .menu-kontainer {
        flex-direction: column;
        width: 90%;
    }
}
