/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    color: #000;
    background: #f9f9f9;
}

/* Header Styling */
header {
    background: #003f5c;
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 20px;
    position: relative;
}

header .logo {
    font-size: 24px;
    font-weight: bold;
    flex: 1;
    text-align: left;
}

/* Search Bar */
header .search-bar {
    flex: 1;
    padding: 5px 10px;
    border-radius: 5px;
    border: none;
    font-size: 16px;
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    margin-right: 15px; /* Add space below the search bar */
}

/* Navigation Menu */
header nav {
    display: flex;
    align-items: center;
    justify-content: center;
}

header nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

header nav ul li a:hover {
    color: #a8dadc;
    color: #000;
}

/* Hamburger Menu Button */
header .hamburger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

/* Responsive Menu */
@media (max-width: 768px) {
    header {
        flex-direction: column;
    }

    header nav ul {
        display: none; /* Hidden by default on mobile */
        flex-direction: column;
        width: 100%;
        background: #003f5c;
        padding: 10px 0;
        border-radius: 5px;
        text-align: center;
    }

    header nav ul.active {
        display: flex; /* Visible when active */
    }

    header .hamburger {
        display: block;
    }

    header .search-bar {
        margin: 10px 0;
        width: 80%;
    }
}


/* Main Content Box */
.content-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    max-width: 800px;
    margin: 30px auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.content-box h1 {
    color: #003f5c;
    font-size: 28px;
    margin-bottom: 20px;
}

.content-box p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Footer Styling */
footer {
    background: #2f4b7c;
    color: #fff;
    text-align: center;
    padding: 10px 0;
}

footer .social-icons a {
    color: #fff;
    margin: 5px 5px 10px 5px;
    font-size: 20px;
    text-decoration: none;
}

footer .social-icons a:hover {
    color: #a8dadc;
}

/* Responsive Design */
@media (max-width: 768px) {
    header nav ul {
        flex-direction: column;
        align-items: center;
    }

    .categories-list, .book-list {
        flex-direction: column;
    }

    .category, .book {
        width: 90%;
    }

    .content-box {
        width: 90%;
        padding: 20px;
    }
}

/* Main Content */
main {
    padding: 20px;
    max-width: 1200px;
    margin: auto;
    text-align: center;
}

/* H1 and Text Centering */
h1 {
    color: #003f5c;
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
}

p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: center;
}

/* Buttons Styling */
a, button {
    display: inline-block;
    background: #1a73e8;
    color: #fff;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
}

a:hover, button:hover {
    background: #a8dadc;
    color: #000;
}

/* Section Layout */
.categories-list, .book-list, .contact-form form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.category, .book {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 20px;
    text-align: center;
    width: 200px;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.category:hover, .book:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Form Styling */
.contact-form form {
    max-width: 500px;
    margin: auto;
    flex-direction: column;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}



/* Book List Styling */
.book-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
}

.book {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 20px;
    text-align: center;
    width: 220px;
    height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.book:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.book h2 {
    font-size: 18px;
    margin-bottom: 10px;
}

.book p {
    font-size: 14px;
    margin-bottom: 10px;
}

.book-list .book .best-seller {
    background-color: #ff6347;
    padding: 5px 10px;
    color: #fff;
    border-radius: 5px;
    font-weight: bold;
}

.book-list .book .best-seller-tag {
    position: relative;
    top: 10px;
    left: 10px;
    color: #fff;
    background-color: #ff6347;
    padding: 5px 10px;
    margin-top: 10px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
}

.book .price {
    font-size: 16px;
    color: #1a73e8;
    margin-bottom: 10px;
}

.book .book-link {
    background-color: inherit;
}

.book .buy-now-btn {
    background-color: #1a73e8;
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    font-size: 14px;
}

.book .buy-now-btn:hover {
    background-color: #a8dadc;
    color: #000;
}

/* Book Image Styling */
.book-image {
    width: 100%;
    height: auto;
    max-height: 200px; /* Set a maximum height for images */
    object-fit: contain; /* Ensures the image maintains its aspect ratio */
    margin-bottom: 15px; /* Space between the image and text */
}
