/* Blog Styles for Little Legends */

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

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

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

/* Navigation */
.blog-nav {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.blog-nav .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-nav .nav-links {
    display: flex;
    gap: 2rem;
}

.blog-nav .nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.blog-nav .nav-links a:hover {
    color: var(--primary-color);
}

/* Blog Index */
.blog-index {
    padding: 4rem 0;
    min-height: 80vh;
}

.blog-header {
    text-align: center;
    margin-bottom: 4rem;
}

.blog-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.blog-header p {
    font-size: 1.25rem;
    color: var(--text-light);
}

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

.post-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.post-card h2 {
    margin-bottom: 0.5rem;
}

.post-card h2 a {
    color: var(--text-dark);
    text-decoration: none;
}

.post-card h2 a:hover {
    color: var(--primary-color);
}

.post-card-meta {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.post-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:hover {
    color: var(--primary-dark);
}

/* Blog Post */
.blog-post {
    padding: 2rem 0 4rem;
}

.post-header {
    padding: 4rem 0 2rem;
    background: var(--bg-light);
    margin-bottom: 3rem;
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-weight: 500;
}

.back-link:hover {
    color: var(--primary-dark);
}

.post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.post-meta time {
    font-weight: 500;
}

.post-meta .author {
    font-style: italic;
}

.tags {
    display: flex;
    gap: 0.5rem;
}

.tag {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Post Content */
.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.post-content h2 {
    font-size: 2rem;
    margin: 2rem 0 1rem;
    color: var(--text-dark);
}

.post-content h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: var(--text-dark);
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid var(--primary-color);
}

.post-content a:hover {
    color: var(--primary-dark);
}

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

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-light);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

.post-content code {
    background: var(--bg-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: var(--text-dark);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: white;
}

/* Footer */
.blog-footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

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

.footer-section p {
    color: #9ca3af;
}

.footer-section a {
    display: block;
    color: #9ca3af;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

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

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    margin-bottom: 0;
}

.social-links a:hover {
    background: var(--primary-color);
}

.copyright {
    text-align: center;
    color: #9ca3af;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .blog-nav .nav-links {
        gap: 1rem;
    }

    .blog-header h1 {
        font-size: 2rem;
    }

    .post-header h1 {
        font-size: 2rem;
    }

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