/* Custom CSS for Blog Post Detail */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --text-color: #333;
    --background-color: #f4f6f7;
    --max-content-width: 700px;
}

.blog-post-container {
    width: 80%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    background-color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.blog-post {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-header {
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eaeaea;
}

.post-title {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-image {
    width: 100%;
    max-height: 500px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.post-image img {
    max-width: 100%;
    max-height: 400px;  /* Limit image height */
    object-fit: contain;  /* Ensures entire image is visible */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.post-content {
    width: 80%;
    max-width: 1200px;

    margin: 0 auto;
    line-height: 1.8;  /* Increased line height for better readability */
    color: var(--text-color);
    font-size: 1.1rem;

    /* Improved text formatting */
    letter-spacing: 0.01em;
    word-spacing: 0.1em;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern";
}

/* Improve paragraph spacing and readability */
.post-content p {
    margin-bottom: 1.5em;
    hanging-punctuation: first last;
}

/* Enhance heading styles within content */
.post-content h2,
.post-content h3 {
    margin-top: 1.5em;
    margin-bottom: 1em;
    color: var(--primary-color);
    padding-bottom: 0.3em;
    border-bottom: 1px solid #eaeaea;
}

.post-content h2 {
    font-size: 1.8rem;
}

.post-content h3 {
    font-size: 1.5rem;
}

/* Improve blockquote styling */
.post-content blockquote {
    border-left: 4px solid var(--secondary-color);
    padding-left: 1em;
    font-style: italic;
    color: #666;
    margin: 1.5em 0;
}

/* Code block styling */
.post-content pre {
    background-color: #f4f4f4;
    border-radius: 4px;
    padding: 1em;
    overflow-x: auto;
    font-size: 0.9em;
    line-height: 1.6;
}

.post-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eaeaea;
}

/* Responsive design */
@media (max-width: 768px) {
    .blog-post-container {
        margin: 1rem;
        padding: 0 0.5rem;
    }

    .post-title {
        font-size: 2rem;
    }

    .post-meta {
        flex-direction: column;
        align-items: center;
    }

    .post-content {
        font-size: 1rem;
    }

    .post-image img {
        max-height: 250px;
    }
}

/* Accessibility and print improvements */
@media print {
    .post-content {
        max-width: 100%;
    }
}