/* EditorJS Public Content Styling */
.editorjs-content {
    width: 100%;
    font-family: var(--font-body);
    color: #2c3e50;
    line-height: 1.8;
}

/* Enforce bold styling */
.editorjs-content b,
.editorjs-content strong {
    font-weight: 700 !important;
}

/* Text-based blocks get a readable max-width */
.editorjs-content .ce-paragraph,
.editorjs-content .ce-header,
.editorjs-content .ce-list,
.editorjs-content .ce-quote {
    /* Default fallback if no width tune is present (e.g. legacy content) */
    max-width: 1200px; 
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px;
}

/* Width Tunes */
/* Width Tunes - Increased Specificity */
.editorjs-content .ce-paragraph.ce-block--width-narrow,
.editorjs-content .ce-header.ce-block--width-narrow,
.editorjs-content .ce-list.ce-block--width-narrow,
.editorjs-content .ce-quote.ce-block--width-narrow,
.editorjs-content .ce-block--width-narrow {
    max-width: 800px !important;
}

.editorjs-content .ce-paragraph.ce-block--width-standard,
.editorjs-content .ce-header.ce-block--width-standard,
.editorjs-content .ce-list.ce-block--width-standard,
.editorjs-content .ce-quote.ce-block--width-standard,
.editorjs-content .ce-block--width-standard {
    max-width: 1200px !important;
}

.editorjs-content .ce-paragraph.ce-block--width-wide,
.editorjs-content .ce-header.ce-block--width-wide,
.editorjs-content .ce-list.ce-block--width-wide,
.editorjs-content .ce-quote.ce-block--width-wide,
.editorjs-content .ce-block--width-wide {
    max-width: 100% !important; 
    max-width: 1600px !important;
}

/* Headers */
.editorjs-content h1,
.editorjs-content h2,
.editorjs-content h3,
.editorjs-content h4,
.editorjs-content h5,
.editorjs-content h6 {
    font-family: var(--font-heading);
    color: #1a1a1a;
    margin-top: 2em;
    margin-bottom: 0.5em;
    font-weight: 700;
}

.ce-header {
    /* Base styles from EditorJS are minimal, we override them here */
}

/* Paragraphs */
.ce-paragraph {
    margin-bottom: 1.25em;
    font-size: 1.1rem;
}

/* Lists */
.ce-list {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.ce-list li {
    margin-bottom: 0.5em;
}

/* Images */
.ce-image {
    margin: 2em 0;
    text-align: center;
}

.ce-image img {
    max-width: 100%;
    width: auto;
    margin: 0 auto;
    display: block;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.ce-image figcaption {
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 0.8em;
    text-align: center;
    font-style: italic;
}

.ce-image--bordered img {
    border: 1px solid #e5e7eb;
    padding: 10px;
    background: #fff;
}

.ce-image--stretched {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
}

.ce-image--stretched img {
    width: 100%;
    height: auto;
    max-width: none;
    border-radius: 0;
    display: block;
}

.ce-image--background {
    background: #f3f4f6;
    padding: 2em;
    border-radius: 8px;
}

/* Custom Image Sizes (Public View) */
.ce-image--small img {
    max-width: 800px !important;
}

.ce-image--medium img {
    max-width: 1200px !important;
}

.ce-image--large img {
    max-width: 100% !important;
    max-width: 1600px !important;
    width: 100%;
}

/* Custom Image Sizes (Editor View) */
.image-size-wrapper[data-size="small"] img {
    max-width: 800px !important;
    margin: 0 auto;
}

.image-size-wrapper[data-size="medium"] img {
    max-width: 1200px !important;
    margin: 0 auto;
}

.image-size-wrapper[data-size="large"] img {
    max-width: 100% !important;
    max-width: 1600px !important;
    width: 100%;
    margin: 0 auto;
}

/* Quotes */
.ce-quote {
    text-align: center;
    margin: 2em 0;
    padding: 0 2em;
}

.ce-quote p {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
    color: #111827;
    margin-bottom: 0.5em;
}

.ce-quote cite {
    font-style: normal;
    font-size: 0.9rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Delimiter */
.ce-delimiter {
    line-height: 1.6em;
    width: 100%;
    text-align: center;
    font-size: 1.5rem;
    margin: 2em 0;
    color: #d1d5db;
    letter-spacing: 0.5em;
}

/* Code */
.ce-code {
    background: #1f2937;
    color: #e5e7eb;
    padding: 1.5em;
    border-radius: 8px;
    margin: 2em 0;
    overflow-x: auto;
    font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
}

/* Warning */
.ce-warning {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 1.5em;
    margin: 2em 0;
    border-radius: 0 8px 8px 0;
}

.ce-warning__title {
    font-weight: 700;
    margin-bottom: 0.5em;
    color: #92400e;
}

.ce-warning__message {
    color: #b45309;
}

/* Table */
.ce-table-wrapper {
    overflow-x: auto;
    margin: 2em 0;
}

.ce-table {
    width: 100%;
    border-collapse: collapse;
}

.ce-table th {
    background: #f9fafb;
    font-weight: 600;
    padding: 0.75em 1em;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
}

.ce-table td {
    padding: 0.75em 1em;
    border-bottom: 1px solid #e5e7eb;
}

/* Embeds (YouTube/Vimeo) */
.ce-embed {
    margin: 2em 0;
    text-align: center;
}

.ce-embed iframe {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.ce-embed__caption {
    margin-top: 0.8em;
    font-size: 0.9rem;
    color: #6b7280;
}
