/**
 * CKEditor Content Styles
 * Default styling for content created in CKEditor
 */

/* Container for CKEditor content */
.ck-content,
.ckeditor-content {
    /* color: #1a202c; */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
}

/* Headings */
h1.ck-content,
h1.ckeditor-content,
.ck-content h1,
.ckeditor-content h1 {
    font-size: 2rem !important;
    font-weight: 700 !important;
    margin-top: 1.5rem !important;
    margin-bottom: 1rem !important;
    color: #0B207C !important;
}

h2.ck-content,
h2.ckeditor-content,
.ck-content h2,
.ckeditor-content h2 {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.75rem !important;
    color: #0B207C !important;
}

h3.ck-content,
h3.ckeditor-content,
.ck-content h3,
.ckeditor-content h3 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    margin-top: 1.25rem !important;
    margin-bottom: 0.75rem !important;
    color: #0B207C !important;
}

h4.ck-content,
h4.ckeditor-content,
.ck-content h4,
.ckeditor-content h4 {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    margin-top: 1.25rem !important;
    margin-bottom: 0.5rem !important;
    color: #0B207C !important;
}

h5.ck-content,
h5.ckeditor-content,
.ck-content h5,
.ckeditor-content h5 {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    margin-top: 1rem !important;
    margin-bottom: 0.5rem !important;
    color: #0B207C !important;
}

h6.ck-content,
h6.ckeditor-content,
.ck-content h6,
.ckeditor-content h6 {
    font-size: 1rem !important;
    font-weight: 600 !important;
    margin-top: 1rem !important;
    margin-bottom: 0.5rem !important;
    color: #0B207C !important;
}

/* Paragraphs */
p.ck-content,
p.ckeditor-content,
.ck-content p,
.ckeditor-content p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1rem !important;
}

/* Links */
.ck-content a,
.ckeditor-content a {
    color: #0000FF;
    text-decoration: none;
    border-bottom: 1px solid #bee3f8;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.ck-content a:hover,
.ckeditor-content a:hover {
    color: #2b6cb0;
    border-bottom-color: #90cdf4;
}

/* Lists */
.ck-content ul,
.ckeditor-content ul {
    list-style-type: disc;
    margin: 1rem 0;
    padding-left: 1rem;
}

.ck-content ol,
.ckeditor-content ol {
    list-style-type: decimal;
    margin: 1rem 0;
    padding-left: 1rem;
}

.ck-content li,
.ckeditor-content li {
    margin-bottom: 0.5rem;
}

.ck-content li > ul,
.ck-content li > ol,
.ckeditor-content li > ul,
.ckeditor-content li > ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Blockquotes */
.ck-content blockquote,
.ckeditor-content blockquote {
    border-left: 4px solid #90cdf4;
    padding-left: 1rem;
    margin-left: 0;
    margin-right: 0;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-style: italic;
    color: #4a5568;
}

/* Code blocks */
.ck-content pre,
.ckeditor-content pre {
    background-color: #f7fafc;
    border-radius: 0.375rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    border: 1px solid #e2e8f0;
}

.ck-content code,
.ckeditor-content code {
    background-color: #f7fafc;
    border-radius: 0.25rem;
    padding: 0.125rem 0.25rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875em;
    border: 1px solid #e2e8f0;
}

/* Tables */
.ck-content table,
.ckeditor-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.ck-content th,
.ckeditor-content th {
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
    font-weight: 600;
    text-align: left;
}

.ck-content td,
.ckeditor-content td {
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
}

.ck-content tr:nth-child(even),
.ckeditor-content tr:nth-child(even) {
    background-color: #f7fafc;
}

/* Images */
.ck-content img,
.ckeditor-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 0.375rem;
}

.ck-content figure,
.ckeditor-content figure {
    margin: 1.5rem 0;
    text-align: center;
}

.ck-content figcaption,
.ckeditor-content figcaption {
    font-size: 0.875rem;
    color: #4a5568;
    margin-top: 0.5rem;
}

/* Horizontal rule */
.ck-content hr,
.ckeditor-content hr {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 1.5rem 0;
}

/* Definition lists */
.ck-content dl,
.ckeditor-content dl {
    margin: 1rem 0;
}

.ck-content dt,
.ckeditor-content dt {
    font-weight: 600;
    margin-top: 0.5rem;
}

.ck-content dd,
.ckeditor-content dd {
    margin-left: 1rem;
    margin-bottom: 0.5rem;
}

/* Alignment classes */
.ck-content .text-center,
.ckeditor-content .text-center {
    text-align: center;
}

.ck-content .text-right,
.ckeditor-content .text-right {
    text-align: right;
}

.ck-content .text-justify,
.ckeditor-content .text-justify {
    text-align: justify;
}

/* Media embed */
.ck-content .media,
.ckeditor-content .media {
    margin: 1rem 0;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
}

.ck-content .media iframe,
.ckeditor-content .media iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
