* {
    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: #ffffff;
}

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

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

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

.nav-brand {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1.2rem;
}

.nav-brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.logo {
    height: 40px;
    width: 40px;
    margin-right: 10px;
}

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

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: #007bff;
}

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

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

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

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

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

.btn-outline {
    background: transparent;
    color: #007bff;
    border: 2px solid #007bff;
}

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

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

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
}

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

/* Page Headers */
.page-header {
    background: #f8f9fa;
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

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

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

.book-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.book-image {
    text-align: center;
    margin-bottom: 20px;
}

.book-image img {
    width: 120px;
    height: 160px;
    object-fit: cover;
    border-radius: 5px;
}

.book-card h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #333;
}

.book-author {
    color: #666;
    margin-bottom: 10px;
    font-style: italic;
}

.book-category {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.book-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.book-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.book-links a {
    padding: 8px 16px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.book-links a:hover {
    background: #e9ecef;
}

/* Featured Books Section */
.featured-books {
    padding: 80px 0;
    background: white;
}

.featured-books h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #333;
}

.section-footer {
    text-align: center;
    margin-top: 50px;
}

/* Categories */
.categories-preview {
    padding: 80px 0;
    background: #f8f9fa;
}

.categories-preview h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #333;
}

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

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

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

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.category-card p {
    color: #666;
    margin-bottom: 20px;
}

.category-count {
    background: #007bff;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Directory Controls */
.directory-controls {
    display: flex;
    gap: 20px;
    margin: 40px 0;
    flex-wrap: wrap;
}

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

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

.search-box input:focus {
    outline: none;
    border-color: #007bff;
}

.filter-controls select {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    min-width: 200px;
}

.filter-controls select:focus {
    outline: none;
    border-color: #007bff;
}

/* Book Details */
.book-details {
    margin: 40px 0;
}

.book-detail-header {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.book-detail-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.book-detail-info h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #333;
}

.book-detail-author {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

.book-detail-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.book-detail-category {
    background: #007bff;
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
}

.book-detail-year {
    background: #f8f9fa;
    padding: 8px 16px;
    border-radius: 25px;
    color: #666;
}

.book-detail-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.book-detail-main h2 {
    font-size: 1.8rem;
    margin: 30px 0 15px 0;
    color: #333;
}

.book-detail-main p {
    margin-bottom: 20px;
    line-height: 1.7;
    color: #666;
}

.book-takeaways ul {
    list-style: none;
    padding-left: 0;
}

.book-takeaways li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 25px;
}

.book-takeaways li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #007bff;
    font-weight: bold;
}

.book-sidebar {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    height: fit-content;
}

.book-sidebar h3 {
    margin-bottom: 20px;
    color: #333;
}

.book-purchase-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.book-purchase-links a {
    display: block;
    padding: 12px 20px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    transition: background 0.3s;
}

.book-purchase-links a:hover {
    background: #0056b3;
}

.purchase-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    color: #856404;
}

/* Categories Page */
.categories-detailed {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.category-section {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.category-section h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #333;
}

.category-section p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

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

.category-book-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.category-book-item h4 {
    margin-bottom: 8px;
    color: #333;
}

.category-book-item p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.category-book-item a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.category-book-item a:hover {
    text-decoration: underline;
}

/* Content Sections */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin: 40px 0;
}

.content-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #333;
}

.content-section p {
    margin-bottom: 20px;
    line-height: 1.7;
    color: #666;
}

.content-section ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.content-section li {
    margin-bottom: 8px;
    color: #666;
}

/* Contact Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin: 40px 0;
}

.contact-info h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

.contact-details {
    margin-top: 40px;
}

.contact-item {
    margin-bottom: 30px;
}

.contact-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.contact-item p {
    color: #666;
    line-height: 1.6;
}

.contact-item a {
    color: #007bff;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-form {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-message {
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Legal Content */
.legal-content {
    padding: 40px 0;
}

.legal-document {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.legal-document h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px 0;
    color: #333;
}

.legal-document h3 {
    font-size: 1.4rem;
    margin: 30px 0 15px 0;
    color: #333;
}

.legal-document p {
    margin-bottom: 20px;
    color: #666;
}

.legal-document ul {
    margin-bottom: 20px;
    padding-left: 30px;
}

.legal-document li {
    margin-bottom: 10px;
    color: #666;
}

/* Breadcrumb */
.breadcrumb {
    margin: 20px 0;
    color: #666;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.book-not-found {
    text-align: center;
    padding: 60px 20px;
}

.book-not-found h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

.book-not-found p {
    margin-bottom: 30px;
    color: #666;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 60px 0 20px 0;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    color: white;
}

.footer-section p {
    color: #ccc;
    line-height: 1.6;
}

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

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

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

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

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 20px;
    text-align: center;
    color: #ccc;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #333;
    color: white;
    padding: 20px;
    z-index: 10000;
    transition: transform 0.3s;
}

.cookie-banner.hidden {
    transform: translateY(100%);
}

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

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .directory-controls {
        flex-direction: column;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .book-detail-header {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .book-detail-content {
        grid-template-columns: 1fr;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 20px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .featured-books h2,
    .categories-preview h2 {
        font-size: 2rem;
    }
    
    .book-card {
        padding: 20px;
    }
    
    .contact-form {
        padding: 20px;
    }
}