* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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;
    border-bottom: 1px solid #e5e5e5;
    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;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1.25rem;
}

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

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

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

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

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

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 2px 0;
    transition: 0.3s;
}

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

.hero .container {
    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: #1e293b;
    line-height: 1.2;
}

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

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

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

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

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* Page Header */
.page-header {
    padding: 3rem 0;
    background: #f8fafc;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.25rem;
    color: #64748b;
}

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

.book-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.book-image {
    height: 200px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.book-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.book-category {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    width: fit-content;
    margin-bottom: 1rem;
}

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

.book-author {
    color: #64748b;
    margin-bottom: 1rem;
    font-weight: 500;
}

.book-description {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
}

/* Featured Books Section */
.featured-books {
    padding: 4rem 0;
}

.featured-books h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #1e293b;
}

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

.categories-preview h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #1e293b;
}

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

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.category-card p {
    color: #64748b;
}

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

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

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

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

.books-count {
    margin-bottom: 1rem;
    color: #64748b;
    font-weight: 500;
}

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

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

.book-detail-image {
    background: #f1f5f9;
    border-radius: 0.75rem;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
}

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

.book-detail-info h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1e293b;
    line-height: 1.2;
}

.book-detail-author {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 1rem;
    font-weight: 500;
}

.book-detail-category {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    width: fit-content;
    margin-bottom: 2rem;
}

.book-detail-description {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 2rem;
}

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

.book-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.book-link:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

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

.purchase-notice p {
    margin: 0;
    color: #92400e;
    font-weight: 500;
}

.book-details-section {
    margin-bottom: 3rem;
}

.book-details-section h2 {
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
}

.book-details-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 2rem;
    color: #1e293b;
}

.book-details-section p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 1rem;
}

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

.book-details-section li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #374151;
    font-size: 1.125rem;
    line-height: 1.6;
}

.book-details-section li:before {
    content: "•";
    color: #2563eb;
    font-weight: bold;
    position: absolute;
    left: 0;
}

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

.not-found-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1e293b;
}

.not-found-content p {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 2rem;
}

/* Categories Page */
.categories-content {
    padding: 3rem 0;
}

.category-section {
    margin-bottom: 4rem;
}

.category-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #2563eb;
}

.category-description {
    font-size: 1.125rem;
    color: #64748b;
    margin-bottom: 2rem;
}

/* Content Sections */
.content-section {
    margin-bottom: 2rem;
}

.content-section h2 {
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
}

.content-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
    color: #1e293b;
}

.content-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    color: #1e293b;
}

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

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

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

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

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

.feature-list li:before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
    position: absolute;
    left: 0;
}

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

/* Contact Page */
.contact-content {
    padding: 3rem 0;
}

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

.contact-info h2,
.contact-form h2 {
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
}

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

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

.contact-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

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

/* Forms */
.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: 1px solid #d1d5db;
    border-radius: 0.5rem;
    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;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

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

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

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

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

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

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    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 {
    margin-bottom: 1rem;
    color: white;
}

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

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

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

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

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

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

/* 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;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .book-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .book-detail-image {
        height: 300px;
    }
    
    .book-detail-info h1 {
        font-size: 2rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .book-links {
        flex-direction: column;
    }
    
    .book-link {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .featured-books h2,
    .categories-preview h2 {
        font-size: 2rem;
    }
    
    .book-detail-info h1 {
        font-size: 1.75rem;
    }
    
    .book-title {
        font-size: 1.125rem;
    }
}

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

[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"] .book-details-section li {
    padding-left: 0;
    padding-right: 1.5rem;
}

[dir="rtl"] .book-details-section li:before {
    left: auto;
    right: 0;
}

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

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