/* --- CKEDITOR CONTENT STYLES --- */

/* 1. Global Container Fixes */
.ck-content {
    line-height: 1.8 !important; /* Better readability */
    color: #374151 !important; /* Tailwind Gray-700 */
    font-size: 1.1rem !important;
}

/* 2. Headings (Fixes Size and Weight) */
.ck-content h1, .ck-content h2, .ck-content h3,
.ck-content h4, .ck-content h5, .ck-content h6 {
    color: #111827 !important; /* Tailwind Gray-900 */
    font-weight: 800 !important;
    line-height: 1.3 !important;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
    display: block !important;
}

.ck-content h1 { font-size: 2.25rem !important; }
.ck-content h2 { font-size: 1.875rem !important; }
.ck-content h3 { font-size: 1.5rem !important; }
.ck-content h4 { font-size: 1.25rem !important; }

/* 3. Links (Visible blue links) */
.ck-content a {
    color: #2563eb !important;
    text-decoration: underline !important;
    font-weight: 500 !important;
    transition: color 0.2s;
}
.ck-content a:hover {
    color: #1d4ed8 !important;
}

/* 4. Lists (Restores Bullets and Numbers) */
.ck-content ul {
    list-style-type: disc !important;
    padding-left: 2.5rem !important;
    margin: 1.25rem 0 !important;
}
.ck-content ol {
    list-style-type: decimal !important;
    padding-left: 2.5rem !important;
    margin: 1.25rem 0 !important;
}
.ck-content li {
    display: list-item !important;
    margin-bottom: 0.5rem !important;
}

/* 5. Images & Floats (Responsive) */
.ck-content img.left {
    float: left !important;
    margin-right: 1.5rem !important;
    margin-bottom: 1rem !important;
    max-width: 50% !important;
    height: auto !important;
    border: 1px solid #e5e7eb;
    padding: 4px;
}

.ck-content img.right {
    float: right !important;
    margin-left: 1.5rem !important;
    margin-bottom: 1rem !important;
    max-width: 50% !important;
    height: auto !important;
    border: 1px solid #e5e7eb;
    padding: 4px;
}

/* Mobile Fix: Stack floated images on small screens */
@media (max-width: 640px) {
    .ck-content img.left, .ck-content img.right {
        float: none !important;
        max-width: 100% !important;
        display: block !important;
        margin: 1.5rem auto !important;
    }
}

/* 6. Tables (Restores Borders) */
.ck-content table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 2rem 0 !important;
}
.ck-content table td, .ck-content table th {
    border: 1px solid #d1d5db !important;
    padding: 0.75rem !important;
    min-width: 50px;
}
.ck-content table th {
    background-color: #f9fafb !important;
    font-weight: bold;
}

/* 7. Blockquotes */
.ck-content blockquote {
    border-left: 5px solid #3b82f6 !important;
    padding: 1rem 1.5rem !important;
    background-color: #f8fafc !important;
    font-style: italic !important;
    margin: 2rem 0 !important;
    color: #4b5563 !important;
}

/* 8. Clearfix (Prevents layout collapse) */
.ck-content::after {
    content: "";
    display: table;
    clear: both;
}
