/* Blog Post Content Styles */

.post-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

/* ===== IMAGE HANDLING ===== */

/* Base responsive images - DO NOT force width:100% */
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* CKEditor figure wrapper */
.post-content figure.image {
    display: table;
    margin: 1rem auto;
    text-align: center;
}

.post-content figure.image img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ? CRITICAL: Resized figures - img takes 100% of figure's width */
.post-content figure.image_resized {
    max-width: 100%;
}

.post-content figure.image_resized img {
    width: 100%;
    height: auto;
}

/* Figure caption */
.post-content figcaption {
    display: table-caption;
    caption-side: bottom;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
    text-align: center;
}

/* Image alignment styles */
.post-content .image-style-side {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    max-width: 50%;
}

.post-content .image-style-align-left {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.post-content .image-style-align-right {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.post-content .image-style-block-align-left {
    margin-right: auto;
    margin-left: 0;
}

.post-content .image-style-block-align-right {
    margin-left: auto;
    margin-right: 0;
}

/* Clear floats */
.post-content::after {
    content: "";
    display: table;
    clear: both;
}

/* ===== OTHER CONTENT ===== */

.post-content table {
    border-collapse: collapse;
    margin: 1.5rem 0;
    width: 100%;
}

.post-content table td,
.post-content table th {
    border: 1px solid #dee2e6;
    padding: 0.75rem;
}

.post-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.post-content pre {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 1rem;
    overflow-x: auto;
}

.post-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
}

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

.post-content blockquote {
    border-left: 4px solid #1b6ec2;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6c757d;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-content a {
    color: #0077cc;
}

.post-content a:hover {
    color: #005999;
}

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

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

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

.blog-content figure.image {
    max-width: 100%;
}

.blog-content figure.image img {
    width: 100%;
    height: auto;
    display: block;
}