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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

[dir="rtl"] .nav-menu {
    margin-right: auto;
    margin-left: 0;
}

[dir="rtl"] .nav-toggle {
    margin-left: auto;
    margin-right: 0;
}

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

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

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;
    transition: color 0.3s ease;
}

a:hover {
    color: #1d4ed8;
}

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

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

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

.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
    color: #374151;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
}

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

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

.cookie-content p {
    margin: 0;
    flex: 1;
    min-width: 250px;
}

.cookie-banner.hidden {
    display: none;
}

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

.nav {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

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

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

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

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

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

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

.hero-image {
    margin-top: 3rem;
    text-align: center;
}

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

/* Sections */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: #1f2937;
}

.featured-books,
.categories-preview,
.books-directory,
.categories-section,
.about-content,
.contact-section,
.policy-content {
    padding: 4rem 0;
}

.section-footer {
    text-align: center;
    margin-top: 3rem;
}

/* Page Header */
.page-header {
    background-color: #f9fafb;
    padding: 3rem 0;
    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(280px, 1fr));
    gap: 2rem;
}

.book-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.book-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.book-content {
    padding: 1.5rem;
}

.book-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

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

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

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

.book-actions {
    display: flex;
    gap: 0.5rem;
}

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

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

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

.category-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.category-count {
    color: #6b7280;
    margin-bottom: 1rem;
}

/* Filters */
.filters-section {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

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

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

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

.results-header {
    margin-bottom: 1.5rem;
    color: #6b7280;
}

/* Book Details */
.book-hero {
    padding: 3rem 0;
    background-color: #f9fafb;
}

.book-hero-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
}

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

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

.book-info .book-category {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

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

.external-links {
    margin-top: 2rem;
}

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

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

.external-link {
    padding: 8px 16px;
    background-color: #2563eb;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.external-link:hover {
    background-color: #1d4ed8;
    color: white;
}

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

.disclaimer-note p {
    margin: 0;
    color: #92400e;
}

.book-content {
    padding: 3rem 0;
}

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

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

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

.content-section ul {
    padding-right: 1.5rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.sidebar {
    background-color: #f9fafb;
    padding: 2rem;
    border-radius: 12px;
    height: fit-content;
}

.related-books h3 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.related-book {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.related-book img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.related-book-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #1f2937;
}

.related-book-info p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* Categories Detailed */
.categories-detailed {
    display: grid;
    gap: 3rem;
}

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

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

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

.category-book {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: #f9fafb;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.category-book:hover {
    background-color: #f3f4f6;
}

.category-book img {
    width: 40px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.category-book-info h4 {
    font-size: 0.875rem;
    margin: 0;
    color: #1f2937;
}

.category-book-info p {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
}

/* Contact Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

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

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

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

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.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 select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

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

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

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

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

/* Policy Content */
.policy-content {
    max-width: 800px;
    margin: 0 auto;
}

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

.disclaimer-notice h2 {
    color: #92400e;
    margin-bottom: 0.5rem;
}

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

.final-notice {
    background-color: #dbeafe;
    border: 1px solid #3b82f6;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.final-notice p {
    color: #1e40af;
    margin: 0;
}

/* Error Messages */
.error-message {
    text-align: center;
    padding: 4rem 0;
}

.error-message h1 {
    color: #ef4444;
    margin-bottom: 1rem;
}

.error-message p {
    color: #6b7280;
    margin-bottom: 2rem;
}

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

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

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

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

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

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

.footer-links a {
    color: #d1d5db;
    transition: color 0.3s ease;
}

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

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

/* 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 0;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        gap: 0;
    }

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

    .nav-link {
        padding: 1rem 2rem;
        border-bottom: none;
    }

    .nav-toggle {
        display: flex;
    }

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

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

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

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

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

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

    .filters-section {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: auto;
    }

    .category-filter select {
        min-width: auto;
        width: 100%;
    }

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

    .cookie-content p {
        min-width: auto;
    }

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

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

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

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

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

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

    .book-content {
        padding: 1rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .featured-books,
    .categories-preview,
    .books-directory,
    .categories-section,
    .about-content,
    .contact-section,
    .policy-content {
        padding: 2rem 0;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .sidebar {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .cookie-banner,
    .nav-toggle {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .container {
        max-width: none;
        padding: 0;
    }

    .book-card,
    .category-card {
        break-inside: avoid;
    }
}

/* Focus Styles for Accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Smooth Transitions */
* {
    transition: all 0.3s ease;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.hidden { display: none; }
.visible { display: block; }

/* RTL Specific Adjustments */
[dir="rtl"] .footer-links {
    padding-right: 0;
}

[dir="rtl"] .content-section ul {
    padding-left: 1.5rem;
    padding-right: 0;
}

[dir="rtl"] .book-actions {
    justify-content: flex-start;
}

[dir="rtl"] .filters-section {
    direction: rtl;
}

[dir="rtl"] .nav-container {
    direction: rtl;
}

<!--