/* Bookerei Blog - Main CSS */
/* Library-inspired design with warm, book-themed colors */

/* Import Google Fonts - Roboto as specified */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,0,1;wght@300;400;500;700&display=swap');

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #ffffff;
    font-weight: 400;
    min-height: 100vh;
}

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

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1.2rem;
    color: #34495e;
}

a {
    color: #4d9de0;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Bookerei.com links styling */
.bookerei-link {
    color: #7768ae;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.bookerei-link:hover {
    color: #e15554;
    border-bottom-color: #7768ae;
    text-decoration: none;
}

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

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(77, 157, 224, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 15px rgba(44, 62, 80, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.6rem;
    font-weight: 600;
    color: #2c3e50;
    text-decoration: none;
}

.logo img {
    height: 35px;
    width: auto;
}

.logo:hover {
    color: #4d9de0;
    text-decoration: none;
}

/* Navigation */
.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    color: #34495e;
    font-weight: 500;
    padding: 0.6rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav a:hover {
    color: #ffffff;
    background-color: #4d9de0;
    text-decoration: none;
}

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #34495e;
}

/* Main Content */
.main {
    padding: 3rem 0;
    min-height: 70vh;
}

.section {
    margin-bottom: 3rem;
}

.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
    color: #2c3e50;
    font-weight: 600;
}

.page-subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 3rem;
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Content placeholder for empty pages */
.content-placeholder {
    text-align: center;
    padding: 3rem 2rem;
    background-color: #f8f9fa;
    border: 1px solid rgba(77, 157, 224, 0.2);
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.05);
}

.content-placeholder h3 {
    color: #4d9de0;
    margin-bottom: 1rem;
    font-weight: 600;
}

.content-placeholder p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Welcome section for homepage */
.welcome-section {
    background: linear-gradient(135deg, #4d9de0 0%, #3bb273 100%);
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(77, 157, 224, 0.2);
}

.welcome-section h1 {
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.welcome-section p {
    font-size: 1.2rem;
    color: #ffffff;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #e1bc29 0%, #e15554 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(225, 188, 41, 0.3);
}

.cta-button:hover {
    background: linear-gradient(135deg, #e15554 0%, #7768ae 100%);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225, 85, 84, 0.4);
}

/* Cards for content sections */
.card {
    background-color: #ffffff;
    border: 1px solid rgba(77, 157, 224, 0.15);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.05);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(77, 157, 224, 0.15);
    border-color: rgba(77, 157, 224, 0.3);
    background-color: #f8f9fa;
}

.card-title {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.card-meta {
    font-size: 0.9rem;
    color: #7768ae;
    margin-bottom: 1rem;
    font-style: italic;
}

.card-excerpt {
    color: #34495e;
    margin-bottom: 1.5rem;
}

.read-more {
    color: #3bb273;
    font-weight: 500;
    text-decoration: none;
}

.read-more:hover {
    color: #e15554;
}

/* Grid layouts */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
    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 h4 {
    color: #ecf0f1;
    margin-bottom: 1rem;
    font-weight: 600;
}

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

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

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

.footer-section a {
    color: #bdc3c7;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #4d9de0;
}

.footer-bottom {
    border-top: 1px solid rgba(236, 240, 241, 0.2);
    padding-top: 1rem;
    text-align: center;
    color: #ecf0f1;
}

.footer-bottom p {
    color: #ecf0f1;
    margin-bottom: 0.5rem;
}

.footer-bookerei {
    margin-top: 1rem !important;
    color: #ecf0f1 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }

    .nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #f8f9fa;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 4px 20px rgba(44, 62, 80, 0.15);
        padding: 1rem;
        border-top: 1px solid rgba(77, 157, 224, 0.2);
    }

    .nav ul.active {
        display: flex;
    }

    .welcome-section h1 {
        font-size: 2.2rem;
    }

    .welcome-section p {
        font-size: 1.1rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    .logo img {
        height: 30px;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

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

    .welcome-section {
        padding: 2.5rem 0;
        margin: 0 1rem 3rem;
    }

    .welcome-section h1 {
        font-size: 1.9rem;
    }

    .main {
        padding: 2rem 0;
    }

    .content-placeholder,
    .card {
        padding: 1.5rem;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus {
    outline: 2px solid #4d9de0;
    outline-offset: 2px;
}

/* 404 Page Styles */
.error-page-actions {
    margin-top: 2rem;
}

.error-page-actions .cta-button {
    margin-right: 1rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.error-page-info {
    margin-top: 2rem;
}

/* Book Analysis Page Styles */
.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 0 3rem;
    text-align: center;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: #6c757d;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.stat {
    text-align: center;
}

.stat strong {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.stat small {
    color: #6c757d;
    font-size: 0.9rem;
}

.books-section {
    padding: 4rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

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

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

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

.book-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.book-cover-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.book-cover-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 62, 80, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.book-card:hover .book-overlay {
    opacity: 1;
}

.read-analysis {
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: 2px solid white;
    border-radius: 25px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.book-info {
    padding: 1.5rem;
}

.book-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.book-author {
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0 0 1rem 0;
    font-style: italic;
}

.book-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.book-excerpt {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 1rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #6c757d;
}

.load-more-section {
    text-align: center;
    padding: 2rem 0;
}

.coming-soon-text {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 0;
}

/* Responsive design for book analysis page */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .books-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
}
