/* ===========================
   TYPOGRAPHY POST CONTENT
=========================== */

.editor-content {
    font-size: 16px;
    line-height: 1.8;
    color: #2d2d2d;
}

/* Paragraph */
.editor-content p {
    margin-bottom: 1rem;
}

/* Heading */
.editor-content h1,
.editor-content h2,
.editor-content h3,
.editor-content h4 {
    font-weight: 700;
    margin: 2rem 0 1rem;
    line-height: 1.4;
}

.editor-content h1 { font-size: 2rem; }
.editor-content h2 { font-size: 1.6rem; }
.editor-content h3 { font-size: 1.3rem; }
.editor-content h4 { font-size: 1.1rem; }

/* List */
.editor-content ul,
.editor-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.2rem;
}

.editor-content li {
    margin-bottom: .5rem;
}

/* Images */
.editor-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1.5rem 0;
}

/* Image caption (EditorJS) */
.editor-content .image-tool__caption,
.editor-content figcaption {
    text-align: center;
    font-size: .85rem;
    color: #666;
    margin-top: .5rem;
}

/* Embed (YouTube, iframe) */
.editor-content iframe {
    width: 100%;
    min-height: 400px;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* Link */
.editor-content a {
    color: #0056b3;
    text-decoration: underline;
}

.editor-content a:hover {
    color: #003f88;
}

/* Quote */
.editor-content blockquote {
    border-left: 4px solid #007bff;
    padding-left: 1rem;
    color: #555;
    font-style: italic;
    margin: 1.5rem 0;
}

/* Divider */
.editor-content hr {
    margin: 2rem 0;
    border-top: 1px solid #e0e0e0;
}

/* ===========================
   TABLE (EditorJS)
=========================== */

.editor-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 15px;
}

/* Header & cell */
.editor-content th,
.editor-content td {
    border: 1px solid #dee2e6;
    padding: 10px 12px;
    vertical-align: top;
}

/* Header */
.editor-content th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-align: left;
}

/* Zebra striping */
.editor-content tbody tr:nth-child(even) {
    background-color: #fafafa;
}

/* Hover */
.editor-content tbody tr:hover {
    background-color: #f1f3f5;
}

/* Responsive table */
.editor-content .table-wrapper {
    overflow-x: auto;
    width: 100%;
}

/* ===========================
   EDITORJS LINK TOOL
=========================== */

.editorjs-link {
    margin: 1.5rem 0;
}

.editorjs-link a {
    text-decoration: none;
    color: inherit;
}

.editorjs-link-card {
    display: flex;
    gap: 15px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    transition: all .2s ease;
}

.editorjs-link-card:hover {
    background: #f9fafb;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

/* Thumbnail */
.editorjs-link-card img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Content */
.editorjs-link-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.editorjs-link-content strong {
    font-size: 16px;
    line-height: 1.3;
    margin-bottom: 4px;
    color: #111827;
}

.editorjs-link-content p {
    font-size: 14px;
    line-height: 1.4;
    color: black;
    margin-bottom: 6px;
}

.editorjs-link-content small {
    font-size: 12px;
    color: #9ca3af;
}

/* Mobile */
@media (max-width: 576px) {
    .editorjs-link-card {
        flex-direction: column;
    }

    .editorjs-link-card img {
        width: 100%;
        height: 160px;
    }
}

.editorjs-columns {
  margin-bottom: 1rem;
}

.editorjs-column figure img {
  max-width: 100%;
  height: auto;
}

.editorjs-column img {
  max-width: 100%;
  height: auto;
}

/* Content images keep their natural size; only the featured image fills the page. */
.single .single-content .editor-content img {
    width: auto;
    max-width: 100%;
    height: auto;
}

.editor-content { min-width: 0; overflow-wrap: anywhere; }
.editor-content::after { content: ""; display: block; clear: both; }
.editor-content .editorjs-image { clear: both; margin: 1.5rem 0; }
.editor-content .editorjs-image img { display: inline-block; vertical-align: top; margin: 0; }
.editor-content .editorjs-image--border img { border: 1px solid #cbd5e1; }
.editor-content .editorjs-image--background { padding: 20px; background: #f1f5f9; }
.single .single-content .editor-content .editorjs-image--stretched img { width: 100%; }
.editor-content .editorjs-image figcaption { margin-top: .5rem; }
.editor-content .editorjs-link-card img { width: 120px; height: 80px; margin: 0; object-fit: cover; }
.editor-content .editorjs-link-content { min-width: 0; }
.editor-content .table-responsive { max-width: 100%; overflow-x: auto; }
.editor-content pre { padding: 16px; white-space: pre-wrap; background: #f1f5f9; border-radius: 6px; }
.editor-content pre.ql-syntax { background: #23241f; color: #f8f8f2; }
.editor-content.editor-content-legacy p { margin-bottom: 1rem; }
.editor-content.editor-content-legacy blockquote { margin: 1.5rem 0; padding: .5rem 1rem; }
.editor-content.editor-content-legacy pre { padding: 12px 16px; }
.editor-content.editor-content-legacy h1,
.editor-content.editor-content-legacy h2,
.editor-content.editor-content-legacy h3,
.editor-content.editor-content-legacy h4 { margin: 1.5rem 0 .75rem; }
.editor-content code { font-family: Consolas, monospace; }
.editor-content .ql-align-center { text-align: center; }
.editor-content .ql-align-right { text-align: right; }
.editor-content .ql-align-justify { text-align: justify; }
.editor-content .ql-video { display: block; max-width: 100%; aspect-ratio: 16 / 9; min-height: 0; height: auto; }
.editor-content .ql-video.ql-align-center { margin-left: auto; margin-right: auto; }
.editor-content .ql-video.ql-align-right { margin-left: auto; }
.editor-content .editorjs-embed iframe { min-height: 0; max-width: 100%; aspect-ratio: 16 / 9; height: auto; }
@media (max-width: 576px) {
    .single .single-content .editor-content .editorjs-link-card img { width: 100%; height: 160px; }
}
