/* Blog-specific styles */

/* Blog detail page header - compact version */
body:has(.blog-post) header {
    padding: 20px;
}

body:has(.blog-post) header h1 {
    font-size: 1.3em;
    margin-bottom: 10px;
}

/* Recent blog posts on homepage */
.blog-post {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.blog-post:last-child {
    border-bottom: none;
}

.blog-post h3 {
    margin-bottom: 10px;
}

.blog-post h3 a {
    color: #FF6B35;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-post h3 a:hover {
    color: #F7931E;
}

.blog-date {
    color: #888;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.blog-post p {
    color: #555;
    line-height: 1.6;
}

/* All posts list */
.all-posts-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.post-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.post-list-item:last-child {
    border-bottom: none;
}

.post-list-item a {
    color: #333;
    text-decoration: none;
    flex: 1;
    transition: color 0.3s;
}

.post-list-item a:hover {
    color: #FF6B35;
}

.post-list-date {
    color: #999;
    font-size: 0.85em;
    white-space: nowrap;
    margin-left: 20px;
}

@media (max-width: 768px) {
    .post-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .post-list-date {
        margin-left: 0;
        font-size: 0.8em;
    }
}

/* Blog detail page */
.back-link {
    display: inline-block;
    margin-top: 20px;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    transition: all 0.3s;
}

.back-link:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.blog-article,
article.blog-post {
    background: white;
    margin: 30px 0;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.blog-article h1 {
    color: #FF6B35;
    margin-bottom: 10px;
    font-size: 2.2em;
}

.blog-meta {
    color: #888;
    font-size: 0.9em;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.blog-content {
    font-size: 1.1em;
    line-height: 1.8;
}

.blog-content h1 {
    color: #FF6B35;
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 2em;
}

.blog-content h2 {
    color: #F7931E;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.6em;
}

.blog-content h3 {
    color: #333;
    margin-top: 25px;
    margin-bottom: 12px;
    font-size: 1.3em;
}

.blog-content p {
    margin-bottom: 20px;
}

.blog-content ul, .blog-content ol {
    margin-bottom: 20px;
    margin-left: 30px;
}

.blog-content li {
    margin-bottom: 10px;
}

.blog-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.blog-content pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.blog-content blockquote {
    border-left: 4px solid #FF6B35;
    padding-left: 20px;
    margin: 20px 0;
    color: #666;
    font-style: italic;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .blog-article {
        padding: 25px;
    }

    .blog-article h1 {
        font-size: 1.8em;
    }

    .blog-content {
        font-size: 1em;
    }
}
