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

.hidden {
    display: none !important;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

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

a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

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

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

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

.cookie-btn {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
}

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

/* Header */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    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;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    text-decoration: none;
}

.logo img {
    margin-right: 0.5rem;
}

.logo:hover {
    color: #2563eb;
    text-decoration: none;
}

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

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

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 24px;
    height: 3px;
    background-color: #4b5563;
    transition: all 0.3s ease;
}

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

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

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

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

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

.cta-btn:hover {
    background-color: #1d4ed8;
    text-decoration: none;
    color: white;
}

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

/* Books Grid */
.featured-books,
.books-directory,
.categories-page {
    padding: 4rem 0;
}

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

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

.book-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    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;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

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

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

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

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

.book-link {
    display: inline-block;
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
}

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

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

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

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

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

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

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

.category-link {
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
}

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

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    color: #4b5563;
}

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

.search-box {
    flex: 1;
}

.search-box input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: #2563eb;
}

.filter-box select {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
    min-width: 200px;
}

.filter-box select:focus {
    outline: none;
    border-color: #2563eb;
}

.books-count {
    margin-bottom: 1rem;
    color: #6b7280;
    font-size: 0.9rem;
}

/* Book Details */
.book-details {
    padding: 2rem 0;
}

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

.book-cover {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

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

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

.book-meta strong {
    color: #374151;
}

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

.purchase-btn {
    display: inline-block;
    background-color: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.purchase-btn:hover {
    background-color: #1d4ed8;
    color: white;
    text-decoration: none;
}

.purchase-btn.amazon {
    background-color: #ff9900;
}

.purchase-btn.amazon:hover {
    background-color: #e68900;
}

.purchase-btn.audible {
    background-color: #f56500;
}

.purchase-btn.audible:hover {
    background-color: #d4570a;
}

.purchase-btn.google {
    background-color: #4285f4;
}

.purchase-btn.google:hover {
    background-color: #3367d6;
}

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

.disclaimer-notice p {
    margin: 0;
    color: #92400e;
    font-size: 0.9rem;
}

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

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

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

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

.takeaways-list li {
    background-color: #f8fafc;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid #2563eb;
    border-radius: 4px;
}

/* Categories Page */
.category-section {
    margin-bottom: 3rem;
}

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

.category-description {
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Contact Form */
.contact-content {
    padding: 2rem 0;
}

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

.contact-info h2,
.contact-form h2 {
    margin-bottom: 1.5rem;
    color: #1f2937;
}

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

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

.contact-item h3 {
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

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

.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: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

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

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

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
}

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

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

/* Legal Content */
.legal-content {
    padding: 2rem 0;
}

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

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

.legal-content h3 {
    color: #374151;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* About Content */
.about-content {
    padding: 2rem 0;
}

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

.not-found-content h1 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.not-found-content p {
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background-color: #1f2937;
    color: #d1d5db;
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    color: #f9fafb;
    margin-bottom: 1rem;
}

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

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

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
}

.footer-section a:hover {
    color: #f9fafb;
    text-decoration: underline;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .book-header {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .book-content {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .directory-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-box select {
        min-width: auto;
    }
    
    .purchase-links {
        justify-content: center;
    }
    
    .cookie-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cookie-content p {
        margin-right: 0;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .book-card {
        padding: 1rem;
    }
    
    .category-card {
        padding: 1.5rem;
    }
    
    .purchase-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
}

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

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

[dir="rtl"] .logo img {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .hero .container {
    grid-template-columns: 1fr 1fr;
}

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

[dir="rtl"] .contact-grid {
    grid-template-columns: 1fr 1fr;
}

[dir="rtl"] ul,
[dir="rtl"] ol {
    padding-left: 0;
    padding-right: 1.5rem;
}

[dir="rtl"] .takeaways-list li {
    border-left: none;
    border-right: 4px solid #2563eb;
}

@media (max-width: 768px) {
    [dir="rtl"] .hero .container,
    [dir="rtl"] .book-header,
    [dir="rtl"] .contact-grid {
        grid-template-columns: 1fr;
    }
}