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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.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;
    color: #1a1a1a;
}

h2 {
    font-size: 2rem;
    color: #1a1a1a;
}

h3 {
    font-size: 1.5rem;
    color: #2a2a2a;
}

p {
    margin-bottom: 1rem;
    color: #555;
}

a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1d4ed8;
}

/* Buttons */
.btn-primary {
    background-color: #2563eb;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: #2563eb;
    padding: 12px 24px;
    border: 2px solid #2563eb;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

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

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

.text-center {
    text-align: center;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    color: white;
    padding: 20px;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

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

.cookie-content p {
    margin: 0;
    color: white;
}

/* Header */
.header {
    background-color: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

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

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #555;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    color: white;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255,255,255,0.9);
}

/* Page Header */
.page-header {
    background-color: #f8fafc;
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

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

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

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

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

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

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

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

.book-category {
    display: inline-block;
    background-color: #e0e7ff;
    color: #3730a3;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.book-description {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

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

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

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

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

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

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

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

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

.category-count {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Directory Controls */
.directory-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

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

.filter-controls select {
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    background-color: white;
}

/* Book Details */
.book-details {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin: 2rem 0;
}

.book-details-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.book-info h1 {
    margin-bottom: 0.5rem;
}

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

.book-meta p {
    margin-bottom: 0.5rem;
}

.book-links {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.external-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s ease;
}

.external-link:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

.key-takeaways ul {
    list-style-type: disc;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

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

.disclaimer-notice {
    background-color: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    padding: 1rem;
    margin: 2rem 0;
}

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

/* Breadcrumb */
.breadcrumb {
    margin: 2rem 0 1rem 0;
    color: #6b7280;
}

.breadcrumb a {
    color: #2563eb;
}

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

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

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

/* Content Section */
.content-section {
    padding: 3rem 0;
}

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

.content-wrapper h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-wrapper ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content-wrapper li {
    margin-bottom: 0.5rem;
}

/* Categories Page */
.categories-page {
    padding: 3rem 0;
}

.category-section {
    margin-bottom: 3rem;
}

.category-section h2 {
    color: #2563eb;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e7ff;
}

/* Contact Section */
.contact-section {
    padding: 3rem 0;
}

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

.contact-info h2 {
    margin-bottom: 1rem;
}

.contact-details {
    margin-top: 2rem;
}

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

.contact-item h3 {
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.contact-item p {
    margin: 0;
}

/* Contact Form */
.contact-form h2 {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

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

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

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

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

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

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

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

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

.footer-section ul li a {
    color: #d1d5db;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .book-details {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .directory-controls {
        flex-direction: column;
    }
    
    .book-links {
        flex-direction: column;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .book-card {
        padding: 1rem;
    }
    
    .category-card {
        padding: 1.5rem;
    }
    
    .hero {
        padding: 1.5rem 0;
    }
    
    .page-header {
        padding: 2rem 0;
    }
    
    .featured-books,
    .categories-preview {
        padding: 2rem 0;
    }
}