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

/* 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 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.logo {
    width: 40px;
    height: 40px;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c5aa0;
}

.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: #2c5aa0;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

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

.hero-content {
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: #2c5aa0;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

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

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

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

.btn-primary {
    background: #2c5aa0;
    color: white;
}

.btn-primary:hover {
    background: #1e3f73;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f8f9fa;
    color: #2c5aa0;
    border: 2px solid #2c5aa0;
}

.btn-secondary:hover {
    background: #2c5aa0;
    color: white;
}

/* Sections */
.featured-books,
.categories-preview {
    padding: 4rem 0;
}

.featured-books h2,
.categories-preview h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #2c5aa0;
    margin-bottom: 3rem;
}

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

.book-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
}

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

.book-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.book-info {
    padding: 1.5rem;
}

.book-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c5aa0;
    margin-bottom: 0.5rem;
}

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

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

.book-category {
    display: inline-block;
    background: #e3f2fd;
    color: #2c5aa0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

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

.category-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s;
}

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

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.category-count {
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Search and Filter */
.search-filter {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
}

.search-filter-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-input,
.filter-select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    flex: 1;
    min-width: 200px;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #2c5aa0;
}

/* Book Detail */
.book-detail {
    padding: 3rem 0;
}

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

.book-detail-image {
    width: 100%;
    border-radius: 12px;
}

.book-detail-info h1 {
    font-size: 2.5rem;
    color: #2c5aa0;
    margin-bottom: 0.5rem;
}

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

.book-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.meta-item {
    background: #f8f9fa;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
}

.book-description-full {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

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

.key-takeaways h3 {
    color: #2c5aa0;
    margin-bottom: 1rem;
}

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

.key-takeaways li {
    background: #f8f9fa;
    margin-bottom: 0.5rem;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #2c5aa0;
}

.who-its-for {
    background: #e3f2fd;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.who-its-for h3 {
    color: #2c5aa0;
    margin-bottom: 1rem;
}

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

.disclaimer-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1rem;
    margin: 2rem 0;
    color: #856404;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 3rem 0 1rem;
    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: #3498db;
    margin-bottom: 1rem;
}

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

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

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

.footer-section a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2c3e50;
    color: white;
    padding: 1rem;
    z-index: 10000;
    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: 1rem;
}

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

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c5aa0;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #2c5aa0;
}

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

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-3 {
    margin-bottom: 3rem;
}

.mt-3 {
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .books-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

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

    .search-filter-row {
        flex-direction: column;
    }

    .search-input,
    .filter-select {
        width: 100%;
        min-width: auto;
    }

    .external-links {
        flex-direction: column;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav {
        padding: 1rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .book-card {
        margin: 0 1rem;
    }

    .container {
        padding: 0 15px;
    }
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .nav {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero {
    flex-direction: row-reverse;
}

[dir="rtl"] .search-filter-row {
    flex-direction: row-reverse;
}

[dir="rtl"] .book-detail-content {
    grid-template-columns: 1fr 300px;
}

[dir="rtl"] .footer-content {
    text-align: right;
}