@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;700&display=swap');

#bookSection {
    font-family: "Lexend", sans-serif;
    scroll-margin-top: 100px;
    padding: 3rem 1rem;
    background-color: #f4f8fc;
}

.book-section-container {
    max-width: 1300px;
    margin: 0 auto;
    text-align: center;
}

.book-section-title {
    font-size: 2.6rem;
    font-weight: 700;
    color: #003344;
    margin-bottom: 0.5rem;
}

.book-section-subtitle {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 2.5rem;
}

.book-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    margin-bottom: 2.5rem;
}

@media (min-width: 576px) {
    .book-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .book-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


.book-card:hover {
    transform: translateY(-6px);
}

.book-img {
    height: 520px;
    object-fit: cover;
    display: block;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    transform: translateZ(0);
    transition: transform 0.3s ease;
}

.book-card:hover .book-img {
    transform: scale(1.01);
}

@media (max-width: 768px) {
    .book-img {
        height: 420px;
    }
}

@media (max-width: 480px) {
    .book-img {
        height: 320px;
    }

    .book-section-title {
        font-size: 2rem;
    }

    .book-section-subtitle {
        font-size: 1rem;
    }
}

.book-button-wrapper {
    text-align: center;
}

.book-readmore-btn {
    display: inline-block;
    padding: 12px 26px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    background-color: #b8950b;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

    .book-readmore-btn:hover {
        color: #000000;
        background-color: #B8860b ;
    }

.book-popup {
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

    .book-popup.hidden {
        display: none;
    }

.book-popup-content {
    background: #fff;
    padding: 1.5rem;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    box-sizing: border-box;
}

    .book-popup-content h3 {
        color: #00bfff;
        font-size: 1.3rem;
        margin-bottom: 1rem;
        line-height: 1.4;
        text-align: left;
    }

    .book-popup-content p {
        font-size: 1rem;
        color: #333;
        line-height: 1.6;
        text-align: justify;
    }

.book-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    font-weight: bold;
    color: #00b300;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: color 0.2s ease;
}

    .book-popup-close:hover {
        color: #00bfff;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
