/* General Styling */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #333;
}

/* Header Styling */
header {
    background-color: #1a2a3a;
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* College Logo */
.college-logo {
    height: 80px;
    width: auto;
    border-radius: 8px;
}

/* Library Name */
.library-name {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
}

/* Navigation Bar */
nav {
    background-color: rgb(29, 53, 78);
    padding: 10px 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.menu {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.menu a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    padding: 8px 12px;
    transition: background 0.3s ease-in-out;
    border-radius: 5px;
}

.menu a:hover {
    background: #1f3b52;
}

/* Library Section */
.library-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    text-align: center;
}

.library-container h2 {
    font-size: 28px;
    color: #1a2a3a;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Book Cards */
.books-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

/* Book Card Styling */
.book-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    overflow: hidden; /* Ensure the image doesn't overflow the card */
}


.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Book Cover Image */
.book-card img {
    width: 100%; /* Ensure the image takes the full width of the card */
    height: 200px; /* Fixed height for consistency */
    object-fit: contain; /* Ensures the image fits within the container without cropping */
    border-radius: 8px;
    margin-bottom: 15px;
    background: #f4f4f9; /* Add a background color for images with transparency */
}

/* Book Title */
.book-title {
    font-size: 18px;
    font-weight: bold;
    color: #1a2a3a;
    margin-bottom: 10px;
}

/* Book Author */
.book-author {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
}

/* View Book Button */
.book-link {
    display: inline-block;
    padding: 10px 20px;
    background: #1d354e;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s ease-in-out;
}

.book-link:hover {
    background: #2980b9;
}

/* Footer */
footer {
    background-color: #1a2a3a;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .college-logo {
        height: 60px;
    }

    .library-name {
        font-size: 20px;
    }

    .menu {
        flex-direction: column;
        gap: 10px;
    }

    .book-card {
        width: 100%;
        max-width: 300px;
    }

    .library-container h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .book-card img {
        height: 150px;
    }

    .book-title {
        font-size: 16px;
    }

    .book-author {
        font-size: 12px;
    }

    .book-link {
        padding: 8px 16px;
        font-size: 12px;
    }
}