/* =========================
 RESET / BASE
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Georgia, "Times New Roman", serif;
    background: #f7f6ef;
    color: #222;
}

a {
    text-decoration: none;
}

/* =========================
 BANNER
========================= */

.latest-banner {
    height: 300px;
    background: url('../img/banner.jpg') center center / cover no-repeat;
    position: relative;
}

.latest-banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
}

.latest-banner-overlay h1 {
    color: #ffffff;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 1px;
}

/* =========================
 SECTION WRAPPER
========================= */

.latest-books {
    padding: 80px 0;
    background: #f7f6ef;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 500;
    margin-bottom: 60px;
}

/* =========================
 GRID
========================= */

.books-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

/* =========================
 BOOK CARD
========================= */

.book-card {
    background: transparent;
}

/* IMAGE CONTAINER (IMPORTANT) */
.book-thumb {
    width: 100%;
    aspect-ratio: 2 / 3;   /* book cover ratio */
    overflow: hidden;
    background: #ddd;
}

/* IMAGE FILL */
.book-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;    /* THIS MAKES IMAGE FILL */
    object-position: center;
    display: block;
}

/* =========================
 BOOK INFO
========================= */

.book-info {
    padding-top: 18px;
}

.book-date {
    display: block;
    font-size: 13px;
    color: #8a7f6b;
    margin-bottom: 10px;
}

.book-info h3 {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 18px;
    font-weight: 400;
    color: #222;
}

/* =========================
 READ MORE BUTTON
========================= */

.read-more-btn {
    display: inline-block;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #b35c2d;
    border: 1px solid #b35c2d;
    padding: 10px 18px;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background: #b35c2d;
    color: #ffffff;
}

/* =========================
 PAGINATION
========================= */

.pagination {
    margin-top: 70px;
    text-align: center;
}

.page-link {
    display: inline-block;
    margin: 0 6px;
    padding: 10px 16px;
    border: 1px solid #ccc;
    color: #444;
    font-size: 14px;
    transition: all 0.3s ease;
}

.page-link:hover,
.page-link.active {
    background: #222;
    color: #ffffff;
    border-color: #222;
}

/* =========================
 RESPONSIVE
========================= */

@media (max-width: 1100px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .books-grid {
        grid-template-columns: 1fr;
    }

    .latest-banner {
        height: 220px;
    }

    .latest-banner-overlay h1 {
        font-size: 30px;
    }
}
