body {
    font-family: Arial, sans-serif;
    background-color: #f4f6f9;
    padding-top: 70px;
}

/* Navbar Custom Styles */
.custom-navbar {
    background-color: #343a40; /* Charcoal dark background for the navbar */
    padding: 0px;
    position: fixed;
    top: 0;
    width: 100%; /* Ensure it spans across the entire page */
    z-index: 1000; /* Make sure the navbar stays on top of other content */
}

.custom-navbar .navbar-brand img {
    height: 40px; /* Adjust the size of the logo */
}

.custom-navbar .navbar-nav .nav-link {
    color: #f8f9fa !important; /* Light gray for the text to stand out */
    padding-left: 15px;
    padding-right: 15px;
}

.custom-navbar .navbar-nav .nav-link:hover,
.custom-navbar .navbar-nav .nav-link.active {
    color: #5bc0de !important; /* Light blue for hover and active states */
    background-color: rgba(91, 192, 222, 0.1); /* Light background on hover */
}

.search-bar input {
    width: 200px;
    margin-right: 10px;
}

.search-bar button {
    background-color: #007bff;
    border: none;
    color: #fff;
    padding: 6px 15px;
}

.search-bar button:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

.custom-navbar .btn-primary {
    background-color: #007bff; /* Blue button background */
}

.custom-navbar .btn-outline-primary {
    color: white;
}

.custom-navbar .btn-outline-primary:hover {
    background-color: #007bff;
    color: white;
}

.vh-100 {
    height: 100vh;
}


.sticky-top {
    position: -webkit-sticky;
    /* Đảm bảo hỗ trợ trên các trình duyệt như Safari */
    position: sticky;
    top: 0;
    /* Đảm bảo nó dính ở trên cùng của khung nhìn khi cuộn */
    z-index: 10;
    /* Đảm bảo thanh sidebar không bị che khuất bởi các phần tử khác */
}

.blog-post {
    display: block;
    margin-bottom: 30px;
}

.blog-post img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.blog-post-content {
    margin-left: 20px;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.card-text {
    font-size: 1rem;
    color: #555;
}


footer {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* Prevents horizontal scrolling caused by the footer */    
    box-sizing: border-box;
    position: relative;
    height: auto; /* Automatically adjust height */
}


footer a {
    color: #5bc0de;
    text-decoration: none;
}

footer a:hover {
    color: #007bff;
}

footer .newsletter-button {
    background-color: #007bff;
    color: white;
}

footer .newsletter-button:hover {
    background-color: #0056b3;
}

.newsletter-form input:focus,
.newsletter-form button:hover {
    outline: none;
}

.newsletter-form {
    display: flex;
    width: 100%;
    max-width: 300px;
    box-sizing: border-box;
}

.newsletter-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 5px 0 0 5px;
    outline: none;
    background: #fff;
    color: #333;
    font-size: 14px;
    box-sizing: border-box;
}

.newsletter-button {
    background-color: #3fa1f1;
    color: white;
    padding: 5px 20px;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.4s ease, transform 0.2s ease;
    text-wrap: nowrap;
}

.newsletter-button:hover {
    background-color: #055abb;
    transform: scale(1.05); /* Slightly enlarges the button */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Adds a shadow for depth */
}

/* Responsive Styles */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .custom-navbar {
        padding: 10px;
    }

    .custom-navbar .navbar-nav {
        display: flex;
        flex-direction: column;
        text-align: center;
    }

    .custom-navbar .navbar-nav .nav-link {
        padding: 10px 0;
    }

    .search-bar {
        flex-direction: column; /* Stack input and button */
        width: 90%; /* Make it span most of the screen width */
        margin: 10 auto; /* Center the search bar */
    }

    .search-bar input {
        max-width: 100%; /* Ensure full width */
        width: 100%;
        border-radius: 5px; /* Fully rounded corners */
        margin-bottom: 5px; /* Add spacing below input */
    }

    .search-bar button {
        width: 100%; /* Full width button */
        border-radius: 5px; /* Fully rounded corners */
        margin-bottom: 10px;
    }

    .category-section img {
        height: auto;
    }

    .books-section,
    .category-section {
        margin-top: 20px;
        padding: 0 10px;
    }

    .card {
        margin-bottom: 15px;
    }

    footer {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    footer .footer-section {
        width: 100%;
        text-align: center;
        margin-bottom: 20px;
    }

    footer .newsletter-form {
        flex-direction: column;

        align-items: center;
    }

    footer .newsletter-input,
    footer .newsletter-button {

        width: 100%;
        margin-bottom: 10px;

    }
}