/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    background: #4361ee;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background: #3a56d4;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

/* Header Styles */
.header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4361ee;
}

.logo span {
    color: #333;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #4361ee;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Search Section */
.search-section {
    padding: 50px 0;
    background-color: white;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.search-container h2 {
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Books Grid */
.books-section {
    padding: 50px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.book-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.book-image {
    height: 350px; /* taller box for book covers */
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f9f9f9; /* neutral background for padding space */
    padding: 10px; /* small padding to avoid edge cuts */
}

.book-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* show the full book cover */
}


.book-card:hover .book-image img {
    transform: scale(1.05);
}

.book-content {
    padding: 20px;
}

.book-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.book-content p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    min-height: 60px;
}

/* Categories Grid */
.categories-section {
    padding: 50px 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    padding: 30px 20px;
}

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

.category-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #4361ee;
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.category-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    min-height: 60px;
}

/* Footer */
.footer {
    background: #2b2d42;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #4361ee;
}

.footer-logo span {
    color: white;
}

.footer-links h4 {
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: #4361ee;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ddd;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #4361ee;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: #4361ee;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        align-items: center;
        padding: 40px 0;
        transition: all 0.3s ease;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .container {
        width: 95%;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .books-grid,
    .categories-grid {
        grid-template-columns: 1fr;
    }
}