/* =========================================================
   CKEditor 5 Output Styles
   (for .ckeditor-contents wrapper)
   ========================================================= */
.ckeditor-contents {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #222;
    word-break: keep-all;
}

/* ---- 기본 여백 ---- */
.ckeditor-contents p {
    margin: 0 0 .5em;
}

.ckeditor-contents h1,
.ckeditor-contents h2,
.ckeditor-contents h3,
.ckeditor-contents h4,
.ckeditor-contents h5,
.ckeditor-contents h6 {
    font-weight: 600;
    line-height: 1.4;
    margin: 2em 0 1em;
}

.ckeditor-contents h1 {
    font-size: 2rem;
}

.ckeditor-contents h2 {
    font-size: 1.6rem;
}

.ckeditor-contents h3 {
    font-size: 1.3rem;
}

.ckeditor-contents h4 {
    font-size: 1.1rem;
}

/* ---- 링크 ---- */
.ckeditor-contents a {
    color: #007aff;
    text-decoration: underline;
}

.ckeditor-contents a:hover {
    color: #0056b3;
    text-decoration: none;
}

/* ---- 리스트 ---- */
.ckeditor-contents ul,
.ckeditor-contents ol {
    margin: 0 0 1.2em 2em;
}

.ckeditor-contents li {
    margin-bottom: 0.4em;
}

/* ---- 인용구 ---- */
.ckeditor-contents blockquote {
    border-left: 4px solid #ddd;
    padding-left: 1em;
    color: #555;
    font-style: italic;
    margin: 1.5em 0;
}

/* ---- 테이블 ---- */
.ckeditor-contents table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95em;
}

.ckeditor-contents th,
.ckeditor-contents td {
    border: 1px solid #ccc;
    padding: 0.6em 0.8em;
}

.ckeditor-contents th {
    background: #f8f8f8;
    font-weight: 600;
}

/* ---- 이미지 ---- */
.ckeditor-contents img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* ---- 이미지 정렬 ---- */
.ckeditor-contents .image {
    display: block;
    margin: 1.5em auto;
    clear: both;
}

.ckeditor-contents .image-style-align-left {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
}

.ckeditor-contents .image-style-align-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    clear: both;
}

.ckeditor-contents .image-style-align-right {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
}

/* ---- 비디오, iframe ---- */
.ckeditor-contents iframe,
.ckeditor-contents video {
    max-width: 100%;
    display: block;
    margin: 1.5em auto;
}

/* ---- 수평선 ---- */
.ckeditor-contents hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 2em 0;
}

/* ---- clearfix ---- */
.ckeditor-contents::after {
    content: "";
    display: block;
    clear: both;
}

/* CKEditor의 font size 클래스는 inline 스타일을 대체하므로
   rem 단위를 사용해 반응형으로 지정 */
.ckeditor-contents .text-tiny {
    font-size: 0.75rem;
    /* 약 12px */
    line-height: 1.6;
}

.ckeditor-contents .text-small {
    font-size: 0.875rem;
    /* 약 14px */
    line-height: 1.7;
}

.ckeditor-contents .text-normal {
    font-size: 1rem;
    /* 16px 기준 */
    line-height: 1.75;
}

.ckeditor-contents .text-big {
    font-size: 1.25rem;
    /* 약 20px */
    line-height: 1.7;
}

.ckeditor-contents .text-huge {
    font-size: 1.5rem;
    /* 약 24px */
    line-height: 1.6;
}

/* === 보조: Heading 대비 균형 유지 === */
.ckeditor-contents h1 .text-big {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.ckeditor-contents h2 .text-big {
    font-size: clamp(1.6rem, 2.5vw, 2rem);
}

/* === 반응형 보정 === */
@media (max-width: 768px) {
    .ckeditor-contents .text-huge {
        font-size: 1.25rem;
        /* 모바일에서는 살짝 축소 */
    }

    .ckeditor-contents .text-big {
        font-size: 1.125rem;
    }
}




/* =========================================================
   Admin: CKEditor 5 - Clean Design Editor Styles
   파일: static/admin/ckeditor_custom.css
   목적: 관리자에서 CKEditor 폭/타이포/정렬/테이블/이미지 등 일관된 UI
   ========================================================= */

/* ===== 레이아웃: 폭 1000px 고정 + 중앙 정렬 ===== */
.ck.ck-editor,
.ck.ck-editor__main,
.ck.ck-editor__editable_inline {
    max-width: 900px !important;
    margin: auto auto auto 0px !important;
    word-break: keep-all;
}

/* 에디터 최소 높이 */
.ck.ck-editor__editable_inline {
    min-height: 360px;
}

.ck.ck-editor p {
    margin: 0 0 .5em;
}