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

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    background-color: #fff;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    text-decoration: none;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
    text-decoration: none;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1f2937;
    color: white;
    padding: 1rem;
    z-index: 1000;
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 1rem;
}

.cookie-content p {
    margin: 0;
    flex: 1;
}

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

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
}

.nav-logo img {
    width: 32px;
    height: 32px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #4b5563;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    text-decoration: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: #4b5563;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    min-height: 500px;
}

.hero-content {
    flex: 1;
    padding-right: 2rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.hero-content p {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.hero-image {
    flex: 1;
    text-align: center;
}

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

/* Page Header */
.page-header {
    padding: 3rem 0;
    background-color: #f8fafc;
    text-align: center;
}

.page-header h1 {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #6b7280;
    font-size: 1.125rem;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.book-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.book-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.book-card h3 {
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.book-card .author {
    color: #6b7280;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.book-card .category {
    display: inline-block;
    background-color: #e2e8f0;
    color: #4b5563;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.book-card p {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.book-card .btn {
    width: 100%;
    text-align: center;
}

/* Featured Books Section */
.featured-books {
    padding: 4rem 0;
}

.featured-books h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #1f2937;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.category-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    text-align: center;
    transition: transform 0.2s ease;
}

.category-card:hover {
    transform: translateY(-2px);
}

.category-card h3 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.category-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.category-card .book-count {
    color: #2563eb;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Categories Preview */
.categories-preview {
    padding: 4rem 0;
    background-color: #f8fafc;
}

.categories-preview h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #1f2937;
}

/* Filters Section */
.filters-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    display: flex;
    gap: 2rem;
    align-items: end;
}

.search-box {
    flex: 2;
}

.search-box input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: #2563eb;
}

.category-filter {
    flex: 1;
}

.category-filter label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.category-filter select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    background-color: white;
}

.category-filter select:focus {
    outline: none;
    border-color: #2563eb;
}

/* Book Details */
.book-details {
    padding: 2rem 0;
}

.book-detail-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.book-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.book-info h1 {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.book-info .author {
    color: #6b7280;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.book-info .category {
    display: inline-block;
    background-color: #e2e8f0;
    color: #4b5563;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.book-info .publication-year {
    color: #6b7280;
    margin-bottom: 2rem;
}

.book-description {
    margin-bottom: 2rem;
}

.book-description h2 {
    margin-bottom: 1rem;
}

.key-takeaways {
    margin-bottom: 2rem;
}

.key-takeaways ul {
    padding-left: 1.5rem;
}

.key-takeaways li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.who-its-for {
    margin-bottom: 2rem;
}

.purchase-disclaimer {
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.purchase-disclaimer p {
    margin: 0;
    color: #92400e;
    font-weight: 500;
}

.external-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.external-links .btn {
    flex: 1;
    min-width: 150px;
}

/* Related Books */
.related-books {
    padding: 3rem 0;
    background-color: #f8fafc;
}

.related-books h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1f2937;
}

/* Categories Listing */
.categories-listing {
    padding: 2rem 0;
}

.categories-list {
    display: grid;
    gap: 2rem;
}

.category-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.category-section h2 {
    color: #1f2937;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.category-books {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.category-book {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1rem;
    transition: border-color 0.2s ease;
}

.category-book:hover {
    border-color: #2563eb;
}

.category-book h4 {
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.category-book .author {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.category-book p {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.category-book .btn {
    font-size: 0.875rem;
    padding: 8px 16px;
}

/* Contact Page */
.contact-content {
    padding: 2rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.form-message {
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.form-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.contact-info {
    margin-bottom: 2rem;
}

.contact-info h3 {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.contact-info p {
    color: #6b7280;
    margin-bottom: 0;
}

.contact-info a {
    color: #2563eb;
}

/* Legal Content */
.legal-content {
    padding: 2rem 0;
}

.content-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.content-section:last-child {
    border-bottom: none;
}

.content-section h2 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.content-section h3 {
    color: #374151;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content-section ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

/* About Content */
.about-content {
    padding: 2rem 0;
}

/* Book Not Found */
.book-not-found {
    padding: 4rem 0;
    text-align: center;
}

.book-not-found h1 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.book-not-found p {
    color: #6b7280;
    margin-bottom: 2rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 0;
    color: #6b7280;
}

/* Footer */
.footer {
    background-color: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
}

.footer-section a:hover {
    color: white;
    text-decoration: underline;
}

.footer-section p {
    color: #d1d5db;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid #374151;
    margin-top: 2rem;
    padding-top: 1rem;
    text-align: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.footer-bottom p {
    color: #9ca3af;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 0;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .book-detail-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .book-image {
        text-align: center;
    }
    
    .book-image img {
        max-width: 300px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .filters-section {
        flex-direction: column;
        gap: 1rem;
    }
    
    .external-links {
        flex-direction: column;
    }
    
    .external-links .btn {
        flex: none;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 1rem 15px;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .book-card,
    .category-card,
    .category-section {
        padding: 1rem;
    }
    
    .filters-section {
        padding: 1rem;
    }
}