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

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

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

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

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

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

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

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

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

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #3498db;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #3498db;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #2c3e50;
}

/* Buttons */
.btn-primary {
    background: #3498db;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-secondary {
    background: transparent;
    color: #3498db;
    padding: 12px 24px;
    border: 2px solid #3498db;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #3498db;
    color: white;
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    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: 60px;
    align-items: center;
}

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

.hero-content p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

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

/* Page Header */
.page-header {
    padding: 60px 0;
    background: #f8f9fa;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.1rem;
    color: #666;
}

/* Featured Books */
.featured-books {
    padding: 80px 0;
}

.featured-books h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 50px;
}

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

.book-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

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

.book-image {
    text-align: center;
    margin-bottom: 20px;
}

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

.book-card h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
}

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

.book-category {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.book-description {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

.book-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.book-link {
    padding: 8px 16px;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.book-link:hover {
    background: #3498db;
    color: white;
}

/* Categories Preview */
.categories-preview {
    padding: 80px 0;
    background: #f8f9fa;
}

.categories-preview h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 50px;
}

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

.category-card {
    background: white;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.category-card h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.category-card p {
    color: #666;
    font-size: 0.95rem;
}

/* Books Directory */
.books-directory {
    padding: 40px 0 80px;
}

.filters {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

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

.search-box input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #3498db;
}

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

.category-filter select:focus {
    outline: none;
    border-color: #3498db;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

/* Book Details */
.book-details {
    padding: 40px 0;
}

.book-detail-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.book-detail-header {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.book-detail-image img {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.book-detail-info h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.2;
}

.book-detail-author {
    font-size: 1.2rem;
    color: #666;
    font-style: italic;
    margin-bottom: 15px;
}

.book-detail-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.book-detail-category {
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 500;
}

.book-detail-year {
    background: #f3e5f5;
    color: #7b1fa2;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 500;
}

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

.book-detail-links {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.book-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.content-section h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

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

.content-section li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: #555;
    line-height: 1.6;
}

.content-section li::before {
    content: '•';
    color: #3498db;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.third-party-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    color: #856404;
}

.third-party-notice h3 {
    color: #856404;
    margin-bottom: 10px;
}

/* Categories Detailed */
.categories-detailed {
    display: grid;
    gap: 40px;
}

.category-detail {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.category-detail h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.category-detail-description {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.category-books {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.category-book-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.category-book-card:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.category-book-card h4 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.category-book-card .author {
    color: #666;
    font-style: italic;
    font-size: 0.9rem;
}

/* Contact Page */
.contact-section {
    padding: 40px 0 80px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h2,
.contact-form h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.contact-details {
    margin-top: 30px;
}

.contact-item {
    margin-bottom: 25px;
}

.contact-item h3 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

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

.contact-item a {
    color: #3498db;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-form {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 12px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

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

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

.form-message {
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Legal Content */
.legal-content {
    padding: 40px 0 80px;
}

.legal-content .content-section {
    margin-bottom: 40px;
}

.legal-content h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.legal-content h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-top: 25px;
    margin-bottom: 15px;
}

.legal-content p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 15px;
}

.legal-content ul {
    margin: 15px 0;
    padding-left: 30px;
}

.legal-content li {
    color: #555;
    line-height: 1.6;
    margin-bottom: 8px;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 50px 0 20px;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    color: white;
}

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

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

.footer-section ul li {
    margin-bottom: 8px;
}

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

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

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

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

.error-message {
    text-align: center;
    padding: 60px 20px;
}

.error-message h1 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 20px;
}

.error-message p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .book-detail-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }
    
    .book-detail-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .contact-form {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 50px 0;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .featured-books h2,
    .categories-preview h2 {
        font-size: 2rem;
    }
    
    .book-card {
        padding: 20px;
    }
    
    .category-card {
        padding: 20px 15px;
    }
    
    .book-detail-info h1 {
        font-size: 2rem;
    }
    
    .book-detail-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .book-detail-links {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}