/*Perpustakaan*/
:root{
    --primary: #4ea1ff;
    --dark: #1b1b1b;
    --text: #666;
    --light: #f4f7fb;
    --white: #fff;
    --card: #e9eef2;
    --icon-bg:#f3f6f9;
}


/* judul */

.judul{
text-align:center;
font-size:32px;
margin:40px 0;
color:var(--dark);
}

/* grid buku */

.book-grid{
    display:grid;
    justify-content: center;
    align-items: center;
    grid-template-columns:repeat(4,1fr); /* 4 buku per baris */
    gap:25px;
    padding:20px 40px;
    max-width: 1200px;
    background: #f8fafc;
    border-radius: 10px;
    position: relative;
    margin: 40px auto;
    box-shadow:0 0 0 1px #e5e7eb;
    flex-wrap: wrap;
}



/* SEARCH AREA */

.search-container{
display:flex;
justify-content:center;
margin-bottom:40px;
}

/* form */

.search-form{
width:100%;
max-width:500px;
}

/* input wrapper */

.search-input{
display:flex;
align-items:center;
background:#fff;
border-radius:30px;
padding:10px 18px;
box-shadow:0 4px 12px rgba(0,0,0,0.08);
border:1px solid #eee;
transition:0.3s;
}

/* focus effect */

.search-input:focus-within{
border:1px solid #2c7be5;
box-shadow:0 4px 15px rgba(44,123,229,0.25);
}

/* icon */

.search-input .icon{
font-size:18px;
margin-right:10px;
opacity:0.6;
}

/* input */

.search-input input{
border:none;
outline:none;
width:100%;
font-size:16px;
background:transparent;
}

/* placeholder */

.search-input input::placeholder{
color:#999;
}


/* link */

.book-link{
text-decoration:none;
color:inherit;
}

/* card buku */

.book-card{
    background:white;
    border-radius:12px;
    overflow:hidden;
    transition:0.3s;
    cursor:pointer;
    padding: 10px;
    /* agar tinggi card sama */
    display:flex;
    flex-direction:column;
    height:100%;
    box-shadow: 0 0 0 1px #e5e7eb;
}

.book-card:hover{
    transform:translateY(-8px) scale(1.03);
    box-shadow:0 20px 10px rgba(0,0,0,0.15);
}

/* cover */

.cover-wrapper{
    position:relative;
    flex-shrink:0;
}

.cover-wrapper img{
    width:100%;
    height:260px;
    object-fit:cover;
    border-radius: 10px;
}

/* isi card */

.book-info{
    padding:15px;
    flex:1;
}

/* judul buku agar tidak membuat card berbeda tinggi */

.book-info h3{
font-size:1.1em;
margin-bottom:5px;

display:-webkit-box;
-webkit-line-clamp:2;
-webkit-box-orient:vertical;
overflow:hidden;
min-height:44px;
}

/* penulis */

.penulis{
    
    font-size:12px;
    font-weight: 600;
    width: 100%;
    text-align: center;
    display: inline-block;
    padding: 5px;
    border-radius: 15px;
    background: linear-gradient(45deg, #00f2ff, #0066ff);
    color: #fff !important;
}

.penulis:hover
{
    box-shadow: 0 0 20px rgba(0,242,255,0.8);
    transform: scale(1.05);
    color: var(--white);
}

/* badge */

.badge{
position:absolute;
top:10px;
left:10px;
padding:5px 10px;
font-size:12px;
border-radius:20px;
color:white;
font-weight:500;
}

/* badge premium */

.badge.premium{
background:#ff9800;
}

/* badge gratis */

.badge.gratis{
background:#ff0000;
}

.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
    
    grid-column: 1 / -1; /* membuat header memanjang penuh */
    width: 100%;
}

.section-title {
    margin: 0;
    font-size: 1.5rem;
}

.filter-container select {
    padding: 8px 40px;
    border-radius: 30px;
    box-shadow:0 0 0 1px #e5e7eb;
    cursor: pointer;
    text-align: center;
}

/* info buku */

.book-info{
padding:15px;
}

.book-info h3{
font-size:16px;
margin:0 0 5px;
color:#222;
}

.penulis{
font-size:14px;
color:#777;
}

/* responsive */

@media(max-width:768px){

.book-grid{
grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
padding:20px;
}


.cover-wrapper img{
height:220px;
}

}


@media(max-width:1024px){
.book-grid{
grid-template-columns:repeat(3,1fr);
}
}

@media(max-width:768px){
.book-grid{
grid-template-columns:repeat(2,1fr);
padding:20px;
}
}

@media(max-width:480px){
.book-grid{
grid-template-columns:1fr;
}
}

/*BATAS*/


.detail-container{
max-width:1100px;
margin:auto;
padding:40px 20px;
}

.detail-card{
display:flex;
gap:40px;
background:white;
padding:30px;
border-radius:15px;
box-shadow:0 10px 30px rgba(0,0,0,0.1);
}

.cover-section img{
width:260px;
border-radius:12px;
box-shadow:0 15px 30px rgba(0,0,0,0.2);
transition:0.3s;
}

.cover-section img:hover{
transform:scale(1.05);
}

.info-section{
flex:1;
}

.info-section h1{
margin-top:0;
font-size:28px;
}

.penulis{
color:#666;
margin-bottom:10px;
}

.status{
display:inline-block;
padding:5px 12px;
border-radius:20px;
font-size:13px;
margin-bottom:20px;
}

.status.gratis{
background:#e8f5e9;
color:#2e7d32;
}

.status.premium{
background:#fff3e0;
color:#e65100;
}

.deskripsi{
line-height:1.7;
margin-bottom:25px;
color:#444;
}

.btn-group{
display:flex;
gap:12px;
margin-top:20px;
flex-wrap:wrap;
}

.btn-baca {
    background: var(--primary);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: 0.3s;
}

.btn-baca:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-download{
background:#2196f3;
color:white;
padding:12px 20px;
border-radius:8px;
text-decoration:none;
font-weight:bold;
}

.btn-download:hover{
background:#1e88e5;
}

.btn-login{
background:#ff9800;
color:white;
padding:12px 20px;
border-radius:8px;
text-decoration:none;
font-weight:bold;
}

.btn-login:hover{
background:#f57c00;
}

@media(max-width:768px){

.detail-card{
flex-direction:column;
align-items:center;
text-align:center;
}

.cover-section img{
width:200px;
}

}




/* container utama */
.detail-container{
    width:90%;
    max-width:1100px;
    margin:auto;
    padding:30px 0;
    font-family:Arial, Helvetica, sans-serif;
}

/* card detail */
.detail-card{
    display:flex;
    gap:30px;
    background:#ffffff71;
    padding:25px;
    border-radius:10px;
    box-shadow:0 5px 20px rgba(0,0,0,0.08);
}

/* cover buku */
.cover-section{
    flex:1;
    text-align:center;
}

.cover-section img{
    width:100%;
    max-width:260px;
    border-radius:8px;
    box-shadow:0 5px 15px rgba(0,0,0,0.2);
}

/* info buku */
.info-section{
    flex:2;
}

.info-section h1{
    margin-bottom:10px;
}

.penulis{
    font-size:15px;
    color:#666;
    margin-bottom:10px;
}

/* status */
.status{
    display:inline-block;
    padding:5px 12px;
    border-radius:5px;
    font-size:12px;
    margin-bottom:15px;
}

.status.gratis{
    background:#e8f5e9;
    color:#2e7d32;
}

.status.premium{
    background:#fff3e0;
    color:#ef6c00;
}

/* deskripsi */
.deskripsi{
    margin-bottom:20px;
    line-height:1.6;
}

/* tombol */
.btn-login,
.btn-baca{
    display:inline-block;
    padding:10px 18px;
    border-radius:6px;
    text-decoration:none;
    font-weight:bold;
}

.btn-login{
    background:#f44336;
    color:white;
}

.btn-baca{
    background:#4CAF50;
    color:white;
}

/* ======================
   BUKU LAINNYA
====================== */

.main-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 5px 10px rgba(0,0,0,0.02);
}

.header-container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0; /* Lebih ramping */
}

.logo {
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.nav-menu{
display:flex;
gap:25px;
align-items:center;
}

.nav-menu a {
    text-decoration: none;
    font-size: 13px;
    color: var(--white);
    font-weight: 600;
    transition: 0.3s;
    background: var(--primary); /* Tombol lebih netral */
    padding: 10px 20px;
    border-radius: 6px;
}

.nav-menu a:hover {
    background: var(--card);
    transform: translateY(-1px);
}

.login-btn{
background:var(--primary);
color:white;
padding:7px 16px;
border-radius:20px;
font-size:13px;
transition:0.25s;
}

.login-btn:hover{
background:#38e3f0;
}



/* ======================
BUKU LAINNYA
====================== */

.buku-lainnya {
    margin-top: 60px;
}

.buku-lainnya h2 {
    margin-bottom: 25px;
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    text-align: left;
}

/* GRID */

.buku-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    padding: 10px 0;
    box-shadow: none; /* Hilangkan shadow di container agar lebih clean */
}

/* CARD ITEM */

.buku-grid p
{
    display: flex;
    width: 100;
    justify-content: center;
    align-items: center;
    height: 30px;
    background: #1e88e5;
    color: #ffffff !important;
    border-radius: 10px;

    
}

/* CARD */

.buku-item {
    text-decoration: none;
    color: var(--text-main);
    background: var(--white);
    padding: 0; /* Flush design */
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    overflow: hidden;
    box-shadow: 0 0 1px #818181;
    padding: 5px;
}


/* HOVER */

.buku-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    border-color: transparent;
}

/* COVER */

.buku-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 0; /* Mengikuti container */
}

/* TITLE */

.buku-item h3 {
    font-size: 14px;
    margin: 15px 12px 5px;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* AUTHOR */

.buku-item p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 15px;
    background: transparent !important; /* Hilangkan background biru di teks penulis */
    display: block !important;
    height: auto !important;
    text-align: left;
    padding: 0 12px 15px;
}

.status.premium { color: #e11d48; font-weight: 700; }
.status.tersedia { color: #059669; font-weight: 700; }

.buku-item:hover{
    transform:translateY(-5px);
}

.buku-item img{
    width:100%;
    height:270px;
    object-fit:fill;
    border-radius:6px;
}

.buku-item h3{
    font-size:15px;
    margin:10px 0 5px;
}

.buku-item p{
    font-size:13px;
    color:#666;
}

/* ======================
RESPONSIVE TABLET
====================== */

@media (max-width:900px){

.detail-card{
flex-direction:column;
text-align:center;
}

.info-section{
text-align:center;
}

.buku-grid{
grid-template-columns:repeat(2,1fr);
}

}

/* ======================
RESPONSIVE MOBILE
====================== */

@media (max-width:600px){

.detail-container{
width:95%;
}

.cover-section img{
max-width:200px;
}

.info-section h1{
font-size:20px;
}

.deskripsi{
font-size:14px;
}

.buku-grid{
grid-template-columns:1fr;
}

.buku-item img{
height:180px;
}

.btn-login,
.btn-baca{
display:block;
width:100%;
text-align:center;
}

}

/* TAMPILAN PARALLAX */

.book-grid-parallax{
    max-width:1200px;
    margin:40px auto;
    
    border-radius:10px;
    overflow:hidden; /* 🔥 penting */
    background: #f8fafc; /* Abu-abu sangat muda agar card putih lebih 'pop' */
    padding: 20px 10px;
}

/* WRAP */
.gpu-wrap{
    width:100%;
    margin:auto;
    position:relative;
    height:400px;
    padding-bottom: 20px;
}

/* PROMO */
.gpu-promo{
    position:absolute;
    left:0;
    bottom:0;

    width:250px;
    height:370px;

    border-radius:10px;
    color:white;
    line-height: 1.8;
    display:flex;
    justify-content:flex-start;
    align-items:center;
    text-align:left;
    font-weight:bold;
    z-index:1;

    background: linear-gradient(135deg, #6366f1, #a855f7); /* Warna gradient lebih modern (Indigo-Purple) */
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
    padding-left: 25px;
    
}

.img-promo{
    height: 150px;
    width: 150px;
    position: absolute;
    left: 0;
    bottom: 0;
}

.gpu-promo h2 {
    font-size: 1.8rem;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.gpu-card p
{
    font-size: 0.95rem;
    color: #1e293b;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    
    /* Margin top auto akan mendorong teks ini ke dasar container flex */
    margin-top: 5px; 
    padding: 5px 0;
    
    /* Agar teks panjang tetap rapi (maksimal 2 baris) */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* SLIDER */
.gpu-slider{
    position:absolute;
    left:100px;
    top:45px; /* 🔥 ini bikin card turun */

    width:calc(100% - 150px);
    z-index:2;
    
     gap: 5px;
    
}


.swiper-slide
{
    width: fit-content !important;
}

.swiper-slide a{
    text-decoration: none;
    color: var(--dark);
}


/* CARD */
.gpu-card{
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    width: 190px;
    height: 340px;
    
    /* Kuncinya di sini */
    display: flex;
    flex-direction: column;
}

.gpu-card img{
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 8px;
    /* Memberikan jarak bawah otomatis agar konten setelahnya terdorong */
    margin-bottom: auto;
}

.gpu-card:hover{
    transform: translateY(-8px); /* Melayang sedikit ke atas */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #e2e8f0;
}

.gpu-card:hover img {
    opacity: 0.9;
}
/* SWIPER FIX */
.swiper {
    overflow: visible !important;
}