
/* Hide scrollbar for all elements globally */
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* For webkit-based browsers */
*::-webkit-scrollbar {
    display: none;
}

/* General Styling */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f6f9;
    padding-top: 70px;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    overflow: auto; /* Ensure content can still scroll */
    scrollbar-width: none; /* Hide scrollbar in Firefox */
    -ms-overflow-style: none; /* Hide scrollbar in IE and Edge */
    overflow: hidden; /* Temporarily disable scrolling */
    overflow-y: auto; /* Re-enable scrolling but hide scrollbar */
}

body::-webkit-scrollbar {
    display: none; /* Hide the scrollbar */
}

h1, h2 {
    margin: 0;
    color: #333;
}

/* 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;
}

.carousel-item img {
    object-fit: cover; /* Ensures the image covers the area without stretching */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Adds a subtle shadow around the image */
}
/* Apply styles to the description */
.description {
    color: black;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    background-color: rgba(240, 240, 240, 0.8);  /* Light gray with slight transparency */
}

.description h5 {
    font-size: 2rem;
    font-weight: bold;
}

.description p {
    font-size: 1.125rem;
    margin: 0.5rem 0;
}

.description strong {
    font-weight: bold;
}
/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .carousel-item {
        flex-direction: column; /* Stack items vertically on smaller screens */
    }

    .carousel-item img {
        width: 100%;
        height: auto; /* Maintain aspect ratio */
    }
    .card {
        width: 330px;
    }
    .card-title {
        white-space: nowrap; /* Prevent text from wrapping */
        overflow: hidden; /* Hide any overflow */
        text-overflow: ellipsis; /* Add "..." for truncated text */ 
    }
    .card-img-top {
        height: 200px; /* Reduce height for smaller screens */
    }
    .card-text{
        white-space: nowrap; /* Prevent text from wrapping */
        overflow: hidden; /* Hide any overflow */
        text-overflow: ellipsis; /* Add "..." for truncated text */ 
    }
    .section-header {
        margin: 0px 20px !important;
        padding: 30px 0 !important;
    }
    .section-header h1::before,
    .section-header h1::after,
    .section-header h2::before,
    .section-header h2::after {
        display: none;
    }


    .section-header h1 {
        font-size: 1.6rem !important; /* Force font size on mobile */
    }
    .description h5 {
        font-size: 1.5rem;
    }

    .description p {
        font-size: 1rem;
    }
}


/* Styling for Section Headers */
.section-header {
    text-align: center;
    margin: 30px 0;
    padding: 15px 0;
}

.section-header h1,
.section-header h2 {
    color: #333;
    font-weight: bold;
    position: relative;
}

.section-header h1 {
    font-size: 2.5rem;  /* Larger font size for primary section headers */
}

.section-header h2 {
    font-size: 2rem;  /* Adjust font size for subheadings */
    color: #444;      /* Slightly lighter color for subheadings */
}

/* Adding lines on either side of the header */
.section-header h1::before,
.section-header h1::after,
.section-header h2::before,
.section-header h2::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 20%;
    height: 2px;
    background-color: #007bff;  /* Blue color for the line */
}

.section-header h1::before,
.section-header h2::before {
    left: 0;
    margin-top: -1px;  /* Adjusts line to be in the middle of the header text */
}

.section-header h1::after,
.section-header h2::after {
    right: 0;
    margin-top: -1px;  /* Adjusts line to be in the middle of the header text */
}

/* Container for the Page Content */
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 40px auto;
    justify-content: center;
    padding: 0 20px;
    max-width: 1200px;
}

.hero-section {
    position: relative;
    padding: 100px 0;
}

.hero-section h1 {
    font-size: 3rem; /* Increase the text size if needed */
    margin-bottom: 15px;
    font-weight: bold;
    color: #ffffff; /* Change text color to white */
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.hero-section .btn {
    font-size: 1.1rem;
    padding: 12px 25px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); /* Darken the background */
    z-index: 1;
}

.hero-section h1, .hero-section p, .hero-section .btn {
    position: relative;
    z-index: 2; /* Bring the text above the overlay */
}

/* Optional: Adjust text and button size on smaller screens */
@media (max-width: 768px) {
    .hero-section {
        padding: 50px 20px;
    }

    .hero-section h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .hero-section .btn {
        font-size: 1rem;
        padding: 10px 20px;
    }
}

/* Styling for the category class */
.category {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 20px;
    margin: 20px auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    font-family: 'Arial', sans-serif;
    color: #333;
}

.category h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #555;
}

.category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category ul li {
    padding: 10px;
    margin-bottom: 10px;
    background-color: #ffffff;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category ul li a {
    text-decoration: none;
    color: #007bff;
    font-size: 18px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.category ul li a:hover {
    color: #0056b3;
}

.category p {
    font-size: 16px;
    line-height: 1.5;
    color: #666;
}

.category button {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.category button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* Books Genre Card Styling */
.card {
    position: relative;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 30px;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0px 15px 25px rgba(0, 0, 0, 0.2);
}

.card-img-top {
    height: 300px;
    object-fit: cover; /* Ensures the image maintains its aspect ratio without distortion */
    width: 100%; /* Ensures the image spans the full width of the card */
}

.card-body {
    padding: 20px;
    text-align: center;
}

.card-title {
    white-space: nowrap;
    font-size: 1.3rem;
    font-weight: bold;
}

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

.card .badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 8px 10px;
    border-radius: 2px;
    font-size: 12px;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}

/* Style for the modal badge */
#modalBadge {
    display: inline-block; /* Display only when set */
    padding: 15px 10px; /* Padding for spacing */
    border-radius: 5px; /* Rounded corners */
    margin-right: auto;
}

/* Ensure the modal actions section is styled correctly */
.modal-actions {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center; /* Align badge and button */
    margin-top: 20px; /* Space from the book description */
}

/* Style for the modal image */
.modal-image {
    width: 100%; /* Adjust as needed */
    max-width: 300px; /* Set a max width */
    height: auto; /* Maintain aspect ratio */
    border-radius: 10px; /* Rounded corners */
}

#bookModal .badge-borrowed {
    background-color: #dc3545; /* Red for "Borrowed" */
}

#bookModal .badge-free {
    background-color: #28a745; /* Green for "New" */
}

.genres-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.genre-card {
    flex: 1 1 calc(25% - 1rem); /* Four cards per row */
    max-width: 22%;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.genre-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.genre-link {
    display: block;
    padding: 2rem 1rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.3s, color 0.3s;
}

.genre-link:hover {
    background-color: #007bff;
    color: #fff;
}

.genre-icon {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 1rem;
    transition: color 0.3s;
}

.genre-link:hover .genre-icon {
    color: #fff;
}

.genre-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-top: 0.5rem;
}

/* Cards */
.card {
    position: relative;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 30px;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0px 15px 25px rgba(0, 0, 0, 0.2);
}
/* Buttons */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

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

    .genre-card {
        flex: 1 1 calc(50% - 1rem); /* Two cards per row */
        max-width: 48%; /* Max width for mobile layout */
        margin-bottom: 1rem; /* Add spacing between rows */
    }

    .genre-icon {
        font-size: 2.5rem; /* Slightly smaller icons on mobile */
    }

    .genre-title {
        font-size: 1rem; /* Adjust font size for smaller screens */
    }

    .genre-link {
        padding: 1.5rem 1rem; /* Reduce padding for compact layout */

    }
}

/* Badge Styles */
.badge-borrowed {
    background-color: #dc3545; /* Red for "Borrowed" */
}
.badge-free {
    background-color: lightgreen;
}
/* Button Styles */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

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;

    }
}
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    width: 70%; /* Adjust as needed */
    max-width: 800px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

/* Modal Body */
.modal-body {
    display: flex;
    flex-direction: row;
    padding: 20px;
    gap: 20px;
}

/* Modal Image */
.modal-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-image-img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

/* Modal Details */
.modal-details {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
}

.modal-title {
    margin: 0;
    color: #222;
    font-size: 24px; /* Larger font for the title */
    font-weight: bold;
}

.modal-author {
    margin: 10px 0;
    font-size: 18px;
    color: #444;
    font-style: italic; /* To differentiate the author */
}

.modal-description {
    margin: 10px 0;
    font-size: 16px;
    color: #555;
    line-height: 1.6; /* Improved line spacing */
}

/* Modal Actions */
.modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.modal-actions .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: inline-block;
    text-align: center;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .modal-content {
        flex-direction: column; /* Stack modal content vertically */
        width: 95%; /* Use almost the full screen width */
    }

    .modal-body {
        flex-direction: column; /* Stack image and details vertically */
        gap: 10px; /* Reduce gap for a cleaner look */
    }

    .modal-image {
        width: 100%; /* Ensure the image section spans full width */
    }

    .modal-image-img {
        max-height: 250px; /* Restrict height for mobile */
        object-fit: cover;
    }

    .modal-details {
        padding: 10px; /* Reduce padding for mobile */
    }

    .modal-title {
        font-size: 20px; /* Adjust font size for smaller screens */
    }

    .modal-author {
        font-size: 16px;
    }

    .modal-description {
        font-size: 14px;
    }

    .modal-actions {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px; /* Add spacing between buttons */
        align-items: center; /* Center items */
    }

    .modal-actions .btn {
        width: 100%; /* Buttons span full width on mobile */
        font-size: 14px; /* Adjust font size for buttons */
    }
    #modalBadge {
        order: -1; /* Move badge to the top */
        margin-bottom: 5px; /* Add space below the badge */
        text-align: center; /* Center the badge content */
    }

    #cancelButton {
        width: 100%; /* Make the button span full width */
        padding: 12px; /* Adjust padding for better touch support */
    }
}
.btn-secondary {
    background-color: #f44336;
    color: white;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn:hover {
    opacity: 0.9;
}

/* Close Button */
.close {
    font-size: 20px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;

}