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

.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;
    gap: 10px;
}

.logo, .footer-logo {
    width: 40px;
    height: 40px;
}

.brand-name, .footer-brand-name {
    font-weight: 700;
    font-size: 1.25rem;
    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;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

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

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #333;
    color: white;
    padding: 1rem;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.cookie-banner.show {
    transform: translateY(0);
}

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

.cookie-btn {
    background: #2c5aa0;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

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

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

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

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

.cta-button {
    display: inline-block;
    background: #2c5aa0;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.cta-button:hover {
    background: #1e3a6f;
}

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

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

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

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

.book-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e9ecef;
}

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

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

.book-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #2c5aa0;
}

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

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

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

.book-link {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 600;
}

.book-link:hover {
    text-decoration: underline;
}

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

.view-all-link {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.view-all-link:hover {
    text-decoration: underline;
}

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

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
    border: 1px solid #e9ecef;
}

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

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c5aa0;
}

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

.category-card a {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 600;
}

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

/* Book Directory */
.book-directory {
    padding: 2rem 0;
}

.directory-header {
    margin-bottom: 2rem;
}

.directory-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c5aa0;
}

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

.search-input, .category-select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    min-width: 200px;
}

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

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

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

.book-detail-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

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

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

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

.book-detail-category, .book-detail-year {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

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

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

.key-takeaways h3, .who-its-for h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c5aa0;
}

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

.takeaways-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.takeaways-list li:before {
    content: "•";
    color: #2c5aa0;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.external-links {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.external-links h3 {
    margin-bottom: 1rem;
    color: #2c5aa0;
}

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

.external-link {
    display: inline-block;
    background: #2c5aa0;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s;
}

.external-link:hover {
    background: #1e3a6f;
}

.disclaimer-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 1rem;
    border-radius: 6px;
    color: #856404;
    font-style: italic;
}

/* Footer */
.footer {
    background: #2c5aa0;
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.footer-brand-name {
    color: white;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.contact-info p {
    margin-bottom: 0.5rem;
    color: rgba(255,255,255,0.8);
}

.contact-info a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.contact-info a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.8);
}

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

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

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

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

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

.btn-submit {
    background: #2c5aa0;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: #1e3a6f;
}

/* Content Pages */
.content-page {
    padding: 2rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.content-page h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2c5aa0;
}

.content-page h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
    color: #2c5aa0;
}

.content-page h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    color: #2c5aa0;
}

.content-page p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: #555;
}

.content-page ul, .content-page ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.content-page li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

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

    .hero-content p {
        font-size: 1.1rem;
    }

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

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

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

    .book-detail-image {
        max-width: 300px;
        margin: 0 auto;
        height: 400px;
    }

    .filters {
        flex-direction: column;
    }

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

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

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

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

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .nav {
        padding: 1rem 15px;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero-content {
        padding: 0 15px;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .featured, .categories-preview {
        padding: 2rem 0;
    }

    .featured h2, .categories-preview h2 {
        font-size: 2rem;
    }

    .book-card {
        padding: 1rem;
    }

    .category-card {
        padding: 1.5rem;
    }
}

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

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

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

[dir="rtl"] .takeaways-list li {
    padding-left: 0;
    padding-right: 1.5rem;
}

[dir="rtl"] .takeaways-list li:before {
    left: auto;
    right: 0;
}

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